/* ── KartenDex — angelehnt an Pokémon Champions ─────────────────────────────
   Ein Farbsystem, drei Rollen:
   · Indigo-Flächen in festen Stufen (Seite → Feld → Platte)
   · Weiß für Text und die Ränder der "Platten" (Champions-Look)
   · Lime ausschließlich für Ausgewähltes/Aktives; Gelb nur für den Tastatur-
     Pfeil, Rot nur für Fehler. Keine weiteren Akzentfarben. */

:root {
  /* Flächen, dunkel → hell */
  --seite: #0b0922;
  --seite-2: #120e33;
  --feld: #1b1550;
  --feld-2: #251d6b;
  --platte: #4733d1;
  --platte-hell: #5f49ee;
  --platte-tief: #3523a8;
  /* Linien & Text */
  --linie: rgba(255, 255, 255, .10);
  --linie-2: rgba(255, 255, 255, .20);
  --rand: #fff;
  --text: #f5f3ff;
  --text-2: #b3acec;
  --text-3: #7d75bd;
  /* Akzente */
  --lime: #d9f43c;
  --lime-2: #a6e22e;
  --auf-lime: #17113f;
  --gelb: #ffd93b;
  --rot: #ff5c7a;
  /* Maße */
  --h: 40px;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --schatten: 0 8px 24px rgba(4, 2, 20, .45);
  --kachel: 136px;
  /* echte Karten: 3 mm Eckradius auf 63 × 88 mm */
  --karten-radius: 4.8% / 3.45%;
  --ui: 'Barlow', system-ui, sans-serif;
  --anzeige: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* Oberfläche, kein Dokument: Textauswahl nur in Eingabefeldern */
body { -webkit-user-select: none; user-select: none; }
input { -webkit-user-select: text; user-select: text; }
body {
  background: var(--seite);
  color: var(--text);
  font-family: var(--ui);
  font-weight: 500;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* ── Bühne: Lichtkegel von oben, Punkteboden unten ────────────────────────── */
.buehne {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(95, 73, 238, .55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 115%, rgba(71, 51, 209, .45), transparent 70%),
    linear-gradient(180deg, var(--seite-2), var(--seite));
}
.buehne::before {           /* zwei weiche Lichtbahnen */
  content: ''; position: absolute; inset: -10%;
  background:
    linear-gradient(112deg, transparent 44%, rgba(255, 255, 255, .045) 47%, transparent 50%),
    linear-gradient(68deg, transparent 58%, rgba(255, 255, 255, .035) 60.5%, transparent 63%);
}
.buehne::after {            /* Punkteboden der Arena, ruhig und einfarbig */
  content: ''; position: absolute; left: -40%; right: -40%; bottom: -10%; height: 55%;
  background: radial-gradient(circle, rgba(140, 120, 255, .38) 0 3.5px, transparent 4.5px) 0 0 / 40px 40px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 80%);
          mask-image: linear-gradient(to top, #000, transparent 80%);
  animation: boden 8s linear infinite;
}
@keyframes boden { to { background-position: 0 40px; } }
@media (prefers-reduced-motion: reduce) { .buehne::after { animation: none; } }

/* ── Bausteine ────────────────────────────────────────────────────────────── */
/* Platte: der Champions-Kasten — Indigo mit weißem Rand. Sparsam einsetzen. */
.platte {
  background: linear-gradient(180deg, var(--platte-hell), var(--platte) 55%, var(--platte-tief));
  border: 2px solid var(--rand);
  box-shadow: var(--schatten), inset 0 1px 0 rgba(255, 255, 255, .25);
}
/* Feld: ruhiges Bedienelement */
.feld {
  height: var(--h); border-radius: 999px;
  background: var(--feld); border: 1px solid var(--linie-2);
  transition: background .15s, border-color .15s;
}
.feld:hover { border-color: rgba(255, 255, 255, .38); }

.taste {                     /* Controller-Taste */
  display: inline-grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text); color: var(--auf-lime);
  font-family: var(--anzeige); font-weight: 800; font-size: 12px; line-height: 1;
}
.taste.eckig { border-radius: 5px; }
.zahl { font-family: var(--anzeige); font-weight: 800; font-style: italic; letter-spacing: .01em; }
.chevron {
  width: 0; height: 0;
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  border-left: 16px solid var(--gelb);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4));
}
.lime-flaeche { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--auf-lime); }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 18px; border-radius: 999px;
  background: var(--feld); border: 1px solid var(--linie-2);
  font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.knopf:hover { background: var(--feld-2); border-color: rgba(255, 255, 255, .38); }
