/* Cards of Binokee – Demo */
/* Schriften: lokal ausgeliefert (SIL Open Font License, siehe fonts/OFL-*.txt) – kein Drittanbieter */
@font-face { font-family: 'Cinzel'; src: url('../fonts/cinzel-500.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../fonts/cinzel-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('../fonts/cinzel-900.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('../fonts/alegreya-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('../fonts/alegreya-sans-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('../fonts/alegreya-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Alegreya Sans'; src: url('../fonts/alegreya-sans-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
:root {
  --bg: #14121c;
  --bg2: #1d1a28;
  --panel: #252136;
  --panel2: #2e2944;
  --linie: #423a5e;
  --text: #ece6d6;
  --text2: #a9a1bd;
  --gold: #e3b955;
  --gold2: #b8902f;
  --rot: #c8463c;
  --gruen: #59b36a;
  --blau: #3c78c8;
  --spieler: #2f5fa8;
  --spieler2: #1d3c70;
  --gegner: #a83a3a;
  --gegner2: #6b2020;
  --r-gewoehnlich: #9a9aa2;
  --r-ungewoehnlich: #4fae5c;
  --r-selten: #3f86d9;
  --r-episch: #a25fd9;
  --r-legendaer: #e3b955;
  --schrift: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --schrift-titel: 'Cinzel', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --tempo: 1;
  /* Redesign-Tokens */
  --seelen: #8fd3ff;
  --sp-hell: #7fb0ff;
  --ge-hell: #ff8a7a;
  --flaeche-1: #0e0c15;
  --flaeche-2: #17141f;
  --flaeche-3: #211d2d;
  --flaeche-4: #2c2640;
  --gold-hell: #f6dc8f;
  --gold-dunkel: #7a5a1c;
  --rahmen-gold: linear-gradient(160deg, #f3d488 0%, #a87b2a 35%, #e9c66f 55%, #6e4f17 100%);
  --rahmen-dunkel: #3a3150;
  --schatten-1: 0 2px 6px rgba(0, 0, 0, .45);
  --schatten-2: 0 8px 24px rgba(0, 0, 0, .55);
  --schatten-3: 0 18px 60px rgba(0, 0, 0, .7);
  --glow-gold: 0 0 18px rgba(227, 185, 85, .45);
  --radius-1: 6px;
  --radius-2: 10px;
  --radius-3: 16px;
  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
  --sicher-links: env(safe-area-inset-left, 0px);
  --sicher-rechts: env(safe-area-inset-right, 0px);
  --nav-hoehe: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at top, #2a2340 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 16px;
  overflow-x: hidden;
}
body.hardcore { box-shadow: inset 0 0 0 4px var(--rot); }
body.hardcore::after {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(200, 70, 60, .25);
}
button { font-family: inherit; }
h1, h2, h3 { font-weight: normal; letter-spacing: .03em; margin: 0 0 .5em; }
h2 { color: var(--gold); }
.klein { font-size: .85em; color: var(--text2); }
.versteckt { display: none !important; }

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- Knöpfe */
.btn {
  background: linear-gradient(#3a3356, #2a2540);
  color: var(--text);
  border: 1px solid var(--linie);
  border-radius: 6px;
  padding: .55em 1.1em;
  font-size: 1em;
  cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s;
}
.btn:hover:not(:disabled) { border-color: var(--gold); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primaer { background: linear-gradient(#c79b3c, #8d6a22); border-color: #e9c66f; color: #1b1407; font-weight: bold; }
.btn.primaer:hover:not(:disabled) { background: linear-gradient(#ddb04e, #9c7628); }
.btn.gefahr { background: linear-gradient(#8f3029, #5e1d18); border-color: #c8463c; }
.btn.gross { font-size: 1.2em; padding: .7em 1.6em; }
.btn.klein-btn { font-size: .85em; padding: .35em .7em; }
.knopfreihe { display: flex; gap: .6em; flex-wrap: wrap; align-items: center; }

select {
  background: var(--panel2); color: var(--text); border: 1px solid var(--linie);
  border-radius: 5px; padding: .35em .5em; font-family: inherit; font-size: .95em;
}

.panel { background: rgba(37, 33, 54, .85); border: 1px solid var(--linie); border-radius: 10px; padding: 1em 1.2em; }

/* --------------------------------------------------------------- Topbar */
.topbar {
  display: flex; align-items: center; gap: 1.2em;
  padding: .55em 1.2em; background: rgba(15, 13, 22, .85);
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 20;
}
.tb-akt { font-size: 1.05em; color: var(--gold); white-space: nowrap; }
.tb-lp { display: flex; align-items: center; gap: .5em; min-width: 200px; }
.lp-balken { width: 120px; height: 12px; background: #3a1818; border-radius: 6px; overflow: hidden; border: 1px solid #5c2b2b; }
.lp-balken > div { height: 100%; background: linear-gradient(90deg, #b8352c, #e05a48); transition: width .4s; }
.tb-gold { color: var(--gold); white-space: nowrap; }
.tb-raum { flex: 1; }
.hc-marke { background: var(--rot); color: #fff; padding: .2em .6em; border-radius: 4px; font-size: .85em; letter-spacing: .05em; }

/* --------------------------------------------------------------- Karten */
.karte {
  --rahmen: var(--r-gewoehnlich);
  --tint1: #3b3550; --tint2: #262136;
  position: relative; isolation: isolate;
  width: 7.5em; height: 10em;
  font-size: 16px;
  border-radius: .55em;
  border: .2em solid var(--rahmen);
  background: linear-gradient(160deg, var(--tint1), var(--tint2));
  box-shadow: 0 .2em .5em rgba(0, 0, 0, .5);
  overflow: hidden;
  flex-shrink: 0;
  user-select: none;
  transition: transform .15s, box-shadow .15s;
}
.karte.k-klein { font-size: 12px; }
.karte.k-mini { font-size: 10px; }
.karte.k-gross { font-size: 20px; }
.karte.r-gewoehnlich { --rahmen: var(--r-gewoehnlich); }
.karte.r-ungewoehnlich { --rahmen: var(--r-ungewoehnlich); }
.karte.r-selten { --rahmen: var(--r-selten); }
.karte.r-episch { --rahmen: var(--r-episch); }
.karte.r-legendaer { --rahmen: var(--r-legendaer); box-shadow: 0 0 .7em rgba(227, 185, 85, .45), 0 .2em .5em rgba(0, 0, 0, .5); }
.karte.b-spieler { --tint1: #3d6fbf; --tint2: var(--spieler2); }
.karte.b-gegner { --tint1: #bf4a4a; --tint2: var(--gegner2); }

.k-art {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 40%, var(--el1, #6b6585), var(--el2, #2b2738));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  --schatten: rgba(0, 0, 0, .7); --besitz: transparent;
}
/* Dunkler Verlauf hinter Werten (oben) und Text (unten); Besitzer als dezente Kante + Tönung */
.k-art::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, var(--schatten) 0, rgba(0, 0, 0, 0) 3.4em, rgba(0, 0, 0, 0) calc(100% - 3.6em), var(--schatten) 100%);
  box-shadow: inset 0 0 0 .14em var(--besitz);
}
.karte.b-spieler .k-art { --schatten: rgba(12, 30, 72, .78); --besitz: rgba(90, 150, 255, .85); }
.karte.b-gegner .k-art { --schatten: rgba(70, 12, 12, .78); --besitz: rgba(255, 95, 85, .85); }
.k-art .k-init { position: relative; }
.k-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Hintergrund (optional) füllt die Karte, Kartenbild liegt darüber */
.k-hg { position: absolute; inset: 0; background: center / cover no-repeat; }
.k-init { font-size: 2em; color: rgba(255, 255, 255, .8); text-shadow: 0 .05em .2em rgba(0, 0, 0, .6); letter-spacing: .05em; }

.k-werte {
  position: absolute; left: .25em; top: .15em;
  display: grid; grid-template-columns: repeat(3, .95em); grid-template-rows: repeat(3, .78em);
  font-weight: bold; font-size: 1.05em; line-height: .8em; text-align: center;
  color: #fff; text-shadow: 0 0 .15em #000, 0 0 .25em #000;
  z-index: 2;
}
.k-werte .o { grid-column: 2; grid-row: 1; }
.k-werte .l { grid-column: 1; grid-row: 2; }
.k-werte .r { grid-column: 3; grid-row: 2; }
.k-werte .u { grid-column: 2; grid-row: 3; }
.k-werte .up { color: #7dff8f; }
.k-werte .elp { color: #9effa8; }
.k-werte .elm { color: #ff9a8a; }

.k-element {
  position: absolute; right: .3em; top: .3em; width: 1.5em; height: 1.5em;
  border-radius: 50%; background: var(--elc, #555); display: flex; align-items: center; justify-content: center;
  font-size: .85em; box-shadow: 0 0 0 .12em rgba(0, 0, 0, .4); z-index: 2;
}
.k-fuss {
  position: absolute; left: 0; right: 0; bottom: 0; min-height: 2.05em;
  padding: .1em .35em .25em; display: flex; flex-direction: column; justify-content: flex-end;
  text-shadow: 0 0 .2em #000, 0 .05em .3em rgba(0, 0, 0, .8);
}
.k-fuss > * { flex-shrink: 0; }
/* Während der Runde (Brett, Hand) kein Kartenname */
.feld .karte .k-name, .hand .karte .k-name, .raetsel-hand .karte .k-name { display: none; }
.karte .k-name { font-size: .5em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-stufe { font-size: .55em; color: var(--text2); }
.k-stufe .stern { color: var(--rahmen); }
.k-anzahl {
  position: absolute; right: .3em; bottom: 2.3em; background: rgba(0, 0, 0, .7); border: 1px solid var(--gold2);
  color: var(--gold); border-radius: .6em; padding: 0 .4em; font-size: .7em; z-index: 3;
}
.k-mod {
  position: absolute; right: .3em; top: 5.1em; font-size: .7em; font-weight: bold; padding: 0 .3em;
  border-radius: .3em; z-index: 3;
}
.k-mod.plus { background: #2f7a3b; }
.k-mod.minus { background: #8a2c25; }
.k-marke {
  position: absolute; left: .3em; bottom: 2.3em; font-size: .7em; z-index: 3;
  background: rgba(0, 0, 0, .7); padding: 0 .35em; border-radius: .3em; color: var(--gold);
}

.karte.verdeckt { background: repeating-linear-gradient(45deg, #4a2230, #4a2230 .5em, #3a1a26 .5em, #3a1a26 1em); --rahmen: #6b3a48; }
.k-ruecken { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6em; color: rgba(227, 185, 85, .5); }
.karte.unentdeckt { background: #1a1824; --rahmen: #34304a; }
.karte.unentdeckt .k-art { background: #22202e; }
.karte.unentdeckt .k-init { color: #4a4562; font-size: 1.6em; }
.karte.verloren { filter: grayscale(1) brightness(.55); }

.karte.waehlbar { cursor: pointer; }
.karte.waehlbar:hover { transform: translateY(-.25em); box-shadow: 0 .4em .9em rgba(0, 0, 0, .6), 0 0 0 .12em var(--gold); }
.karte.gewaehlt { box-shadow: 0 0 0 .2em var(--gold), 0 0 1em rgba(227, 185, 85, .6); }
.karte.gesperrt { opacity: .4; cursor: not-allowed; }

/* Flip-Animation */
@keyframes flip {
  0% { transform: rotateY(0); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}
.karte.flip { animation: flip calc(300ms * var(--tempo)) ease-in-out; }
@keyframes legen {
  0% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.karte.legen { animation: legen calc(250ms * var(--tempo)) ease-out; }
@keyframes verlust {
  0% { transform: none; opacity: 1; }
  30% { transform: rotate(-4deg) scale(1.05); }
  60% { transform: rotate(4deg); opacity: .9; }
  100% { transform: translateY(1.5em) rotate(8deg); opacity: .45; filter: grayscale(1); }
}
.karte.verlust { animation: verlust 1.4s ease-in forwards; animation-delay: .4s; }
@keyframes einblenden { from { opacity: 0; transform: translateY(.6em); } to { opacity: 1; transform: none; } }
.einblenden { animation: einblenden .35s ease-out both; }

/* ------------------------------------------------------------ Kartenraster */
.raster { display: flex; flex-wrap: wrap; gap: .7em; }
.raster.zentriert { justify-content: center; }

/* ----------------------------------------------------------------- Titel */
.titel {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4em;
  padding: 2em; text-align: center;
}
.logo { font-size: 3.6em; color: var(--gold); text-shadow: 0 0 .4em rgba(227, 185, 85, .35); margin: 0; letter-spacing: .06em; }
.logo small { display: block; font-size: .32em; color: var(--text2); letter-spacing: .3em; text-transform: uppercase; margin-top: .3em; }
.intro { max-width: 620px; font-style: italic; color: var(--text2); line-height: 1.6; }
.titel-menue { display: flex; flex-direction: column; gap: .7em; min-width: 260px; }
.titel-karten { display: flex; gap: .4em; margin-bottom: .5em; }
.titel-karten .karte:nth-child(1) { transform: rotate(-10deg) translateY(.6em); }
.titel-karten .karte:nth-child(2) { transform: rotate(-4deg); }
.titel-karten .karte:nth-child(4) { transform: rotate(4deg); }
.titel-karten .karte:nth-child(5) { transform: rotate(10deg) translateY(.6em); }

/* ------------------------------------------------------------ Seitenlayout */
.seite { flex: 1; padding: 1.2em 1.6em 2em; max-width: 1400px; width: 100%; margin: 0 auto; }
.seite-kopf { display: flex; align-items: center; gap: 1em; margin-bottom: 1em; flex-wrap: wrap; }
.seite-kopf h2 { margin: 0; }
.filterleiste { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; margin-bottom: .8em; }

/* Run-Setup */
.setup { display: grid; grid-template-columns: 1fr 470px; gap: 1.2em; align-items: start; }
.modus-wahl { display: flex; gap: .8em; margin-bottom: 1em; }
.modus {
  flex: 1; padding: .9em 1em; border-radius: 8px; border: 2px solid var(--linie); background: var(--panel); cursor: pointer;
  text-align: left; color: var(--text); font-size: .95em;
}
.modus b { display: block; font-size: 1.15em; margin-bottom: .2em; }
.modus.aktiv { border-color: var(--gold); box-shadow: 0 0 .8em rgba(227, 185, 85, .25); }
.modus.hc.aktiv { border-color: var(--rot); box-shadow: 0 0 .8em rgba(200, 70, 60, .35); }
.modus:disabled { opacity: .45; cursor: not-allowed; }
.rucksack-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5em; min-height: 260px; }
.slot-leer { width: 7.5em; height: 10em; font-size: 10px; border: 2px dashed var(--linie); border-radius: .55em; }
.sammlung-raster { max-height: calc(100vh - 290px); overflow-y: auto; padding: .4em; }

/* ------------------------------------------------------------ Dungeon-Karte */
.karte-seite { display: grid; grid-template-columns: 1fr 300px; gap: 1.2em; padding: 1em 1.6em; flex: 1; }
.dungeon {
  position: relative; height: calc(100vh - 130px); min-height: 560px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .04), transparent 70%), var(--bg2);
  border: 1px solid var(--linie); border-radius: 12px; overflow: hidden;
}
.dungeon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dungeon line { stroke: #4b4366; stroke-width: 2.5; stroke-dasharray: 5 5; }
.dungeon line.gegangen { stroke: var(--gold); stroke-dasharray: none; stroke-width: 3; }
.dungeon line.moeglich { stroke: #c9b37a; stroke-dasharray: none; opacity: .8; }
.station {
  position: absolute; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel2); border: 2px solid var(--linie);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  color: var(--text); cursor: default; padding: 0; transition: transform .15s;
}
.station.elite { border-color: #a25fd9; }
.station.boss { width: 66px; height: 66px; font-size: 30px; border-color: var(--gold); background: #3a2a1a; }
.station.haendler { border-color: var(--gold2); }
.station.lager { border-color: #c96a2a; }
.station.besucht { opacity: .5; }
.station.besucht::after { content: '✓'; position: absolute; right: -4px; bottom: -4px; font-size: 13px; background: var(--gruen); border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: #fff; }
.station.aktuell { box-shadow: 0 0 0 4px var(--gold); opacity: 1; }
@keyframes puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(227, 185, 85, .7); } 50% { box-shadow: 0 0 0 9px rgba(227, 185, 85, 0); } }
.station.erreichbar { cursor: pointer; animation: puls 1.6s infinite; border-color: var(--gold); }
.station.erreichbar:hover { transform: translate(-50%, -50%) scale(1.15); }
.station-tip { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 11px; white-space: nowrap; color: var(--text2); margin-top: 3px; pointer-events: none; }
.ebene-nr { position: absolute; left: 10px; font-size: 11px; color: #5a5276; transform: translateY(-50%); }
.seitenleiste { display: flex; flex-direction: column; gap: 1em; }
.legende div { display: flex; gap: .5em; align-items: center; margin: .25em 0; font-size: .92em; }

/* Regel-Chips */
.regeln { display: flex; gap: .35em; flex-wrap: wrap; }
.regel { background: #3b2f5a; border: 1px solid #5a4a86; border-radius: 1em; padding: .15em .7em; font-size: .82em; cursor: help; }
.regel-liste { margin: .4em 0 0; padding: 0; list-style: none; }
.regel-liste li { margin: .45em 0; line-height: 1.35; font-size: .93em; }
.regel-liste b { color: var(--gold); }

/* ---------------------------------------------------------- Vorbereitung */
.vorb { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; }
.gegner-kopf { display: flex; align-items: center; gap: .8em; }
.typ-marke { padding: .15em .6em; border-radius: 4px; font-size: .8em; background: var(--panel2); border: 1px solid var(--linie); }
.typ-marke.elite { border-color: #a25fd9; color: #d2b0f3; }
.typ-marke.boss { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------------------- Duell */
.duell-bildschirm { flex: 1; display: flex; flex-direction: column; }
.duell-kopf { display: flex; align-items: center; justify-content: center; gap: 1.2em; padding: .6em 1em; }
.duell-kopf .gegner-name { color: var(--gold); font-size: 1.1em; }
.zug-anzeige { padding: .25em .9em; border-radius: 1em; font-size: .9em; border: 1px solid var(--linie); }
.zug-anzeige.spieler { background: var(--spieler2); border-color: var(--spieler); }
.zug-anzeige.gegner { background: var(--gegner2); border-color: var(--gegner); }
.duell-feld {
  flex: 1; display: flex; justify-content: center; align-items: flex-start; gap: 2.2em; padding: .5em 1em 1.5em;
  --zh: 168px; --zb: calc(var(--zh) * .762);
}
/* Hand: Größe folgt dem Brett (--zh); Karten fächern sich über die Handhöhe (--i = Position, --n = Anzahl) */
.hand {
  --reihen: 3; --hh: calc(var(--zh) * var(--reihen) + 36px); --kh: calc(var(--zh) * 10 / 10.5);
  position: relative; width: calc(var(--zb) + 22px); height: var(--hh);
}
.hand .karte {
  position: absolute; left: 10px; transition: transform .15s, top .2s; font-size: calc(var(--zh) / 10.5);
  top: calc(var(--i, 0) * min(var(--kh) * .59, (var(--hh) - var(--kh)) / max(var(--n, 2) - 1, 1)));
}
.hand-spieler .karte.waehlbar:hover { transform: translateX(10px); }
.hand-spieler .karte.gewaehlt { transform: translateX(26px); }
.hand-gegner .karte.ki-wahl { transform: translateX(-26px); box-shadow: 0 0 0 .2em #ff8a7a; }
.hand-titel { text-align: center; font-size: .85em; color: var(--text2); margin-bottom: .3em; }
.brett-bereich { display: flex; flex-direction: column; align-items: center; gap: .5em; }
.brett {
  --zh: 168px; --zb: 128px;
  display: grid; grid-template-columns: repeat(3, var(--zb)); grid-template-rows: repeat(3, var(--zh)); gap: 6px;
  padding: 10px; background: linear-gradient(145deg, #2a2338, #1a1625); border: 2px solid #4b4166; border-radius: 12px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .6), 0 6px 20px rgba(0, 0, 0, .4);
}
.feld {
  position: relative; border-radius: 8px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06);
  display: flex; align-items: center; justify-content: center; perspective: 600px;
}
.feld.frei.zielbar { cursor: pointer; background: rgba(227, 185, 85, .08); border-color: rgba(227, 185, 85, .4); }
.feld.frei.zielbar:hover { background: rgba(227, 185, 85, .2); }
.feld.hervor { box-shadow: 0 0 0 3px #fff, 0 0 18px #fff; border-radius: 8px; }
.feld-element { position: absolute; font-size: 38px; opacity: .55; pointer-events: none; }
.feld-element-name { position: absolute; bottom: 6px; font-size: 11px; color: var(--text2); pointer-events: none; }
.feld .karte { font-size: calc(var(--zh) / 10.5); z-index: 1; }
.punkte { display: flex; gap: 2em; align-items: center; font-size: 2em; }
.punkte .sp { color: #7fb0ff; }
.punkte .ge { color: #ff8a7a; }
.punkte .trenner { color: var(--text2); font-size: .6em; }
.sd-marke { color: var(--gold); font-size: .9em; }

.banner {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(.6); opacity: 0;
  font-size: 3.4em; color: var(--gold); text-shadow: 0 0 .3em #000, 0 0 .6em rgba(227, 185, 85, .6);
  pointer-events: none; z-index: 50; white-space: nowrap; transition: transform .2s, opacity .2s;
  background: rgba(10, 8, 16, .7); padding: .1em .8em; border-radius: .3em; border: 1px solid var(--gold2);
}
.banner.zeigen { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* --------------------------------------------------------------- Ergebnis */
.zentrum { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 2em 1em; gap: 1.2em; text-align: center; }
.gross-titel { font-size: 3em; margin: 0; }
.gross-titel.sieg { color: var(--gold); }
.gross-titel.niederlage { color: var(--rot); }
.gross-titel.unentschieden { color: var(--text2); }
.belohnungen { display: flex; gap: 1.5em; font-size: 1.2em; justify-content: center; }
.belohnungen .gold { color: var(--gold); }
.belohnungen .lp { color: #ff8a7a; }

/* ----------------------------------------------------- Händler / Lagerfeuer */
.laden { display: grid; grid-template-columns: 1fr 360px; gap: 1.2em; align-items: start; }
.angebot { display: flex; flex-direction: column; align-items: center; gap: .4em; }
.preis { color: var(--gold); }
.dienst { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .7em 0; border-bottom: 1px solid var(--linie); }
.dienst:last-child { border-bottom: 0; }
.dienst p { margin: .2em 0 0; font-size: .85em; color: var(--text2); }
.lager-aktionen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.lager-aktion { text-align: center; padding: 1.4em 1em; border-radius: 10px; border: 2px solid var(--linie); background: var(--panel); color: var(--text); cursor: pointer; font-size: 1em; }
.lager-aktion:hover:not(:disabled) { border-color: var(--gold); }
.lager-aktion:disabled { opacity: .4; cursor: not-allowed; }
.lager-aktion .icon { font-size: 2.6em; display: block; margin-bottom: .2em; }
.lager-aktion b { display: block; font-size: 1.15em; margin-bottom: .3em; }
.lagerfeuer-deko { font-size: 4em; text-align: center; filter: drop-shadow(0 0 20px rgba(255, 140, 40, .6)); }

/* ----------------------------------------------------------- Sammelbuch */
.statistik { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; margin-bottom: 1em; }
.stat { background: var(--panel); border: 1px solid var(--linie); border-radius: 8px; padding: .6em .8em; text-align: center; }
.stat b { display: block; font-size: 1.6em; color: var(--gold); }
/* Spaltenbreite folgt der Kartengröße (.karte.k-klein = 7,5em) */
.buch-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(100px, calc(7.5 * clamp(12px, 1.2vw, 20px) + 6px)), 1fr)); gap: .8em; justify-items: center; }
.buch-slot { display: flex; flex-direction: column; align-items: center; gap: .2em; }
.buch-nr { font-size: .75em; color: var(--text2); }

/* ---------------------------------------------------------------- Modal */
.modal-bg {
  position: fixed; inset: 0; background: rgba(5, 4, 10, .72); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 2em;
  animation: einblenden .2s ease-out;
}
.modal {
  background: var(--bg2); border: 1px solid var(--gold2); border-radius: 12px; padding: 1.3em 1.5em;
  max-width: 760px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0, 0, 0, .7);
}
.modal.breit { max-width: 1100px; }
.modal h2 { margin-bottom: .6em; }
.modal-knoepfe { display: flex; justify-content: flex-end; gap: .6em; margin-top: 1.2em; flex-wrap: wrap; }
.seiten-wahl { display: grid; grid-template-columns: repeat(3, auto); grid-template-rows: repeat(3, auto); gap: .5em; justify-content: center; align-items: center; margin: 1em 0; }
.seiten-wahl .btn[data-seite="oben"] { grid-column: 2; grid-row: 1; }
.seiten-wahl .btn[data-seite="links"] { grid-column: 1; grid-row: 2; }
.seiten-wahl .btn[data-seite="rechts"] { grid-column: 3; grid-row: 2; }
.seiten-wahl .btn[data-seite="unten"] { grid-column: 2; grid-row: 3; }
.seiten-wahl .karte { grid-column: 2; grid-row: 2; }

.toast-box { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .4em; align-items: center; }
.toast { background: var(--panel2); border: 1px solid var(--gold2); padding: .55em 1.1em; border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); animation: einblenden .25s ease-out; }

/* ---------------------------------------------------------------- Debug */
.debug {
  position: fixed; right: 10px; bottom: 10px; z-index: 300; background: rgba(10, 30, 15, .95); border: 1px solid #3c8a4c;
  border-radius: 8px; padding: .6em; font-size: 12px; display: flex; flex-direction: column; gap: .3em; width: 180px;
  font-family: monospace;
}
.debug b { color: #7dff8f; }
.debug button { font-family: monospace; font-size: 12px; background: #1d3a24; color: #c9f5d1; border: 1px solid #3c8a4c; border-radius: 4px; padding: .3em; cursor: pointer; text-align: left; }
.debug button:hover { background: #2a5233; }

/* Kartenstärke */
.k-summe {
  position: absolute; right: .3em; top: 2.2em; z-index: 3;
  background: rgba(0, 0, 0, .75); border: 1px solid var(--gold2); color: var(--gold);
  border-radius: .35em; padding: 0 .35em; font-size: .75em; font-weight: bold;
}
.tb-seelen { color: #8fd3ff; font-weight: bold; white-space: nowrap; }
.k-summe.elp { color: #9effa8; border-color: #59b36a; }
.k-summe.elm { color: #ff9a8a; border-color: #c8463c; }
.staerke-vergleich { display: flex; flex-direction: column; gap: .45em; }
.st-zeile { display: grid; grid-template-columns: 170px 1fr 150px; align-items: center; gap: .8em; }
.st-titel { font-size: .95em; }
.st-balken { height: 16px; background: rgba(255, 255, 255, .06); border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); }
.st-balken > div { height: 100%; border-radius: 8px; transition: width .3s; }
.st-wert { font-weight: bold; white-space: nowrap; }

/* Relikte */
.tb-relikte { display: flex; gap: .25em; flex-wrap: wrap; max-width: 320px; }
.tb-relikt { font-size: 1.15em; cursor: help; background: rgba(255, 255, 255, .06); border: 1px solid var(--linie); border-radius: 6px; padding: 0 .25em; }
.tb-relikt.verbraucht { opacity: .35; filter: grayscale(1); }
.relikt-reihe { display: flex; gap: 1em; flex-wrap: wrap; justify-content: center; }
.relikt {
  width: 200px; padding: 1em; border-radius: 10px; border: 2px solid var(--gold2); background: linear-gradient(160deg, #3a2f52, #241f33);
  display: flex; flex-direction: column; align-items: center; gap: .35em; text-align: center;
}
.relikt.waehlbar { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.relikt.waehlbar:hover { transform: translateY(-.25em); box-shadow: 0 0 0 .12em var(--gold), 0 .5em 1em rgba(0, 0, 0, .5); }
.relikt.gewaehlt { box-shadow: 0 0 0 .2em var(--gold), 0 0 1em rgba(227, 185, 85, .6); }
.relikt.gesperrt { opacity: .4; }
.relikt-symbol { font-size: 2.4em; }

/* Ereignis, Schatzkammer, Rätsel, Arena */
.ereignis { max-width: 820px; margin: 0 auto; text-align: center; }
.ereignis-symbol { font-size: 4em; filter: drop-shadow(0 0 16px rgba(227, 185, 85, .35)); }
.ereignis-text { font-style: italic; color: var(--text2); line-height: 1.6; font-size: 1.05em; }
.ereignis-optionen { display: flex; flex-direction: column; gap: .6em; margin: 1.4em auto; max-width: 580px; }
.ereignis-optionen .btn { text-align: left; padding: .8em 1.1em; }
.ereignis-log { list-style: none; padding: 0; margin: 1em 0; }
.ereignis-log li { margin: .35em 0; font-size: 1.05em; }
.einsatz-box { margin-top: 1em; padding: .8em; border: 1px dashed var(--gold); border-radius: 10px; display: flex; gap: 1.5em; align-items: center; justify-content: center; flex-wrap: wrap; }
.raetsel-feld { display: flex; gap: 2em; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.raetsel-hand { display: flex; flex-direction: column; gap: .6em; }
.feld.loesung { box-shadow: 0 0 0 3px var(--gruen), 0 0 18px var(--gruen); }

/* Boosterpacks */
.booster-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2em; }
.booster-pack { text-align: center; }
.booster-pack h3 { margin: .3em 0 0; color: var(--gold); font-weight: normal; }
.booster-pack.gesperrt { opacity: .6; }
.booster-symbol { font-size: 3em; }
.chancen-stufe { margin: 1em 0; }
.chancen-raster { display: flex; flex-wrap: wrap; gap: .8em; margin-top: .5em; }
.chance-karte { display: flex; flex-direction: column; align-items: center; gap: .1em; width: 92px; text-align: center; }
.booster-aufdecken .aufdecken { animation: aufdecken .5s ease-out both; }
@keyframes aufdecken { from { opacity: 0; transform: rotateY(90deg) scale(.8); } to { opacity: 1; transform: none; } }

/* =================================================================
 * Responsive: Tablet (≤ 1000 px) und Smartphone & kleine Tablets (≤ 800 px)
 * ================================================================= */
@media (max-width: 1000px) {
  .setup, .laden, .karte-seite, .vorb { grid-template-columns: 1fr; }
  .karte-seite { padding: .8em; }
  .sammlung-raster { max-height: none; }
  .rucksack-slots { min-height: 0; }
  .topbar { flex-wrap: wrap; gap: .4em .9em; }
  .topbar .btn { white-space: nowrap; }
  .tb-relikte { max-width: none; flex-wrap: nowrap; }
}

@media (max-width: 800px) {
  body { font-size: 15px; }
  .seite { padding: .8em .7em 1.5em; }
  .zentrum { padding: 1.2em .7em; gap: .9em; }
  h2 { font-size: 1.3em; }
  .gross-titel { font-size: 2.1em; }
  .belohnungen { flex-wrap: wrap; gap: .8em; }
  .btn.gross { font-size: 1.05em; padding: .65em 1.1em; }
  .knopfreihe { flex-wrap: wrap; }
  .panel { padding: .8em; }

  /* Karten etwas kleiner */
  .karte { font-size: 13px; }
  .karte.k-gross { font-size: 15px; }
  .karte.k-klein { font-size: 10.5px; }
  .karte.k-mini { font-size: 9px; }
  .raster { gap: .5em; }

  /* Kopfzeile */
  .topbar { flex-wrap: wrap; gap: .35em .7em; padding: .4em .6em; font-size: 14px; }
  .tb-akt { flex-basis: 100%; font-size: .95em; }
  .tb-lp { min-width: 0; }
  .lp-balken { width: 64px; }
  .tb-relikte { flex-wrap: wrap; }
  .tb-raum { display: none; }
  .topbar .btn.klein-btn { font-size: .78em; padding: .3em .5em; }

  /* Titel */
  .logo { font-size: 2.3em; }
  .titel { padding: 1.2em .8em; gap: 1em; }
  .titel-karten .karte { font-size: min(10.5px, 2.4vw); }
  .titel-menue { min-width: 0; width: 100%; max-width: 320px; }

  /* Setup */
  .modus-wahl { flex-direction: column; }
  .rucksack-slots { gap: .3em; }
  .rucksack-slots .karte, .slot-leer { font-size: min(9px, 2.1vw); }

  /* Dungeon-Karte */
  .dungeon { height: calc(100svh - 150px); min-height: 520px; }
  .station { width: 40px; height: 40px; font-size: 18px; }
  .station.boss { width: 54px; height: 54px; font-size: 26px; }
  .station-tip { display: none; }
  .ebene-nr { left: 4px; }

  /* Vorbereitung: Stärkevergleich */
  .st-zeile { grid-template-columns: 88px 1fr; gap: .2em .6em; }
  .st-wert { grid-column: 1 / -1; font-size: .9em; text-align: right; }
  .st-titel { font-size: .85em; }

  /* Duell: Gegnerhand oben, Brett, eigene Hand unten */
  .brett, .raetsel-feld {
    --zh: clamp(84px, min(33vw, calc((100svh - 330px) / 3)), 168px);
    --zb: calc(var(--zh) * .762);
  }
  .duell-kopf { flex-wrap: wrap; gap: .4em .6em; padding: .4em .5em; }
  .duell-feld { flex-direction: column; align-items: center; gap: .35em; padding: .2em .4em 1em; }
  .duell-feld > div:first-child { order: 3; }
  .duell-feld > .brett-bereich { order: 2; }
  .duell-feld > div:last-child { order: 1; }
  .hand { width: auto; height: auto; display: flex; justify-content: center; gap: .2em; min-height: 5em; }
  .hand .karte { position: relative; left: auto; top: auto !important; font-size: min(10px, 2.35vw); }
  .hand-spieler .karte.waehlbar:hover { transform: none; }
  .hand-spieler .karte.gewaehlt { transform: translateY(-.9em); }
  .hand-gegner .karte.ki-wahl { transform: translateY(.9em); }
  .hand-titel { margin-bottom: .1em; font-size: .78em; }
  .punkte { font-size: 1.5em; gap: 1.2em; }
  .brett { grid-template-columns: repeat(3, var(--zb)); grid-template-rows: repeat(3, var(--zh)); gap: 4px; padding: 6px; }
  .feld .karte { font-size: calc(var(--zh) / 10.6); }
  .feld-element { font-size: calc(var(--zh) / 4.5); }
  .feld-element-name { font-size: 9px; bottom: 3px; }
  .banner { font-size: 2em; }

  /* Rätsel */
  .raetsel-feld { flex-direction: column; align-items: center; gap: 1em; }
  .raetsel-hand { flex-direction: row; justify-content: center; }
  .raetsel-hand .karte { font-size: min(11px, 2.6vw); }

  /* Händler, Lagerfeuer, Statistik */
  .lager-aktionen { grid-template-columns: 1fr; gap: .6em; }
  .lager-aktion { padding: .8em; }
  .lager-aktion .icon { font-size: 1.8em; }
  .lagerfeuer-deko { font-size: 2.6em; }
  .statistik { grid-template-columns: repeat(2, 1fr); gap: .5em; }
  .dienst { flex-wrap: wrap; }

  /* Relikte, Ereignisse, Booster */
  .relikt { width: min(200px, 42vw); padding: .7em; }
  .ereignis-symbol { font-size: 3em; }
  .booster-reihe { grid-template-columns: 1fr; }
  .chance-karte { width: 78px; }

  /* Dialoge */
  .modal-bg { padding: .6em; align-items: flex-start; }
  .modal { padding: 1em; max-height: calc(100svh - 1.2em); }
  .modal-knoepfe { justify-content: stretch; }
  .modal-knoepfe .btn { flex: 1; }
  .seiten-wahl .karte { font-size: 11px; }
  .toast-box { top: 10px; width: calc(100% - 20px); }
  .debug { width: 150px; max-height: 50vh; overflow-y: auto; }
}

/* Smartphone quer: wenig Höhe -> Hände links/rechts als 2er-Raster, alles an die Höhe angepasst */
@media (max-height: 560px) and (orientation: landscape) {
  .topbar { position: static; flex-wrap: nowrap; font-size: 13px; padding: .3em .6em; gap: .6em; }
  .tb-akt { display: none; }
  .topbar .btn.klein-btn { font-size: .78em; padding: .25em .45em; }
  .duell-kopf { padding: .25em .5em; gap: .5em; font-size: .9em; }
  .brett, .raetsel-feld {
    --zh: clamp(60px, calc((100svh - 135px) / 3), 168px);
    --zb: calc(var(--zh) * .762);
  }
  .brett { gap: 3px; padding: 4px; }
  .brett-bereich { flex-direction: column-reverse; gap: .2em; }
  .duell-feld { flex-direction: row; align-items: center; justify-content: center; gap: .8em; padding: .2em .5em .6em; }
  .duell-feld > div { order: 0 !important; }
  .hand { width: auto; height: auto; display: grid; grid-template-columns: repeat(2, auto); gap: .25em; min-height: 0; }
  .hand .karte { position: relative; left: auto; top: auto !important; font-size: clamp(6px, calc((100svh - 135px) / 24), 12px); }
  .hand-spieler .karte.waehlbar:hover { transform: none; }
  .hand-spieler .karte.gewaehlt { transform: translateY(-.5em); box-shadow: 0 0 0 .2em var(--gold); }
  .hand-gegner .karte.ki-wahl { transform: translateY(.5em); }
  .punkte { font-size: 1.1em; line-height: 1; }
  .feld-element { font-size: calc(var(--zh) / 4.5); }
  .dungeon { height: calc(100svh - 60px); min-height: 330px; }
  .station { width: 34px; height: 34px; font-size: 16px; }
  .station.boss { width: 46px; height: 46px; font-size: 22px; }
  .station-tip { display: none; }
  .modal { max-height: calc(100svh - 1.2em); }
}

/* ---------- Datenschutz-Banner ---------- */
.ds-banner-bg {
  position: fixed; inset: 0; z-index: 200; background: rgba(5, 4, 10, .8);
  display: flex; align-items: flex-end; justify-content: center; padding: 1em;
  animation: einblenden .25s ease-out;
}
.ds-banner {
  background: var(--bg2); border: 1px solid var(--gold2); border-radius: 12px;
  padding: 1.2em 1.4em; max-width: 720px; width: 100%; max-height: calc(100svh - 2em); overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .7); line-height: 1.45;
}
.ds-banner h2 { margin: 0 0 .5em; }
.ds-banner p { margin: .5em 0; }
.ds-knoepfe { display: flex; justify-content: flex-end; gap: .6em; flex-wrap: wrap; margin: 1em 0 .4em; }
.ds-details { margin: .8em 0; border-top: 1px solid var(--linie); padding-top: .6em; }
.ds-details summary { cursor: pointer; color: var(--gold); }
.ds-banner h3, .modal-inhalt h3 { font-size: 1em; color: var(--gold); margin: 1.1em 0 .3em; }
.ds-tabelle { width: 100%; border-collapse: collapse; font-size: .88em; margin: .4em 0; }
.ds-tabelle th, .ds-tabelle td { text-align: left; padding: .35em .5em; border-bottom: 1px solid var(--linie); vertical-align: top; }
.ds-tabelle code { font-size: .92em; word-break: break-all; color: #c9b8f0; }
.ds-status { padding: .5em .7em; border-radius: 6px; margin: 0 0 .8em; }
.ds-status.ja { background: rgba(89, 179, 106, .15); border: 1px solid var(--gruen); }
.ds-status.nein { background: rgba(200, 70, 60, .15); border: 1px solid var(--rot); }
.ds-hinweis { max-width: 520px; margin: 1em auto 0; padding: .5em .8em; border: 1px solid var(--rot); border-radius: 6px; background: rgba(200, 70, 60, .12); font-size: .9em; text-align: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }
@media (max-width: 800px) {
  .ds-banner { padding: 1em; font-size: .95em; }
  .ds-knoepfe .btn { flex: 1 1 100%; }
}
.modal-inhalt h3 ~ p { line-height: 1.4; }

/* ---------- Mini-Footer & Rechtsseiten ---------- */
body { padding-bottom: 1.9em; }
.mini-footer {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 250;
  display: flex; gap: .45em; align-items: center; white-space: nowrap;
  padding: .2em .8em; font-size: 11.5px; line-height: 1.4;
  background: rgba(20, 18, 28, .85); border: 1px solid var(--linie); border-bottom: 0; border-radius: 7px 7px 0 0;
  color: var(--text2);
}
.mini-footer a { color: var(--text2); text-decoration: none; }
.mini-footer a:hover, .mini-footer a:focus-visible, .mini-footer a[aria-current] { color: var(--gold); text-decoration: underline; }

.recht { max-width: 860px; margin: 0 auto; padding: 1.5em 16px 2.5em; line-height: 1.55; overflow-wrap: anywhere; hyphens: auto; }
.recht-zurueck { display: inline-block; margin-bottom: 1em; color: var(--gold); text-decoration: none; }
.recht-zurueck:hover { text-decoration: underline; }
.recht-text { background: var(--bg2); border: 1px solid var(--linie); border-radius: 12px; padding: 1.2em 1.6em; }
.recht h1 { color: var(--gold); font-size: 1.8em; margin: .2em 0 .6em; }
.recht h2 { color: var(--gold); font-size: 1.3em; margin: 1.5em 0 .4em; }
.recht h3 { font-size: 1.1em; margin: 1.3em 0 .3em; }
.recht h4 { font-size: 1em; margin: 1em 0 .2em; color: var(--text2); }
.recht p, .recht li { margin: .45em 0; }
.recht a { color: var(--gold); }
.recht-siegel { display: flex; justify-content: center; gap: 1.2em; flex-wrap: wrap; margin-top: 1.6em; }
.recht-siegel img { width: 135px; height: auto; display: block; }
@media (max-width: 600px) {
  .recht-text { padding: 1em; }
  .recht h1 { font-size: 1.45em; }
  .recht-siegel img { width: 110px; }
}
.ds-banner a, .modal-inhalt a { color: var(--gold); }

/* ---------- Regelbeispiele ---------- */
.bsp-details { margin: .45em 0 .9em; border: 1px solid var(--linie); border-radius: 8px; background: rgba(0, 0, 0, .18); }
.bsp-details > summary { cursor: pointer; padding: .4em .7em; color: var(--gold); font-size: .92em; list-style-position: inside; user-select: none; }
.bsp-details > summary:hover { background: rgba(227, 185, 85, .08); }
.bsp-details[open] > summary { border-bottom: 1px solid var(--linie); }
.bsp { padding: .7em .8em .5em; }
.bsp-legende { margin: .6em .8em 0; display: flex; flex-wrap: wrap; gap: .25em .5em; align-items: center; }
.bsp-chip { display: inline-block; width: .95em; height: .95em; border-radius: 3px; vertical-align: -2px; }
.bsp-chip.b-s { background: var(--spieler); }
.bsp-chip.b-g { background: var(--gegner); }
.bsp-chip.m { border: 2px solid var(--gold); background: transparent; border-radius: 50%; }
.bsp-reihe { display: flex; align-items: center; justify-content: center; gap: .8em; flex-wrap: wrap; }
.bsp-reihe figure { margin: 0; text-align: center; }
.bsp-reihe figcaption { font-size: .8em; color: var(--text2); margin-bottom: .3em; }
.bsp-pfeil { font-size: 1.6em; color: var(--gold); }
.bsp-brett {
  --bf: 58px;
  display: grid; grid-template-columns: repeat(3, var(--bf)); grid-template-rows: repeat(3, var(--bf)); gap: 4px;
  padding: 5px; background: var(--panel); border: 2px solid var(--linie); border-radius: 8px;
}
.bsp-brett.wand { border-top: 4px solid var(--gold); }
.bsp-feld { position: relative; border-radius: 5px; background: rgba(255, 255, 255, .04); display: flex; align-items: center; justify-content: center; }
.bsp-feld.elfeld { background: rgba(224, 89, 42, .12); }
.bsp-feld-el { position: absolute; font-size: 22px; opacity: .45; }
.bsp-karte {
  position: absolute; inset: 0; border-radius: 5px; border: 2px solid rgba(255, 255, 255, .25);
  background: linear-gradient(160deg, var(--tint1), var(--tint2)); font-size: 13px; font-weight: bold; color: #fff;
}
.bsp-karte.b-s { --tint1: #3d6fbf; --tint2: var(--spieler2); }
.bsp-karte.b-g { --tint1: #bf4a4a; --tint2: var(--gegner2); }
.bsp-karte.neu { border-color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.bsp-karte.flip { border-color: var(--gold); box-shadow: 0 0 10px rgba(227, 185, 85, .7); animation: bsp-flip .6s ease-out; }
@keyframes bsp-flip { from { transform: rotateY(90deg); } to { transform: none; } }
.bsp-karte .bw { position: absolute; line-height: 1; text-shadow: 0 1px 2px #000; min-width: 1.15em; text-align: center; padding: 1px 0; border-radius: 50%; }
.bsp-karte .bw.o { top: 3px; left: 50%; transform: translateX(-50%); }
.bsp-karte .bw.u { bottom: 3px; left: 50%; transform: translateX(-50%); }
.bsp-karte .bw.l { left: 3px; top: 50%; transform: translateY(-50%); }
.bsp-karte .bw.r { right: 3px; top: 50%; transform: translateY(-50%); }
.bsp-karte .bw.m { outline: 2px solid var(--gold); background: rgba(0, 0, 0, .35); }
.bsp-karte .bw.elp { color: #8ef59f; }
.bsp-karte .bw.elm { color: #ff9a8f; }
.bsp-el { position: absolute; left: 2px; bottom: 1px; font-size: 10px; line-height: 1; }
.bsp-marke { position: absolute; top: 1px; right: 3px; font-size: 11px; color: var(--gold); }
.bsp-marke.neu { color: #fff; }
.bsp-text { margin-top: .6em; font-size: .92em; }
.bsp-text p { margin: .35em 0; }
@media (max-width: 560px) {
  .bsp-reihe { flex-direction: column; gap: .3em; }
  .bsp-pfeil { transform: rotate(90deg); font-size: 1.3em; }
  .bsp { padding: .6em .4em .4em; }
}

/* ---------- Zufallskampf 4×4 ---------- */
.brett.brett-4 {
  --zh: clamp(96px, calc((100svh - 230px) / 4), 136px); --zb: calc(var(--zh) * .762);
  grid-template-columns: repeat(4, var(--zb)); grid-template-rows: repeat(4, var(--zh)); gap: 5px;
}
.duell-4 .feld-element { font-size: calc(var(--zh) / 4.5); }
.duell-4 .feld-element-name { font-size: 10px; }
.zk-kampfwert { font-size: .95em; color: var(--text2); }
.zk-kampfwert .sp { color: #7fb0ff; }
.zk-kampfwert .ge { color: #ff8a7a; }
.zk-intro { max-width: 900px; margin: -.4em 0 1em; }
.zk-setup { grid-template-columns: 1fr 480px; }
.zk-rechts { display: flex; flex-direction: column; gap: 1em; }
.zk-gesperrt .sammlung-raster { opacity: .45; pointer-events: none; }
.zk-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; justify-items: center; }
.zk-kampfwert-box { margin-top: .8em; padding: .5em .7em; border-radius: 6px; background: rgba(227, 185, 85, .08); border: 1px solid rgba(227, 185, 85, .35); font-size: .92em; }
.zk-regeln { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; margin: .6em 0 .3em; }
.zk-regel { display: flex; gap: .5em; align-items: flex-start; padding: .45em .55em; border: 1px solid var(--linie); border-radius: 6px; cursor: pointer; background: rgba(0, 0, 0, .15); }
.zk-regel.an { border-color: var(--gold); background: rgba(227, 185, 85, .08); }
.zk-regel input { margin-top: .25em; accent-color: var(--gold); }
.zk-regel > span { display: flex; flex-direction: column; gap: .1em; }
.zk-regel .klein { font-size: .78em; line-height: 1.3; }
.zk-stufen { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin-top: .6em; }
.zk-groessen { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin-top: .6em; }
.zk-groessen .modus { font-size: .85em; padding: .6em; }
.zk-slots.zk-slots-3 { grid-template-columns: repeat(5, 1fr); }
.zk-stufen .modus { font-size: .85em; padding: .6em; }
.zk-lohn { color: #8fd3ff; }
.zk-endstand { font-size: 2.4em; }
.zk-bilanz { display: flex; flex-direction: column; gap: .3em; font-size: .92em; }
.zk-gegnerdeck { gap: .4em; }
@media (max-width: 1000px) {
  .zk-setup { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .brett.brett-4 { --zh: clamp(60px, min(24vw, calc((100svh - 420px) / 4)), 136px); gap: 3px; padding: 5px; }
  .duell-4 .hand { flex-wrap: wrap; max-width: calc(4 * 6.4em + 1em); margin: 0 auto; }
  .duell-4 .hand .karte { font-size: min(7.5px, 2vw); }
  .duell-4 .feld .karte { font-size: calc(var(--zh) / 10.6); }
  .zk-regeln { grid-template-columns: 1fr; }
  .zk-stufen { grid-template-columns: 1fr; }
  .zk-slots.zk-slots-3 .karte, .zk-slots.zk-slots-3 .slot-leer { font-size: min(8px, 1.8vw); }
  .zk-slots .karte, .zk-slots .slot-leer { font-size: min(9px, 2.1vw); }
}
@media (max-height: 560px) and (orientation: landscape) {
  .brett.brett-4 { --zh: clamp(48px, calc((100svh - 120px) / 4), 136px); gap: 2px; padding: 3px; }
  .duell-4 .hand { flex-wrap: nowrap; max-width: none; grid-template-columns: repeat(2, auto); }
  .duell-4 .hand .karte { font-size: clamp(5px, calc((100svh - 120px) / 42), 10px); }
}

/* Versteckter Debug-Schalter: Tippen ohne jede sichtbare Rückmeldung */
.titel-karten [data-geheim] { cursor: default; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; outline: none; }
.debug-token { width: 100%; font: inherit; padding: .5em .6em; border-radius: 6px; border: 1px solid var(--linie); background: var(--bg); color: var(--text); }
.debug-token:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.debug-token-fehler { min-height: 1.3em; color: #ff8a7a; }

/* ---------- Konto & Cloud-Save (horizOn) ---------- */
.konto-modal { max-width: 460px; }
.k-tabs { display: flex; gap: .3em; border-bottom: 1px solid var(--linie); margin-bottom: 1em; }
.k-tab {
  flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text2);
  padding: .55em .4em; cursor: pointer; font-size: 1em; margin-bottom: -1px;
}
.k-tab:hover { color: var(--text); }
.k-tab.aktiv { color: var(--gold); border-bottom-color: var(--gold); }
.k-feld { display: flex; flex-direction: column; gap: .3em; margin-bottom: .85em; }
.k-feld span { font-size: .9em; color: var(--text2); }
.k-feld input {
  background: var(--panel2); color: var(--text); border: 1px solid var(--linie); border-radius: 6px;
  padding: .6em .7em; font: inherit; font-size: 16px; width: 100%;
}
.k-feld input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(227, 185, 85, .25); }
.k-feld input:disabled { opacity: .6; }
.k-fehler { min-height: 1.2em; margin: 0 0 .7em; color: #ff9a8a; font-size: .9em; }
.k-fehler:empty { min-height: 0; margin: 0; }
.k-fehler.gut { color: #9fe0aa; }
.k-info { margin-top: 1.2em; border-top: 1px solid var(--linie); padding-top: .8em; }
.k-profil { display: flex; align-items: center; gap: .9em; margin-bottom: 1em; }
.k-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#3a3356, #2a2540); border: 2px solid var(--gold2); color: var(--gold); font-size: 1.3em;
}
.k-profil .k-name { font-size: 1.2em; }
.k-sync { padding: .55em .8em; border-radius: 6px; border: 1px solid var(--linie); background: var(--panel); margin: 0 0 1em; }
.k-sync.s-konflikt, .k-sync.s-fehler { border-color: var(--rot); background: rgba(200, 70, 60, .12); }
.k-sync.s-synchron { border-color: var(--gruen); }
.sync-badge { display: inline-block; min-width: 1.1em; text-align: center; }
.sync-badge.s-synchron { color: #8fd3ff; }
.sync-badge.s-konflikt, .sync-badge.s-fehler { color: #ff9a8a; }
.k-vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; margin-top: 1em; }
.k-stand { background: var(--panel); border: 1px solid var(--linie); border-radius: 8px; padding: .7em .9em; }
.k-stand h3 { color: var(--gold); font-size: 1.05em; }
.k-stand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3em; }
@media (max-width: 560px) { .k-vergleich { grid-template-columns: 1fr; } }

/* ---------- Social: Freunde, Profil, Duelle, Chat ---------- */
.social { max-width: 900px; }
.f-badge {
  display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 1em; background: var(--rot); color: #fff;
  font-size: .78em; line-height: 1.4em; text-align: center; font-weight: bold; vertical-align: middle;
}
.f-code { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; margin-bottom: 1em; }
.f-code-wert { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25em; color: var(--gold); margin: .2em 0 .5em; word-break: break-all; user-select: all; }
.f-hinzu { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6em; }
.f-hinzu .k-feld { flex: 1 1 12em; margin: 0; }
.f-hinzu input { font-family: ui-monospace, Menlo, Consolas, monospace; }
.f-vorschau { flex: 1 1 100%; display: flex; align-items: center; gap: .7em; padding: .5em .7em; border: 1px solid var(--gold2); border-radius: 8px; background: var(--panel); }
.f-tabs { flex-wrap: wrap; }
.f-tabs .k-tab { flex: 1 1 auto; white-space: nowrap; }
.f-inhalt h3 { margin-top: 1em; font-size: 1.05em; color: var(--text2); }
.f-liste { display: flex; flex-direction: column; gap: .5em; }
.f-eintrag {
  display: flex; align-items: center; gap: .8em; padding: .6em .8em; border: 1px solid var(--linie); border-radius: 10px;
  background: rgba(37, 33, 54, .85);
}
.f-eintrag[data-profil] { cursor: pointer; }
.f-eintrag[data-profil]:hover { border-color: var(--gold2); }
.f-eintrag.f-wichtig { border-color: var(--gold); box-shadow: 0 0 .6em rgba(227, 185, 85, .2); }
.f-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15em; }
.f-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#3a3356, #2a2540); border: 2px solid var(--gold2); color: var(--gold); font-size: 1.05em;
}
.f-profil { max-width: 620px; }
.f-profil-kopf { display: flex; align-items: center; gap: 1em; margin-bottom: 1em; }
.f-profil-kopf h2 { margin: 0; }
.f-profil-kopf .f-avatar { width: 60px; height: 60px; font-size: 1.4em; }
.f-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5em; margin-bottom: 1em; }
.f-stat { background: var(--panel); border: 1px solid var(--linie); border-radius: 8px; padding: .5em; text-align: center; display: flex; flex-direction: column; gap: .2em; }
.f-stat b { color: var(--gold); font-size: 1.15em; }
.f-stat span { font-size: .78em; color: var(--text2); }
.fd-deck { display: flex; flex-direction: column; align-items: center; gap: .6em; margin: .6em 0 1em; }
.fd-regeln { margin-bottom: 1em; }
.fd-sammlung { max-height: 46vh; overflow-y: auto; padding: .3em; justify-content: center; }
.chat-modal { max-width: 560px; display: flex; flex-direction: column; }
.chat-hinweis { margin-top: 0; }
.chat-liste {
  height: 46vh; min-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: .5em;
  padding: .6em; border: 1px solid var(--linie); border-radius: 8px; background: var(--bg);
}
.chat-leer { margin: auto; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.chat-msg.eigen { align-self: flex-end; align-items: flex-end; }
.chat-blase { background: var(--panel2); border: 1px solid var(--linie); border-radius: 12px 12px 12px 4px; padding: .45em .7em; word-break: break-word; white-space: normal; }
.chat-msg.eigen .chat-blase { background: #3d3418; border-color: var(--gold2); border-radius: 12px 12px 4px 12px; }
.chat-msg.offen .chat-blase { opacity: .65; }
.chat-meta { font-size: .72em; color: var(--text2); margin-top: .15em; }
.chat-meta .link-btn { font-size: 1em; }
.chat-eingabe { display: flex; gap: .5em; margin-top: .6em; align-items: stretch; }
.chat-eingabe textarea {
  flex: 1; resize: none; background: var(--panel2); color: var(--text); border: 1px solid var(--linie); border-radius: 6px;
  padding: .5em .6em; font: inherit; font-size: 16px;
}
.chat-eingabe textarea:focus { outline: none; border-color: var(--gold); }
.chat-fehler { margin-top: .4em; }
@media (max-width: 700px) {
  .f-code { grid-template-columns: 1fr; }
  .f-stats { grid-template-columns: repeat(2, 1fr); }
  .f-eintrag { flex-wrap: wrap; }
  .f-eintrag .knopfreihe { flex: 1 1 100%; justify-content: flex-end; }
}

/* ---------- Live-Freundesduell ---------- */
.zug-anzeige.eilig { animation: eilig 1s ease-in-out infinite; border-color: var(--rot); }
@keyframes eilig { 50% { box-shadow: 0 0 .7em rgba(220, 70, 70, .6); } }
.fd-modus { margin-bottom: .6em; }
.fd-modus .k-tab { display: flex; flex-direction: column; gap: .15em; flex: 1; }
.fd-modus .k-tab .klein { font-weight: normal; }
.fd-warte { max-width: 460px; margin: 3em auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .6em; }
.fd-countdown { color: var(--gold); font-variant-numeric: tabular-nums; min-height: 1.3em; margin: 0; }
.fd-spinner {
  width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--linie); border-top-color: var(--gold);
  animation: fd-dreh 1s linear infinite;
}
@keyframes fd-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .fd-spinner, .zug-anzeige.eilig { animation: none; } }
.f-lobby-kopf { display: flex; gap: 1em; align-items: center; justify-content: space-between; margin-bottom: .8em; }
.f-lobby-kopf p { margin: .3em 0 0; }
.f-lobby-filter { margin-bottom: .6em; align-items: center; }
.f-lobby-filter .zk-regel { padding: .3em .6em; }
@media (max-width: 700px) { .f-lobby-kopf { flex-direction: column; align-items: stretch; } }

/* ---------- Promo-Codes ---------- */
.promo-modal { max-width: 480px; }
.promo-form { display: flex; gap: .6em; align-items: flex-end; flex-wrap: wrap; }
.promo-form .k-feld { flex: 1 1 14em; margin: 0; }
.promo-form input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.promo-code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--gold); }
.promo-steine { font-size: 1.2em; color: #8fd3ff; }

/* =====================================================================
 * REDESIGN – Dark Fantasy (nur Optik & Anordnung)
 * Desktop: PC-Spiel-Look · Mobile (≤ 800 px): klassisches Mobile Game
 * mit Ressourcenleiste oben und Tab-Leiste unten (js/ui/nav.js).
 * ===================================================================== */

/* ---------- Grundlagen ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(120, 86, 190, .22), transparent 60%),
    radial-gradient(ellipse 80% 60% at 100% 110%, rgba(200, 120, 40, .10), transparent 60%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(60, 100, 200, .10), transparent 60%),
    linear-gradient(180deg, #120f1b 0%, var(--flaeche-1) 100%) fixed;
  background-color: var(--flaeche-1);
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
/* Vignette über allem Hintergrund */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%);
}
#app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; }
h1, h2, h3 { font-family: var(--schrift-titel); font-weight: 600; letter-spacing: .04em; }
h2 { color: var(--gold); text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 14px rgba(227, 185, 85, .18); }
h3 { font-size: 1.05em; }
.spacer { flex: 1; }
.seelen-text { color: var(--seelen); }
.regel-gross { font-size: 1em; }
.seelen-text.regel-gross { font-size: 1.05em; }
.nur-mobil { display: none; }
::selection { background: rgba(227, 185, 85, .35); }
:focus-visible { outline: 2px solid var(--gold-hell); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #4a3f68 transparent; }

/* ---------- Knöpfe: Metallrahmen mit Gold-Fase ---------- */
.btn {
  position: relative;
  font-family: var(--schrift-titel); font-weight: 600; letter-spacing: .04em;
  color: #efe6cf;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #3b3352, #241f35);
  border: 1px solid #5b4d7c;
  border-radius: var(--radius-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 -2px 0 rgba(0, 0, 0, .35), var(--schatten-1);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .6);
  transition: border-color .15s, box-shadow .15s, transform .08s, filter .15s, background .15s;
}
.btn:hover:not(:disabled) {
  border-color: var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 0 0 1px rgba(227, 185, 85, .25), 0 0 16px rgba(227, 185, 85, .22);
  filter: brightness(1.08);
}
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .45); }
.btn:disabled { filter: grayscale(.6); }
.btn.primaer {
  color: #23170a; text-shadow: 0 1px 0 rgba(255, 240, 200, .45);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #f0cd72 0%, #c99a3b 55%, #9a7124 100%);
  border: 1px solid #fbe3a0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(90, 60, 10, .45), 0 0 0 1px #5e4313, 0 4px 14px rgba(0, 0, 0, .5), 0 0 22px rgba(227, 185, 85, .25);
}
.btn.primaer:hover:not(:disabled) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, #f7d985 0%, #d5a746 55%, #a77b2a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -3px 0 rgba(90, 60, 10, .45), 0 0 0 1px #5e4313, 0 4px 14px rgba(0, 0, 0, .5), 0 0 30px rgba(240, 200, 100, .45);
}
.btn.gefahr {
  color: #ffe9e4;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 50%), linear-gradient(180deg, #a3382f, #5e1a15);
  border-color: #e0685c;
}
.btn.gefahr:hover:not(:disabled) { border-color: #ff9a8a; box-shadow: 0 0 16px rgba(220, 80, 60, .45); }
.btn.gross { font-size: 1.15em; padding: .75em 1.8em; letter-spacing: .08em; }
.btn.klein-btn { font-size: .8em; padding: .4em .8em; }
.link-btn { font-family: inherit; }

select, .k-feld input, .chat-eingabe textarea {
  background: linear-gradient(180deg, #16131f, #1d1929);
  border: 1px solid #4a3f66; color: var(--text);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45);
}
select { border-radius: var(--radius-1); padding: .45em .6em; font-family: var(--schrift); }
select:focus { outline: none; border-color: var(--gold); }

/* ---------- Panels: dunkles Inlay mit Goldrahmen & Eckornamenten ---------- */
.panel, .stat, .k-stand, .f-stat, .f-eintrag, .modus, .lager-aktion, .relikt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 40%),
    linear-gradient(160deg, rgba(44, 38, 64, .92), rgba(24, 21, 34, .94));
  border: 1px solid #4b3f6c;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06), var(--schatten-2);
}
.panel { position: relative; border-radius: var(--radius-2); padding: 1.1em 1.3em; border-color: rgba(184, 144, 47, .55); }
.panel::before, .panel::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 2px solid var(--gold2); opacity: .85;
}
.panel::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.panel::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.panel-flach { box-shadow: none; }

/* ---------- Run-HUD (Topbar) ---------- */
.topbar {
  padding: .55em max(1.4em, var(--sicher-rechts)) .55em max(1.4em, var(--sicher-links));
  padding-top: calc(.55em + var(--sicher-oben));
  background: linear-gradient(180deg, rgba(10, 8, 16, .96), rgba(22, 18, 32, .92));
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--gold2) 20%, var(--gold) 50%, var(--gold2) 80%, transparent) 1;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tb-akt { font-family: var(--schrift-titel); font-weight: 700; letter-spacing: .06em; text-shadow: 0 0 10px rgba(227, 185, 85, .3); }
.tb-lp, .tb-gold, .tb-seelen {
  padding: .22em .7em; border-radius: 999px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .3));
  border: 1px solid #4a3f66; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.tb-gold { border-color: rgba(227, 185, 85, .45); }
.tb-seelen { border-color: rgba(143, 211, 255, .4); color: var(--seelen); }
.lp-balken { height: 11px; border-radius: 6px; background: #2a0f0f; border-color: #6a2c2c; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7); }
.lp-balken > div { background: linear-gradient(180deg, #ff7a66, #c2302a 60%, #8e1f1b); box-shadow: 0 0 8px rgba(255, 90, 70, .5); }
.tb-relikt { border-color: rgba(184, 144, 47, .5); background: rgba(0, 0, 0, .35); border-radius: 8px; padding: .05em .3em; }
.hc-marke { font-family: var(--schrift-titel); font-weight: 700; box-shadow: 0 0 12px rgba(200, 70, 60, .6); }

/* ---------- Karten: edler Rahmen & Tiefe ---------- */
.karte {
  border-radius: .6em;
  box-shadow: 0 .15em .3em rgba(0, 0, 0, .55), 0 .5em 1.2em rgba(0, 0, 0, .35), inset 0 0 0 .06em rgba(255, 255, 255, .25);
}
.karte::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 4; border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .06) 100%);
}
.karte.r-episch { box-shadow: 0 0 .6em rgba(162, 95, 217, .45), 0 .5em 1.2em rgba(0, 0, 0, .4), inset 0 0 0 .06em rgba(255, 255, 255, .25); }
.karte.r-legendaer { box-shadow: 0 0 .9em rgba(240, 200, 100, .55), 0 .5em 1.2em rgba(0, 0, 0, .4), inset 0 0 0 .06em rgba(255, 255, 255, .35); }
.karte.r-legendaer::after, .karte.r-episch::after {
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .28) 45%, rgba(255, 255, 255, 0) 60%) -150% 0 / 250% 100% no-repeat,
              linear-gradient(125deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 30%);
  animation: glanz 5s ease-in-out infinite;
}
@keyframes glanz { 0%, 60% { background-position: -150% 0, 0 0; } 100% { background-position: 150% 0, 0 0; } }
.karte .k-name { font-family: var(--schrift-titel); font-weight: 700; letter-spacing: .02em; }
.k-werte { font-family: var(--schrift-titel); font-weight: 900; }
.karte.verdeckt {
  background:
    radial-gradient(circle at 50% 50%, rgba(227, 185, 85, .25), transparent 45%),
    repeating-linear-gradient(45deg, #3e1b2a 0 .45em, #2c1220 .45em .9em);
  --rahmen: #8a5a3a;
}
.k-ruecken { color: rgba(240, 205, 120, .75); text-shadow: 0 0 .4em rgba(240, 200, 100, .6); }
@media (hover: hover) {
  .karte.waehlbar:hover { transform: translateY(-.35em) scale(1.03); box-shadow: 0 .8em 1.6em rgba(0, 0, 0, .65), 0 0 0 .12em var(--gold), 0 0 1.2em rgba(227, 185, 85, .45); }
}

/* ---------- Titelbildschirm ---------- */
.titel { position: relative; overflow: hidden; }
.titel-szene { display: flex; justify-content: center; }
.logo {
  font-family: var(--schrift-titel); font-weight: 900; letter-spacing: .05em; line-height: 1.02;
  background: linear-gradient(180deg, #fff3c9 0%, #f0cd72 40%, #b8862c 70%, #f3d488 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(60, 35, 5, .9)) drop-shadow(0 0 18px rgba(227, 185, 85, .35));
  text-shadow: none;
}
.logo small {
  font-family: var(--schrift-titel); font-weight: 600; font-size: .26em; letter-spacing: .38em;
  -webkit-text-fill-color: var(--text2); color: var(--text2); filter: none; margin-top: .55em;
}
.intro { font-size: 1.08em; }
.hub-hud { display: flex; align-items: center; gap: .6em; }
.hud-plakette {
  display: inline-flex; align-items: center; gap: .3em; padding: .35em .9em; border-radius: 999px;
  font-weight: 700; font-variant-numeric: tabular-nums; color: var(--seelen);
  background: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .35));
  border: 1px solid rgba(143, 211, 255, .45); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6), 0 0 12px rgba(143, 211, 255, .15);
}
.hud-konto { border-radius: 999px; padding: .4em 1em; font-size: .9em; }
.menue-kacheln { display: contents; }
.menue-kachel .kachel-symbol { margin-right: .35em; }
.menue-trenner { display: block; height: 1px; margin: .35em 0; background: linear-gradient(90deg, transparent, rgba(184, 144, 47, .6), transparent); }
.ds-hinweis { max-width: 560px; }

/* Desktop: Menü links, Kartenfächer als Bühne rechts, HUD oben rechts */
@media (min-width: 1001px) {
  .titel {
    display: grid; grid-template-columns: minmax(380px, 34%) 1fr; grid-template-rows: auto 1fr;
    align-items: center; justify-items: start; text-align: left;
    padding: 2.2em 3.5em 3.5em; gap: 0 2em; min-height: 100vh; min-height: 100dvh;
  }
  .titel::before {
    content: ''; position: absolute; inset: 0 auto 0 0; width: min(46%, 640px); pointer-events: none;
    background: linear-gradient(90deg, rgba(8, 6, 14, .88) 0%, rgba(8, 6, 14, .6) 70%, transparent 100%);
    border-right: 1px solid rgba(184, 144, 47, .18);
  }
  .hub-hud { grid-column: 1 / -1; grid-row: 1; justify-self: end; position: relative; z-index: 2; }
  .titel-spalte { grid-column: 1; grid-row: 2; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 1.2em; align-self: center; width: 100%; max-width: 440px; }
  .titel-szene {
    grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: center; position: relative; z-index: 1;
    perspective: 1200px;
  }
  .titel-szene::before {
    content: ''; position: absolute; left: 50%; top: 55%; width: 140%; aspect-ratio: 1; transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(227, 185, 85, .22), rgba(130, 80, 200, .12) 40%, transparent 65%);
    pointer-events: none; z-index: -1;
  }
  .titel-karten { gap: 0; transform: rotateX(12deg); }
  .titel-karten .karte { font-size: clamp(16px, 1.6vw, 26px); margin: 0 -1.2em; box-shadow: 0 1.2em 2.4em rgba(0, 0, 0, .7); }
  .titel-karten .karte:nth-child(1) { transform: rotate(-18deg) translateY(2.2em); }
  .titel-karten .karte:nth-child(2) { transform: rotate(-9deg) translateY(.6em); }
  .titel-karten .karte:nth-child(3) { transform: translateY(-.4em) scale(1.08); z-index: 2; }
  .titel-karten .karte:nth-child(4) { transform: rotate(9deg) translateY(.6em); }
  .titel-karten .karte:nth-child(5) { transform: rotate(18deg) translateY(2.2em); }
  .logo { font-size: clamp(2.8em, 4.2vw, 4.4em); }
  .intro { margin: 0; max-width: 420px; border-left: 2px solid rgba(184, 144, 47, .5); padding-left: 1em; }
  .titel-menue { min-width: 0; width: 100%; gap: .25em; }
  .titel-menue .menue-haupt { margin-bottom: .6em; width: 100%; font-size: 1.25em; }
  .titel-menue .btn:not(.primaer) {
    text-align: left; background: transparent; border: 1px solid transparent; box-shadow: none;
    font-size: 1.06em; padding: .55em 1em .55em 1.2em; letter-spacing: .07em; color: #d9cfb6;
  }
  .titel-menue .btn:not(.primaer)::before {
    content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 0; transform: translateY(-50%);
    background: var(--gold); box-shadow: 0 0 10px var(--gold); transition: height .18s;
  }
  .titel-menue .btn:not(.primaer):hover:not(:disabled) {
    color: var(--gold-hell); filter: none; border-color: transparent;
    background: linear-gradient(90deg, rgba(227, 185, 85, .16), rgba(227, 185, 85, 0) 80%);
    box-shadow: none; text-shadow: 0 0 12px rgba(227, 185, 85, .6);
  }
  .titel-menue .btn:not(.primaer):hover::before { height: 70%; }
  .titel-menue .menue-mehr { font-size: .94em; color: var(--text2); padding-top: .4em; padding-bottom: .4em; }
  .titel-run { margin: 0; }
}
/* Tablet: zentrierte Spalte mit allen Menüpunkten */
@media (max-width: 1000px) and (min-width: 801px) {
  .titel-spalte { display: flex; flex-direction: column; align-items: center; gap: 1.2em; }
  .hub-hud { position: absolute; top: 1em; right: 1.2em; }
  .titel-menue { width: 320px; }
  .nur-desktop { display: none; }
}

/* ---------- Seitenköpfe & Hub-Seiten ---------- */
.seite-kopf {
  padding-bottom: .7em; margin-bottom: 1.1em;
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--gold2), rgba(184, 144, 47, .1) 70%, transparent) 1;
}
.seite-kopf h2 { font-size: 1.55em; }
.statistik .stat b, .f-stat b { font-family: var(--schrift-titel); font-weight: 700; }
.stat { border-radius: var(--radius-2); padding: .8em .9em; }
.buch-raster { gap: 1em .8em; }
.buch-nr { font-family: var(--schrift-titel); letter-spacing: .05em; }

/* Booster als stehende Packs */
.booster-pack {
  border-radius: var(--radius-3);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(227, 185, 85, .18), transparent 60%),
    linear-gradient(170deg, #2f2746, #161320 80%);
  transition: transform .18s, box-shadow .18s;
}
@media (hover: hover) { .booster-pack:not(.gesperrt):hover { transform: translateY(-4px); box-shadow: var(--schatten-3), 0 0 24px rgba(227, 185, 85, .25); } }
.booster-pack h3 { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.25em; }
.booster-symbol {
  width: 2.2em; height: 2.2em; margin: .1em auto .2em; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, #4a3c6e, #1a1626);
  border: 2px solid var(--gold2); box-shadow: 0 0 0 4px rgba(0, 0, 0, .35), 0 0 22px rgba(227, 185, 85, .35);
}
.preis { font-family: var(--schrift-titel); font-weight: 700; }

/* ---------- Dungeon-Karte als Pergament-/Steinkarte ---------- */
.dungeon {
  border-radius: var(--radius-3); border: 1px solid rgba(184, 144, 47, .55);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(227, 185, 85, .07), transparent 60%),
    repeating-radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .012) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #221c30, #120f1a);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(0, 0, 0, .6), var(--schatten-2);
}
.dungeon::after {
  content: '✦'; position: absolute; right: 14px; top: 10px; font-size: 34px; color: rgba(227, 185, 85, .22); pointer-events: none;
}
.station {
  background: radial-gradient(circle at 40% 35%, #3f3558, #1c1828);
  border-width: 2px; box-shadow: 0 0 0 3px rgba(0, 0, 0, .45), var(--schatten-1);
}
.station.boss { background: radial-gradient(circle at 40% 35%, #6b4a1e, #2a1a0c); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 22px rgba(227, 185, 85, .4); }
.station.aktuell { box-shadow: 0 0 0 3px var(--gold), 0 0 18px rgba(227, 185, 85, .6); }

/* ---------- Duell: Spieltisch ---------- */
.duell-kopf {
  margin: .5em auto 0; padding: .45em 1.2em; border-radius: 999px; max-width: max-content;
  background: linear-gradient(180deg, rgba(10, 8, 16, .85), rgba(26, 22, 38, .8));
  border: 1px solid rgba(184, 144, 47, .45); box-shadow: var(--schatten-2);
}
.duell-kopf .gegner-name { font-family: var(--schrift-titel); font-weight: 700; letter-spacing: .05em; }
.zug-anzeige { font-family: var(--schrift-titel); font-weight: 700; letter-spacing: .05em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.zug-anzeige.spieler { background: linear-gradient(180deg, #3463ad, #1d3c70); box-shadow: 0 0 14px rgba(80, 140, 230, .5); }
.zug-anzeige.gegner { background: linear-gradient(180deg, #ad3a3a, #6b2020); box-shadow: 0 0 14px rgba(230, 80, 80, .45); }
.brett {
  padding: 14px; border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .2)),
    repeating-linear-gradient(90deg, #2a2033 0 3px, #261d2f 3px 7px),
    #231b2c;
  border: 3px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 0 1px #2c1f0a, 0 0 0 4px #8e6a26, 0 0 0 5px #3a2a0e, inset 0 0 40px rgba(0, 0, 0, .7), 0 18px 50px rgba(0, 0, 0, .6), 0 0 60px rgba(227, 185, 85, .12);
}
.feld {
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(0, 0, 0, .25));
  border: 1px solid rgba(0, 0, 0, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -2px 6px rgba(0, 0, 0, .4);
}
.feld.frei.zielbar { box-shadow: inset 0 0 18px rgba(227, 185, 85, .18), 0 0 0 1px rgba(227, 185, 85, .4); }
.punkte {
  font-family: var(--schrift-titel); font-weight: 900; padding: .1em .9em; border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .6), rgba(0, 0, 0, .25));
  border: 1px solid rgba(184, 144, 47, .45); box-shadow: inset 0 1px 4px rgba(0, 0, 0, .6);
}
.punkte .sp { color: var(--sp-hell); text-shadow: 0 0 12px rgba(100, 150, 255, .6); }
.punkte .ge { color: var(--ge-hell); text-shadow: 0 0 12px rgba(255, 110, 90, .55); }
.hand-titel { font-family: var(--schrift-titel); letter-spacing: .08em; text-transform: uppercase; font-size: .75em; }
@media (min-width: 801px) {
  .hand {
    border-radius: var(--radius-3); padding-top: .4em;
    background: linear-gradient(180deg, rgba(0, 0, 0, .3), rgba(0, 0, 0, .1));
    box-shadow: inset 0 0 0 1px rgba(184, 144, 47, .2), inset 0 0 30px rgba(0, 0, 0, .4);
  }
}
.banner {
  font-family: var(--schrift-titel); font-weight: 900; letter-spacing: .08em;
  padding: .25em 1.4em; border-radius: 6px;
  background: linear-gradient(90deg, transparent, rgba(10, 8, 16, .92) 15%, rgba(10, 8, 16, .92) 85%, transparent);
  border: 0; border-top: 1px solid var(--gold2); border-bottom: 1px solid var(--gold2);
}

/* ---------- Ergebnis & Szenen ---------- */
.gross-titel { font-family: var(--schrift-titel); font-weight: 900; letter-spacing: .06em; }
.gross-titel.sieg {
  background: linear-gradient(180deg, #fff3c9, #f0cd72 45%, #b8862c); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(60, 35, 5, .9)) drop-shadow(0 0 24px rgba(227, 185, 85, .5));
}
.gross-titel.niederlage { text-shadow: 0 2px 0 #2a0505, 0 0 24px rgba(200, 70, 60, .55); }
.belohnungen > * {
  padding: .3em .9em; border-radius: 999px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(184, 144, 47, .45);
  font-family: var(--schrift-titel); font-weight: 700;
}
.ereignis-symbol, .lagerfeuer-deko { line-height: 1.1; }
.ereignis-text { font-size: 1.12em; }
.lager-aktion { border-radius: var(--radius-3); }
.lager-aktion b, .modus b, .relikt b { font-family: var(--schrift-titel); }
.modus { border-radius: var(--radius-2); }
.regel { background: linear-gradient(180deg, #3e3160, #2c2346); border-color: #6a58a0; }

/* ---------- Dialoge ---------- */
.modal-bg { background: rgba(4, 3, 8, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal {
  position: relative; border-radius: var(--radius-3); padding: 0 1.6em 1.4em;
  background: linear-gradient(180deg, #221d31, #16131f);
  border: 1px solid rgba(227, 185, 85, .6);
  box-shadow: 0 0 0 1px #000, 0 0 0 4px rgba(184, 144, 47, .18), var(--schatten-3);
}
.modal h2 {
  margin: 0 -1.6em 1em; padding: .8em 1.6em .7em; font-size: 1.3em;
  background: linear-gradient(180deg, rgba(227, 185, 85, .14), rgba(227, 185, 85, 0));
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--gold2) 20%, var(--gold) 50%, var(--gold2) 80%, transparent) 1;
  position: sticky; top: 0; z-index: 2; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal:not(:has(> h2)) { padding-top: 1.4em; }
.toast {
  font-family: var(--schrift-titel); font-weight: 600; letter-spacing: .03em;
  background: linear-gradient(180deg, #2c2540, #1a1626); border: 1px solid var(--gold2); border-radius: 999px;
  padding: .6em 1.4em; box-shadow: var(--schatten-2), 0 0 14px rgba(227, 185, 85, .2); text-align: center;
}
.k-tabs { border-bottom-color: rgba(184, 144, 47, .35); }
.k-tab { font-family: var(--schrift-titel); font-weight: 600; letter-spacing: .04em; border-radius: 8px 8px 0 0; }
.k-tab.aktiv { background: linear-gradient(180deg, rgba(227, 185, 85, .14), rgba(227, 185, 85, 0)); text-shadow: 0 0 10px rgba(227, 185, 85, .4); }
.ds-banner { border-radius: var(--radius-3); background: linear-gradient(180deg, #221d31, #16131f); border-color: rgba(227, 185, 85, .6); }
.mehr-liste { display: flex; flex-direction: column; gap: .5em; }
.mehr-eintrag { display: flex; align-items: center; gap: .8em; text-align: left; padding: .85em 1em; font-size: 1em; }
.mehr-symbol { width: 1.6em; text-align: center; font-size: 1.2em; }
.mehr-recht { text-align: center; margin: 1.2em 0 0; font-size: .9em; }
.mehr-recht a { color: var(--text2); }
.mini-footer { font-family: var(--schrift); }

/* ---------- Tab-Leiste (nur Mobile) ---------- */
.hub-nav { display: none; }

/* =====================================================================
 * MOBILE (≤ 800 px): klassisches Mobile-Game-Layout
 * ===================================================================== */
@media (max-width: 800px) {
  :root { --nav-hoehe: calc(62px + var(--sicher-unten)); }
  .nur-mobil { display: inline; }
  .nur-desktop { display: none; }
  .seite, .zentrum { padding-left: max(.8em, var(--sicher-links)); padding-right: max(.8em, var(--sicher-rechts)); }
  .btn { min-height: 44px; }
  .btn.klein-btn { min-height: 36px; }
  .topbar .btn.klein-btn { min-height: 32px; }

  /* Tab-Leiste */
  body:has(.hub-nav) { padding-bottom: var(--nav-hoehe); }
  body:has(.hub-nav) .mini-footer { display: none; }
  .hub-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    height: var(--nav-hoehe); padding: 0 var(--sicher-rechts) var(--sicher-unten) var(--sicher-links);
    background: linear-gradient(180deg, rgba(30, 25, 44, .97), rgba(12, 10, 18, .99));
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--gold2) 15%, var(--gold) 50%, var(--gold2) 85%, transparent) 1;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, .55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .hub-tab {
    flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: none; border: 0; color: var(--text2); cursor: pointer; padding: 6px 2px 4px; min-width: 0;
    font-family: var(--schrift-titel); font-weight: 700; font-size: 10.5px; letter-spacing: .04em;
    touch-action: manipulation;
  }
  .hub-tab-symbol { font-size: 22px; line-height: 1; filter: grayscale(.7) brightness(.85); transition: transform .15s, filter .15s; }
  .hub-tab-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .hub-tab.aktiv { color: var(--gold-hell); text-shadow: 0 0 10px rgba(227, 185, 85, .55); }
  .hub-tab.aktiv .hub-tab-symbol { filter: none; transform: translateY(-2px) scale(1.12); }
  .hub-tab.aktiv::before {
    content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px;
    background: var(--gold); box-shadow: 0 0 12px var(--gold);
  }
  .hub-tab:active .hub-tab-symbol { transform: scale(.92); }
  .hub-tab .f-badge { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10px; }

  /* Hub-Seiten: Zurück-Knopf entfällt (Tab-Leiste übernimmt) */
  body:has(.hub-nav) .seite-kopf [data-a="zurueck"] { display: none; }
  .toast-box { top: auto; bottom: calc(var(--nav-hoehe) + 12px); }
  body:not(:has(.hub-nav)) .toast-box { bottom: calc(2.4em + var(--sicher-unten)); }

  /* Titel: Ressourcenleiste oben, großer Spielen-Knopf, Kacheln */
  .titel { justify-content: flex-start; padding: 0 0 1.2em; gap: 0; min-height: calc(100dvh - var(--nav-hoehe)); }
  .hub-hud {
    order: -2; align-self: stretch; justify-content: space-between;
    padding: calc(.55em + var(--sicher-oben)) max(.8em, var(--sicher-rechts)) .55em max(.8em, var(--sicher-links));
    background: linear-gradient(180deg, rgba(10, 8, 16, .95), rgba(22, 18, 32, .85));
    border-bottom: 1px solid rgba(184, 144, 47, .4); box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
  }
  .hud-konto { max-width: 55vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 38px; }
  .titel-szene { order: -1; margin: 1.4em 0 .2em; }
  .titel-karten { gap: 0; }
  .titel-karten .karte { font-size: min(12px, 2.9vw); margin: 0 -.7em; }
  .titel-karten .karte:nth-child(1) { transform: rotate(-16deg) translateY(1.1em); }
  .titel-karten .karte:nth-child(2) { transform: rotate(-8deg) translateY(.25em); }
  .titel-karten .karte:nth-child(3) { transform: translateY(-.3em) scale(1.08); z-index: 2; }
  .titel-karten .karte:nth-child(4) { transform: rotate(8deg) translateY(.25em); }
  .titel-karten .karte:nth-child(5) { transform: rotate(16deg) translateY(1.1em); }
  .titel-spalte { display: flex; flex-direction: column; align-items: center; gap: .9em; width: 100%; padding: 0 max(1em, var(--sicher-rechts)) 0 max(1em, var(--sicher-links)); }
  .logo { font-size: clamp(1.9em, 9vw, 2.6em); }
  .intro { display: none; }
  .titel-menue { width: 100%; max-width: 380px; gap: .7em; }
  .titel-menue .menue-hub, .titel-menue .menue-mehr { display: none; }
  .titel-menue .menue-haupt {
    font-size: 1.4em; padding: .8em 1em; border-radius: 14px; letter-spacing: .1em;
    animation: haupt-puls 2.6s ease-in-out infinite;
  }
  @keyframes haupt-puls { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -3px 0 rgba(90, 60, 10, .45), 0 0 0 1px #5e4313, 0 4px 14px rgba(0, 0, 0, .5), 0 0 34px rgba(240, 200, 100, .55); } }
  .titel-menue .menue-zweit { font-size: .95em; }
  .menue-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: .7em; }
  .menue-kachel {
    display: flex; flex-direction: column; align-items: center; gap: .25em; padding: .9em .5em; border-radius: 14px; min-height: 86px;
    background: radial-gradient(ellipse at 50% 0%, rgba(227, 185, 85, .16), transparent 70%), linear-gradient(180deg, #342c4c, #1c1829);
    border-color: rgba(184, 144, 47, .6);
  }
  .menue-kachel .kachel-symbol { font-size: 1.9em; margin: 0; filter: drop-shadow(0 0 8px rgba(227, 185, 85, .4)); }
  .ds-hinweis { margin: 1em 1em 0; font-size: .9em; }
  .titel-run { margin: .2em 0 0; }

  /* Run-HUD kompakt */
  .topbar { padding: calc(.4em + var(--sicher-oben)) max(.6em, var(--sicher-rechts)) .4em max(.6em, var(--sicher-links)); }
  .tb-lp, .tb-gold, .tb-seelen { padding: .15em .55em; }

  /* Dialoge als Bottom-Sheet */
  .modal-bg { align-items: flex-end; padding: 0; padding-top: calc(var(--sicher-oben) + 2em); }
  .modal {
    max-width: none !important; width: 100%; border-radius: 20px 20px 0 0;
    padding: 0 1.1em calc(1.1em + var(--sicher-unten));
    max-height: calc(100dvh - var(--sicher-oben) - 2em);
    border-bottom: 0; animation: sheet-hoch .26s cubic-bezier(.2, .8, .2, 1);
  }
  .modal::before {
    content: ''; position: sticky; top: 0; display: block; width: 44px; height: 5px; border-radius: 3px; margin: 8px auto 0;
    background: rgba(255, 255, 255, .25); z-index: 3;
  }
  .modal h2 { margin: 0 -1.1em .9em; padding: .55em 1.1em .6em; font-size: 1.15em; text-align: center; }
  .modal:not(:has(> h2)) { padding-top: .6em; }
  .modal-knoepfe { position: sticky; bottom: calc(-1.1em - var(--sicher-unten)); margin: 1em -1.1em calc(-1.1em - var(--sicher-unten)); padding: .8em 1.1em calc(.8em + var(--sicher-unten)); background: linear-gradient(180deg, rgba(22, 19, 31, .6), #16131f 40%); }
  @keyframes sheet-hoch { from { transform: translateY(100%); } to { transform: none; } }
  .chat-modal .chat-liste { height: 52dvh; }
  .ds-banner-bg { padding: 0; }
  .ds-banner { border-radius: 20px 20px 0 0; padding-bottom: calc(1.2em + var(--sicher-unten)); }

  /* Duell kompakt */
  .duell-kopf { max-width: calc(100% - 1em); border-radius: 14px; padding: .35em .7em; margin-top: .35em; }
  .brett { padding: 8px; border-radius: 12px; }
  .hand-spieler, .duell-feld > div:first-child { padding-bottom: var(--sicher-unten); }

  /* Setup/Vorbereitung: Hauptaktion bleibt unten erreichbar */
  .seite > .knopfreihe:last-child, .zk-rechts > .knopfreihe:last-child {
    position: sticky; bottom: 0; z-index: 15; margin: 1em calc(-1 * max(.8em, var(--sicher-links))) -1.5em; padding: .7em max(.8em, var(--sicher-rechts)) calc(.7em + var(--sicher-unten));
    background: linear-gradient(180deg, rgba(14, 12, 21, 0), rgba(14, 12, 21, .96) 30%);
  }
  .seite > .knopfreihe:last-child .btn.primaer { flex: 1; }

  .seite-kopf h2 { font-size: 1.3em; }
  .booster-pack { border-radius: 14px; }
}

/* Querformat-Handy: keine Tab-Leiste, damit das Brett Platz hat */
@media (max-height: 560px) and (orientation: landscape) {
  .hub-nav { height: calc(48px + var(--sicher-unten)); }
  :root { --nav-hoehe: calc(48px + var(--sicher-unten)); }
  .hub-tab-symbol { font-size: 18px; }
  .hub-tab { flex-direction: row; gap: 6px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .karte::after, .titel-menue .menue-haupt, .modal { animation: none !important; }
}

/* ---------- Mobile-Feinschliff: kompakte Leisten, Brett passt in den Bildschirm ---------- */
@media (max-width: 800px) {
  .titel-spalte { flex: 1; }
  .titel-menue { margin-top: auto; padding-top: 1em; }
  .titel-karten .karte { font-size: min(13px, 3.1vw); }
  .topbar { font-size: 12.5px; gap: .3em .45em; }
  .tb-akt { font-size: .95em; }
  .topbar .btn.klein-btn { font-size: .74em; padding: .3em .55em; letter-spacing: .02em; min-height: 30px; }
  .duell-kopf { font-size: .82em; gap: .3em .5em; }
  .duell-kopf .regel { font-size: .8em; }
  .hand-titel { font-size: .68em; margin-bottom: 0; }
  .punkte { font-size: 1.25em; padding: 0 .8em; }
  .brett, .raetsel-feld {
    --zh: clamp(70px, min(30vw, calc((100svh - 430px) / 3)), 168px);
    --zb: calc(var(--zh) * .762);
  }
  .brett { padding: 6px; box-shadow: 0 0 0 1px #2c1f0a, 0 0 0 3px #8e6a26, inset 0 0 30px rgba(0, 0, 0, .7), 0 10px 30px rgba(0, 0, 0, .6); }
}
@media (max-height: 560px) and (orientation: landscape) {
  .duell-kopf { font-size: .78em; margin-top: .2em; padding: .2em .8em; }
  .hand-titel { display: none; }
  .brett { padding: 4px; box-shadow: 0 0 0 1px #2c1f0a, 0 0 0 3px #8e6a26, inset 0 0 20px rgba(0, 0, 0, .7); }
  .brett, .raetsel-feld {
    --zh: clamp(56px, calc((100svh - 150px) / 3), 168px);
    --zb: calc(var(--zh) * .762);
  }
  .hand .karte { font-size: clamp(6px, calc((100svh - 150px) / 25), 12px); }
  .punkte { font-size: 1em; padding: 0 .6em; }
  .hand { padding-top: 0; background: none; box-shadow: none; }
}
@media (max-width: 800px) {
  body:has(.hub-nav) #app { min-height: calc(100dvh - var(--nav-hoehe)); }
  .titel { min-height: calc(100dvh - var(--nav-hoehe)); padding-bottom: 1em; }
  .titel-spalte .logo { margin: auto 0; padding: .3em 0; }
  .titel-menue { margin-top: 0; }
}

/* Kurzer Freundescode */
.f-code-kurz { font-family: var(--schrift-titel); font-weight: 900; font-size: 2em; letter-spacing: .14em; white-space: nowrap; text-shadow: 0 0 14px rgba(227, 185, 85, .35); }
.f-code-lang { margin: -.3em 0 .6em; word-break: break-all; font-size: .75em; }
.f-hinzu input { text-transform: uppercase; }
.f-hinzu input::placeholder { text-transform: none; }

/* ---------- Holo-Effekt (Feld „holo“, im Card Builder gesetzt) ----------
 * Karte mit Feld „holo“: Folie (.k-holo) liegt über dem Hintergrund, aber unter der
 * freigestellten Figur; Glanzlicht (.k-glanz) über der ganzen Karte, unter den Werten.
 * Steuerung über CSS-Variablen, die U.holoZeiger (js/ui/common.js) beim Zeigen setzt:
 *   --px/--py Position (0–100 %), --rx/--ry Neigung, --nx/--ny Versatz (−1 … 1)
 */
@property --px { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
@property --py { syntax: '<percentage>'; inherits: true; initial-value: 50%; }

.k-holo, .k-glanz { position: absolute; inset: 0; pointer-events: none; }
.k-holo {
  mix-blend-mode: color-dodge; opacity: .5; filter: saturate(1.3);
}
/* Regenbogen: dunkler, kontrastreicher Verlauf, damit er auch auf hellen Hintergründen farbig bleibt */
.holo-regenbogen .k-holo {
  opacity: .7; filter: brightness(.7) contrast(1.25) saturate(1.6) blur(.15em);
  background-size: 300% 300%, auto; background-position: var(--px) var(--py), 0 0;
}
.holo-regenbogen .k-holo {
  background-image:
    repeating-linear-gradient(115deg, #ff6f7d 0%, #ffb877 9%, #f6ef86 18%, #7ef0b4 27%, #6cc8ff 36%, #a78bff 45%, #ff6f7d 54%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 4px);
}
.holo-gold .k-holo {
  opacity: .65;
  background-image:
    linear-gradient(115deg, rgba(0, 0, 0, 0) 25%, rgba(255, 200, 90, .85) 42%, rgba(255, 246, 210, 1) 50%, rgba(255, 185, 70, .85) 58%, rgba(0, 0, 0, 0) 75%),
    repeating-linear-gradient(-45deg, rgba(255, 225, 150, .2) 0 1px, transparent 1px 3px);
  background-size: 260% 260%, auto; background-position: var(--px) var(--py), 0 0;
}
.holo-glitzer .k-holo {
  opacity: .9;
  background-image: repeating-linear-gradient(115deg, #ff5f6d 0%, #ffc371 6%, #63f5a8 12%, #4fc3ff 18%, #a77bff 24%, #ff5f6d 30%);
  background-size: 260% 260%;
  -webkit-mask-image: radial-gradient(circle, #000 0 .05em, transparent .09em), radial-gradient(circle, #000 0 .035em, transparent .07em);
  -webkit-mask-size: .9em .9em, .55em .55em; -webkit-mask-position: 0 0, .3em .4em;
  mask-image: radial-gradient(circle, #000 0 .05em, transparent .09em), radial-gradient(circle, #000 0 .035em, transparent .07em);
  mask-size: .9em .9em, .55em .55em; mask-position: 0 0, .3em .4em;
}
.k-glanz {
  z-index: 1; mix-blend-mode: soft-light; opacity: .8;
  background: radial-gradient(circle at var(--px) var(--py), rgba(255, 255, 255, .85), rgba(255, 255, 255, 0) 55%);
}

/* Kosmos: Sternenfeld vor violett-blauem Nebel, die Sterne wandern gegen den Nebel */
.holo-kosmos .k-holo {
  opacity: 1; filter: saturate(1.5);
  background-image:
    radial-gradient(circle, #fff 0 .06em, transparent .1em),
    radial-gradient(circle, #cfe3ff 0 .045em, transparent .08em),
    radial-gradient(circle, #ffd9f5 0 .08em, rgba(255, 200, 240, .4) .1em, transparent .16em),
    radial-gradient(ellipse at var(--px) var(--py), rgba(150, 90, 255, .95), rgba(40, 120, 255, .7) 35%, rgba(255, 80, 180, .5) 60%, rgba(60, 40, 160, .35) 85%);
  background-size: 1.3em 1.7em, 2.1em 1.9em, 3.3em 2.9em, 100% 100%;
  background-position:
    calc(var(--px) * .08) calc(var(--py) * .08), calc(var(--px) * -.12) calc(var(--py) * .1),
    calc(var(--px) * .2) calc(var(--py) * -.15), 0 0;
}
/* Feuer: Glut steigt in Bändern auf, Funken als Punkte */
.holo-feuer .k-holo {
  opacity: .7; filter: saturate(1.5) contrast(1.2);
  background-image:
    radial-gradient(circle, #ffe08a 0 .04em, transparent .08em),
    repeating-linear-gradient(170deg, #ff3b1f 0%, #ff8a1f 6%, #ffd34d 10%, #ff6a1f 15%, #b3170f 22%, #ff3b1f 28%),
    linear-gradient(0deg, rgba(255, 90, 20, .7), transparent 70%);
  background-size: 1.6em 2.3em, 240% 240%, 100% 100%;
  background-position: calc(var(--px) * .1) calc(var(--py) * -.3), var(--px) var(--py), 0 0;
}
/* Frost: feine Eiskristall-Linien und kühler Schimmer */
.holo-frost .k-holo {
  opacity: 1; filter: saturate(1.3);
  background-image:
    repeating-linear-gradient(60deg, rgba(200, 240, 255, .8) 0 .07em, transparent .07em .9em),
    repeating-linear-gradient(-60deg, rgba(200, 240, 255, .8) 0 .07em, transparent .07em .9em),
    repeating-linear-gradient(0deg, rgba(180, 230, 255, .3) 0 1px, transparent 1px 1.4em),
    linear-gradient(115deg, transparent 20%, rgba(120, 210, 255, .8) 42%, rgba(240, 252, 255, 1) 50%, rgba(140, 170, 255, .8) 58%, transparent 80%);
  background-size: auto, auto, auto, 260% 260%;
  background-position: 0 0, 0 0, 0 0, var(--px) var(--py);
}
/* Polarlicht: weiche grün-türkis-violette Schleier */
.holo-polarlicht .k-holo {
  opacity: .8; filter: brightness(.8) saturate(1.6);
  background-image:
    repeating-linear-gradient(100deg, #1fe0b0 0%, #4fd1ff 7%, #8a5cff 14%, #ff5fc8 19%, #1fe0b0 26%),
    radial-gradient(ellipse 120% 60% at 50% 20%, rgba(255, 255, 255, .25), transparent 70%);
  background-size: 300% 300%, 100% 100%;
  background-position: var(--px) calc(var(--py) * .5), 0 0;
}
/* Prisma: Vollholo – Regenbogen auch über der Figur, dazu kräftige Folie im Hintergrund */
.holo-prisma .k-holo {
  opacity: .8; filter: brightness(.72) contrast(1.3) saturate(1.7) blur(.15em);
  background-image:
    repeating-linear-gradient(125deg, #ff6f7d 0%, #ffb877 8%, #f6ef86 16%, #7ef0b4 24%, #6cc8ff 32%, #a78bff 40%, #ff6f7d 48%),
    repeating-linear-gradient(35deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 3px);
  background-size: 280% 280%, auto; background-position: var(--px) var(--py), 0 0;
}
.holo-prisma .k-glanz {
  mix-blend-mode: color-dodge; opacity: .35; filter: blur(.2em);
  background:
    radial-gradient(circle at var(--px) var(--py), rgba(255, 255, 255, .5), transparent 50%),
    repeating-linear-gradient(125deg, #ff6f7d 0%, #ffb877 8%, #f6ef86 16%, #7ef0b4 24%, #6cc8ff 32%, #a78bff 40%, #ff6f7d 48%) var(--px) var(--py) / 280% 280%;
}

/* Große Karten (Sammelbuch, Booster, Beute, Schatz): Neigung zum Zeiger, Tiefe, ruhiger Schimmer.
   Auf Brett, Hand und in Listen liegt die Folie still (spart Leistung auf dem Handy). */
.karte.k-gross.holo {
  transform: perspective(40em) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--hub, 0em));
  transition: transform .4s ease-out, box-shadow .15s;
}
.karte.k-gross.holo.zeiger { transition: transform .06s linear, box-shadow .15s; }
.karte.k-gross.holo.waehlbar:hover { --hub: -.25em; }
.karte.k-gross.holo .k-hg { inset: -5%; transform: translate(calc(var(--nx, 0) * -3%), calc(var(--ny, 0) * -3%)); }
.karte.k-gross.holo .k-art img { transform: translate(calc(var(--nx, 0) * 1.5%), calc(var(--ny, 0) * 1.5%)) scale(1.03); }
.karte.k-gross.holo:not(.zeiger) { animation: holo-ruhe 7s ease-in-out infinite alternate; }
@keyframes holo-ruhe { 0% { --px: 15%; --py: 20%; } 50% { --px: 70%; --py: 45%; } 100% { --px: 35%; --py: 85%; } }
@media (prefers-reduced-motion: reduce) {
  .karte.holo { animation: none !important; }
  .karte.k-gross.holo { transform: translateY(var(--hub, 0em)); }
}

/* ---------- Große Bildschirme: größere Karten nur im Sammelbuch, in der Deck-Sammlung und im Kartendetail ---------- */
@media (min-width: 801px) {
  .buch-raster .karte.k-klein, .sammlung-raster .karte.k-klein { font-size: clamp(12px, 1.2vw, 20px); }
  .karten-detail .karte.k-gross { font-size: clamp(20px, 2.3vw, 34px); }
}