.knopf:active { transform: scale(.98); }
.knopf.lime { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--auf-lime); border: 2px solid var(--rand); font-weight: 700; }
.knopf.lime:hover { filter: brightness(1.05); }
.knopf[aria-expanded="true"] { background: var(--text); color: var(--auf-lime); border-color: var(--text); }

.balken { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.balken i {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--lime-2), var(--lime));
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

/* ── Kopf ─────────────────────────────────────────────────────────────────── */
.oben {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 9, 34, .82);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--linie);
}
.kopf {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px;
  padding: 14px 28px 12px;
}
.marke { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.marke .ball { width: 30px; height: 30px; flex: none; }
.marke b {
  font-family: var(--anzeige); font-style: italic; font-weight: 800; font-size: 25px; line-height: 1.15; letter-spacing: .02em;
  /* kursive Kanten ragen aus der Box — ohne Polster schneidet background-clip sie ab */
  padding: 0 .3em; margin: 0 -.3em;
  color: var(--text);
}
.marke b span { color: var(--lime); }

.tabs { display: flex; align-items: center; gap: 10px; }
.reiter {
  display: flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: var(--feld); border: 1px solid var(--linie-2);
}
.reiter button {
  border: 0; background: transparent; height: 36px; padding: 0 24px; border-radius: 999px;
  font-weight: 700; font-size: 15px; color: var(--text-2); white-space: nowrap;
  transition: background .15s, color .15s;
}
.reiter button:hover { color: var(--text); }
.reiter button[aria-selected="true"] { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--auf-lime); }
.tabs .taste { background: transparent; color: var(--text-3); border: 1.5px solid var(--text-3); width: 24px; height: 24px; font-size: 13px; }

.fortschritt {
  justify-self: end;
  display: grid; grid-template-columns: auto 170px; column-gap: 16px; align-items: center;
  padding: 7px 18px 8px; border-radius: var(--r-m);
}
#f-zahl { grid-row: 1 / 3; font-size: 30px; line-height: 1; }
#f-zahl small { font-size: 16px; color: rgba(255, 255, 255, .7); margin-left: 2px; }
#f-prozent { justify-self: end; font-size: 15px; line-height: 1; margin-bottom: 6px; }
.fortschritt .balken { grid-column: 2; }

/* ── Werkzeugleiste ───────────────────────────────────────────────────────── */
.leiste {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 0 28px 14px;
}
.suche { display: flex; align-items: center; gap: 10px; padding: 0 16px; flex: 0 1 300px; min-width: 220px; }
.suche:focus-within { border-color: var(--lime); }
.suche input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-weight: 600; }
.suche input::placeholder { color: var(--text-3); }
.suche svg { flex: none; color: var(--text-2); }

.segment { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--feld); border: 1px solid var(--linie-2); }
.segment button {
  border: 0; background: transparent; height: 32px; padding: 0 16px; border-radius: 999px;
  font-weight: 600; color: var(--text-2); transition: background .15s, color .15s;
}
.segment button:hover { color: var(--text); }
.segment button[aria-pressed="true"] { background: var(--text); color: var(--auf-lime); }

.groesse { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--feld); border: 1px solid var(--linie-2); }
.groesse button {
  width: 34px; height: 32px; border: 0; border-radius: 999px; display: grid; place-items: center;
  background: transparent; color: var(--text-2);
}
.groesse button:hover { color: var(--text); }
.groesse button[aria-pressed="true"] { background: var(--text); color: var(--auf-lime); }

.gens { display: flex; gap: 4px; margin-left: auto; }
.gens button {
  min-width: 38px; height: 32px; padding: 0 8px; border-radius: var(--r-s);
  background: transparent; border: 1px solid var(--linie-2); color: var(--text-2);
  font-family: var(--anzeige); font-weight: 800; font-style: italic; font-size: 15px;
  transition: color .15s, border-color .15s, background .15s;
}
.gens button:hover { color: var(--text); border-color: rgba(255, 255, 255, .5); background: var(--feld); }

/* Formen-Menü */
.menue-anker { position: relative; }
.menue {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: 300px;
  padding: 8px; border-radius: var(--r-l);
}
.menue h3 { margin: 6px 10px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .7); }
.menue label { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; font-weight: 600; }
.menue label:hover { background: rgba(255, 255, 255, .1); }
.menue label .anz { margin-left: auto; font-family: var(--anzeige); font-style: italic; font-weight: 800; color: rgba(255, 255, 255, .7); }
.menue input { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #fff; background: rgba(0, 0, 0, .2); display: grid; place-items: center; margin: 0; flex: none; }
.menue input:checked { background: var(--lime); }
.menue input:checked::after { content: ''; width: 9px; height: 5px; border: solid var(--auf-lime); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.menue input:disabled { opacity: .45; }

/* ── Raster ───────────────────────────────────────────────────────────────── */
main { padding: 8px 28px 120px; }

.gen { margin-top: 26px; scroll-margin-top: 140px; }
.gen-kopf { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; }
.gen-tag { padding: 3px 18px 4px 16px; border-radius: 999px; font-family: var(--anzeige); font-style: italic; font-weight: 800; font-size: 19px; line-height: 1.2; }
.gen-region { font-weight: 700; font-size: 19px; }
.gen-linie { flex: 1; height: 1px; background: var(--linie-2); }
.gen-stand { display: flex; align-items: center; gap: 12px; }
.gen-stand .zahl { font-size: 18px; }
.gen-stand .zahl small { font-size: 13px; color: var(--text-2); margin-left: 1px; }
.gen-stand .balken { width: 120px; background: var(--feld); }

.gitter {
  display: grid; gap: 18px 14px;
  grid-template-columns: repeat(auto-fill, minmax(var(--kachel), 1fr));
}

.kachel {
  position: relative; -webkit-touch-callout: none;
  outline: none; cursor: pointer; touch-action: manipulation;
}
.kachel .bild {
  position: relative; aspect-ratio: 63 / 88; border-radius: var(--karten-radius); overflow: hidden;
  background: var(--feld);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
  transition: transform .16s ease, box-shadow .16s ease, filter .25s ease, opacity .25s ease;
}
.kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Namensschild unter der Karte: Name, darunter Nummer · Form · Sprache */
.kachel .schild {
  margin-top: 8px; padding: 6px 10px 7px; border-radius: 10px;
  background: var(--feld); min-width: 0;
  transition: background .15s, color .15s;
}
.kachel .nm { display: block; font-weight: 700; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kachel .unter { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; line-height: 1.2; color: var(--text-2); min-width: 0; }
.kachel .nr { font-family: var(--anzeige); font-weight: 700; font-style: italic; flex: none; }
.kachel .form { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kachel .sprache {
  margin-left: auto; flex: none; padding: 0 5px; border-radius: 4px; border: 1px solid currentColor;
  font-size: 10px; font-weight: 700; letter-spacing: .05em; line-height: 14px;
}

/* i-Knopf: öffnet die Kartenwahl */
.kachel .info {
  position: absolute; right: 7px; top: 7px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
  border: 2px solid #fff; background: rgba(11, 9, 34, .78); color: #fff;
  backdrop-filter: blur(4px);
  font-family: var(--anzeige); font-weight: 800; font-style: italic; font-size: 18px; line-height: 1;
  opacity: 0; transform: scale(.85);
  transition: opacity .14s, transform .14s, background .14s, color .14s;
}
.kachel:hover .info, .kachel.cursor .info { opacity: 1; transform: none; }
.kachel .info:hover { background: var(--lime); color: var(--auf-lime); transform: scale(1.1); }
@media (hover: none) { .kachel .info { display: none; } }

.kachel .haken {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 42%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: var(--lime); color: var(--auf-lime);
  box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0, 0, 0, .45);
  opacity: 0; scale: .4; transition: opacity .18s, scale .25s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.kachel .haken svg { width: 56%; height: 56%; }
.kachel .bild-rahmen { position: relative; transition: transform .16s ease; }

/* Hover / Tastatur-Cursor: Lime-Rahmen, Schild wird Lime */
.kachel:hover .bild-rahmen, .kachel.cursor .bild-rahmen { transform: translateY(-4px); }
.kachel:hover .bild, .kachel.cursor .bild {
  box-shadow: 0 0 0 2.5px var(--lime), 0 12px 26px rgba(0, 0, 0, .5);
}
.kachel:hover .schild, .kachel.cursor .schild { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--auf-lime); }
.kachel:hover .unter, .kachel.cursor .unter { color: rgba(23, 17, 63, .7); }
.kachel.cursor::before {
  content: ''; position: absolute; left: -16px; top: 36%; z-index: 3;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 14px solid var(--gelb);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
  animation: stupsen .8s ease-in-out infinite alternate;
}
@keyframes stupsen { to { translate: 4px 0; } }

/* Gesammelt: ausgegraut, durchsichtig, mit Haken */
.kachel.hat .bild { filter: grayscale(1); opacity: .3; }
.kachel.hat .haken { opacity: 1; scale: 1; }
.kachel.hat .schild { background: transparent; color: var(--text-3); }
.kachel.hat .unter { color: var(--text-3); }
.kachel.blitz .bild { animation: blitz .3s ease; }
@keyframes blitz { 40% { transform: scale(.95); } }

/* Ohne Karte: Platzhalter mit Sprite */
.platzhalter {
  position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 14% 10% 12%;
  background: radial-gradient(circle at 50% 40%, var(--feld-2), var(--feld) 70%);
  border: 1.5px dashed var(--linie-2); border-radius: inherit;
}
.platzhalter img { width: 78%; height: auto; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.platzhalter span { font-size: 11px; font-weight: 600; text-align: center; color: var(--text-2); line-height: 1.3; }
.platzhalter span i { font-style: normal; color: var(--text-3); }

.leer { margin: 80px auto; max-width: 420px; text-align: center; padding: 30px; border-radius: var(--r-l); }
.leer h2 { margin: 0 0 6px; }
.leer p { margin: 0; color: rgba(255, 255, 255, .8); }

/* Größen */
body[data-groesse="s"] { --kachel: 96px; }
body[data-groesse="s"] .gitter { gap: 14px 10px; }
body[data-groesse="s"] .kachel .schild { padding: 4px 7px 5px; border-radius: 8px; }
body[data-groesse="s"] .kachel .nm { font-size: 12px; }
body[data-groesse="s"] .kachel .unter { font-size: 10.5px; }
body[data-groesse="s"] .kachel .info { width: 28px; height: 28px; font-size: 15px; right: 5px; top: 5px; }
body[data-groesse="l"] { --kachel: 196px; }
body[data-groesse="l"] .kachel .nm { font-size: 15.5px; }
body[data-groesse="l"] .kachel .unter { font-size: 13px; }
body[data-groesse="l"] .kachel .info { width: 40px; height: 40px; font-size: 21px; }

/* ── Hinweisleiste unten rechts ───────────────────────────────────────────── */
.hinweise {
  position: fixed; right: 20px; bottom: 18px; z-index: 15;
  display: flex; gap: 18px; padding: 9px 18px; border-radius: 999px;
  background: rgba(11, 9, 34, .82); backdrop-filter: blur(10px); border: 1px solid var(--linie-2);
  font-weight: 600; font-size: 13.5px; color: var(--text-2);
}
.hinweise > span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 76px; z-index: 60; translate: -50% 16px; opacity: 0;
  display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 20px; border-radius: 999px;
  font-weight: 600; transition: opacity .2s, translate .2s; pointer-events: none;
}
.toast.an { opacity: 1; translate: -50% 0; pointer-events: auto; }
.toast button { border: 0; border-radius: 999px; height: 32px; padding: 0 14px; font-weight: 700; background: #fff; color: var(--auf-lime); }
.toast.fehler { background: var(--rot); }

/* ── Detail-Dialog ────────────────────────────────────────────────────────── */
.dialog {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
  background: rgba(6, 4, 22, .7); backdrop-filter: blur(6px);
  animation: einblenden .18s ease;
}
@keyframes einblenden { from { opacity: 0; } }
.panel {
  position: relative; width: min(1180px, 100%); max-height: calc(100vh - 48px);
  display: grid; grid-template-columns: minmax(260px, 370px) 1fr; gap: 28px;
  padding: 26px; border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(255, 255, 255, .12), transparent 70%),
    linear-gradient(170deg, var(--platte-hell), var(--platte) 45%, var(--platte-tief));
  border: 2px solid var(--rand);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: aufsteigen .25s cubic-bezier(.2, .9, .3, 1.15);
}
@keyframes aufsteigen { from { transform: translateY(20px) scale(.98); opacity: 0; } }
.panel-links { display: flex; flex-direction: column; gap: 18px; min-height: 0; max-height: calc(100vh - 104px); }
.grosskarte {
  /* bei niedrigen Fenstern kleiner werden statt gestaucht: Platz minus Faktenliste */
  flex: none; align-self: center; width: min(100%, calc((100vh - 104px - 330px) * 63 / 88));
  position: relative; aspect-ratio: 63 / 88; cursor: pointer;
  transform-style: preserve-3d; transition: transform .12s ease-out;
}
/* Umdrehen: zwei Seiten Rücken an Rücken. Kein overflow am Container — das
   würde den 3D-Raum flach drücken; abgerundet wird jede Seite für sich. */
.dreher { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .7, .25, 1.15); }
.grosskarte.gedreht .dreher { transform: rotateY(180deg); }
.seite {
  position: absolute; inset: 0; border-radius: var(--karten-radius); overflow: hidden; background: var(--feld);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
}
.seite.hinten { transform: rotateY(180deg); }
.grosskarte img { width: 100%; height: 100%; object-fit: cover; display: block; }
.grosskarte .glanz {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .75), transparent 55%);
}
.grosskarte:hover .glanz { opacity: 1; }
.grosskarte .platzhalter span { font-size: 15px; }

/* Fakten: eine ruhige Tabelle statt einzelner Pillen */
.fakten { border-radius: var(--r-m); background: rgba(11, 9, 34, .35); overflow: hidden; }
.fakt { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 7px 14px; font-size: 14px; }
.fakt + .fakt { border-top: 1px solid var(--linie); }
.fakt b { font-weight: 600; color: rgba(255, 255, 255, .62); }
.fakt span { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Höhe fest an den Dialog binden — sonst wächst die Kartenliste über den Rand */
.panel-rechts { display: flex; flex-direction: column; min-height: 0; gap: 16px; max-height: calc(100vh - 104px); }
.titel { display: flex; align-items: center; gap: 14px; }
.titel img { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.titel h2 { margin: 0; font-size: 30px; line-height: 1.05; font-weight: 700; }
.titel h2 .zahl { font-size: 22px; color: rgba(255, 255, 255, .65); margin-right: 8px; }
.titel .unter { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.typ {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px 0 4px; border-radius: 999px;
  background: rgba(11, 9, 34, .45); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
}
.typ i { width: 18px; height: 18px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.marke-klein { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: 12.5px; background: #fff; color: var(--auf-lime); }
.schliessen {
  margin-left: auto; align-self: flex-start; width: 42px; height: 42px; border-radius: 50%; padding: 0;
  border: 2px solid #fff; background: rgba(11, 9, 34, .35); display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.schliessen:hover { background: #fff; color: var(--auf-lime); }
.schliessen svg { width: 18px; height: 18px; }

.liste-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.liste-kopf .segment { background: rgba(11, 9, 34, .4); border-color: rgba(255, 255, 255, .25); }
.liste-kopf .segment button { color: rgba(255, 255, 255, .75); }
.liste-kopf .segment button[aria-pressed="true"] { color: var(--auf-lime); }
.liste-kopf .erkl { font-size: 13px; color: rgba(255, 255, 255, .65); margin-left: auto; }

.liste { overflow-y: auto; min-height: 0; flex: 1; padding: 3px 6px 6px 26px; margin-left: -26px; display: grid; gap: 8px; align-content: start; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .35) transparent; }
/* Zeile im Stil der Attacken-Auswahl */
.zeile {
  position: relative; display: grid; grid-template-columns: 50px 1fr auto; align-items: center;
  border: 2px solid var(--rand); border-radius: 999px; overflow: hidden; text-align: left; padding: 0;
  background: linear-gradient(180deg, var(--platte-hell), var(--platte));
  min-height: 60px; transition: transform .12s, box-shadow .12s;
}
.zeile:hover { transform: translateX(3px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.zeile .mini { height: 60px; width: 50px; padding: 6px 0 6px 10px; }
.zeile .mini img { height: 100%; width: auto; border-radius: 3px; display: block; }
.zeile .feld {
  height: auto; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 2px;
  padding: 4px 14px; min-width: 0; margin: 6px 0; border: 0; border-radius: 0 999px 999px 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 3px, transparent 3px 7px), rgba(11, 9, 34, .5);
}
.zeile .feld b { font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .feld small { font-size: 12.5px; color: rgba(255, 255, 255, .62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile .rechts { display: flex; align-items: center; gap: 10px; padding: 0 20px 0 14px; }
.zeile .datum { font-size: 21px; line-height: 1; }
.zeile .tags { display: flex; gap: 4px; }
/* Markierungen: alle gleich gebaut, nur AUTO ist gefüllt */
.tag {
  height: 18px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .55); color: #fff;
}
.tag.auto { background: #fff; color: var(--auf-lime); border-color: #fff; }
.tag.ultra::before { content: '★'; margin-right: 3px; font-size: 9px; }
.zeile.gewaehlt { background: linear-gradient(180deg, var(--lime), var(--lime-2)); color: var(--auf-lime); }
.zeile.gewaehlt .feld { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .04) 0 3px, transparent 3px 7px), rgba(255, 255, 255, .42); }
.zeile.gewaehlt .feld small { color: rgba(23, 17, 63, .7); }
.zeile.gewaehlt .tag { border-color: rgba(23, 17, 63, .45); color: var(--auf-lime); }
.zeile.gewaehlt .tag.auto { background: var(--auf-lime); color: var(--lime); border-color: var(--auf-lime); }
.zeile.gewaehlt .datum { color: var(--auf-lime); }
.zeile.fokus, .zeile:focus-visible { outline: 2px solid var(--gelb); outline-offset: 3px; }

.aktionen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.aktionen .knopf { height: 46px; padding: 0 22px; font-size: 15.5px; }
.aktionen .knopf:not(.lime) { background: rgba(11, 9, 34, .4); border-color: rgba(255, 255, 255, .35); }
.aktionen .knopf.hat { background: #fff; color: var(--auf-lime); border: 2px solid #fff; }

/* ── Laden & Login ────────────────────────────────────────────────────────── */
.vollbild { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; transition: opacity .4s ease; }
.vollbild.weg { opacity: 0; pointer-events: none; }
.lade { display: grid; justify-items: center; gap: 28px; }
.stapel { position: relative; width: 116px; height: 162px; }
.stapel i {
  position: absolute; inset: 0; border-radius: var(--karten-radius);
  background: url(rueckseiten/international.webp) center / cover;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .5);
  animation: mischen 1.8s cubic-bezier(.6, 0, .3, 1) infinite;
}
.stapel i:nth-child(2) { animation-delay: .6s; }
.stapel i:nth-child(3) { animation-delay: 1.2s; }
@keyframes mischen {
  0%   { transform: translate(0, 0) rotate(-4deg); z-index: 3; }
  30%  { transform: translate(76px, -16px) rotate(13deg); z-index: 3; }
  31%  { z-index: 0; }
  60%  { transform: translate(0, 6px) rotate(3deg); z-index: 0; }
  100% { transform: translate(0, 0) rotate(-4deg); z-index: 0; }
}
.lade-text { font-family: var(--anzeige); font-style: italic; font-weight: 800; font-size: 26px; letter-spacing: .02em; }
.lade-text span { display: inline-block; animation: huepfen 1s ease-in-out infinite; }
.lade-text span:nth-child(2) { animation-delay: .15s; }
.lade-text span:nth-child(3) { animation-delay: .3s; }
@keyframes huepfen { 50% { transform: translateY(-7px); color: var(--lime); } }
.lade-tipp { color: var(--text-2); font-weight: 500; max-width: 420px; text-align: center; min-height: 1.4em; }

.login {
  width: min(440px, 100%); display: grid; gap: 16px; justify-items: center; text-align: center;
  padding: 34px 30px 30px; border-radius: 28px;
}
.orden { width: 120px; height: 120px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .4)); animation: schweben 3s ease-in-out infinite; }
@keyframes schweben { 50% { transform: translateY(-6px) rotate(2deg); } }
.login h1 { margin: 0; font-family: var(--anzeige); font-style: italic; font-weight: 800; font-size: 38px; line-height: 1.15; padding: 0 .2em; }
.login p { margin: -6px 0 6px; color: rgba(255, 255, 255, .75); font-weight: 500; }
.login .suche { width: 100%; flex: none; height: 48px; background: rgba(11, 9, 34, .45); border-color: rgba(255, 255, 255, .3); }
.login .knopf { width: 100%; height: 50px; font-size: 17px; position: relative; }
.login .knopf .chevron { position: absolute; left: -28px; }
.login .fehler { color: #ffd0da; font-weight: 600; min-height: 1.3em; margin: -4px 0; }

/* ── Schmal ───────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .gens { display: none; }
}
@media (max-width: 980px) {
  .kopf { grid-template-columns: 1fr auto; padding: 12px 16px 10px; gap: 10px 12px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .fortschritt { grid-template-columns: auto 100px; padding: 5px 12px 6px; }
  #f-zahl { font-size: 24px; }
  .leiste { padding: 0 16px 12px; }
  main { padding: 4px 16px 120px; }
  .hinweise { display: none; }
  .panel { grid-template-columns: 1fr; overflow-y: auto; padding: 18px; gap: 18px; }
  .panel-links { flex-direction: row; align-items: flex-start; }
  .grosskarte { width: 42%; flex: none; align-self: flex-start; }
  .fakten { flex: 1; min-width: 0; }
  .fakt { grid-template-columns: 1fr; gap: 0; padding: 5px 10px; }
  .fakt b { font-size: 11.5px; }
  .fakt span { white-space: normal; }
  .liste { overflow: visible; }
  .panel-rechts, .panel-links { max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
  .gen { scroll-margin-top: 10px; }
  .marke b { font-size: 21px; }
  .marke .ball { width: 26px; height: 26px; }
  .reiter button { padding: 0 18px; }
  .tabs .taste { display: none; }
  .fortschritt { grid-template-columns: auto; }
  .fortschritt .balken, #f-prozent { display: none; }
  .suche { min-width: 0; flex: 1 1 100%; }
  .oben { position: static; }
  body[data-groesse="m"] { --kachel: 104px; }
  body[data-groesse="l"] { --kachel: 150px; }
  body[data-groesse="s"] { --kachel: 76px; }
  .gitter { gap: 14px 10px; }
  .gen-stand .balken { width: 60px; }
  .gen-region { font-size: 17px; }
  .dialog { padding: 0; }
  .panel { max-height: 100vh; height: 100vh; border-radius: 0; border: 0; }
  .panel-rechts { display: contents; }
  .titel { order: 0; position: sticky; top: -18px; z-index: 2; margin: -18px -18px 0; padding: 14px 18px 10px;
    background: linear-gradient(180deg, var(--platte-hell) 80%, rgba(95, 73, 238, 0)); }
  .panel-links { order: 1; }
  .liste-kopf { order: 2; }
  .liste { order: 3; }
  .aktionen { order: 4; position: sticky; bottom: -18px; margin: 0 -18px -18px; padding: 12px 18px 18px;
    background: linear-gradient(0deg, var(--platte-tief) 75%, rgba(53, 35, 168, 0)); }
  .aktionen .knopf { flex: 1; }
  .titel h2 { font-size: 23px; }
  .titel img { width: 54px; height: 54px; }
  .zeile .feld b { font-size: 14.5px; }
  .zeile .datum { font-size: 18px; }
  .zeile .tags { display: none; }
}

/* Regeln: nummerierte Liste im Menü */
.menue.regeln { width: min(460px, calc(100vw - 32px)); padding: 10px 12px 12px; }
.menue.regeln ol { margin: 0; padding: 0; list-style: none; counter-reset: regel; display: grid; gap: 2px; }
.menue.regeln li {
  counter-increment: regel; position: relative;
  padding: 8px 10px 8px 42px; border-radius: 12px; line-height: 1.4; font-weight: 500;
}
.menue.regeln li:nth-child(odd) { background: rgba(11, 9, 34, .22); }
.menue.regeln li::before {
  content: counter(regel); position: absolute; left: 10px; top: 8px;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--auf-lime);
  font-family: var(--anzeige); font-style: italic; font-weight: 800; font-size: 13px;
}
/* Deutsche Karte mit englischem Bild: gestrichelt, damit es nicht wie eine Sprache aussieht */
.kachel .sprache.bild-hinweis { border-style: dashed; opacity: .85; text-transform: none; letter-spacing: .02em; }
