:root {
    --bg-dark: #0a0705; --bg-panel: #1a1512; --bg-card: #12100e;
    --gold: #c9a84c; --gold-light: #f5d77a; --gold-dark: #8a6d2b;
    --stone: #2a2420; --stone-light: #3d3530; --border: #4a3f35;
    --text-main: #e8dcc8; --text-dim: #a89880;
    --alliance: #3b82f6; --horde: #ef4444;
    --field-w: 150px; --field-h: 210px;
    --hand-w: 140px; --hand-h: 196px;
    --res-w: 32px; --res-h: 45px;
}
* { box-sizing: border-box; user-select: none; }
body {
    margin: 0; padding: 0; height: 100vh; width: 100vw;
    background: radial-gradient(circle at 50% 30%, #1f1814 0%, #0a0705 80%), repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    color: var(--text-main); font-family: 'Georgia', 'Times New Roman', serif;
    display: flex; overflow: hidden;
}
/* Spielfeld-Hintergrund (js/backgrounds.js): etwas gedämpft und leicht weich, Rand abgedunkelt – die Karten stehen davor im Fokus */
#match-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
#match-bg.on { opacity: 1; }
#match-bg .mbg-layer { position: absolute; inset: 0; background: center / cover no-repeat;
    filter: blur(1.5px) saturate(.45) brightness(.42); }
#match-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(10,7,5,0) 0%, rgba(10,7,5,.35) 70%, rgba(5,3,2,.7) 100%); }
#error-banner { display: none; position: fixed; top: 0; left: 0; right: 0; background: #7f1d1d; color: #fff; padding: 8px 12px; font-weight: bold; text-align: center; z-index: 1000000; border-bottom: 2px solid var(--gold); }

.shake { animation: shakeAnim 0.35s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shakeAnim { 10%,90%{transform:translate3d(-3px,1px,0)} 20%,80%{transform:translate3d(4px,-2px,0)} 30%,50%,70%{transform:translate3d(-5px,3px,0)} 40%,60%{transform:translate3d(5px,-1px,0)} }

.floating-text { position: fixed; pointer-events: none; font-size: 36px; font-weight: 900; z-index: 999999; text-shadow: 0 3px 10px rgba(0,0,0,0.9); animation: floatUp 1.2s ease-out forwards; font-family: 'Georgia', serif; }
.floating-text.hit { color: #ef4444; } .floating-text.heal { color: #10b981; } .floating-text.buff { color: #60a5fa; }
@keyframes floatUp { 0%{transform:translate(-50%,-20%) scale(0.6);opacity:0} 20%{transform:translate(-50%,-50%) scale(1.5);opacity:1} 100%{transform:translate(-50%,-150%) scale(1);opacity:0} }

#decision-modal, #sim-modal, #deck-overview-modal, #graveyard-modal, #deck-builder-modal, #booster-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center; backdrop-filter: blur(6px); z-index: 100000; }
.modal-box { background: linear-gradient(180deg, #1f1a16 0%, #110e0b 100%); border: 2px solid var(--gold); border-radius: 4px; padding: 24px; box-shadow: 0 0 30px rgba(201,168,76,0.2); color: var(--text-main); }
#decision-box { max-width: 500px; text-align: center; }
#sim-box { max-width: 900px; width: 90%; max-height: 85vh; overflow-y: auto; }
#deck-overview-box { max-width: 900px; width: 90%; max-height: 85vh; overflow-y: auto; }
#graveyard-box { max-width: 95vw; width: 95%; max-height: 92vh; overflow-y: auto; }
#graveyard-content { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 20px 0; }
#graveyard-content .gy-section { flex-basis: 100%; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); color: var(--gold); font-weight: bold; text-align: center; }
.deck-view-card { width: var(--hand-w); height: var(--hand-h); transition: transform 0.2s; transform-origin: center bottom; }
.grave-btn { cursor: pointer; }
.grave-btn:hover { border-color: var(--gold); }

/* ---------------- Deck Builder ---------------- */
#deck-builder-modal .modal-box { width: 96vw; height: 92vh; display: flex; flex-direction: column; padding: 14px 16px; }
#deck-builder-modal { touch-action: manipulation; }   /* Tablet: kein Warten auf einen möglichen Doppeltipp-Zoom – +/− und Karten reagieren sofort */
#deck-builder-modal input, #deck-builder-modal select, #db-io-modal textarea { background: #0a0705; border: 1px solid var(--border); color: var(--text-main); padding: 6px 8px; border-radius: 4px; font-family: inherit; }
#deck-builder-modal input:focus, #deck-builder-modal select:focus, #db-io-modal textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,168,76,.25); }
/* Kopf in einer Zeile: Titel · Deckname · Klassen-Icons · Aktionen (bei schmalem Fenster bricht er um) */
.db-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.db-top h2 { margin: 0; color: var(--gold); font-size: 18px; white-space: nowrap; }
#db-name { font-size: 14px; font-weight: bold; width: 210px; padding: 5px 8px; }
.db-top .db-actions { margin-left: auto; flex-wrap: nowrap; gap: 6px; }
.db-top .db-actions button { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
.db-hero-pick { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.db-hero-pick label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
#db-hero-select { max-width: 340px; font-size: 13px; }
#db-hero-thumb { width: 52px; height: 73px; flex: none; }
#db-hero-thumb .card-wrapper { --cw: 52px; }
.db-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.db-actions button { padding: 8px 12px; }
.db-content { display: flex; flex: 1; gap: 14px; overflow: hidden; min-height: 0; }
.db-pool, .db-deck { background: #0a0705; border: 1px solid var(--border); border-radius: 6px; display: flex; flex-direction: column; min-height: 0; }
.db-pool { flex: 1; min-width: 0; }
.db-deck { flex: 0 0 380px; }
.db-filters { padding: 10px; background: #1a1512; border-bottom: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-radius: 6px 6px 0 0; }
#db-search { flex: 1 1 220px; }
.db-chips { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.db-chips button { border: 0; border-radius: 0; border-right: 1px solid var(--border); padding: 6px 9px; background: #120e0b; color: var(--text-dim); }
.db-chips button:last-child { border-right: 0; }
.db-chips button.on { background: var(--gold-dark); color: #fff; }
.db-chips button:hover:not(.on) { color: var(--gold-light); }
.db-dim { color: var(--text-dim); font-size: 12px; }
.db-hint { font-size: 11px; color: var(--text-dim); padding: 4px 12px; font-style: italic; }
.db-scroll { flex: 1; overflow-y: auto; padding: 8px 12px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; align-content: start; }
.db-tile { position: relative; cursor: pointer; transition: transform .12s; }
.db-tile:hover { transform: translateY(-3px); z-index: 5; }
.db-tile .db-card { width: 100%; --cw: 100%; }
.db-tile-count { position: absolute; top: -6px; right: -6px; z-index: 60; min-width: 26px; padding: 2px 6px; border-radius: 12px; font: 900 12px/1.2 Georgia, serif; text-align: center; display: none; }
.db-tile-count.has { display: block; background: var(--gold); color: #000; border: 1px solid #000; box-shadow: 0 2px 5px rgba(0,0,0,.8); }
.db-tile-count.full { background: #4ade80; }
/* Statistiken */
.db-stats { padding: 12px; background: #1a1512; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; display: flex; flex-direction: column; gap: 10px; }
.db-progress-row { display: flex; align-items: center; gap: 10px; }
.db-progress { position: relative; flex: 1; height: 14px; background: #000; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
#db-progress-fill { height: 100%; width: 0; border-radius: 7px; transition: width .3s ease, background .3s; }
#db-progress-fill.under { background: linear-gradient(90deg, #a16207, #facc15); }
#db-progress-fill.exact { background: linear-gradient(90deg, #15803d, #4ade80); box-shadow: 0 0 10px #4ade80; }
#db-progress-fill.over { background: linear-gradient(90deg, #991b1b, #ef4444); }
#db-count { font: 900 16px Georgia, serif; min-width: 64px; text-align: right; }
#db-count.under { color: #facc15; } #db-count.exact { color: #4ade80; } #db-count.over { color: #ef4444; }
.db-stat-cols { display: flex; gap: 14px; }
.db-stat-title { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 4px; }
.db-curve-box { flex: 1.2; } .db-types-box { flex: 1; }
.db-curve { display: flex; align-items: flex-end; gap: 4px; height: 92px; }
.db-curve-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; }
.db-curve-stack { flex-shrink: 0; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; min-height: 0; transition: height .3s ease; }
.db-curve-n { font-size: 10px; text-align: center; color: var(--text-main); height: 12px; }
.db-curve-l { font-size: 10px; text-align: center; color: var(--text-dim); border-top: 1px solid var(--border); margin-top: 2px; }
.db-typebar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.db-typebar > div { transition: flex .3s; }
.db-empty-bar { flex: 1; font-size: 9px; color: var(--text-dim); text-align: center; line-height: 12px; }
.db-typelegend { margin-top: 6px; display: grid; gap: 3px; font-size: 12px; }
.db-typelegend div { display: grid; grid-template-columns: 12px 1fr auto 34px; align-items: center; gap: 6px; }
.db-typelegend i { width: 10px; height: 10px; border-radius: 2px; }
.db-typelegend b { color: var(--text-main); } .db-typelegend span { color: var(--text-dim); text-align: right; font-size: 11px; }
#db-warnings { display: flex; flex-direction: column; gap: 4px; }
.db-warn { font-size: 12px; color: #fca5a5; background: rgba(127,29,29,.35); border: 1px solid #7f1d1d; border-radius: 4px; padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.db-warn button { padding: 2px 8px; font-size: 11px; }
.db-flash { font-size: 12px; color: #fde68a; background: rgba(120,90,20,.35); border: 1px solid var(--gold-dark); border-radius: 4px; padding: 4px 8px; animation: dbFlash 2.2s ease forwards; }
@keyframes dbFlash { 0% { opacity: 0; transform: translateY(-4px); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* Deckliste */
.db-deck-list { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
/* Deck Builder: schlanke Scrollleiste – nur der Griff, ohne Hintergrund und Pfeile */
#deck-builder-modal ::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
#deck-builder-modal ::-webkit-scrollbar-track, #deck-builder-modal ::-webkit-scrollbar-corner { background: transparent; }
#deck-builder-modal ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
#deck-builder-modal ::-webkit-scrollbar-thumb { background: rgba(201,168,76,.45); border-radius: 8px; }
#deck-builder-modal ::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,.75); }
@supports (-moz-appearance: none) { #deck-builder-modal * { scrollbar-width: thin; scrollbar-color: rgba(201,168,76,.5) transparent; } }
.db-group { display: flex; justify-content: space-between; margin: 10px 0 4px; padding: 2px 6px; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1.5px; color: var(--tc); border-bottom: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); }
.db-row { display: grid; grid-template-columns: 34px 1fr 22px 22px 22px; align-items: center; gap: 4px; padding: 3px 4px 3px 2px; border-radius: 4px; font-size: 13px; cursor: default; }
.db-row:hover { background: rgba(201,168,76,.1); }
.db-row.illegal .db-row-name { color: #f87171; text-decoration: line-through; }
.db-row.pulse { animation: dbPulse .6s ease; }
@keyframes dbPulse { 0% { background: rgba(250,204,21,.45); } 100% { background: transparent; } }
.db-row-cost { justify-self: center; width: 24px; height: 24px; border-radius: 50%; background: #0c3a5c; border: 1px solid #1c78b4; color: #b0d8ff; font: bold 11px/22px Georgia, serif; text-align: center; }
.db-row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-row-n { text-align: center; font-weight: 900; color: var(--gold-light); }
.db-row-btn { padding: 0; width: 22px; height: 22px; line-height: 20px; font-size: 14px; border-radius: 50%; }
.db-empty { margin: 30px 10px; text-align: center; color: var(--text-dim); line-height: 1.6; font-size: 13px; }
#db-hover { position: fixed; z-index: 100010; width: 220px; display: none; pointer-events: none; filter: drop-shadow(0 10px 25px rgba(0,0,0,.9)); }
#db-hover .card-wrapper { --cw: 220px; }
/* Import / Export */
#db-io-modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: none; align-items: center; justify-content: center; z-index: 100020; }
#db-io-modal .modal-box { width: min(560px, 92vw); display: flex; flex-direction: column; gap: 10px; }
#db-io-modal h3 { margin: 0; color: var(--gold); }
#db-io-text { height: 320px; resize: vertical; font: 13px/1.5 Consolas, 'Courier New', monospace; user-select: text; }
#db-io-report { max-height: 120px; overflow-y: auto; font-size: 12px; }
#db-io-report .ok { color: #86efac; } #db-io-report .bad { color: #fca5a5; }
.db-io-actions { display: flex; justify-content: flex-end; gap: 8px; }
code { background: #000; padding: 1px 4px; border-radius: 3px; color: var(--gold-light); }

/* ---- BOOSTER ---- */
#booster-modal { z-index: 99400; display: none; flex-direction: column; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #1b1730 0%, #0b0a14 55%, #000 100%) !important; }
#booster-bg, #booster-flash, #booster-fx { position: absolute; inset: 0; pointer-events: none; }
#booster-bg { z-index: 0; }
.booster-rays { position: absolute; left: 50%; top: 45%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; opacity: .09; transition: opacity 1.2s;
    background: repeating-conic-gradient(from 0deg, rgba(251,191,36,.5) 0deg 3deg, transparent 3deg 15deg);
    -webkit-mask: radial-gradient(circle, #000 0%, transparent 26%); mask: radial-gradient(circle, #000 0%, transparent 26%); animation: bRays 60s linear infinite; }
#booster-modal.opened .booster-rays { opacity: .16; }
@keyframes bRays { to { transform: rotate(360deg); } }
.booster-motes { position: absolute; inset: -50%; opacity: .55;
    background-image: radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,230,160,.9), transparent), radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,.8), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(251,191,36,.7), transparent), radial-gradient(1px 1px at 85% 15%, rgba(200,180,255,.8), transparent);
    background-size: 260px 260px, 340px 340px, 420px 420px, 300px 300px; animation: bMotes 40s linear infinite; }
@keyframes bMotes { to { transform: translate(-260px, -420px); } }
#booster-stage { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#booster-stage.bshake { animation: bShake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes bShake { 10%, 90% { transform: translate(calc(var(--shk) * -.3), calc(var(--shk) * .2)); } 20%, 80% { transform: translate(calc(var(--shk) * .5), calc(var(--shk) * -.4)); }
    30%, 50%, 70% { transform: translate(calc(var(--shk) * -1), calc(var(--shk) * .6)); } 40%, 60% { transform: translate(var(--shk), calc(var(--shk) * -.8)); } }
#booster-flash { z-index: 3; opacity: 0; background: radial-gradient(circle at 50% 45%, rgba(var(--fl, 255,236,180), .95) 0%, rgba(var(--fl, 255,236,180), .35) 35%, transparent 70%); }
#booster-flash.go { animation: bFlash .45s ease-out; }
@keyframes bFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
#booster-fx { z-index: 4; }

/* Pack */
.booster-pack-container { position: relative; width: min(300px, 40vh); aspect-ratio: 3 / 5; cursor: pointer; display: flex; justify-content: center; align-items: center;
    transform: perspective(900px) rotateY(calc(var(--px, 0) * 16deg)) rotateX(calc(var(--py, 0) * -12deg)); transition: transform .25s ease-out;
    animation: bFloat 3.2s ease-in-out infinite; }
@keyframes bFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.booster-pack-container:hover { scale: 1.04; }
.booster-pack-container.enter { animation: bPackIn .9s cubic-bezier(.2,1.4,.4,1) both, bFloat 3.2s ease-in-out .9s infinite; }
@keyframes bPackIn { 0% { scale: .4; rotate: -14deg; opacity: 0; translate: 0 120px; } 100% { scale: 1; rotate: 0deg; opacity: 1; translate: 0 0; } }
.booster-pack-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px;   /* füllt den Rahmen immer: alle Booster gleich groß, Glanz deckt genau das Bild */ box-shadow: 0 18px 40px rgba(0,0,0,.85); user-select: none; }
.booster-pack-aura { position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(251,191,36,.55) 0%, rgba(251,146,60,.18) 45%, transparent 70%);
    filter: blur(14px); animation: bAura 2.6s ease-in-out infinite; }
@keyframes bAura { 0%, 100% { opacity: .55; scale: .95; } 50% { opacity: .9; scale: 1.06; } }
.booster-pack-shine { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; pointer-events: none; }
.booster-pack-shine::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -60%; transform: skewX(-20deg);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: bShine 3.4s ease-in-out infinite; }
@keyframes bShine { 0%, 55% { left: -60%; } 100% { left: 140%; } }
.booster-pack-container.charging { animation: bCharge .85s cubic-bezier(.5,0,1,.5) forwards; cursor: default; }
.booster-pack-container.charging .booster-pack-aura { animation: bAura .25s ease-in-out infinite; background: radial-gradient(circle, rgba(255,240,190,.9) 0%, rgba(251,191,36,.45) 40%, transparent 70%); }
.booster-pack-container.charging .booster-pack-img { filter: brightness(1.15) saturate(1.2); }
@keyframes bCharge {
    0% { rotate: 0deg; scale: 1; } 15% { rotate: -2deg; } 30% { rotate: 3deg; scale: 1.03; } 45% { rotate: -4deg; } 58% { rotate: 5deg; scale: 1.07; }
    70% { rotate: -6deg; } 80% { rotate: 7deg; scale: 1.1; } 88% { rotate: -8deg; } 94% { rotate: 8deg; scale: 1.14; } 100% { rotate: 0deg; scale: 1.18; } }
.booster-pack-container.burst { animation: bBurst .4s ease-out forwards; pointer-events: none; }
@keyframes bBurst { 0% { scale: 1.18; opacity: 1; filter: brightness(1); } 40% { filter: brightness(3); } 100% { scale: 2.2; opacity: 0; filter: brightness(4) blur(6px); } }
#booster-hint { margin-top: 26px; color: var(--gold-light); font-size: 15px; letter-spacing: .5px; opacity: 0; transition: opacity .4s; text-shadow: 0 0 10px rgba(251,191,36,.6); pointer-events: none; }
#booster-hint.show { opacity: 1; animation: bHint 1.8s ease-in-out infinite; }
@keyframes bHint { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Karten */
.booster-cards-container { position: absolute; inset: 0; display: none; perspective: 1400px; --bcw: 180px; }
.booster-card-wrapper { position: absolute; left: 50%; top: 46%; width: var(--bcw); height: calc(var(--bcw) * 1.4); margin: calc(var(--bcw) * -0.7) 0 0 calc(var(--bcw) * -0.5);
    transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot, 0deg)); transform-origin: center 120%; cursor: pointer;
    transition: transform .55s cubic-bezier(.2,.9,.25,1.15), translate .25s ease-out, scale .25s ease-out, opacity .35s, filter .35s; }
.booster-card-wrapper.dealing { transform: translate(0, 0) rotate(var(--deal, 0deg)) scale(.3); opacity: 0; }
.booster-card-wrapper:not(.flipped):not(.dealing):hover { translate: 0 -22px; scale: 1.08; }
.booster-card-wrapper:not(.flipped):hover .flip-back img { box-shadow: 0 0 0 2px rgba(var(--gc), .9), 0 0 28px 6px rgba(var(--gc), .6); }
.booster-card-wrapper.flipped { transform: translate(var(--tx, 0), calc(var(--ty, 0) - 14px)) rotate(calc(var(--rot, 0deg) * .5)); }
.booster-card-wrapper.flipped:not(.focus):hover { scale: 1.05; }
.booster-card-wrapper.pop { animation: bPop .6s cubic-bezier(.3,1.6,.5,1); }
@keyframes bPop { 0% { scale: 1; } 40% { scale: 1.22; } 100% { scale: 1; } }
.booster-card-wrapper.focus { transform: translate(0, 0) rotate(0deg); transform-origin: 50% 50%; scale: var(--fs, 2); cursor: zoom-out; transition: transform .45s cubic-bezier(.2,.9,.25,1.1), scale .45s cubic-bezier(.2,.9,.25,1.1); }
#booster-modal.has-focus .booster-card-wrapper:not(.focus) { opacity: .25; filter: blur(2px) brightness(.6); }
.flip-container { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.4,.2,.2,1); }
.booster-card-wrapper.flipped .flip-container { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 4px; }
.flip-front { transform: rotateY(180deg); }
.flip-back { transform: rotateY(0deg); }
.flip-back img { width: 100%; height: 100%; object-fit: fill; border-radius: 6px; border: 2px solid var(--gold-dark); box-shadow: 0 10px 22px rgba(0,0,0,.8); transition: box-shadow .25s; user-select: none; }
.booster-card-wrapper.glow-common { --gc: 190,190,190; } .booster-card-wrapper.glow-uncommon { --gc: 74,222,128; }
.booster-card-wrapper.glow-rare { --gc: 96,165,250; } .booster-card-wrapper.glow-epic { --gc: 168,85,247; }
.booster-card-wrapper.glow-hero { --gc: 245,158,11; } .booster-card-wrapper.glow-ea { --gc: 251,191,36; } .booster-card-wrapper.glow-foil { --gc: 244,114,182; }
/* Rahmen sitzt auf der Kartenfläche selbst (in .cfx-tilt) – er folgt dem Kippen und Anheben beim Hover */
.booster-card-wrapper.flipped .card-visual { box-shadow: 0 0 0 0.9cqw rgb(var(--gc)), 0 0 7cqw 1.5cqw rgba(var(--gc), .55), 0 2cqw 5cqw rgba(0,0,0,.7); }
.booster-card-wrapper.flipped:is(.glow-rare, .glow-epic, .glow-hero, .glow-ea, .glow-foil) .card-visual { animation: bGlow 2.2s ease-in-out infinite; }
@keyframes bGlow { 0%, 100% { box-shadow: 0 0 0 0.9cqw rgb(var(--gc)), 0 0 6cqw 1cqw rgba(var(--gc), .45), 0 2cqw 5cqw rgba(0,0,0,.7); }
    50% { box-shadow: 0 0 0 0.9cqw rgb(var(--gc)), 0 0 12cqw 3cqw rgba(var(--gc), .8), 0 2cqw 5cqw rgba(0,0,0,.7); } }
/* Lichtstrahlen hinter epischen Karten, Helden und Extended Art */
.booster-card-wrapper.rays::before { content: ''; position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; pointer-events: none;
    background: repeating-conic-gradient(rgba(var(--gc), .55) 0deg 6deg, transparent 6deg 20deg); border-radius: 50%;
    -webkit-mask: radial-gradient(circle, #000 10%, transparent 62%); mask: radial-gradient(circle, #000 10%, transparent 62%);
    animation: bRaysIn 2.6s ease-out forwards, bRays 14s linear infinite; }
@keyframes bRaysIn { 0% { opacity: 0; scale: .3; } 15% { opacity: 1; scale: 1.1; } 100% { opacity: .45; scale: 1; } }
.booster-rar-label { position: absolute; left: 50%; top: calc(100% + 10px); translate: -50% 6px; white-space: nowrap; font-size: max(11px, calc(var(--bcw) * .075)); font-weight: 700; letter-spacing: .6px;
    text-transform: uppercase; color: rgb(var(--gc)); text-shadow: 0 0 8px rgba(var(--gc), .8), 0 1px 2px #000; opacity: 0; transition: opacity .4s .35s, translate .4s .35s; pointer-events: none; }
.booster-card-wrapper.flipped .booster-rar-label { opacity: 1; translate: -50% 0; }
.booster-card-wrapper.focus .booster-rar-label { opacity: 0; }

/* Aktionen unten */
#booster-actions { position: absolute; left: 50%; bottom: 26px; z-index: 2; display: flex; gap: 12px; align-items: center; translate: -50% 30px; opacity: 0; pointer-events: none; transition: opacity .4s, translate .4s cubic-bezier(.2,1.3,.4,1); }
#booster-actions.show { opacity: 1; translate: -50% 0; pointer-events: auto; }
#booster-count { color: var(--text-dim); font-size: 13px; min-width: 150px; text-align: right; }
#booster-actions button { padding: 10px 18px; font-size: 14px; }
#booster-again.pulse { animation: bAgain 1.4s ease-in-out infinite; }
@keyframes bAgain { 0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 50% { box-shadow: 0 0 18px 6px rgba(16,185,129,.55); } }

#sim-progress-wrapper { margin-bottom: 16px; }
#sim-progress { color: var(--text-dim); font-size: 13px; font-style: italic; margin-bottom: 6px; display: flex; justify-content: space-between; }
.sim-bar-bg { width: 100%; height: 8px; background: #000; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.8); }
#sim-progress-bar { width: 0%; height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width 0.2s ease-out; }
#sim-content table { border-collapse: collapse; margin-bottom: 12px; width: 100%; }
#sim-content td, #sim-content th { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: left; font-size: 12px; vertical-align: middle; }
#sim-content th { color: var(--gold); font-weight: bold; background: rgba(0,0,0,0.3); }
.deck-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.deck-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 130px; border-radius: 4px; cursor: pointer; border: 2px solid; transition: transform 0.2s; background: rgba(0,0,0,0.5); }
.deck-btn.alliance { border-color: var(--alliance); color: var(--alliance); } .deck-btn.horde { border-color: var(--horde); color: var(--horde); }
.deck-btn:hover { transform: scale(1.05); }
.deck-icon { width: 60px; height: 60px; margin-bottom: 8px; display: flex; justify-content: center; align-items: center; }
.deck-icon img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-dark); box-shadow: 0 4px 8px rgba(0,0,0,0.6); background: #000; }
.deck-name { font-size: 14px; font-weight: bold; text-transform: uppercase; text-align: center; line-height: 1.2; }
.deck-grid-head { grid-column: 1 / -1; color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 2px; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-top: 8px; }
.deck-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; text-align: center; padding: 0 6px; }
.deck-sub .under { color: #facc15; } .deck-sub .exact { color: #4ade80; } .deck-sub .over { color: #ef4444; }
.deck-btn.custom .deck-name { text-transform: none; padding: 0 6px; }
.deck-btn.new { border: 2px dashed var(--gold-dark); color: var(--gold); }
.deck-plus { font-size: 34px; line-height: 1; margin-bottom: 6px; }

#turn-banner { position: fixed; top: 45%; left: 50%; transform: translate(-50%,-50%) scale(0.8); background: linear-gradient(180deg, #1f1a16 0%, #110e0b 100%); border: 2px solid var(--gold); padding: 14px 36px; border-radius: 4px; font-size: 26px; font-weight: 900; color: var(--gold-light); z-index: 10000; opacity: 0; pointer-events: none; transition: all 0.3s; box-shadow: 0 0 50px rgba(0,0,0,0.9); }
#turn-banner.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

#arena { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 10px 0 10px; overflow: hidden; }
.player-row { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 220px; position: relative; }
.bottom-row { align-items: flex-end; margin-top: auto; }
.deck-zone { width: 58px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.deck-stack { width: 50px; height: 70px; background: linear-gradient(135deg, #3d3530, #1a1512); border: 2px solid var(--gold-dark); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: var(--gold); }
.hand-arc-container { flex: 1; height: 240px; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 10px; overflow: visible; position: relative; }
.hand-card-slot { position: relative; width: var(--hand-w); height: var(--hand-h); margin: 0 calc(-1 * var(--hand-ov, 20px)); transition: transform 0.22s; transform-origin: center bottom; z-index: 10; }
.hand-card-slot:hover { z-index: 2000; }

/* Gegnerische Hand: normaler Fächer (wie die eigene Hand), der ganze Container um 180° gedreht.
   Nur der untere Teil ragt oben ins Spielfeld. */
.opp-hand-tray {
    position: absolute;
    top: calc(-156px * var(--ui-scale, 1));
    left: 50%;
    height: calc(224px * var(--ui-scale, 1));
    transform: translateX(calc(-50% + var(--opp-shift, 0px))) rotate(180deg);   /* --opp-shift: layoutBar */
    transform-origin: 50% 50%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 50;
    pointer-events: none;
}

.opp-hand-card-wrapper {
    position: relative;
    transform-origin: center bottom;
    transition: transform 0.2s;
    margin: 0 calc(-1 * var(--opp-ov, 45px)); /* Überlappung für den Fächer-Effekt */
    display: flex;
    justify-content: center;
}

.opp-hand-card-img {
    width: calc(160px * var(--ui-scale, 1));
    height: calc(224px * var(--ui-scale, 1));
    border-radius: 8px;
    border: 2px solid var(--gold-dark);
    box-shadow: 0 8px 20px rgba(0,0,0,0.8);
}


/* Spielbare Handkarten: gelber Rand und etwas größer */
.hand-card-slot.playable { width: calc(var(--hand-w) * 1.1); height: calc(var(--hand-h) * 1.1); }
.hand-card-slot.playable .card-wrapper.hand-card { --cw: calc(var(--hand-w) * 1.1); }
/* Einheitlicher gelber Rand für alles, was in diesem Zug noch etwas tun kann (Handkarten, Allies, Held, Ausrüstung, Quests) */
.card-wrapper.can-act .card-visual { --bd: #facc15; box-shadow: 0 0 0 0.9cqw #facc15, 0 0 4cqw rgba(250,204,21,.75); }
.card-wrapper.can-act .card-visual.has-img::after { box-shadow: inset 0 0 0 0.9cqw #facc15; }
/* Gerade gespielte Allies schlafen: grau + 💤 */
.card-wrapper.sleeping .card-visual { filter: grayscale(.75) brightness(.7); }
.card-wrapper.sleeping::after { content: '💤'; position: absolute; top: -10%; left: -8%; z-index: 40; font-size: clamp(16px, 20cqw, 30px); pointer-events: none;
    filter: drop-shadow(0 0 4px #000); animation: zzz 2.2s ease-in-out infinite; }
@keyframes zzz { 0%, 100% { transform: translateY(0) rotate(-8deg); opacity: .85; } 50% { transform: translateY(-6px) rotate(6deg); opacity: 1; } }
#btn-undo:not(:disabled) { color: #fde68a; border-color: #b45309; }

/* Ongoing-Fähigkeiten neben der Ausrüstung */
.ongoing-card .card-visual { box-shadow: 0 0 0 2px #7c3aed, 0 0.8cqw 2.4cqw rgba(0,0,0,.65); }

.quest-card-large { position: relative; width: var(--hand-w); height: var(--hand-h); border-radius: 4px; transform-origin: center bottom; }
.quest-card-large.zone-quest { opacity: .72; } .quest-card-large.zone-quest:hover { opacity: 1; }   /* Set drums: Quest aus Friedhof/Deck abschließbar */
.active-quests-row .quest-card-large:hover { z-index: 100; }
.quest-card-large.quest-ready { cursor: pointer; }

.hero-dock { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.hero-dock > div { position: relative; }

#battlefield-zone { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; gap: 10px; min-height: 500px; position: relative; }

/* Mehr Platz in der Mitte: Die untere Reihe (Deck, Hand, Ressourcen, Held) liegt über dem unteren Rand des Spielfelds.
   Die eigene Hand ist eingefahren (nur der obere Teil sichtbar) und fährt hoch, sobald die Maus ins untere Viertel kommt. */
#arena { position: relative; }
.bottom-row { position: absolute; left: 10px; right: 10px; width: auto; bottom: 0; min-height: 0; margin: 0; pointer-events: none; z-index: 800; }
.bottom-row > * { pointer-events: auto; }
#battlefield-zone { padding-bottom: calc(var(--hand-h) * 0.42); }

/* Lebensbalken rechts neben den Heldenkarten */
.hero-with-hp { display: flex; align-items: stretch; gap: 6px; }
.hp-bar { position: relative; width: 16px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hp-track { position: relative; flex: 1; width: 12px; border-radius: 7px; overflow: hidden; background: #140f0b;
    border: 1px solid #4a3f35; box-shadow: inset 0 0 5px rgba(0,0,0,.9); }
.hp-trail, .hp-fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; }
.hp-trail { background: #fde68a; transition: height .7s ease-out; }
.hp-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--hpc) 70%, #000), var(--hpc), color-mix(in srgb, var(--hpc) 70%, #fff));
    transition: height .45s cubic-bezier(.3,.8,.3,1), background .3s; }
.hp-bar.hit { animation: hpHit .45s ease-out; }
.hp-bar.healed .hp-fill { animation: hpHeal .9s ease-out; }
@keyframes hpHit { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-1px); } }
@keyframes hpHeal { 0% { filter: none; } 35% { filter: brightness(1.8) drop-shadow(0 0 6px #86efac); background: #86efac; } 100% { filter: none; } }
/* Wenig Leben: auffällig rot pulsierend, kritisch noch stärker */
.hp-bar.low .hp-track { border-color: #ef4444; animation: hpLow 1.2s ease-in-out infinite; }
.hp-bar.critical .hp-track { animation: hpCrit .6s ease-in-out infinite; }
@keyframes hpLow { 50% { box-shadow: 0 0 12px 3px rgba(239,68,68,.85); } }
@keyframes hpCrit { 50% { box-shadow: 0 0 20px 7px rgba(239,68,68,1); border-color: #fecaca; } }
#bot-hand { position: absolute; left: 50%; bottom: 0; width: min(64%, 1100px); flex: none;
    transform: translate(-50%, 64%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); z-index: 900; }
#bot-hand.hand-up { transform: translate(-50%, 0); }

/* Zuganzeige: Linie über das Spielfeld mit Plakette, leuchtender Held des aktiven Spielers */
#turn-indicator { position: absolute; left: 0; right: 0; top: 50%; height: 0; z-index: 4; pointer-events: none; display: flex; align-items: center; justify-content: flex-start; }
#turn-indicator::before { content: ''; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--ti-c) 15%, var(--ti-c) 85%, transparent); opacity: .55; }
#turn-indicator span { position: relative; margin-left: 14px; padding: 5px 16px; border-radius: 999px; font: 900 13px/1 Georgia, serif; letter-spacing: 2px;
    color: #1a1208; background: var(--ti-c); box-shadow: 0 0 18px var(--ti-c); transform: translateY(-50%); }
#turn-indicator.me { --ti-c: #facc15; } #turn-indicator.cpu { --ti-c: #ef4444; }
#turn-indicator.cpu span { color: #fff; }
.hero-dock.turn-active .card-wrapper .card-visual { animation: turnGlow 1.6s ease-in-out infinite; }
#bot-dock.turn-active { --tg: #facc15; } #top-dock.turn-active { --tg: #ef4444; }
@keyframes turnGlow { 0%, 100% { box-shadow: 0 0 0 0.9cqw var(--tg), 0 0 4cqw var(--tg); } 50% { box-shadow: 0 0 0 1.2cqw var(--tg), 0 0 9cqw var(--tg); } }
#btn-end-turn.cpu-turn { color: #fca5a5; border-color: #7a2d2d; }

/* Großer End-Turn-Button, wenn nichts Sinnvolles mehr möglich ist */
#big-end-turn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 30; display: none;
    padding: 16px 52px; font: 900 26px/1 Georgia, serif; letter-spacing: 2px; color: #1a1208; border: 3px solid #fde68a; border-radius: 40px;
    background: linear-gradient(180deg, #fde047, #ca8a04); box-shadow: 0 0 30px rgba(250,204,21,.8), 0 8px 20px rgba(0,0,0,.7); animation: endPulse 1.4s ease-in-out infinite; }
#big-end-turn:hover { filter: brightness(1.12); }
@keyframes endPulse { 50% { box-shadow: 0 0 50px rgba(250,204,21,1), 0 8px 20px rgba(0,0,0,.7); transform: translate(-50%, -50%) scale(1.05); } }

#side-panel { width: 280px; flex-shrink: 0; background: linear-gradient(180deg, #1a1512 0%, #0a0705 100%); border-left: 2px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
button { background: linear-gradient(180deg, #3d3530, #1a1512); color: var(--gold-light); border: 1px solid var(--gold-dark); padding: 7px 10px; border-radius: 3px; font-weight: bold; font-size: 12px; cursor: pointer; }
button:hover { border-color: var(--gold); }
button:disabled { color: #5a4f45; cursor: not-allowed; }
button.success { color: #a3e6bb; border-color: #2d7a4a; }
button.danger { color: #e6a3a3; border-color: #7a2d2d; }
.stats-box { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 3px; padding: 8px; font-size: 11px; display: flex; flex-direction: column; gap: 4px; }
.stats-row { display: flex; gap: 6px; flex-wrap: wrap; } .stats-row b { color: var(--gold); }
.cpu-indicator { padding: 6px 10px; background: #1a1512; border: 1px solid #6366f1; border-radius: 3px; font-size: 11px; color: #c7d2fe; display: flex; align-items: center; gap: 6px; }
.cpu-indicator .spinner { width: 10px; height: 10px; border: 2px solid #a5b4fc; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#log-area { flex: 1; background: rgba(0,0,0,0.5); border-radius: 3px; border: 1px solid var(--border); padding: 8px; overflow-y: auto; font-family: 'Courier New', monospace; font-size: 11px; display: flex; flex-direction: column-reverse; gap: 3px; }
.log-entry { padding-bottom: 2px; border-bottom: 1px solid rgba(74,63,53,0.5); line-height: 1.3; }
.log-turn { color: var(--gold); font-weight: bold; } .log-hit { color: #f87171; } .log-heal { color: #34d399; } .log-cpu { color: #a78bfa; } .log-combat { color: #fbbf24; }

.ally-ability-btn { position: absolute; left: 0; right: 0; bottom: -32px; z-index: 20; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.card-wrapper:hover .ally-ability-btn { opacity: 1; }
.ally-ability-btn button { flex: 1; padding: 4px 0; font-size: 10px; border-radius: 3px; border: 1px solid var(--gold-dark); font-weight: bold; color: #fff; cursor: pointer; background: linear-gradient(180deg, #2563eb, #1e40af); }
.ally-ability-btn button:hover { border-color: var(--gold); }
.card-wrapper.target-selected .card-visual { box-shadow: 0 0 5cqw 1.5cqw #fbbf24 !important; }
.card-wrapper.target-selected .card-visual.has-img::after { box-shadow: inset 0 0 0 0.7cqw #fbbf24; }

#multi-target-ui { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.9); border: 2px solid var(--gold); border-radius: 8px; padding: 12px 24px; display: none; flex-direction: column; align-items: center; gap: 8px; z-index: 50000; box-shadow: 0 5px 25px rgba(0,0,0,0.8); }
#multi-target-ui h3 { margin: 0; color: var(--gold); font-size: 16px; }
#multi-target-ui .mt-info { font-size: 12px; color: var(--text-dim); }
#multi-target-ui button { padding: 6px 20px; font-size: 14px; }
/* ===== Game 3: Schlachtfeld mit Ausrüstungs-Zone, Entscheidungsfeld, Protector ===== */
.card-action-bar { flex-wrap: wrap; }
.card-action-bar button { min-width: 48%; }

/* Getappte (erschöpfte) Quests in der Ressourcenreihe */
.quest-card-large.exhausted > .card-wrapper > .cfx-rot { transform: rotate(90deg); }
.quest-card-large.exhausted { opacity: .8; }

/* Protector wählen */
.card-wrapper.protect-pulsing .card-visual { box-shadow: 0 0 5cqw 1.5cqw #38bdf8 !important; animation: protPulse 1s ease-in-out infinite; }
@keyframes protPulse { 50% { box-shadow: 0 0 7cqw 2.5cqw #38bdf8; } }
.card-wrapper.in-combat .card-visual { outline: 0.8cqw solid #f97316; }
.protect-label { position: fixed; transform: translate(-50%, -50%); pointer-events: none; z-index: 999999; font-size: 34px; font-weight: 900; color: #38bdf8;
    text-shadow: 0 0 12px #0ea5e9, 0 3px 10px rgba(0,0,0,.9); letter-spacing: 2px; font-family: 'Georgia', serif; animation: protectPop 1.6s ease-out forwards; }
@keyframes protectPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); } 30% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }

/* Entscheidungsfeld (Ziele, "you may", Protector, Waffenschlag, Priorität, Kette) */
#pending-panel { position: fixed; left: 12px; top: 50%; transform: translateY(-50%); z-index: 9000; width: 270px; max-height: 70vh; overflow: auto;
    display: none; flex-direction: column; gap: 8px; background: rgba(10,7,5,.94); border: 2px solid var(--gold); border-radius: 8px; padding: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.7); }
#pp-title { font-weight: 900; color: var(--gold); font-size: 14px; }
#pp-prompt { font-size: 12px; line-height: 1.45; color: var(--text-main); }
#pp-opts { display: flex; flex-direction: column; gap: 5px; }
#pp-opts button { padding: 6px 8px; font-size: 12px; text-align: left; }
.pp-chain-head { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
.pp-chain-item { font-size: 11px; padding: 3px 6px; border-radius: 3px; margin-bottom: 2px; background: #1a1512; border-left: 3px solid #60a5fa; }
.pp-chain-item.opp { border-left-color: #f87171; }

/* ===== Entscheidungsfenster (mittig, Kartenbilder) ===== */
#choice-modal { position: fixed; inset: 0; z-index: 9500; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
#choice-box { max-width: min(1100px, 92vw); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 18px 24px; }
#cm-title { margin: 0; color: var(--gold); font-size: 18px; }
#cm-prompt { font-size: 14px; line-height: 1.45; color: var(--text-main); max-width: 640px; }
#cm-context { display: flex; align-items: center; justify-content: center; gap: 14px; }
#cm-context:empty, #cm-cards:empty { display: none; }
.cm-ctx-card .card-wrapper, .cm-ctx-card .card-wrapper.hand-card { --cw: clamp(110px, 11vw, 170px); cursor: default; }
.cm-arrow { font-size: 34px; font-weight: 900; color: var(--gold-light); }
#cm-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; padding-top: 6px; border-top: 1px solid var(--border); }
.cm-card { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; transition: transform .15s; }
.cm-card:hover { transform: translateY(-6px); }
.cm-card .card-wrapper, .cm-card .card-wrapper.hand-card { --cw: clamp(100px, 9vw, 150px); }
.cm-card:hover .card-visual { box-shadow: 0 0 0 0.9cqw #facc15, 0 0 4cqw rgba(250,204,21,.75); }
.cm-warn { margin-top: 8px; color: #f87171; font-weight: bold; }
.cm-card.cm-picked .card-visual { box-shadow: 0 0 0 0.9cqw #ef4444, 0 0 4cqw rgba(239,68,68,.8); }
.cm-card.cm-picked { transform: translateY(-6px); }
/* Mehrfachauswahl (pickMany): markiert = grün, Zähler über den Karten */
.cm-card.cm-sel .card-visual { box-shadow: 0 0 0 0.9cqw #22c55e, 0 0 4cqw rgba(34,197,94,.8); }
.cm-card.cm-sel { transform: translateY(-6px); }
.cm-multi-count { margin-top: 6px; font-weight: 700; color: #86efac; }
/* Mehrfachauswahl auf dem Spielfeld: markierte Karten grün (statt des gelben Zielrands) */
.multi-picked .card-visual, .multi-picked.card-visual { box-shadow: 0 0 0 3px #22c55e, 0 0 14px rgba(34,197,94,.9) !important; }
.multi-picked { transform: translateY(-4px); }
.cm-caption { max-width: clamp(100px, 9vw, 150px); font-size: 11px; font-weight: bold; color: var(--gold-light); line-height: 1.3; }
#cm-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
#cm-buttons button { padding: 8px 20px; font-size: 14px; }

/* ===== Schadenszahlen, Treffer-Partikel, Tod ===== */
.fx-particle { position: fixed; z-index: 9800; border-radius: 50%; pointer-events: none; }
.dmg-number { position: fixed; z-index: 9810; pointer-events: none; white-space: nowrap; font: 900 46px/1 Georgia, serif;
    -webkit-text-stroke: 2px #1a0505; text-shadow: 0 0 12px rgba(0,0,0,.9), 0 4px 10px rgba(0,0,0,.9); transform: translate(-50%, -50%); }
.dmg-number .dmg-icon { font-size: 26px; margin-right: 4px; vertical-align: middle; -webkit-text-stroke: 0; }
.fx-ghost { position: fixed; z-index: 9700; pointer-events: none; }
.fx-ghost .card-wrapper { width: 100%; }
.fx-shock { position: fixed; z-index: 9790; pointer-events: none; border-radius: 50%; border: 6px solid; box-sizing: border-box; }
.fx-screenflash { position: fixed; inset: 0; z-index: 9795; pointer-events: none; mix-blend-mode: screen; }

/* ===== Ziel-/Angriffspfeil ===== */
#aim-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9900; pointer-events: none; display: none; overflow: visible; }
#aim-arrow .aim-line { fill: none; stroke: url(#aim-grad); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 18 10; animation: aimDash .6s linear infinite; }
#aim-arrow .aim-glow { fill: none; stroke: rgba(249,115,22,.35); stroke-width: 20; stroke-linecap: round; filter: blur(4px); }
@keyframes aimDash { to { stroke-dashoffset: -28; } }

/* ===== CPU-Karte groß in der Mitte ===== */
.fx-showcase { position: fixed; z-index: 9750; pointer-events: none; perspective: 900px; filter: drop-shadow(0 18px 40px rgba(0,0,0,.85)) drop-shadow(0 0 24px rgba(201,168,76,.45)); }
.fx-showcase .card-wrapper { width: 100%; }

/* ===== Bild-Test-Szene ===== */

/* ===== Siegbildschirm ===== */
#gameover { position: fixed; inset: 0; z-index: 100500; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 2vh;
    background: radial-gradient(ellipse at center, rgba(40,30,18,.94) 0%, rgba(5,3,2,.97) 70%); }
#go-title { font: 900 clamp(48px, 9vw, 110px)/1 Georgia, serif; letter-spacing: 6px; color: var(--gold-light); text-shadow: 0 0 30px rgba(201,168,76,.7), 0 6px 0 #3b2a10; }
#go-title.win { color: #fde68a; } #go-title.lose { color: #fca5a5; text-shadow: 0 0 30px rgba(239,68,68,.6), 0 6px 0 #3b1010; }
#go-sub { color: var(--text-main); font-size: 17px; }
#go-main { display: flex; align-items: center; gap: 4vw; margin: 2vh 0; }
#go-card { transform: rotate(-7deg); filter: drop-shadow(0 0 30px rgba(250,204,21,.55)) drop-shadow(0 20px 40px rgba(0,0,0,.9)); }
#go-card .card-wrapper { --cw: min(300px, 26vw, 34vh); }
#go-caption { max-width: 300px; }
.go-best { color: var(--text-dim); font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.go-name { color: var(--gold-light); font: 900 30px/1.2 Georgia, serif; margin: 6px 0 10px; }
.go-stats { color: #fca5a5; font-size: 16px; font-weight: bold; }
#go-buttons { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
#go-buttons button { padding: 10px 22px; font-size: 15px; }

/* ===== Sprechblase der CPU ===== */
.cpu-bubble { position: fixed; z-index: 9400; max-width: 260px; padding: 10px 14px; border-radius: 14px; pointer-events: none;
    background: #f5ecd7; color: #2a1d10; font: italic bold 14px/1.35 Georgia, serif; border: 2px solid var(--gold-dark);
    box-shadow: 0 6px 20px rgba(0,0,0,.6); animation: bubbleIn .25s ease-out; transition: opacity .35s, transform .35s; }
.cpu-bubble::after { content: ''; position: absolute; right: -12px; top: 14px; border: 8px solid transparent; border-left: 12px solid #f5ecd7; border-right: 0; }
.cpu-bubble.tail-left::after { right: auto; left: -12px; border-left: 0; border-right: 12px solid #f5ecd7; }
.cpu-bubble.out { opacity: 0; transform: translateY(-6px); }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.6) translateX(20px); } to { opacity: 1; transform: none; } }

/* ===== Mulligan im Hearthstone-Stil =====
   Spielfeld dunkel und verschwommen im Hintergrund (#hs-mull-bg), Glut steigt auf, Starthand groß im Fächer.
   Ebenen je Karte: Slot (Fächer-Lage) > bob (leichtes Schweben) > lift (Hover/Markiert) > Karte (Anflug). */
#hs-mulligan { position: fixed; inset: 0; z-index: 100000; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 2.6vh; overflow: hidden; }
#hs-mull-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: radial-gradient(ellipse 80% 70% at 50% 55%, rgba(40,28,14,.12) 0%, rgba(8,5,3,.5) 60%, rgba(2,1,0,.86) 100%);
    -webkit-backdrop-filter: blur(8px) saturate(.75) brightness(.72); backdrop-filter: blur(8px) saturate(.75) brightness(.72); }
#hs-mull-embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#hs-mull-embers i { position: absolute; bottom: -14px; width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
    background: radial-gradient(circle, #fff3c4 0%, #f59e0b 42%, rgba(245,158,11,0) 72%); animation: mullEmber var(--d) linear var(--dl) infinite; }
@keyframes mullEmber { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: var(--o, .8); } 75% { opacity: calc(var(--o, .8) * .5); } 100% { transform: translate(var(--dx), -108vh); opacity: 0; } }
#hs-mull-head { display: flex; flex-direction: column; align-items: center; gap: .9vh; pointer-events: none; }
#hs-mull-title { display: flex; align-items: center; gap: .7em; font: 900 clamp(22px, 4.4vh, 48px)/1.1 Georgia, serif; letter-spacing: .2em; text-transform: uppercase;
    color: #f6d983; filter: drop-shadow(0 0 14px rgba(232,180,70,.45)) drop-shadow(0 4px 10px #000); }
#hs-mull-title::before, #hs-mull-title::after { content: ''; width: clamp(40px, 9vw, 160px); height: 2px; background: linear-gradient(90deg, rgba(201,168,76,0), #e9c46a); }
#hs-mull-title::after { background: linear-gradient(270deg, rgba(201,168,76,0), #e9c46a); }
#hs-mull-hint { color: #e6d7b5; opacity: .78; font-size: clamp(12px, 1.8vh, 17px); letter-spacing: 1.5px; text-shadow: 0 2px 8px #000; }
#hs-mull-cards { display: flex; justify-content: center; align-items: flex-end; padding: 1vh 0 2vh; }
.hs-mull-card { position: relative; flex: none; margin: 0 calc(-1 * var(--mov, 12px)); transform-origin: 50% 100%; cursor: pointer; }
.hs-mull-card .card-wrapper.hand-card { --cw: var(--mw, 220px); }
.hs-mull-bob { animation: mullBob 3.8s ease-in-out var(--bd, 0s) infinite; }
@keyframes mullBob { 50% { transform: translateY(calc(var(--mw, 220px) * -.018)); } }
.hs-mull-lift { position: relative; transition: transform .3s cubic-bezier(.2,.9,.3,1.35); }
.hs-mull-card:hover { z-index: 60 !important; }
#hs-mulligan:not(.busy) .hs-mull-card:hover .hs-mull-lift { transform: translateY(-7%) scale(1.08); }
.hs-mull-card .card-visual { transition: filter .25s, box-shadow .25s; box-shadow: 0 2cqw 6cqw rgba(0,0,0,.7); }
#hs-mulligan:not(.busy) .hs-mull-card:hover .card-visual { box-shadow: 0 0 0 .8cqw #f6d983, 0 0 7cqw 1.4cqw rgba(250,204,21,.5), 0 4cqw 8cqw rgba(0,0,0,.75); }
.hs-mull-card.marked .hs-mull-lift { transform: translateY(8%) scale(.93) rotate(-2deg); }
#hs-mulligan:not(.busy) .hs-mull-card.marked:hover .hs-mull-lift { transform: translateY(4%) scale(.96) rotate(-2deg); }
.hs-mull-card.marked .card-visual { filter: grayscale(.85) brightness(.42); }
#hs-mulligan:not(.busy) .hs-mull-card.marked:hover .card-visual { box-shadow: 0 0 0 .8cqw #ef4444, 0 0 7cqw 1.4cqw rgba(239,68,68,.45); }
/* Austausch-Stempel: springt groß herein und setzt sich schräg */
.hs-mull-x { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; pointer-events: none; opacity: 0;
    transform: scale(2.3) rotate(-24deg); transition: opacity .12s, transform .3s cubic-bezier(.3,1.7,.5,1); }
.hs-mull-x b { width: 46%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font: 900 calc(var(--mw, 220px) * .3)/1 Arial, sans-serif; color: #fff;
    background: radial-gradient(circle at 40% 35%, #f87171, #b91c1c 60%, #7f1d1d); border: calc(var(--mw, 220px) * .018) solid #fecaca;
    box-shadow: 0 0 0 calc(var(--mw, 220px) * .012) #7f1d1d, 0 0 26px rgba(239,68,68,.8), 0 8px 18px rgba(0,0,0,.7); text-shadow: 0 2px 4px rgba(0,0,0,.6); }
.hs-mull-card.marked .hs-mull-x { opacity: 1; transform: scale(1) rotate(-10deg); }
/* Glanz, der nach dem Landen einmal über die Karte läuft */
.hs-mull-shine { position: absolute; inset: 0; z-index: 25; pointer-events: none; border-radius: calc(var(--mw, 220px) * .046); overflow: hidden; }
.hs-mull-shine::before { content: ''; position: absolute; inset: -20% -60%; opacity: 0; transform: translateX(-60%) rotate(8deg);
    background: linear-gradient(100deg, rgba(255,255,255,0) 38%, rgba(255,240,200,.55) 50%, rgba(255,255,255,0) 62%); mix-blend-mode: screen; }
.hs-mull-card.shine .hs-mull-shine::before { animation: mullShine .75s ease-out; }
@keyframes mullShine { 0% { opacity: 0; transform: translateX(-60%) rotate(8deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateX(60%) rotate(8deg); } }
/* Neue Karte nach dem Tausch: kurzer goldener Schein */
.hs-mull-card.fresh .card-visual { animation: mullFresh 1.2s ease-out; }
@keyframes mullFresh { 0%, 35% { box-shadow: 0 0 0 .9cqw #fde68a, 0 0 9cqw 3cqw rgba(253,230,138,.85); } 100% { box-shadow: 0 2cqw 6cqw rgba(0,0,0,.7); } }
#hs-mull-keep { position: relative; padding: 13px 64px; min-width: 240px; font: 900 clamp(16px, 2.3vh, 21px)/1 Georgia, serif; letter-spacing: 1.5px; border-radius: 40px;
    color: #dcfce7; border: 2px solid #4ade80; background: linear-gradient(180deg, #1f6b3d, #0f3b22); text-shadow: 0 2px 4px rgba(0,0,0,.6);
    box-shadow: 0 0 22px rgba(74,222,128,.35), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.7); animation: mullBtn 2.4s ease-in-out infinite;
    transition: transform .15s, filter .15s, background .25s, border-color .25s, color .25s; }
#hs-mull-keep:hover:not(:disabled) { transform: translateY(-2px) scale(1.05); filter: brightness(1.15); }
#hs-mull-keep:active:not(:disabled) { transform: scale(.96); }
#hs-mull-keep:disabled { color: #dcfce7; cursor: default; animation: none; }
#hs-mull-keep.swap { color: #fff7ed; border-color: #fb923c; background: linear-gradient(180deg, #b4531a, #6b260b); box-shadow: 0 0 22px rgba(251,146,60,.4), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.7); animation-name: mullBtnSwap; }
@keyframes mullBtn { 50% { box-shadow: 0 0 36px rgba(74,222,128,.65), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.7); } }
@keyframes mullBtnSwap { 50% { box-shadow: 0 0 36px rgba(251,146,60,.7), inset 0 1px 0 rgba(255,255,255,.18), 0 8px 20px rgba(0,0,0,.7); } }
/* Abflug zur Hand: kein Schweben/Hover mehr */
#hs-mulligan.landing .hs-mull-bob { animation: none; }
#hs-mulligan.busy .hs-mull-card { cursor: default; }
/* Solange das Fenster offen ist, liegt die echte Hand unsichtbar bereit – beim Abflug ganz ausgefahren (Zielplätze) */
body.mull-open #bot-hand { visibility: hidden; }
body.mull-land #bot-hand { transform: translate(calc(-50% + var(--hand-shift, 0px)), 0) !important; transition: none !important; }

/* ===== Symmetrisches Brett =====
   Spielfeld über die volle Höhe, zwei gleich große Hälften, Zuglinie genau in der Mitte.
   Beide Spielerreihen liegen in den Ecken darüber: unten Ressourcen ab der linken Ecke, Friedhof + Held rechts;
   oben gespiegelt (Held + Friedhof links, Ressourcen ab der rechten Ecke). Die Ally-Reihen weichen seitlich aus (js/ui.js layoutBoard). */
#arena { position: relative; padding: 0; }
#battlefield-zone { position: absolute; inset: 0; min-height: 0; padding: 0 10px !important; display: flex; flex-direction: column; justify-content: stretch; gap: 0; }
.player-row { position: absolute; left: 10px; right: 10px; width: auto; min-height: 0; margin: 0; pointer-events: none; z-index: 800; gap: 12px; }
.player-row > * { pointer-events: auto; }
.top-row { top: 8px; align-items: flex-start; }
.bottom-row { bottom: 8px; align-items: flex-end; }
.bottom-row .resource-tray { order: 0; margin: 0 auto 0 0; }
.bottom-row .deck-zone { order: 1; }
.bottom-row .hero-dock { order: 2; }
.top-row .hero-dock { order: 0; }
.top-row .deck-zone { order: 1; }
.top-row .resource-tray { order: 2; margin: 0 0 0 auto; }

/* Ressourcen: eine Reihe aus der Ecke heraus – verdeckte Karten (Kartenrücken, überlappend), daneben offene Quests */
.res-card img { position: absolute; top: 0; left: 0; width: var(--hand-w); height: var(--hand-h); border-radius: 6px; border: 1px solid var(--gold-dark);
    box-shadow: 0 4px 12px rgba(0,0,0,.75); transition: transform .3s, filter .3s; user-select: none; }
.top-row .res-card img { left: auto; right: 0; }
.res-card.exhausted img { transform: rotate(90deg) scale(.82); filter: brightness(.55) saturate(.7); }
.res-card:hover { z-index: 5; }

/* Friedhof: kartengroße Ablage neben dem Helden */
.deck-zone { width: calc(var(--field-w) * .8); }
.deck-stack { position: relative; width: 100%; height: auto; aspect-ratio: 5 / 7; padding: 0; background: rgba(0,0,0,.25); border: 2px dashed rgba(201,168,76,.25); border-radius: 6px; visibility: visible !important; }
.deck-stack.grave-btn { border: none; background: none; cursor: pointer; }
.deck-stack .card-wrapper { position: absolute; inset: 0; width: 100%; filter: grayscale(.35) brightness(.85); }
.deck-stack.grave-btn:hover .card-wrapper { filter: none; }
.grave-label { color: rgba(201,168,76,.35); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.grave-count { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); z-index: 30; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
    background: #1a1512; border: 1px solid var(--gold-dark); color: var(--gold-light); font-size: 11px; font-weight: 900; pointer-events: none; }
.top-row .grave-count { bottom: auto; top: -10px; }
/* Combo-Punkte auf Finishing Moves in der Hand (wie in WoW): 5 Kreise oben, gelb = Combo im Friedhof, grau = leer */
.card-combo { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 40; display: flex; gap: 3px; padding: 3px 6px;
    border-radius: 999px; background: rgba(10, 6, 4, .85); border: 1px solid rgba(201, 168, 76, .6); box-shadow: 0 2px 6px rgba(0,0,0,.6); pointer-events: none; }
.card-combo i { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6b6b6b, #2e2e2e 70%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.7); }
.card-combo i.on { background: radial-gradient(circle at 35% 35%, #fff6a8, #f2c31b 55%, #9a6a05); box-shadow: 0 0 5px rgba(255, 210, 60, .9), inset 0 0 0 1px rgba(90,60,0,.6); }
/* Overkill ("remove X finishing move cards"): Finisher im Friedhof statt Combos – rot statt gelb */
.card-combo.fm { border-color: rgba(220, 70, 50, .7); }
/* Stash-Karte auf der Hand, die jetzt noch als Ressource gelegt werden darf */
.card-stash { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 2px 8px; border-radius: 10px; white-space: nowrap;
    font: 700 11px/1.3 Georgia, serif; color: #ffe9a8; background: rgba(40, 26, 6, .92); border: 1px solid #d9a441;
    box-shadow: 0 0 8px rgba(255, 200, 80, .8); animation: stashPulse 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes stashPulse { 50% { box-shadow: 0 0 14px 3px rgba(255, 210, 90, 1); } }
.card-combo.fm i.on { background: radial-gradient(circle at 35% 35%, #ffc2a8, #e0452b 55%, #7a1406); box-shadow: 0 0 5px rgba(255, 80, 50, .9), inset 0 0 0 1px rgba(90,10,0,.6); }
#bot-hand { z-index: 700; }
#bot-hand.hand-up { z-index: 900; }
.bottom-row > .resource-tray, .bottom-row > .deck-zone, .bottom-row > .hero-dock { position: relative; z-index: 800; }
/* Seitenleiste: Untermenü "Einstellungen & Tests" */
#side-more { border: 1px solid var(--border); border-radius: 4px; background: rgba(0,0,0,.3); }
#side-more > summary { cursor: pointer; list-style: none; padding: 7px 10px; font-size: 12px; font-weight: bold; color: var(--gold-light); user-select: none; }
#side-more > summary::-webkit-details-marker { display: none; }
#side-more > summary::after { content: '▸'; float: right; transition: transform .2s; }
#side-more[open] > summary::after { transform: rotate(90deg); }
#side-more > summary:hover { color: var(--gold); }
.side-more-body { display: flex; flex-direction: column; gap: 6px; padding: 4px 8px 10px; max-height: 46vh; overflow-y: auto; }
.side-more-head { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--border); padding: 4px 0 2px; }
/* Ressourcen-Ablage auch leer als Dropzone (Karte als Ressource legen) */
.bottom-row #bot-resource-tray { min-width: var(--hand-w); min-height: var(--hand-h); border-radius: 8px; }
/* Friedhof erst sichtbar, wenn eine Karte drin liegt (Platz bleibt reserviert, damit der Held nicht springt) */
.deck-stack.empty { visibility: hidden !important; }
/* Mana-Juwel: verfügbare Ressourcen (eigenes über den Ressourcen, gegnerisches darunter) */
.top-row .resource-tray { position: relative; }
.mana-badge { position: absolute; left: 0; bottom: calc(100% + 10px); display: flex; align-items: center; gap: 8px; pointer-events: auto; z-index: 5; }
.top-row .mana-badge { left: auto; right: 0; bottom: auto; top: calc(100% + 10px); flex-direction: row-reverse; }
.mana-gem { position: relative; width: calc(52px * var(--ui-scale, 1)); height: calc(52px * var(--ui-scale, 1)); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #bfe4ff 0%, #4aa3ff 22%, #1957c9 55%, #0b2463 85%);
    box-shadow: 0 0 0 3px #c9a84c, 0 0 0 5px #3a2a10, 0 0 14px rgba(74,163,255,.8), inset 0 -6px 10px rgba(0,0,40,.6);
    display: flex; align-items: center; justify-content: center; transition: filter .3s; }
.mana-gem::after { content: ''; position: absolute; left: 22%; top: 12%; width: 34%; height: 22%; border-radius: 50%; background: rgba(255,255,255,.45); filter: blur(2px); }
.mana-gem span { position: relative; z-index: 1; font: 900 calc(28px * var(--ui-scale, 1))/1 Impact, 'Arial Black', Georgia, sans-serif; color: #fff;
    -webkit-text-stroke: 4px #000; paint-order: stroke fill; text-shadow: 0 0 6px #000; }
.mana-txt { display: flex; flex-direction: column; line-height: 1.05; text-shadow: 0 1px 3px #000; }
.top-row .mana-txt { align-items: flex-end; }
.mana-txt b { font-size: 12px; color: #9fd0ff; text-transform: uppercase; letter-spacing: 1px; }
.mana-txt small { font-size: 11px; color: var(--text-dim); }
.mana-badge.empty .mana-gem { filter: grayscale(.85) brightness(.55); }
.mana-badge.empty .mana-txt b { color: var(--text-dim); }
.mana-gem.spend { animation: manaSpend .5s ease-out; }
.mana-gem.gain { animation: manaGain .7s ease-out; }
@keyframes manaSpend { 0% { transform: scale(1); } 30% { transform: scale(1.25); box-shadow: 0 0 0 3px #c9a84c, 0 0 0 5px #3a2a10, 0 0 26px 6px rgba(239,68,68,.9); } 100% { transform: scale(1); } }
@keyframes manaGain { 0% { transform: scale(1); } 35% { transform: scale(1.3) rotate(-8deg); box-shadow: 0 0 0 3px #fde68a, 0 0 0 5px #3a2a10, 0 0 30px 8px rgba(250,204,21,.9); } 100% { transform: scale(1); } }
/* Hand rückt bei vielen Ressourcen nach rechts (--hand-shift setzt layoutHand) */
#bot-hand { transform: translate(calc(-50% + var(--hand-shift, 0px)), 64%); }
#bot-hand.hand-up { transform: translate(calc(-50% + var(--hand-shift, 0px)), 0); }
/* Deckübersicht: Kacheln wachsen mit dem Text, Icon ohne zusätzlichen Kreis, sauber zentriert */
.deck-btn { height: auto; min-height: 130px; padding: 12px 8px 10px; box-sizing: border-box; overflow: hidden; }
.deck-icon { width: 64px; height: 64px; margin: 0 auto 8px; flex-shrink: 0; }
.deck-icon img { border: none; border-radius: 0; box-shadow: none; background: none; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.7)); }
.deck-name { width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.deck-btn.custom .deck-name { font-size: 13px; }
.deck-event { font-size: 11px; color: var(--text-main); opacity: .75; margin-top: 3px; text-align: center; line-height: 1.25; padding: 0 4px; overflow-wrap: anywhere; }
.deck-sub { line-height: 1.3; }
/* Booster-Auswahl je Set */
#booster-picker { display: none; flex-direction: column; align-items: center; gap: 22px;
    max-height: 100%; overflow-y: auto; box-sizing: border-box; padding: 30px 40px; }   /* niedrige Bildschirme (Tablet quer): scrollen statt oben/unten abgeschnitten */
.bp-title { color: var(--gold-light); font: 700 22px Georgia, serif; letter-spacing: 1px; text-shadow: 0 0 14px rgba(251,191,36,.45); }
.bp-row { display: flex; gap: 44px; align-items: flex-end; justify-content: center; flex-wrap: wrap; }
.bp-pack { display: flex; flex-direction: column; align-items: center; gap: 12px; cursor: pointer; animation: bPackIn .7s cubic-bezier(.2,1.4,.4,1) both; transition: transform .25s, filter .25s; }
.bp-pack img { width: min(220px, 22vw); aspect-ratio: 3 / 5; object-fit: cover; border-radius: 10px; box-shadow: 0 16px 34px rgba(0,0,0,.85); transition: box-shadow .25s; user-select: none; }
.bp-pack:hover { transform: translateY(-14px) scale(1.06); }
.bp-pack:hover img { box-shadow: 0 0 0 2px #fbbf24, 0 0 34px 8px rgba(251,191,36,.55), 0 20px 40px rgba(0,0,0,.85); }
.bp-pack.last .bp-name::after { content: ' ★'; color: #fbbf24; }
.bp-name { color: var(--text-main); font: 700 15px Georgia, serif; text-shadow: 0 1px 4px #000; }
.bp-pack:hover .bp-name { color: var(--gold-light); }
/* Helden: normal wie Ungewöhnlich, Foil-Helden mit goldenem Pulsieren und Strahlen */
.booster-card-wrapper.glow-hero { --gc: 74,222,128; }
.booster-card-wrapper.flipped.glow-hero .card-visual { animation: none; }
.booster-card-wrapper.glow-herofoil { --gc: 245,158,11; }
.booster-card-wrapper.flipped.glow-herofoil .card-visual { animation: bGlow 2.2s ease-in-out infinite; }
/* Deck Builder: Klassen-Leiste (Filter) und Helden-Streifen mit Bildern */
#db-class-bar { display: flex; gap: 4px; flex-wrap: wrap; align-items: stretch; min-width: 0; }
/* Heldenfeld oben in der Deckliste (rechte Spalte): Karte links, Angaben daneben */
#db-hero-slot { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 10px 12px; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; transition: background .15s;
    background: radial-gradient(ellipse at 15% 50%, rgba(201,168,76,.16), transparent 65%), #1a1512; }
#db-hero-slot:hover { background: radial-gradient(ellipse at 15% 50%, rgba(201,168,76,.26), transparent 70%), #1f1914; }
.db-hs-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.db-hs-info b { color: var(--gold-light); font-size: 17px; }
.db-hs-info span { color: var(--text-main); font-size: 12px; }
.db-hs-info small { color: var(--text-dim); font-size: 10px; margin-top: 4px; }
.db-hs-hint { color: var(--text-dim); font-size: 12px; line-height: 1.4; }
.db-hs-card { order: -1; width: 92px; flex: none; border-radius: 8px; transition: transform .15s, box-shadow .15s; }
.db-hs-card .card-wrapper { width: 100%; }
#db-hero-slot:hover .db-hs-card { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(250,204,21,.45); }
#db-hero-slot + .db-stats { border-radius: 0; }
.db-hs-card.empty { height: 128px; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--gold-dark); background: rgba(0,0,0,.35); color: var(--gold); font-size: 20px; font-weight: bold; letter-spacing: 1px; }
/* Auswahl-Fenster */
#db-hero-picker { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.72); align-items: center; justify-content: center; }
.db-hp-box { width: min(1180px, 94vw); max-height: 90vh; display: flex; flex-direction: column; background: #0d0907; border: 1px solid var(--gold-dark); border-radius: 10px; box-shadow: 0 10px 50px rgba(0,0,0,.8); overflow: hidden; }
.db-hp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.db-hp-head b { color: var(--gold-light); font-size: 16px; flex: 1; }
#db-hp-tools { display: flex; gap: 6px; }
.db-hp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 12px; padding: 14px; overflow-y: auto; }
.db-hp-cls { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: var(--gold); font-weight: bold; font-size: 14px; border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-top: 4px; }
.db-hp-cls img { width: 24px; height: 24px; object-fit: contain; }
.db-hp-grid .db-hero-tile { width: auto; }
.db-hero-sub { font-size: 9px; text-align: center; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-class { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 4px 2px; min-width: 54px; border-radius: 8px; background: #120e0b; border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.db-class img { width: 28px; height: 28px; object-fit: contain; filter: grayscale(.6) brightness(.8); transition: filter .15s; }
.db-class small { font-size: 9px; font-weight: bold; letter-spacing: .2px; }
.db-class:hover { transform: translateY(-2px); border-color: var(--gold-dark); color: var(--gold-light); }
.db-class:hover img { filter: none; }
.db-class.on { background: linear-gradient(180deg, #3a2c12, #1a1208); border-color: var(--gold); color: var(--gold-light); box-shadow: 0 0 12px rgba(201,168,76,.45); }
.db-class.on img { filter: drop-shadow(0 0 6px rgba(250,204,21,.6)); }
.db-class-all { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--gold); }
#db-hero-strip { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 6px 4px 8px; align-items: center; border-radius: 6px; background: rgba(0,0,0,.3); border: 1px solid var(--border); scrollbar-width: thin; }
.db-hero-hint { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; min-width: 150px; max-width: 190px; padding: 0 8px; gap: 3px; }
.db-hero-hint b { color: var(--gold-light); font-size: 14px; }
.db-hero-hint span { color: var(--text-dim); font-size: 11px; line-height: 1.3; }
.db-hero-tile { flex: 0 0 auto; width: 78px; cursor: pointer; border-radius: 6px; transition: transform .15s, box-shadow .15s, filter .15s; filter: brightness(.8); }
.db-hero-tile:hover { transform: translateY(-3px); filter: none; }
.db-hero-tile.on { filter: none; box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(250,204,21,.6); transform: translateY(-2px); }
.db-hero-tile .card-wrapper { width: 100%; }
.db-hero-name { margin-top: 3px; font-size: 9.5px; line-height: 1.15; text-align: center; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-hero-tile.on .db-hero-name { color: var(--gold-light); font-weight: bold; }

/* Sprachwahl (Flaggen im Menükopf) */
.lang-flag { padding: 2px; line-height: 0; background: transparent; border: 1px solid transparent; border-radius: 3px; cursor: pointer; opacity: .45; filter: saturate(.6); transition: opacity .15s, filter .15s; }
.lang-flag:hover { opacity: .85; filter: none; }
.lang-flag.active { opacity: 1; filter: none; border-color: var(--gold-dark, #8a6d2b); cursor: default; }
.lang-flag svg { display: block; border-radius: 1px; }

/* ===== Menü rechts einklappbar, Zugsteuerung auf dem Spielfeld ===== */
/* Menü liegt über dem Spielfeld (Spielfeld nutzt die volle Breite); eingeklappt nur der Reiter #side-tab */
#side-panel { position: fixed; top: 0; right: 0; bottom: 0; overflow-y: auto; z-index: 2000; transform: translateX(100%);
    transition: transform .22s ease, box-shadow .22s; box-shadow: none; }
body.side-open #side-panel { transform: none; box-shadow: -10px 0 30px rgba(0,0,0,.7); }
#side-tab { position: fixed; top: 10px; right: 0; z-index: 1999; padding: 8px 9px; font-size: 16px; line-height: 1;
    border-radius: 6px 0 0 6px; border-right: none; background: linear-gradient(180deg, #2a2118, #120d09); opacity: .85; }
#side-tab:hover { opacity: 1; }
body.side-open #side-tab { opacity: 0; pointer-events: none; }
#turn-controls { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); z-index: 850; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
#turn-controls button { box-shadow: 0 4px 12px rgba(0,0,0,.6); }
#btn-end-turn { padding: 11px 18px; font-size: 14px; letter-spacing: .5px; min-width: 130px; }
#btn-undo, #btn-cancel-action { padding: 6px 10px; font-size: 12px; }
#btn-undo:disabled { display: none; }

/* Spieleigene Rückfragen/Eingaben liegen über allen anderen Fenstern (ersetzen confirm/prompt) */
#decision-modal { z-index: 100050; }
#decision-text input[type=number] { width: 120px; margin-top: 10px; padding: 8px 10px; font-size: 16px; background: #0a0705; color: var(--text-main); border: 1px solid var(--gold-dark); border-radius: 4px; text-align: center; }

/* Auto-Zugende: Balken im End-turn-Knopf läuft bis zum automatischen Zugende */
#btn-end-turn { position: relative; overflow: hidden; }
#btn-end-turn.auto-ending::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #fde047; transform-origin: left; animation: autoEndBar var(--ae, 1500ms) linear forwards; }
@keyframes autoEndBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Rückgängig: zeigt, was zurückgenommen wird */
#btn-undo small { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: normal; opacity: .8; }
/* Kurze Meldungen auf dem Spielfeld (z. B. warum eine Karte nicht spielbar ist) */
#game-toast { position: fixed; left: 50%; top: 18%; transform: translate(-50%, -10px); z-index: 100200;   /* über Mulligan- und Entscheidungsfenstern (z. B. Münzwurf-Ergebnis) */ pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s;
    padding: 10px 22px; border-radius: 999px; background: rgba(20,14,10,.92); border: 1px solid var(--gold-dark, #8a6d2b); color: #fde68a; font: 700 15px Georgia, serif; box-shadow: 0 8px 24px rgba(0,0,0,.6); max-width: 80vw; text-align: center; }
#game-toast.show { opacity: 1; transform: translate(-50%, 0); }
#game-toast.err { color: #fca5a5; border-color: #7a2d2d; }

/* Touch-Geräte: Menü-Reiter größer und leichter zu treffen */
@media (hover: none) {
    #side-tab { top: 8px; padding: 14px 16px; font-size: 22px; opacity: .95; }
}

/* ===== Lernen: Menü mit Videos, Tutorial-Overlay ===== */
.learn-btn { border-color: #60a5fa !important; color: #bfdbfe !important; }
#hs-mull-learn { margin-top: 10px; padding: 8px 22px; font-size: 14px; }
#learn-modal { position: fixed; inset: 0; z-index: 100060; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.88); backdrop-filter: blur(6px); }
.learn-box { width: min(760px, 94vw); max-height: 94vh; overflow-y: auto; background: linear-gradient(180deg, #1a1512, #0a0705); border: 1px solid var(--gold-dark, #8a6d2b); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.8); }
.learn-box h2 { margin: 0; color: var(--gold); font-family: Georgia, serif; }
.learn-videos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.learn-video { display: flex; flex-direction: column; gap: 4px; color: var(--text-main); text-decoration: none; }
.learn-video b { font-size: 13px; } .learn-video small { color: var(--text-dim); font-size: 11px; }
.learn-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; border: 1px solid var(--border); background: #000 center / cover no-repeat; display: flex; align-items: center; justify-content: center; transition: transform .15s, border-color .15s; }
.learn-video:hover .learn-thumb { transform: scale(1.02); border-color: var(--gold); }
.learn-play { width: 54px; height: 38px; border-radius: 10px; background: rgba(220,38,38,.92); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.6); }
#learn-tut { padding: 12px; font-size: 16px; }
#tut-dim { position: fixed; inset: 0; z-index: 2500; background: rgba(0,0,0,.62); pointer-events: none; transition: clip-path .2s; }
#tut-rings { position: fixed; inset: 0; z-index: 2510; pointer-events: none; }
.tut-ring { position: fixed; border: 3px solid #fde047; border-radius: 10px; box-shadow: 0 0 18px rgba(250,204,21,.85); animation: tutPulse 1.2s ease-in-out infinite; }
@keyframes tutPulse { 50% { box-shadow: 0 0 34px rgba(250,204,21,1); border-color: #fff7ae; } }
#tut-arrow { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 2520; pointer-events: none; overflow: visible; }
.tut-path { fill: none; stroke: #fde047; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 14 10; animation: tutDash .8s linear infinite; filter: drop-shadow(0 0 6px rgba(250,204,21,.9)); }
@keyframes tutDash { to { stroke-dashoffset: -24; } }
#tut-box { position: fixed; z-index: 2600; width: min(440px, calc(100vw - 24px)); box-sizing: border-box; padding: 12px 16px; border-radius: 10px; background: linear-gradient(180deg, #2a2118, #120d09); border: 2px solid #fde047; box-shadow: 0 10px 34px rgba(0,0,0,.8); color: var(--text-main); }
#tut-step { font-size: 11px; color: var(--text-dim); letter-spacing: .5px; }
#tut-text { margin: 6px 0 10px; font: 600 15px/1.45 Georgia, serif; }
#tut-box .tut-actions, .tut-final .tut-actions { display: flex; gap: 8px; justify-content: flex-end; }
#tut-box.tut-passive { border-color: var(--border); opacity: .9; }
#tut-box.tut-passive .tut-actions { display: none; }
#tut-box.tut-final { position: fixed; text-align: center; padding: 18px 22px; }
#tut-box.tut-final h3 { margin: 0 0 6px; color: var(--gold); font-family: Georgia, serif; }
#tut-box.tut-final .tut-actions { justify-content: center; margin-top: 10px; }
#tut-hand { position: fixed; left: 0; top: 0; z-index: 2530; pointer-events: none; display: none; font-size: 46px; line-height: 1;
    offset-rotate: 0deg; offset-anchor: 30% 10%; filter: drop-shadow(0 4px 8px rgba(0,0,0,.8)); animation: tutHand 2s ease-in-out infinite; }
@keyframes tutHand { 0% { offset-distance: 0%; opacity: 0; transform: scale(1.15); } 12% { opacity: 1; transform: scale(.95); } 80% { offset-distance: 100%; opacity: 1; transform: scale(.95); } 100% { offset-distance: 100%; opacity: 0; transform: scale(1); } }
#tut-labels { position: fixed; inset: 0; z-index: 2515; pointer-events: none; }
.tut-label { position: fixed; padding: 4px 12px; border-radius: 999px; background: rgba(20,14,10,.9); border: 2px solid #fde047; color: #fde68a; font: 800 13px Georgia, serif; letter-spacing: .5px; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.7); }
.learn-thumb { overflow: hidden; background: linear-gradient(135deg, #2a1d12, #0a0705); }
.learn-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.learn-play { position: relative; z-index: 1; }
@media (max-width: 560px) { .learn-videos { grid-template-columns: 1fr; } }


/* --- Deck Coach: ab 60 Karten wird die Heldenkarte zum Avatar, die Tipps laufen als Chat links über den Karten --- */
/* Fortschrittsbalken: 60 Karten = golden; beim Erreichen leuchtet er auf */
#db-progress-fill.exact { background: linear-gradient(90deg, #a16207, #facc15, #fff3b0, #facc15); background-size: 200% 100%; box-shadow: 0 0 10px #facc15; }
/* Glanz nur in dem Moment, in dem das Deck voll wird (coachAwaken setzt .coach-glow), danach steht der Balken still */
.db-progress.coach-glow #db-progress-fill.exact { animation: coachBarShine 1.2s linear 2; }
#db-count.exact { color: #facc15; text-shadow: 0 0 8px rgba(250,204,21,.6); }
@keyframes coachBarShine { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.db-progress.coach-glow { animation: coachBarGlow 1.4s ease-out; }
@keyframes coachBarGlow { 0% { box-shadow: 0 0 0 0 rgba(250,204,21,0); } 25% { box-shadow: 0 0 22px 6px rgba(250,204,21,.9); } 100% { box-shadow: 0 0 0 0 rgba(250,204,21,0); } }
/* Der Avatar: Kopf schaut aus einem Loch (Innenschatten), goldener Rand */
.coach-hero-ava { order: -1; flex: none; width: 128px; height: 128px; border-radius: 50%; cursor: pointer; position: relative; background-color: #0d0906; background-repeat: no-repeat;
    border: 3px solid var(--gold); box-shadow: inset 0 0 22px 8px rgba(0,0,0,.85), 0 0 0 4px rgba(0,0,0,.6), 0 0 18px rgba(250,204,21,.5);
    transition: width .8s cubic-bezier(.5,0,.2,1), height .8s cubic-bezier(.5,0,.2,1), border-radius .8s ease, background-size .9s ease, background-position .9s cubic-bezier(.3,1.4,.5,1), box-shadow .3s; }
.coach-hero-ava:hover { box-shadow: inset 0 0 22px 8px rgba(0,0,0,.85), 0 0 0 4px rgba(0,0,0,.6), 0 0 28px rgba(250,204,21,.85); }
.coach-hero-ava.waking { box-shadow: 0 0 30px 8px rgba(250,204,21,.8); }
.coach-hero-ava.pop { animation: coachPop .55s cubic-bezier(.3,1.6,.5,1); }
.coach-hero-ava.pop::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid #fde68a; animation: coachRing .8s ease-out forwards; pointer-events: none; }
@keyframes coachPop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes coachRing { from { transform: scale(1); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
/* Chat-Fenster: oben rechts über den Karten, Spitze zeigt nach rechts zum Helden */
.db-pool { position: relative; }
#db-coach { position: absolute; top: 84px; right: 12px; z-index: 500; width: min(460px, calc(100% - 24px)); max-height: calc(100% - 92px); display: none; flex-direction: column;
    border: 1px solid var(--gold); border-radius: 14px; background: linear-gradient(180deg, rgba(34,26,16,.97), rgba(14,10,7,.97));
    box-shadow: 0 12px 40px rgba(0,0,0,.75), 0 0 20px rgba(250,204,21,.25); animation: coachIn .25s ease-out; }
#db-coach::after { content: ''; position: absolute; right: -11px; top: 16px; border: 11px solid transparent; border-right: 0; border-left-color: var(--gold); }
@keyframes coachIn { from { opacity: 0; transform: translateX(14px) scale(.97); } to { opacity: 1; transform: none; } }
.coach-close { position: absolute; top: 6px; right: 6px; z-index: 2; padding: 1px 7px; font-size: 11px; opacity: .7; }
.coach-close:hover { opacity: 1; }
.coach-body { overflow-y: auto; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; cursor: default; }
.coach-body > * { flex-shrink: 0; }   /* sonst stauchen sich die Nachrichten bei langem Verlauf übereinander */
.coach-msg { font-size: 13px; line-height: 1.4; color: #e8dcc6; padding: 7px 11px; border-radius: 12px 4px 12px 12px; background: rgba(255,255,255,.07); min-height: 1.4em; margin-right: 8px; }
.coach-body > .coach-msg:first-child { font-size: 14px; margin-right: 26px; }
.coach-msg b { color: #fde68a; }
.coach-intro { font-size: 14px; background: rgba(250,204,21,.1); border: 1px solid rgba(250,204,21,.28); }
.coach-good { color: #4ade80; background: rgba(34,197,94,.13); }
.coach-bad { color: #fdba74; background: rgba(249,115,22,.1); border-left: 3px solid #f97316; }
.coach-smart { color: #ddd6fe; background: linear-gradient(90deg, rgba(139,92,246,.22), rgba(56,189,248,.12)); border: 1px solid rgba(167,139,250,.55); box-shadow: 0 0 12px rgba(139,92,246,.3); font-weight: bold; }
.coach-dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.coach-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d6c49c; animation: coachDot 1s ease-in-out infinite; }
.coach-dots i:nth-child(2) { animation-delay: .15s; } .coach-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes coachDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }
.coach-replies { display: flex; gap: 8px; justify-content: flex-start; flex-wrap: wrap; margin-top: 4px; }
.coach-more { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--gold); color: #fde68a; font-weight: bold;
    background: linear-gradient(180deg, #4a3712, #22180a); box-shadow: 0 0 10px rgba(250,204,21,.35); animation: coachRecIn .3s ease-out; cursor: pointer; }
.coach-more:hover { box-shadow: 0 0 16px rgba(250,204,21,.6); transform: translateY(-1px); }
.coach-more.alt { border-color: #4b4033; color: #a8957a; background: rgba(0,0,0,.3); box-shadow: none; font-weight: normal; }
.coach-recs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coach-rec { display: flex; flex-direction: column; align-items: center; gap: 5px; opacity: 0; animation: coachRecIn .35s ease-out forwards; }
@keyframes coachRecIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.coach-rec .coach-rec-card { --cw: 100%; width: 100%; cursor: zoom-in; }
.coach-rec-why { font-size: 11px; line-height: 1.3; color: #d6c8ae; text-align: center; min-height: 2.6em; }
.coach-rec-img { position: relative; width: 100%; }
.coach-add { position: absolute; left: 50%; bottom: 8%; transform: translateX(-50%); padding: 3px 10px; font-size: 12px; white-space: nowrap; opacity: .92; box-shadow: 0 2px 8px rgba(0,0,0,.6); }
.coach-add:hover { opacity: 1; }
.coach-add.added { background: #14532d; border-color: #22c55e; }
/* Test-Szene: Avatar-Köpfe ausrichten */
#face-edit { position: fixed; inset: 0; z-index: 100000; background: #0b0806; display: flex; flex-direction: column; }
#face-edit .fe-head { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
#face-edit .fe-head b { color: var(--gold); font-size: 16px; }
#face-edit .fe-head span { flex: 1; font-size: 12px; color: #a8957a; }
#face-edit .fe-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 14px; }
#face-edit .fe-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#face-edit .fe-ava { width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--gold); background-color: #0d0906; background-repeat: no-repeat; cursor: grab; position: relative;
    box-shadow: inset 0 0 22px 8px rgba(0,0,0,.85); }
#face-edit .fe-ava:active { cursor: grabbing; }
#face-edit .fe-name { font-size: 12px; color: #e8dcc6; text-align: center; line-height: 1.2; }
#face-edit .fe-name i { display: block; font-style: normal; font-size: 10px; color: #7c6f5c; }
#face-edit .fe-out { position: absolute; inset: 0; background: rgba(0,0,0,.75); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #e8dcc6; }
#face-edit .fe-out textarea { width: min(900px, 92vw); height: 50vh; font: 12px monospace; background: #120d09; color: #e8dcc6; border: 1px solid var(--gold); border-radius: 6px; padding: 8px; }
/* Deckliste wie in Hearthstone: jede Zeile zeigt rechts einen Ausschnitt der Karte, der nach links ins Dunkle ausblendet */
:is(#db-deck-cards, #dp-cards) .db-row { position: relative; overflow: hidden; height: 34px; margin-bottom: 3px; padding: 0 6px 0 3px; border-radius: 5px;
    background: linear-gradient(180deg, #1c1712, #0f0c09); border: 1px solid #3a2f24; border-left: 3px solid var(--tc, #3a2f24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 3px rgba(0,0,0,.5); transition: border-color .15s, transform .15s; }
:is(#db-deck-cards, #dp-cards) .db-row > :not(.db-row-art) { position: relative; z-index: 1; }
.db-row-art { position: absolute; top: 0; bottom: 0; right: 76px; width: 58%; z-index: 0; pointer-events: none;
    background-repeat: no-repeat; background-size: 140% auto; background-position: 55% 30%; filter: saturate(1.1) brightness(.9);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 22%, #000 50%, #000 80%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 22%, #000 50%, #000 80%, transparent 100%);
    transition: filter .2s, background-position .4s ease; }
/* Rechts unter − / Anzahl / + leicht abdunkeln, damit sie lesbar bleiben */
:is(#db-deck-cards, #dp-cards) .db-row::after { content: ''; position: absolute; top: 0; bottom: 0; right: 0; width: 80px; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8,6,4,0), rgba(8,6,4,.55) 30%); }
:is(#db-deck-cards, #dp-cards) .db-row:hover { border-color: var(--gold-dark); border-left-color: var(--tc, var(--gold)); background: linear-gradient(180deg, #241d15, #120e0a); }
:is(#db-deck-cards, #dp-cards) .db-row:hover .db-row-art { filter: saturate(1.25) brightness(1.08); background-position: 55% 26%; }
/* Ausrüstung hat rechts im Bild die senkrechte Leiste mit den Klassen-Symbolen: Ausschnitt nach links schieben (sichtbar ca. 9–80 % der Bildbreite) */
.db-row-art.eq { background-position: 28% 30%; }
:is(#db-deck-cards, #dp-cards) .db-row:hover .db-row-art.eq { background-position: 28% 26%; }
:is(#db-deck-cards, #dp-cards) .db-row-name { font-weight: bold; color: #f4ecdc; letter-spacing: .2px; text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 10px rgba(0,0,0,.95); }
:is(#db-deck-cards, #dp-cards) .db-row-n { text-shadow: 0 0 4px #000, 0 1px 2px #000; }
:is(#db-deck-cards, #dp-cards) .db-row-btn { background: rgba(12,9,6,.75); }
/* Kosten auf der Original-Kugel aus dem Kartenrahmen (icons/cost/) */
:is(#db-deck-cards, #dp-cards) .db-row-cost { width: 26px; height: 26px; border: 0; border-radius: 50%; background: center/cover no-repeat; box-shadow: 0 1px 3px rgba(0,0,0,.8);
    color: #fff; font: 900 13px/26px Georgia, serif; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 1px 2px #000; }
:is(#db-deck-cards, #dp-cards) .db-row-cost.orb-quest { width: 20px; height: 26px; border-radius: 3px; background-size: contain; box-shadow: none; }
/* Große Kosten-Kugeln wie in Hearthstone: ragen links über den Zeilenrand, große Zahl */
:is(#db-deck-cards, #dp-cards) .db-row { overflow: visible; grid-template-columns: 30px 1fr 22px 22px 22px; padding-left: 0; margin-left: 10px; }
:is(#db-deck-cards, #dp-cards) .db-row-art { border-radius: 0 5px 5px 0; }
:is(#db-deck-cards, #dp-cards) .db-row-cost { width: 40px; height: 40px; margin-left: -16px; z-index: 2; font: 900 19px/40px Georgia, serif; letter-spacing: -.5px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000; box-shadow: 0 2px 5px rgba(0,0,0,.85); }
:is(#db-deck-cards, #dp-cards) .db-row-cost.orb-quest { width: 30px; height: 40px; margin-left: -12px; }
/* Kugeln etwas kleiner, Kartenausschnitt bis zum rechten Rand (− / + liegen erst beim Überfahren darüber) */
:is(#db-deck-cards, #dp-cards) .db-row-cost { width: 32px; height: 32px; margin-left: -12px; font: 900 17px/32px Georgia, serif; }
:is(#db-deck-cards, #dp-cards) .db-row-cost.orb-quest { width: 24px; height: 32px; margin-left: -9px; }
:is(#db-deck-cards, #dp-cards) .db-row-art { right: 0; width: 74%; border-radius: 0 5px 5px 0; background-size: 120% auto;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.45) 16%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.45) 16%, #000 38%); }
:is(#db-deck-cards, #dp-cards) .db-row::after { width: 56px; border-radius: 0 5px 5px 0; background: radial-gradient(ellipse 40% 70% at 70% 50%, rgba(8,6,4,.6), rgba(8,6,4,0)); }
:is(#db-deck-cards, #dp-cards) .db-row:hover::after { width: 90px; background: linear-gradient(90deg, rgba(8,6,4,0), rgba(8,6,4,.7) 35%); }
/* Deckliste minimalistisch: − / + erst beim Überfahren, + bei 4 Kopien grau; die überfahrene Zeile wächst nach oben und unten */
:is(#db-deck-cards, #dp-cards) .db-row { transition: height .15s ease, margin .15s ease, border-color .15s, box-shadow .15s; }
:is(#db-deck-cards, #dp-cards) .db-row:hover { height: 42px; margin-top: -4px; margin-bottom: -1px; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.8), 0 0 0 1px rgba(201,168,76,.35); }
:is(#db-deck-cards, #dp-cards) .db-row-btn { opacity: 0; transition: opacity .15s; }
:is(#db-deck-cards, #dp-cards) .db-row:hover .db-row-btn { opacity: 1; }
:is(#db-deck-cards, #dp-cards) .db-row-btn:disabled { opacity: 0 !important; }
:is(#db-deck-cards, #dp-cards) .db-row:hover .db-row-btn:disabled { opacity: .35 !important; filter: grayscale(1); cursor: not-allowed; }
:is(#db-deck-cards, #dp-cards) .db-row-n { font: 900 18px/1 Georgia, serif; color: #fde68a; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 6px #000; }
@media (hover: none) { :is(#db-deck-cards, #dp-cards) .db-row-btn { opacity: 1; } :is(#db-deck-cards, #dp-cards) .db-row-btn:disabled { opacity: .35 !important; } }
/* Online-Spiel: Lobby-Fenster und Hinweise auf neue Lobbys */
#mp-modal { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: none; align-items: center; justify-content: center; backdrop-filter: blur(6px); z-index: 100000; }
.mp-box { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.mp-head { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--gold-light); }
.mp-head b { flex: 1; font-family: Georgia, serif; }
#mp-status { font-size: 11px; color: var(--text-dim); }
#mp-status.ok { color: #6ee7b7; } #mp-status.err { color: #f87171; }
.mp-x { padding: 2px 8px; }
.mp-row { display: flex; align-items: center; gap: 8px; }
.mp-row label { width: 90px; font-size: 12px; color: var(--text-dim); }
.mp-row input, .mp-row select, .mp-join input, .mp-chat-in input { flex: 1; min-width: 0; background: #0a0705; border: 1px solid var(--border); color: var(--text-main); padding: 5px 7px; border-radius: 4px; font-size: 13px; }
.mp-row > span { flex: 1; display: flex; } .mp-row > span select { flex: 1; }
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.mp-join { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.mp-join input { text-transform: uppercase; letter-spacing: 2px; font-family: monospace; }
.mp-sub { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--border); padding-bottom: 2px; margin-top: 4px; }
#mp-list { display: flex; flex-direction: column; gap: 5px; max-height: 240px; overflow: auto; }
.mp-empty { font-size: 12px; color: var(--text-dim); font-style: italic; padding: 6px 0; }
.mp-lobby, .mp-player { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; background: rgba(255,255,255,.03); }
.mp-lobby b, .mp-player b { color: #f4ecdc; }
.mp-lobby span, .mp-player span { flex: 1; font-size: 12px; color: var(--text-dim); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-lobby code, .mp-code-row code { font: bold 14px monospace; letter-spacing: 2px; color: var(--gold-light); }
.mp-code-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mp-code-row code { font-size: 22px; padding: 2px 10px; border: 1px dashed var(--gold-dark); border-radius: 5px; user-select: all; }
#mp-players { display: flex; flex-direction: column; gap: 5px; }
.mp-player.empty { opacity: .6; }
.mp-role { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); width: 38px; }
.mp-player em { font-style: normal; font-size: 12px; color: #6ee7b7; }
#mp-chat { height: 150px; overflow: auto; background: #0a0705; border: 1px solid var(--border); border-radius: 5px; padding: 6px 8px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
#mp-chat .me b { color: var(--gold-light); } #mp-chat .mp-sys { color: var(--text-dim); font-style: italic; }
.mp-chat-in { display: flex; gap: 6px; }
#mp-go.on { box-shadow: 0 0 0 2px #10b981 inset; }
.mp-popup { position: fixed; left: 16px; bottom: 16px; z-index: 99500; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); padding: 10px 12px; border-radius: 8px;
    background: linear-gradient(180deg, #1e3a5f, #0f1f33); border: 1px solid #3b82f6; color: #dbeafe; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.6); animation: mpPopIn .35s ease; transition: opacity .3s, transform .3s; }
.mp-popup span { font-size: 11px; color: #93c5fd; }
.mp-popup.out { opacity: 0; transform: translateY(20px); }
.mp-pop-x { padding: 2px 7px; background: transparent; }
@keyframes mpPopIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.mp-box { overflow-x: hidden; }
.mp-row label { flex: 0 0 90px; }
.mp-row > span { min-width: 0; } .mp-row select { width: 100%; min-width: 0; text-overflow: ellipsis; }
.mp-player .mp-role { flex: 0 0 44px; }
.mp-player b, .mp-lobby b { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
/* Antwort-Dialog: sinnvolle Antworten (Engine) vorn und leuchtend, die übrigen gedämpft */
/* Hochformat auf Touch-Geräten sperren: Hinweis zum Drehen über allem (das Spiel ist für Querformat gebaut) */
#rotate-hint { display: none; position: fixed; inset: 0; z-index: 2147483000; background: radial-gradient(circle at 50% 40%, #2a2016, #0a0705 70%);
    color: #f4ecdc; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 0 60px; font-family: Georgia, serif; }
#rotate-hint b { font-size: 64px; color: var(--gold-light); line-height: 1.2; }
#rotate-hint span { font-size: 40px; color: var(--text-dim); }
#rotate-hint .rh-icon { font-size: 180px; animation: rhTurn 2.4s ease-in-out infinite; }
@keyframes rhTurn { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0); } }
@media (orientation: portrait) and (pointer: coarse) { #rotate-hint { display: flex; } }
/* ===== Deck-Builder als Vollbild-Menü (Layout A): links Pool mit Suche, Filter-Pop-up und Menü, rechts das Deck in voller Höhe ===== */
#deck-builder-modal { background: #0a0705; backdrop-filter: none; }
#deck-builder-modal .modal-box { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; border: 0; border-radius: 0; padding: 8px; box-shadow: none; }
.db-content { gap: 8px; }
.db-deck { flex: 0 0 clamp(320px, 30%, 470px); overflow: hidden; }
.db-toolbar { display: flex; gap: 8px; align-items: center; padding: 8px; background: #1a1512; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.db-toolbar #db-search { flex: 1 1 auto; min-width: 0; }
#db-filter-btn { white-space: nowrap; }
#db-filter-btn.on { border-color: var(--gold); color: var(--gold-light); }
#db-filter-badge:not(:empty) { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--gold); color: #1a1208; font-size: 11px; font-weight: bold; }
.db-toolbar #db-pool-count { white-space: nowrap; }
.db-toolbar { flex-wrap: wrap; }
.db-toolbar #db-search { min-width: 160px; }
.db-toolbar > button { white-space: nowrap; }
.db-zoom { display: inline-flex; }
.db-zoom button { padding: 4px 10px; font-size: 16px; font-weight: bold; line-height: 1; }
.db-zoom button:first-child { border-radius: 4px 0 0 4px; }
.db-zoom button:last-child { border-radius: 0 4px 4px 0; margin-left: -1px; }
.db-zoom button:disabled { opacity: .4; cursor: default; }
#db-filter-pop { display: none; position: absolute; left: 8px; top: 54px; z-index: 600; width: min(600px, calc(100% - 16px)); flex-direction: column; gap: 6px; padding: 12px;
    background: #120d09; border: 1px solid var(--gold-dark); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.8); }
#db-filter-pop.open { display: flex; }
.db-fp-title { margin-top: 4px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
#db-filter-pop .db-chips { flex-wrap: wrap; align-self: flex-start; }
.db-fp-row { display: flex; gap: 8px; margin-top: 6px; }
.db-fp-row select { flex: 1; }
/* Größere Karten im Pool */
.db-scroll { grid-template-columns: repeat(auto-fill, minmax(var(--db-tile, 150px), 1fr)); gap: 14px; }
/* Deck: fester Kopf, darunter eine gemeinsame Scrollfläche (Held, Statistik, Liste) */
.db-deck-head { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px; background: #1a1512; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.db-dh-row { display: flex; gap: 6px; align-items: center; }
.db-dh-row #db-name { flex: 1; min-width: 0; width: auto; }
.db-dh-row button { padding: 5px 11px; font-size: 15px; }
.db-deck-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.db-deck-scroll .db-deck-list { flex: none; overflow: visible; }
.db-deck-scroll #db-hero-slot { border-radius: 0; }
.db-deck-scroll .db-stats { border-radius: 0; }
#db-coach { top: 60px; }
/* Kompaktere Deckzeilen */
:is(#db-deck-cards, #dp-cards) .db-row { height: 28px; margin-bottom: 2px; }
:is(#db-deck-cards, #dp-cards) .db-row-cost { width: 28px; height: 28px; margin-left: -11px; font: 900 15px/28px Georgia, serif; }
:is(#db-deck-cards, #dp-cards) .db-row-cost.orb-quest { width: 21px; height: 28px; margin-left: -8px; }
:is(#db-deck-cards, #dp-cards) .db-row:hover { height: 34px; margin-top: -3px; margin-bottom: -1px; }
:is(#db-deck-cards, #dp-cards) .db-row-n { font-size: 16px; }
:is(#db-deck-cards, #dp-cards) .db-row-name { font-size: 12.5px; }
.db-group { margin: 8px 0 3px; }
/* Log: minimalistisch – jede Zeile gehört einem Spieler (du blau, Gegner rot), Zugwechsel nur als Linie */
.log-entry { padding: 2px 6px; border-bottom: 0; border-left: 3px solid transparent; border-radius: 2px; margin-bottom: 1px; }
.log-entry.log-me { border-left-color: #3b82f6; background: rgba(59,130,246,.10); }
.log-entry.log-opp { border-left-color: #ef4444; background: rgba(239,68,68,.10); }
.log-sep { flex: none; height: 1px; margin: 5px 0; background: linear-gradient(90deg, transparent, var(--gold-dark), transparent); }
/* Wenig Leben: ruhiger Hinweis statt Blinken (langsamer, schwacher Schein, Zahl hüpft nicht) */
.hp-bar.low .hp-track { animation: hpLow 2.8s ease-in-out infinite; }
.hp-bar.critical .hp-track { animation: hpCrit 1.8s ease-in-out infinite; }
@keyframes hpLow { 50% { box-shadow: 0 0 6px 1px rgba(239,68,68,.45); } }
@keyframes hpCrit { 50% { box-shadow: 0 0 9px 2px rgba(239,68,68,.6); } }
.row-watermark { display: none; }
/* Auto-Fill am Ende der Deckliste */
.db-autofill { display: block; width: calc(100% - 10px); margin: 10px 0 6px 10px; padding: 8px 10px; font-size: 14px; font-weight: bold; border-radius: 6px;
    color: #1a1208; background: linear-gradient(180deg, #fde68a, #d4a017); border: 1px solid #fde68a; box-shadow: 0 2px 10px rgba(250,204,21,.35); cursor: pointer; }
.db-autofill:hover { filter: brightness(1.08); box-shadow: 0 2px 14px rgba(250,204,21,.6); }
/* Schalter im Filter-Pop-up (z. B. "Show neutral abilities") */
.db-toggle { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--text-main); cursor: pointer; user-select: none; }
.db-toggle input { display: none; }
.db-toggle-sw { position: relative; width: 34px; height: 18px; flex: none; border-radius: 9px; background: #3a2f24; border: 1px solid var(--border); transition: background .15s; }
.db-toggle-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #a89880; transition: transform .15s, background .15s; }
.db-toggle input:checked + .db-toggle-sw { background: var(--gold-dark); border-color: var(--gold); }
.db-toggle input:checked + .db-toggle-sw::after { transform: translateX(16px); background: #fde68a; }
.tm-box { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 4px; background: #0a0705; }
.tm-box label { display: flex; flex-direction: column; gap: 2px; font-size: 10px; color: var(--text-dim); }
.tm-box select { width: 100%; background: #0a0705; border: 1px solid var(--border); color: var(--text-main); padding: 3px; border-radius: 3px; font-size: 11px; }
.tm-btns { display: flex; gap: 4px; }
.tm-btns button { flex: 1; }
/* Online: Gegner entscheidet gerade – mittig, Klicks gehen durch */
#opp-thinking { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.96); z-index: 9400; pointer-events: none; opacity: 0; transition: opacity .25s, transform .25s;
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 34px; border-radius: 12px; background: rgba(10,7,5,.88); border: 1px solid var(--gold-dark); box-shadow: 0 10px 40px rgba(0,0,0,.8); }
#opp-thinking.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#opp-thinking b { font: bold 26px Georgia, serif; color: var(--gold-light); animation: oppThink 1.6s ease-in-out infinite; }
#opp-thinking span { font-size: 14px; color: var(--text-dim); }
@keyframes oppThink { 50% { opacity: .55; } }
/* Zielmodus: gespielte Karte in der Mitte, Hinweis darunter; Klicks gehen auf das Spielfeld durch (außer Knöpfe) */
#aim-banner { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 9300; pointer-events: none; display: none;
    flex-direction: column; align-items: center; gap: 6px; text-align: center; max-width: min(520px, 90vw); }
#aim-banner.show { display: flex; }
#aim-banner .ab-card { width: clamp(90px, 8vw, 140px); filter: drop-shadow(0 12px 30px rgba(0,0,0,.9)) drop-shadow(0 0 18px rgba(201,168,76,.5)); }
#aim-banner .ab-card:empty { display: none; }
#aim-banner .ab-card.fly-in { animation: abFly .45s cubic-bezier(.2,.8,.2,1); }
@keyframes abFly { from { transform: translateY(45vh) scale(.6); opacity: .3; } to { transform: none; opacity: 1; } }
#aim-banner .ab-title { font: bold 26px Georgia, serif; color: var(--gold-light); text-shadow: 0 2px 8px #000, 0 0 18px rgba(0,0,0,.9); }
#aim-banner .ab-prompt { font-size: 14px; color: #e7e2d6; text-shadow: 0 1px 6px #000, 0 0 12px #000; }
#aim-banner .ab-warn { color: #f87171; font-weight: bold; text-shadow: 0 1px 6px #000; }
#aim-banner .ab-warn:empty { display: none; }
#aim-banner .ab-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#aim-banner .ab-btns:empty { display: none; }
#aim-banner .ab-btns button { pointer-events: auto; }
.card-wrapper.destroy-picked .card-visual { box-shadow: 0 0 0 0.9cqw #ef4444, 0 0 4cqw rgba(239,68,68,.85) !important; }
/* Hand blockiert nur dort, wo Karten liegen (dahinter liegende Ressourcen bleiben anklickbar) */
#bot-hand { pointer-events: none; }
#bot-hand > * { pointer-events: auto; }
/* Deck-Builder: Platzhalter am Listenende, löst das Nachladen aus (js/features.js dbPoolMore) */
.db-pool-more { grid-column: 1 / -1; height: 1px; }

/* Deck-Builder Set-Filter: Hintergrund je Block (Azeroth-Block, Outland-Block, Raids) */
#db-set-filter option[class^="set-"] { color: #f1f5f9; }
#db-set-filter option.set-block1 { background: #1e3a5f; }
#db-set-filter option.set-block2 { background: #2f4a1c; }
#db-set-filter option.set-block3 { background: #4a2f1c; }
#db-set-filter option.set-block4 { background: #1c3a4a; }
#db-set-filter option.set-raid { background: #5c1f1f; }
#db-set-filter option.set-arena { background: #4a3a1c; }

/* Deck-Übersicht: jedes Deck als Deck-Box (vorne Heldenbild, oben Klassen-Icon, Farbe nach Fraktion) */
#deck-overview-box { max-width: 1100px; width: 94%; max-height: 90vh; }
#deck-overview-modal.picking { z-index: 100040; }                                         /* Auswahl über Deck-Builder und Online-Lobby */
#deck-overview-modal.picking .deck-ov-foot #deck-backup-btn, #deck-overview-modal.picking .deck-ov-foot #deck-restore-btn { display: none; }
.deck-ov-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.deck-ov-head h2 { margin: 0; color: var(--gold); flex: 1; }
#deck-overview-search { flex: 0 1 260px; min-width: 0; background: #0a0705; border: 1px solid var(--border); color: var(--text-main); padding: 6px 9px; border-radius: 4px; font-size: 13px; }
#deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; margin-top: 10px; }
.deck-slot { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 2px 6px 4px; text-align: left; background: #0a0705; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.deck-slot:hover { border-color: var(--gold-dark); }
.deck-slot-name { flex: 1; min-width: 0; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main); }
.mp-row .mp-deck.deck-slot { flex: 1; }
.mp-row .mp-deck .deck-slot-name { font-size: 13px; }
@media (max-width: 600px) {
    #deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px 6px; }
}

/* Online-Lobby: links du, rechts der Gegner, dazwischen VS (Tippen = Hintergrund-Simulation mit Winrate) */
.mp-box { width: min(640px, calc(100vw - 32px)); }
.mp-code-row { flex-wrap: wrap; }
#mp-vis { margin-left: auto; }
.mp-vis-tog { display: inline-flex; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.mp-vis-tog button { border: 0; border-radius: 0; padding: 4px 10px; font-size: 12px; background: #0a0705; color: var(--text-dim); }
.mp-vis-tog button.on { background: var(--gold-dark); color: #1a1208; font-weight: bold; }
.mp-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 6px; border: 1px solid var(--border); border-radius: 8px;
    background: radial-gradient(ellipse at 25% 50%, rgba(37,99,235,.10), transparent 60%), radial-gradient(ellipse at 75% 50%, rgba(185,28,28,.10), transparent 60%), rgba(0,0,0,.25); }
.mp-side { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.mp-side > b { color: #f4ecdc; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-side > b.dim { color: var(--text-dim); font-weight: normal; font-size: 13px; }
.mp-side > span { font-size: 11px; color: var(--text-dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-side em { font-style: normal; font-size: 12px; color: var(--text-dim); } .mp-side em.on { color: #6ee7b7; }
.mp-deckbox { background: none; border: 0; padding: 0; display: flex; justify-content: center; }
.mp-vs { width: 104px; height: 104px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0;
    background: radial-gradient(circle at 50% 35%, #3a2a12, #120c05); border: 2px solid var(--gold-dark); box-shadow: 0 0 18px rgba(201,168,76,.25); color: var(--gold-light); cursor: pointer; }
.mp-vs:hover { border-color: var(--gold); box-shadow: 0 0 24px rgba(201,168,76,.45); }
.mp-vs-t { font: 900 34px/1 Georgia, serif; letter-spacing: 1px; text-shadow: 0 2px 6px #000; }
.mp-vs-wr { font-size: 15px; font-weight: bold; color: #f4ecdc; }
.mp-vs small { font-size: 9px; color: var(--text-dim); line-height: 1.1; max-width: 90px; }
@media (max-width: 520px) {
    .mp-vs { width: 80px; height: 80px; } .mp-vs-t { font-size: 26px; }
}
/* VS als Kuchendiagramm: grüner Anteil = eigene Winrate, roter = Gegner; innen ein Ring mit "VS" */
.mp-vs.pie { background: conic-gradient(#22c55e 0 var(--wr), #b91c1c var(--wr) 100%); position: relative; }
.mp-vs.pie::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #3a2a12, #120c05); box-shadow: 0 0 6px rgba(0,0,0,.8); }
.mp-vs.pie .mp-vs-t { position: relative; }
/* VS: Winrate unter "VS" im Kreis; läuft die Simulation, kreist ein goldener Bogen um den Kreis */
.mp-vs { position: relative; }
.mp-vs-t, .mp-vs-wr { position: relative; z-index: 1; }
.mp-vs.pie .mp-vs-t { font-size: 28px; }
.mp-vs-wr { font-size: 16px; font-weight: bold; color: #f4ecdc; text-shadow: 0 1px 4px #000; }
.mp-vs.running::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--gold-light); border-right-color: rgba(245,215,122,.35);
    animation: mpVsSpin .9s linear infinite; pointer-events: none; }
@keyframes mpVsSpin { to { transform: rotate(360deg); } }

/* ===== Deck-Box (3D) – Vorbild: Ultra-Pro-Deckbox mit Klappdeckel. Korpus schwarz-matt, Klappe/Seite/Deckel in
   Fraktionsfarbe mit Goldkante: Allianz Königsblau + Gold, Horde Karminrot + Bronze-Gold, Neutral Stein + Silber ===== */
.dbox { --w: 76px; --h: 104px; --d: 30px; --c1: #8a7a62; --c2: #2e271e; --tr: #cfc8b8; --glow: rgba(210,200,170,.45);
    position: relative; width: var(--w); height: var(--h); margin: calc(var(--d) * .62) calc(var(--d) * .5) 6px 0; perspective: 720px; flex: none; }
.dbox.alliance { --c1: #1f6ad6; --c2: #071d4d; --tr: #ecc66a; --glow: rgba(70,130,255,.6); }
.dbox.horde { --c1: #c4262f; --c2: #48060a; --tr: #d9a44c; --glow: rgba(235,55,50,.6); }
.dbox-3d { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-17deg) rotateY(-28deg); transition: transform .55s cubic-bezier(.34,1.56,.64,1); }
.dbox-f { position: absolute; backface-visibility: hidden; }
/* Front: schwarzer Korpus, Bildfenster mit Goldrahmen, Klappe oben */
.dbox-front { inset: 0; transform: translateZ(calc(var(--d) / 2)); border-radius: 3px; overflow: hidden;
    background: linear-gradient(165deg, #2a2620 0%, #13110e 45%, #070605 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 0 0 2px #050403; transition: box-shadow .3s; }
.dbox-art { position: absolute; left: 6%; right: 6%; top: 27%; bottom: 6%; border-radius: 2px; background-color: var(--c2); background-repeat: no-repeat;
    box-shadow: 0 0 0 1px var(--tr), 0 0 0 2px #050403, inset 0 0 10px rgba(0,0,0,.55), inset 0 -14px 12px -6px rgba(0,0,0,.6); }
.dbox-flap { position: absolute; left: 0; right: 0; top: 0; height: 22%; border-radius: 3px 3px 40% 40% / 3px 3px 12% 12%;
    background: radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.22), transparent 55%), linear-gradient(180deg, var(--c1), var(--c2));
    border-bottom: 1.5px solid var(--tr); box-shadow: 0 2px 4px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; }
.dbox-medal { width: 42%; aspect-ratio: 1; margin-top: 18%; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 40% 35%, #3b3125, #0d0a07 70%); border: 1.5px solid var(--tr);
    box-shadow: 0 2px 4px rgba(0,0,0,.8), inset 0 0 4px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.6); }
.dbox-medal img { width: 78%; filter: drop-shadow(0 1px 1px #000); }
.dbox-n { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); font: bold 9px/1 Georgia, serif; padding: 2px 5px 1px; border-radius: 3px;
    background: linear-gradient(#1b1610, #070605); border: 1px solid var(--tr); color: var(--tr); letter-spacing: .5px; box-shadow: 0 1px 3px #000; }
.dbox-n.under { color: #facc15; } .dbox-n.over { color: #f87171; }
.dbox-gloss { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.26) 46%, rgba(255,255,255,.05) 54%, transparent 64%);
    background-size: 260% 100%; background-position: 110% 0; mix-blend-mode: screen; }
/* Seite und Deckel: Fraktionsfarbe, Goldkanten, dunkler (abgewandt vom Licht) */
.dbox-side { width: var(--d); height: var(--h); left: calc((var(--w) - var(--d)) / 2); top: 0; transform: rotateY(90deg) translateZ(calc(var(--w) / 2)); border-radius: 2px;
    background: linear-gradient(180deg, transparent 21.5%, var(--tr) 21.5%, var(--tr) 23%, transparent 23%),
        repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px),
        linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.25) 50%, rgba(0,0,0,.6)), linear-gradient(180deg, var(--c1), var(--c2) 60%, #050403);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); }
.dbox-top { width: var(--w); height: var(--d); left: 0; top: calc((var(--h) - var(--d)) / 2); transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); border-radius: 3px;
    background: radial-gradient(80% 120% at 30% 30%, rgba(255,255,255,.18), transparent 60%), linear-gradient(90deg, var(--c1), var(--c2));
    box-shadow: inset 0 0 0 1.5px var(--tr), inset 0 0 8px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.dbox-top img { height: 70%; filter: drop-shadow(0 1px 1px rgba(0,0,0,.8)); }
.dbox-shadow { position: absolute; left: -2%; right: -22%; bottom: -9px; height: 16px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(0,0,0,.75), transparent); transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .4s; }
/* Größen */
.dbox.big { --w: 112px; --h: 154px; --d: 44px; perspective: 900px; }
.dbox.big .dbox-n { font-size: 11px; }
.dbox.mini { --w: 20px; --h: 28px; --d: 8px; margin: 5px 6px 2px 0; perspective: 240px; }
.dbox.mini .dbox-art { left: 4%; right: 4%; top: 24%; bottom: 4%; box-shadow: 0 0 0 1px var(--tr); }
.dbox.mini .dbox-shadow { bottom: -4px; height: 6px; }
/* Platzhalter-Boxen (Zufall, Neues Deck, Gegner fehlt) */
.dbox-special { width: 76px; height: 104px; margin: 19px 15px 6px 0; border: 2px dashed var(--gold-dark); border-radius: 6px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; font: 900 34px Georgia, serif; color: var(--gold); background: radial-gradient(circle, rgba(201,168,76,.12), transparent 70%);
    transition: transform .45s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .3s; }
.dbox-special.mini { width: 20px; height: 28px; margin: 5px 6px 2px 0; font-size: 13px; border-width: 1px; flex: none; }
.mp-deckbox .dbox-special { width: 112px; height: 154px; margin: 27px 22px 6px 0; font-size: 48px; }

/* ===== Deck-Übersicht: Kacheln ===== */
#deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 8px; }
.deck-tile { --tx: 0; --ty: 0; position: relative; display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: 6px 2px 6px; border-radius: 10px; min-width: 0;
    animation: deckTileIn .5s cubic-bezier(.2,1.25,.4,1) both; animation-delay: calc(var(--i, 0) * 22ms); -webkit-tap-highlight-color: transparent; }
@keyframes deckTileIn { from { opacity: 0; transform: translateY(18px) scale(.9); } }
.deck-tile::before { content: ''; position: absolute; inset: 4% 8% 18%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow, rgba(201,168,76,.35)), transparent);
    opacity: 0; transform: scale(.7); transition: opacity .3s, transform .45s cubic-bezier(.34,1.56,.64,1); pointer-events: none; }
.deck-tile:has(.alliance) { --glow: rgba(70,130,255,.5); } .deck-tile:has(.horde) { --glow: rgba(235,55,50,.5); }
.deck-tile:hover::before, .deck-tile.current::before { opacity: 1; transform: scale(1); }
.deck-tile:hover .dbox-3d { transform: translateY(-11px) rotateX(calc(-11deg - var(--ty) * 16deg)) rotateY(calc(-13deg + var(--tx) * 26deg)) scale(1.08); transition-duration: .35s; }
.deck-tile:hover .dbox-shadow { transform: scale(.78) translateY(4px); opacity: .55; }
.deck-tile:hover .dbox-gloss { animation: dboxGloss .9s ease-out; }
@keyframes dboxGloss { from { background-position: 110% 0; } to { background-position: -10% 0; } }
.deck-tile:hover .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 0 0 2px #050403, 0 0 16px var(--glow); }
.deck-tile:active .dbox-3d { transform: translateY(-5px) rotateX(-12deg) rotateY(-12deg) scale(.96); transition-duration: .08s; }
.deck-tile:hover .dbox-special { transform: translateY(-8px) scale(1.06); border-color: var(--gold); box-shadow: 0 0 16px rgba(201,168,76,.35); }
.deck-tile.picked .dbox-3d { animation: dboxPick .3s cubic-bezier(.3,1.6,.5,1) forwards; }
.deck-tile.picked .dbox-special { animation: dboxPick2 .3s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes dboxPick { 0% { transform: translateY(-11px) rotateX(-11deg) rotateY(-13deg) scale(1.08); } 45% { transform: translateY(-16px) rotateX(-6deg) rotateY(0deg) scale(1.22); }
    100% { transform: translateY(-14px) rotateX(-8deg) rotateY(-4deg) scale(1.16); filter: brightness(1.25); } }
@keyframes dboxPick2 { 50% { transform: scale(1.2); } 100% { transform: scale(1.14); } }
.deck-tile.current .deck-tile-name { color: var(--gold-light); }
.deck-tile.current .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 2px var(--gold), 0 0 18px rgba(201,168,76,.6); }
.deck-tile-name { position: relative; margin-top: 8px; font-size: 11.5px; font-weight: bold; color: var(--text-main); text-align: center; line-height: 1.2; max-width: 100%; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color .2s; }
.deck-tile:hover .deck-tile-name { color: var(--gold-light); }
.deck-tile-sub { position: relative; font-size: 10px; color: var(--text-dim); text-align: center; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Lobby: große Box, gleiche Effekte beim Darüberfahren */
button.mp-deckbox { cursor: pointer; }
button.mp-deckbox:hover .dbox-3d { transform: translateY(-8px) rotateX(-12deg) rotateY(-14deg) scale(1.05); transition-duration: .35s; }
button.mp-deckbox:hover .dbox-gloss { animation: dboxGloss .9s ease-out; }
button.mp-deckbox:hover .dbox-shadow { transform: scale(.8) translateY(4px); opacity: .55; }
@media (max-width: 600px) {
    #deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px 4px; }
    .deck-tile .dbox { --w: 62px; --h: 85px; --d: 24px; }
    .deck-tile .dbox-special { width: 62px; height: 85px; margin: 15px 12px 6px 0; }
}
@media (max-width: 520px) {
    .dbox.big { --w: 78px; --h: 107px; --d: 30px; }
    .mp-deckbox .dbox-special { width: 78px; height: 107px; margin: 19px 15px 6px 0; }
}
@media (prefers-reduced-motion: reduce) { .deck-tile, .dbox-3d, .deck-tile:hover .dbox-gloss { animation: none !important; transition: none !important; } }

/* ===== Deck-Übersicht im Vollbild: links die Boxen, rechts die Deckliste des überfahrenen Decks ===== */
#deck-overview-modal #deck-overview-box { width: 100vw; height: 100vh; max-width: none; max-height: none; border-radius: 0; border: 0; box-sizing: border-box;
    display: flex; flex-direction: column; overflow: hidden; padding: 16px 20px 12px; background: radial-gradient(ellipse at 30% 0%, #241b10, #0d0a07 70%); }
.deck-ov-body { flex: 1; min-height: 0; display: flex; gap: 18px; }
#deck-overview-grid.deck-grid { flex: 1; min-width: 0; overflow-y: auto; align-content: start; padding: 4px 6px 24px 2px; margin-top: 10px; }
#deck-preview { flex: 0 0 380px; min-height: 0; overflow-y: auto; margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; background: #120e0a;
    box-shadow: inset 0 0 30px rgba(0,0,0,.6); }
#deck-preview.dp-in { animation: dpIn .28s cubic-bezier(.2,1,.4,1); }
@keyframes dpIn { from { opacity: .3; transform: translateX(10px); } }
#deck-preview .dp-hint { height: 100%; display: flex; align-items: center; justify-content: center; padding: 30px; text-align: center; color: var(--text-dim); font-style: italic; }
#deck-preview .db-stats { border-radius: 0; }
#dp-cards { padding: 0 10px 12px 4px; }
#dp-cards .db-row { cursor: default; }
@media (max-width: 900px), (hover: none) { #deck-preview { display: none; } }
@media (max-width: 600px) { #deck-overview-modal #deck-overview-box { padding: 10px 8px; } }
/* Deck-Box: Plättchen unten = Spezialisierung des Helden; Boxen in der Übersicht größer */
.dbox-n { max-width: 86%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px; padding: 3px 6px 2px; letter-spacing: .3px; box-sizing: border-box; }
.dbox { --w: 92px; --h: 126px; --d: 36px; }
.dbox-special { width: 92px; height: 126px; margin: 22px 18px 6px 0; }
#deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(134px, 1fr)); gap: 22px 10px; }
.dbox.big .dbox-n { font-size: 12px; }
@media (max-width: 600px) {
    #deck-overview-grid.deck-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px 4px; }
    .deck-tile .dbox { --w: 70px; --h: 96px; --d: 27px; }
    .deck-tile .dbox-special { width: 70px; height: 96px; margin: 17px 14px 6px 0; }
    .deck-tile .dbox-n { font-size: 8px; }
}
/* Deck-Übersicht: angezeigtes Deck bleibt hervorgehoben (gehoben, Leuchten, goldener Rahmen); schmale goldene Scrollbars wie im Deck-Builder */
.deck-tile.shown::before { opacity: 1; transform: scale(1); }
.deck-tile.shown .dbox-3d { transform: translateY(-9px) rotateX(-12deg) rotateY(-15deg) scale(1.06); }
.deck-tile.shown .dbox-shadow { transform: scale(.8) translateY(4px); opacity: .55; }
.deck-tile.shown .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 2px var(--gold), 0 0 20px var(--glow); }
.deck-tile.shown .dbox-special { transform: translateY(-8px) scale(1.06); border-color: var(--gold); }
.deck-tile.shown .deck-tile-name { color: var(--gold-light); }
#deck-preview { overflow-x: hidden; }
#deck-overview-modal ::-webkit-scrollbar { width: 8px; height: 8px; background: transparent; }
#deck-overview-modal ::-webkit-scrollbar-track, #deck-overview-modal ::-webkit-scrollbar-corner { background: transparent; }
#deck-overview-modal ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
#deck-overview-modal ::-webkit-scrollbar-thumb { background: rgba(201,168,76,.45); border-radius: 8px; }
#deck-overview-modal ::-webkit-scrollbar-thumb:hover { background: rgba(201,168,76,.75); }
@supports (-moz-appearance: none) { #deck-overview-modal * { scrollbar-width: thin; scrollbar-color: rgba(201,168,76,.5) transparent; } }

/* Deck-Übersicht: Turnier-Ordner (je World Championship eine Mappe mit Emblem und Jahr; offen: Kopf mit Schriftzug, Jahr, Ort) */
.deck-tile.folder { --glow: rgba(255,165,50,.45); }
.wfold { position: relative; width: 124px; height: 150px; margin-bottom: 2px; perspective: 520px; }
.wfold-back { position: absolute; left: 4px; right: 4px; top: 40px; bottom: 0; border-radius: 3px 8px 6px 6px; background: linear-gradient(#3b2715, #1c1209); border: 1px solid #6b4f22; box-shadow: 0 8px 16px rgba(0,0,0,.65); }
.wfold-back::before { content: ''; position: absolute; top: -12px; left: -1px; width: 46%; height: 12px; border-radius: 6px 12px 0 0; background: #3b2715; border: 1px solid #6b4f22; border-bottom: 0; }
.wfold-papers i { position: absolute; left: 14px; right: 14px; top: 46px; height: 70px; border-radius: 2px; background: linear-gradient(#f1e5c6, #cbb684); box-shadow: 0 1px 3px rgba(0,0,0,.5); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.wfold-papers i:nth-child(1) { transform: rotate(-5deg); background: linear-gradient(#e6d6ae, #b9a271); }
.wfold-papers i:nth-child(2) { transform: rotate(3deg) translateY(2px); }
.wfold-papers i:nth-child(3) { transform: rotate(-1deg) translateY(4px); background: linear-gradient(#f6ecd4, #d5c294); }
.wfold-front { position: absolute; left: 4px; right: 4px; bottom: 0; height: 96px; transform-origin: 50% 100%; border-radius: 4px 4px 6px 6px;
    background: radial-gradient(120% 90% at 50% 0%, #5a3a1c, #2a190c 62%, #1a1008); border: 1px solid #8a6a2c;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,220,140,.3), 0 -2px 8px rgba(0,0,0,.45); transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .3s; }
.wfold-front::after { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(201,168,76,.35); border-radius: 3px; pointer-events: none; }
.wfold-logo { position: absolute; left: 50%; top: -50px; width: 120px; transform: translateX(-50%); filter: drop-shadow(0 4px 6px rgba(0,0,0,.8)); transition: transform .45s cubic-bezier(.34,1.56,.64,1); pointer-events: none; }
.wfold-year { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font: 900 25px/1 Georgia, 'Times New Roman', serif; letter-spacing: 1px;
    background: linear-gradient(#fff3b0, #f2b632 45%, #c2561b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 1px #000) drop-shadow(0 0 1px #000); }
.wfold-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font: 900 17px/1.15 Georgia, serif; color: var(--gold); text-shadow: 0 2px 2px #000; }
.deck-tile.folder:hover .wfold-front, .deck-tile.folder:focus-visible .wfold-front { transform: rotateX(-24deg); box-shadow: inset 0 0 0 2px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,220,140,.3), 0 0 18px var(--glow); }
.deck-tile.folder:hover .wfold-logo { transform: translateX(-50%) translateY(-4px) scale(1.05); }
.deck-tile.folder:hover .wfold-papers i:nth-child(1) { transform: rotate(-9deg) translate(-4px, -14px); }
.deck-tile.folder:hover .wfold-papers i:nth-child(2) { transform: rotate(6deg) translate(4px, -18px); }
.deck-tile.folder:hover .wfold-papers i:nth-child(3) { transform: rotate(-1deg) translateY(-10px); }
.deck-tile.folder:active .wfold { transform: scale(.96); }
.wflag { width: 17px; height: 9px; vertical-align: -1px; margin-right: 5px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.deck-folder-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; padding: 2px 4px 12px; border-bottom: 1px solid var(--border); animation: deckTileIn .45s cubic-bezier(.2,1.25,.4,1) both; }
.deck-folder-back { flex: none; }
.deck-archive-all { margin-left: auto; flex: none; }
.dfh-text { height: 92px; width: auto; min-width: 0; flex: 0 1 auto; max-width: 52%; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.8)); }
.dfh-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dfh-year { font: 900 36px/1 Georgia, serif; background: linear-gradient(#fff3b0, #f2b632 45%, #c2561b); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 1px #000); }
.dfh-year.dfh-name { font-size: 26px; }
.dfh-place { font-size: 15px; font-weight: bold; color: var(--text-main); white-space: nowrap; }
.dfh-place .wflag { width: 21px; height: 11px; margin-right: 7px; }
.dfh-sub { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; }
.deck-tile.locked .dbox { filter: grayscale(.85) brightness(.65); }
.deck-tile.locked .deck-tile-name { color: var(--text-dim); }
.deck-lock { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); font-size: 22px; filter: drop-shadow(0 2px 3px #000); pointer-events: none; }
.dp-locked { margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: rgba(201,168,76,.08); font-size: 12px; line-height: 1.4; color: var(--text-dim); }
.dp-raw { display: flex; gap: 8px; padding: 3px 6px; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,.05); color: var(--text-main); }
.dp-raw b { flex: none; width: 34px; text-align: right; color: var(--gold); }
.dp-raw.hero span { color: var(--gold-light); font-weight: bold; }
@media (max-width: 600px) {
    .wfold { width: 98px; height: 118px; }
    .wfold-back { top: 32px; } .wfold-papers i { top: 38px; height: 54px; left: 11px; right: 11px; }
    .wfold-front { height: 76px; }
    .wfold-logo { width: 96px; top: -40px; }
    .wfold-year { font-size: 20px; bottom: 5px; }
    .deck-lock { top: 56px; font-size: 18px; }
    .deck-folder-head { gap: 10px; flex-wrap: wrap; }
    .dfh-text { height: 48px; max-width: 60%; }
    .dfh-year { font-size: 26px; }
}
@media (max-height: 500px) { .dfh-text { height: 54px; } .dfh-year { font-size: 26px; } .deck-folder-head { padding-bottom: 8px; } }

/* ===================== HAUPTMENÜ ===================== */
#main-menu { position: fixed; inset: 0; z-index: 99000; display: none; overflow: hidden; background: #050302; --px: 0; --py: 0; font-family: Georgia, 'Times New Roman', serif; }
#main-menu.in { animation: mmIn 1.2s ease both; }
#main-menu.out { animation: mmOut .45s ease forwards; pointer-events: none; }
@keyframes mmIn { from { opacity: 0; } }
@keyframes mmOut { to { opacity: 0; transform: scale(1.04); filter: brightness(1.6) blur(2px); } }
/* Matten: klar und hell, wechseln mit Überblendung, langsamer Zoom (Ken Burns), Parallax zur Maus */
.mm-bg { position: absolute; inset: -5%; transform: translate3d(calc(var(--px) * -16px), calc(var(--py) * -10px), 0); will-change: transform; }
.mm-bg-layer { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 5s ease-in-out; transform-origin: var(--ox, 50%) var(--oy, 50%); }
.mm-bg-layer.on { opacity: 1; }
.mm-bg-layer.kb { animation: mmKenBurns 60s linear forwards; }
@keyframes mmKenBurns { from { transform: scale(1.08); } to { transform: scale(1.01); } }
.mm-sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* nur links ein Verlauf hinter Titel und Knöpfen (Lesbarkeit), die Matte selbst bleibt klar */
.mm-shade { position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, rgba(6,4,2,.78) 0%, rgba(6,4,2,.45) 28%, rgba(6,4,2,0) 52%), radial-gradient(ellipse 120% 90% at 60% 50%, transparent 70%, rgba(0,0,0,.25)); }
.mm-content { position: relative; height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4vw; padding: 0 6vw 0 5vw; box-sizing: border-box; }
.mm-left { display: flex; flex-direction: column; gap: 34px; }
/* Titel: Gold mit wanderndem Glanz */
.mm-title { display: flex; flex-direction: column; line-height: .92; filter: drop-shadow(0 4px 10px rgba(0,0,0,.9)); }
#main-menu.in .mm-title { animation: mmTitleIn 1s cubic-bezier(.2,1.25,.4,1) .1s both; }
@keyframes mmTitleIn { from { opacity: 0; transform: translateY(-34px) scale(1.12); filter: blur(6px) drop-shadow(0 4px 10px #000); } }
.mm-t1, .mm-t3 { color: #e9d49a; letter-spacing: 7px; text-transform: uppercase; font-size: clamp(13px, 1.5vw, 19px); font-weight: bold; text-shadow: 0 2px 4px #000; }
.mm-t2 { font-size: clamp(54px, 8.4vw, 118px); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; margin: 4px 0 8px;
    background: linear-gradient(100deg, #8a5d17 0%, #e6b94e 18%, #fff3c2 26%, #f2c55c 34%, #9a6a1c 58%, #e8bd55 80%, #8a5d17 100%); background-size: 260% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px rgba(60,35,5,.6); animation: mmShimmer 14s ease-in-out infinite; }
@keyframes mmShimmer { 0%, 55% { background-position: 100% 0; } 85%, 100% { background-position: 0% 0; } }
/* Knöpfe: Plaketten mit Goldkante, schieben sich beim Überfahren nach rechts */
.mm-nav { display: flex; flex-direction: column; gap: 10px; }
.mm-btn { position: relative; width: min(360px, 80vw); text-align: left; padding: 13px 26px 12px 22px; border: 1px solid rgba(201,168,76,.4); border-left: 3px solid var(--gold); border-radius: 2px;
    background: linear-gradient(90deg, rgba(22,15,8,.92), rgba(22,15,8,.55)); color: #f4ecdc; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); box-shadow: 0 6px 18px rgba(0,0,0,.45);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .25s, border-color .25s, color .2s; }
.mm-btn span { font: bold 21px/1.15 Georgia, serif; letter-spacing: .5px; text-shadow: 0 2px 3px #000; }
.mm-btn small { font: 12px/1.2 Georgia, serif; color: #bfae8a; opacity: .85; }
.mm-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,230,160,.28) 45%, transparent 60%); transform: translateX(-120%); }
.mm-btn:hover { transform: translateX(12px); border-color: var(--gold); background: linear-gradient(90deg, rgba(70,48,16,.95), rgba(40,27,10,.6)); color: #ffe9a8; }
.mm-btn:hover::before { transform: translateX(120%); transition: transform .7s ease; }
.mm-btn:active { transform: translateX(8px) scale(.97); transition-duration: .08s; }
.mm-btn.mm-primary { padding: 17px 26px 15px 22px; background: linear-gradient(90deg, #d8b45a, #9b7425 70%, rgba(110,80,25,.75)); border-color: #f2d27a; }
.mm-btn.mm-primary span { font-size: 26px; color: #1d1306; text-shadow: 0 1px 0 rgba(255,240,190,.5); }
.mm-btn.mm-primary small { color: #3a2a10; opacity: 1; }
.mm-btn.mm-primary:hover { background: linear-gradient(90deg, #f0cd6c, #b98a2e 70%, rgba(130,95,30,.8)); box-shadow: 0 0 26px rgba(240,200,100,.45), 0 6px 18px rgba(0,0,0,.45); }
.mm-continue { display: none; }
#main-menu.has-game .mm-continue { display: flex; }
.mm-btn.mm-hit { animation: mmHit .3s ease; }
@keyframes mmHit { 40% { filter: brightness(1.8); } }
#main-menu.in .mm-btn { animation: mmBtnIn 1s cubic-bezier(.2,1,.3,1) both; }
#main-menu.in .mm-btn:nth-child(1) { animation-delay: .6s; } #main-menu.in .mm-btn:nth-child(2) { animation-delay: .72s; } #main-menu.in .mm-btn:nth-child(3) { animation-delay: .84s; }
#main-menu.in .mm-btn:nth-child(4) { animation-delay: .96s; } #main-menu.in .mm-btn:nth-child(5) { animation-delay: 1.08s; }
@keyframes mmBtnIn { from { opacity: 0; transform: translateX(-60px); } }
/* Rechts: Deck-Box und Booster-Stapel als Objekte im Raum */
.mm-props { display: flex; align-items: flex-end; gap: clamp(20px, 4vw, 70px); padding-bottom: 4vh;
    transform: translate3d(calc(var(--px) * 8px), calc(var(--py) * 5px), 0); }
.mm-prop { --tx: 0; --ty: 0; background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
#main-menu.in .mm-prop { animation: mmPropIn 1.4s cubic-bezier(.2,1.1,.3,1) both; }
#main-menu.in .mm-decks { animation-delay: 1s; } #main-menu.in .mm-boosters { animation-delay: 1.2s; }
@keyframes mmPropIn { from { opacity: 0; transform: translateY(70px) scale(.7) rotate(-6deg); } }
.mm-prop::before { content: ''; position: absolute; left: -20%; right: -20%; top: 10%; bottom: 18%; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(255,200,90,.35), transparent); opacity: 0; transform: scale(.7); transition: opacity .35s, transform .5s cubic-bezier(.34,1.56,.64,1); }
.mm-prop:hover::before { opacity: 1; transform: scale(1); }
.mm-deckbox, .mm-pile { animation: mmFloat 10s ease-in-out infinite; }
.mm-pile { animation-delay: -5s; }
@keyframes mmFloat { 50% { transform: translateY(-5px); } }
.mm-deckbox .dbox.big { --w: 150px; --h: 206px; --d: 58px; perspective: 1100px; margin: 36px 30px 10px 0; }
.mm-deckbox .dbox.big .dbox-n { font-size: 13px; padding: 4px 9px 3px; }
.mm-deckbox .dbox-special { width: 150px; height: 206px; margin: 36px 30px 10px 0; font-size: 60px; }
.mm-decks:hover .dbox-3d { transform: translateY(-14px) rotateX(calc(-10deg - var(--ty) * 18deg)) rotateY(calc(-12deg + var(--tx) * 30deg)) scale(1.07); transition-duration: .35s; }
.mm-decks:hover .dbox-shadow { transform: scale(.75) translateY(6px); opacity: .5; }
.mm-decks:hover .dbox-gloss { animation: dboxGloss .9s ease-out; }
.mm-decks:hover .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 2px var(--gold), 0 0 26px var(--glow); }
.mm-decks:active .dbox-3d { transform: translateY(-6px) rotateX(-12deg) rotateY(-12deg) scale(.96); transition-duration: .08s; }
.mm-pile { position: relative; width: 190px; height: 262px; perspective: 900px; }
.mm-pack { position: absolute; left: 50%; bottom: 10px; width: 140px; margin-left: -70px; border-radius: 5px; transform-origin: 50% 110%; user-select: none;
    transform: rotate(calc(var(--k) * 9deg)) translateX(calc(var(--k) * 16px)); box-shadow: 0 10px 22px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.4);
    transition: transform .5s cubic-bezier(.34,1.56,.64,1), filter .3s; }
.mm-boosters:hover .mm-pack { transform: rotate(calc(var(--k) * 15deg + var(--tx) * 6deg)) translateX(calc(var(--k) * 30px)) translateY(-12px); filter: brightness(1.08); }
.mm-boosters:hover .mm-pack:last-child { transform: rotate(calc(var(--k) * 15deg + var(--tx) * 6deg)) translateX(calc(var(--k) * 30px)) translateY(-30px) scale(1.06); filter: brightness(1.15) drop-shadow(0 0 14px rgba(255,210,120,.55)); }
.mm-boosters:active .mm-pack { transition-duration: .08s; filter: brightness(1.3); }
.mm-boosters.burst .mm-pack { transition: transform .26s ease-in, opacity .26s; opacity: 0; transform: rotate(calc(var(--k) * 40deg)) translateX(calc(var(--k) * 110px)) translateY(-160px) scale(1.2); }
.mm-plate { margin-top: 14px; padding: 7px 20px 6px; font: bold 16px Georgia, serif; letter-spacing: 1.5px; text-transform: uppercase; color: #f6dc92; white-space: nowrap;
    background: linear-gradient(180deg, #2c2116, #0f0a06); border: 1px solid var(--gold-dark); border-radius: 3px; box-shadow: 0 6px 14px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,230,160,.18);
    text-shadow: 0 2px 3px #000; transition: border-color .2s, box-shadow .3s, transform .35s cubic-bezier(.34,1.56,.64,1); }
.mm-prop:hover .mm-plate { border-color: var(--gold); box-shadow: 0 0 18px rgba(240,200,100,.45), 0 6px 14px rgba(0,0,0,.7); transform: translateY(-3px); }
/* Optionen */
.mm-options { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.mm-options.in { opacity: 1; }
.mm-options[hidden] { display: none; }
.mm-opt-box { width: min(420px, 92vw); max-height: 86vh; overflow-y: auto; padding: 20px 22px; background: linear-gradient(180deg, #221a12, #0e0a07); border: 1px solid var(--gold-dark); border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,.8); display: flex; flex-direction: column; gap: 10px; transform: scale(.94); transition: transform .35s cubic-bezier(.34,1.56,.64,1); font-family: inherit; }
.mm-options.in .mm-opt-box { transform: none; }
.mm-opt-box h2 { margin: 0 0 4px; color: var(--gold); text-align: center; }
.mm-opt-body { display: flex; flex-direction: column; gap: 7px; }
.mm-opt-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.mm-opt-row > span { flex: 1; }
.mm-opt-close { align-self: center; margin-top: 6px; padding: 8px 30px; }
@media (max-width: 760px) {
    .mm-content { flex-direction: column; justify-content: center; gap: 26px; padding: 20px 16px; }
    .mm-left { align-items: center; gap: 20px; } .mm-title { align-items: center; text-align: center; }
    .mm-shade { background: linear-gradient(180deg, rgba(6,4,2,.7), rgba(6,4,2,.35) 60%, rgba(6,4,2,.6)); }
    .mm-btn { width: min(340px, 88vw); padding: 10px 20px; } .mm-btn span { font-size: 18px; } .mm-btn.mm-primary span { font-size: 21px; }
    .mm-props { padding-bottom: 0; gap: 26px; }
    .mm-deckbox .dbox.big { --w: 92px; --h: 126px; --d: 36px; margin: 22px 18px 6px 0; }
    .mm-pile { width: 120px; height: 160px; } .mm-pack { width: 88px; margin-left: -44px; }
    .mm-plate { font-size: 12px; padding: 5px 12px 4px; }
}
@media (prefers-reduced-motion: reduce) { #main-menu *, #main-menu { animation: none !important; } .mm-bg { transform: none; } }
/* Hauptmenü: Logo statt Text-Titel, mit wanderndem Glanz (nur auf dem Logo: Maske = Logo selbst) */
.mm-title { position: relative; width: clamp(300px, 36vw, 560px); line-height: 0; }
.mm-logo { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 18px rgba(0,0,0,.85)); user-select: none; }
.mm-logo-shine { position: absolute; inset: 0; pointer-events: none; -webkit-mask: url("../icons/logo.png") center / 100% 100% no-repeat; mask: url("../icons/logo.png") center / 100% 100% no-repeat;
    background: linear-gradient(105deg, transparent 38%, rgba(255,250,220,.55) 47%, rgba(255,240,190,.15) 52%, transparent 60%); background-size: 300% 100%; mix-blend-mode: screen;
    animation: mmLogoShine 16s ease-in-out 3s infinite; }
@keyframes mmLogoShine { 0% { background-position: 100% 0; } 25%, 100% { background-position: 0% 0; } }
#main-menu.in .mm-title { animation: mmLogoIn 1.8s cubic-bezier(.2,1,.3,1) .2s both; }
@keyframes mmLogoIn { 0% { opacity: 0; transform: translateY(-40px) scale(1.25); filter: blur(8px); } 60% { opacity: 1; filter: blur(0) brightness(1.4); } }
.mm-title:hover .mm-logo { filter: drop-shadow(0 8px 18px rgba(0,0,0,.85)) drop-shadow(0 0 14px rgba(120,170,255,.35)); }
@media (max-width: 760px) { .mm-title { width: min(330px, 86vw); } }
/* Hauptmenü: Inhalt über die volle Breite (Deck-Box und Booster rechts), auf großen Bildschirmen größer */
.mm-content { width: 100%; padding: 0 7vw 0 6vw; }
.mm-props { margin-left: auto; padding-bottom: 6vh; }
@media (min-width: 1300px) and (min-height: 820px) { .mm-props { zoom: 1.3; } .mm-nav { zoom: 1.12; } .mm-title { width: clamp(300px, 34vw, 620px); } }
@media (min-width: 1700px) and (min-height: 1000px) { .mm-props { zoom: 1.6; } .mm-nav { zoom: 1.3; } .mm-title { width: clamp(300px, 34vw, 760px); } }
@media (min-width: 2300px) and (min-height: 1300px) { .mm-props { zoom: 2.1; } .mm-nav { zoom: 1.7; } .mm-title { width: 34vw; } }
/* Hauptmenü: Abstand zwischen Spielen (oben) und Extras (unten), Extras etwas kleiner */
.mm-sep { height: 22px; }
.mm-sep ~ .mm-btn { padding-top: 10px; padding-bottom: 9px; }
.mm-sep ~ .mm-btn span { font-size: 18px; }
#main-menu.in .mm-btn:nth-child(6) { animation-delay: 1.2s; }

/* Tests und Debug nur lokal (body.dev, IS_DEV in main.js) */
body:not(.dev) #side-more { display: none !important; }

/* Mulligan (Standard): Schleier durchsichtig, Fenster oben – die Starthand unten bleibt sichtbar */
#decision-modal.peek { background: rgba(0,0,0,.18); backdrop-filter: none; align-items: flex-start; padding-top: 14vh; }
#decision-modal.peek .modal-box { box-shadow: 0 18px 50px rgba(0,0,0,.85); }
/* … und die Hand ist dabei ganz ausgefahren (wie beim Darüberfahren) */
body:has(#decision-modal.peek[style*="flex"]) #bot-hand { transform: translate(calc(-50% + var(--hand-shift, 0px)), 0); }
#mp-chat .mp-warn { font-style: normal; font-size: 11px; color: #e8c97a; background: rgba(201,168,76,.08); border: 1px solid rgba(201,168,76,.25); border-radius: 4px; padding: 5px 8px; margin-bottom: 6px; }
/* Hauptmenü auf niedrigen Bildschirmen (Handy quer): alles kompakter, damit Logo, alle Knöpfe und beide Objekte passen */
@media (max-height: 520px) and (min-width: 561px) {
    .mm-content { padding: 0 4vw 0 4vw; gap: 3vw; }
    .mm-left { gap: 10px; }
    .mm-title { width: clamp(150px, 26vw, 230px); }
    .mm-nav { gap: 5px; zoom: 1; }
    .mm-btn { width: min(250px, 38vw); padding: 6px 16px 5px 14px; }
    .mm-btn span { font-size: 14px; } .mm-btn small { font-size: 9.5px; }
    .mm-btn.mm-primary { padding: 8px 16px 7px 14px; } .mm-btn.mm-primary span { font-size: 17px; }
    .mm-sep { height: 8px; }
    .mm-sep ~ .mm-btn span { font-size: 13px; }
    .mm-props { zoom: 1; gap: 3vw; padding-bottom: 0; }
    .mm-deckbox .dbox.big { --w: 84px; --h: 115px; --d: 33px; margin: 20px 17px 6px 0; }
    .mm-deckbox .dbox.big .dbox-n { font-size: 9px; padding: 2px 6px 1px; }
    .mm-deckbox .dbox-special { width: 84px; height: 115px; margin: 20px 17px 6px 0; font-size: 36px; }
    .mm-pile { width: 120px; height: 150px; } .mm-pack { width: 82px; margin-left: -41px; bottom: 4px; }
    .mm-plate { font-size: 11px; padding: 4px 10px 3px; margin-top: 8px; letter-spacing: 1px; }
}
/* Hauptmenü: Deck-Box und Booster vom bunten Hintergrund absetzen – dunkle „Bühne“ dahinter, Bodenschatten,
   Schlagschatten und eine feine helle Kante (Rim-Light) */
.mm-props { position: relative; isolation: isolate; }
.mm-props::before { content: ''; position: absolute; inset: -22% -18% -14% -18%; z-index: -1; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(6,4,2,.9) 0%, rgba(6,4,2,.72) 45%, rgba(6,4,2,.3) 75%, transparent 100%);
    filter: blur(6px); }
.mm-prop::after { content: ''; position: absolute; left: 4%; right: 4%; bottom: 30px; height: 26px; z-index: -1; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0,0,0,.85), rgba(0,0,0,.4) 55%, transparent); transition: transform .5s cubic-bezier(.34,1.56,.64,1), opacity .4s; }
.mm-prop:hover::after { transform: scale(.82); opacity: .7; }
.mm-deckbox, .mm-pile { filter: drop-shadow(0 18px 16px rgba(0,0,0,.75)) drop-shadow(0 0 1px rgba(255,225,160,.55)); }
.mm-pack { box-shadow: 0 12px 26px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.6), 0 0 0 2px rgba(255,225,160,.12); }
@media (max-height: 520px) and (min-width: 561px) { .mm-prop::after { bottom: 22px; height: 16px; } }
/* Hauptmenü, Bühne v2: Hintergrund hinter Deck-Box und Boostern unscharf, dunkel und entsättigt (weich ausgeblendete
   Milchglas-Fläche); Bodenschatten direkt unter der Box bzw. dem Stapel statt versetzt; kräftigere Kante */
.mm-props::before { inset: -26% -16% -18% -16%; border-radius: 0; filter: none;
    background: radial-gradient(closest-side, rgba(8,5,2,.55), rgba(8,5,2,.35) 60%, transparent);
    -webkit-backdrop-filter: blur(10px) brightness(.42) saturate(.55); backdrop-filter: blur(10px) brightness(.42) saturate(.55);
    -webkit-mask: radial-gradient(closest-side, #000 55%, transparent 100%); mask: radial-gradient(closest-side, #000 55%, transparent 100%); }
.mm-prop::after { display: none; }
.mm-deckbox .dbox-shadow { display: none; }
.mm-deckbox, .mm-pile { position: relative; filter: drop-shadow(0 0 1.5px rgba(255,225,160,.8)) drop-shadow(0 0 22px rgba(0,0,0,.95)) drop-shadow(0 14px 14px rgba(0,0,0,.8)); }
/* Bodenschatten: flache Ellipse am Fuß, unabhängig vom Schweben etwas kleiner, wenn das Objekt oben ist */
.mm-deckbox::after, .mm-pile::after { content: ''; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0,0,0,.9), rgba(0,0,0,.5) 50%, transparent); }
.mm-deckbox::after { left: -6%; right: 4%; bottom: -4px; height: 30px; }
.mm-pile::after { left: 4%; right: 4%; bottom: -6px; height: 30px; }
.mm-prop:hover .mm-deckbox::after, .mm-prop:hover .mm-pile::after { transform: scale(.85); opacity: .75; transition: transform .5s, opacity .4s; }
@media (max-height: 520px) and (min-width: 561px) { .mm-deckbox::after, .mm-pile::after { height: 16px; bottom: -2px; } }
.mm-plate { position: relative; z-index: 2; }   /* über dem Schatten des schwebenden Booster-Stapels */
/* Start: schwarze Abdeckung bis das Hauptmenü steht (kein Aufblitzen des leeren Spielfelds); Fehlerbanner liegt darüber */
#boot-cover { position: fixed; inset: 0; z-index: 999999; background: #050302; transition: opacity .9s ease; pointer-events: none; }
#boot-cover.gone { opacity: 0; }
#main-menu.in.boot { animation: none; }
/* Deck-Box: glatte Kanten. Ein Filter auf einem Vorfahren rechnet die 3D-Box als flaches Bild ohne Kantenglättung
   (Treppen am schrägen Deckel) – im Hauptmenü daher kein Filter an der Box, Schatten/Kante direkt an den Flächen.
   Unsichtbare 1-px-Umrandung = Kantenglättung für gedrehte Flächen (Chrome/Edge) */
.dbox-f { outline: 1px solid transparent; }
.mm-deckbox { filter: none; }
.mm-deckbox .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 0 0 2px #050403, 0 0 0 1px rgba(255,225,160,.55), 0 0 26px rgba(0,0,0,.9), 0 18px 22px rgba(0,0,0,.75); }
.mm-deckbox .dbox-side, .mm-deckbox .dbox-top { box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), 0 0 1px rgba(255,225,160,.5); }
.mm-deckbox .dbox-top { box-shadow: inset 0 0 0 1.5px var(--tr), inset 0 0 8px rgba(0,0,0,.5), 0 0 1px rgba(255,225,160,.5); }
.mm-decks:hover .dbox-front { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 0 0 2px var(--gold), 0 0 26px var(--glow), 0 18px 22px rgba(0,0,0,.75); }
/* Deckel: die hintere Kante wird beim Zeichnen ~3fach gestaucht (flacher Blickwinkel) – eine harte Kante im Bild der
   Fläche wird dabei zur Treppe. Fläche ringsum 3 px durchsichtig vergrößern (gleiche Mitte, gleiche sichtbare Größe) und die
   hintere Kante darin weich auslaufen lassen: Maske von durchsichtig (1 px) zu deckend (5 px), Mitte = sichtbare Kante bei 3 px */
.dbox-top { box-sizing: border-box; border: 3px solid transparent; background-clip: padding-box; border-radius: 6px;
    width: calc(var(--w) + 6px); height: calc(var(--d) + 6px); left: -3px; top: calc((var(--h) - var(--d)) / 2 - 3px);
    -webkit-mask-image: linear-gradient(180deg, transparent 1px, #000 5px); mask-image: linear-gradient(180deg, transparent 1px, #000 5px); }
/* Ressourcen ablegen: beim Ziehen einer Handkarte deutlich größere Ablagefläche (freie Ecke unten links bis zur Hand),
   sichtbar als gestrichelte grüne Fläche */
.bottom-row #bot-resource-tray.dropzone-active { outline: none; background: none; }
.bottom-row #bot-resource-tray.dropzone-active::before { content: ''; position: absolute; left: -10px; bottom: -8px; width: calc(100% + min(280px, 17vw)); height: calc(100% + min(150px, 22vh));
    border: 2px dashed #22c55e; border-radius: 10px; background: rgba(34,197,94,.10); box-shadow: inset 0 0 24px rgba(34,197,94,.18); z-index: -1; }
/* Lern-Menü: Play-Symbol im YouTube-Knopf */
.learn-play::before { content: ''; margin-left: 4px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff; }
/* Beim Ziehen einer Handkarte (Ressource möglich): Hand rückt nach rechts und enger zusammen – Platz für die Ablage links */
@media (min-width: 1000px) {
    body.res-drag #bot-hand { transform: translate(calc(-50% + var(--hand-shift, 0px) + min(170px, 11vw)), 64%); }
    body.res-drag #bot-hand.hand-up { transform: translate(calc(-50% + var(--hand-shift, 0px) + min(170px, 11vw)), 0); }
    body.res-drag #bot-hand .hand-card-slot { margin: 0 calc(-1 * max(38px, var(--hand-ov, 20px))); transition: margin .25s, transform .22s; }
}
/* Fehlerbanner: Klicks gehen durch (nur der Schließen-Knopf ist bedienbar) */
#error-banner { pointer-events: none; opacity: .92; font-size: 13px; }
#error-banner button { pointer-events: auto; margin-left: 12px; padding: 0 8px; background: rgba(0,0,0,.35); color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 4px; cursor: pointer; }
/* ===== World Championship: Siegertreppe für Platz 1–3 (Pokal, Medaillen, Stufen in Gold/Silber/Bronze) ===== */
.wpodium { grid-column: 1 / -1; display: flex; justify-content: center; align-items: flex-end; gap: 22px; padding: 14px 0 4px; margin-bottom: 6px;
    background: radial-gradient(ellipse 60% 70% at 50% 75%, rgba(242,201,76,.16), transparent 70%); }
.wpod { --m1: #fff4c2; --m2: #f2c94c; --m3: #9a6b14; --sh: rgba(242,201,76,.55); display: flex; flex-direction: column; align-items: center; width: 200px; min-width: 0; }
.wpod.p2 { --m1: #ffffff; --m2: #c9ced6; --m3: #6f7782; --sh: rgba(210,218,230,.4); }
.wpod.p3 { --m1: #ffd9b3; --m2: #cd8a4f; --m3: #6e3d17; --sh: rgba(205,138,79,.4); }
.wpod-award { height: 62px; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 0 8px var(--sh)) drop-shadow(0 2px 2px #000); }
.wpod-award svg { height: 100%; }
.wpod.p1 .wpod-award { height: 92px; animation: wpodCup 3.2s ease-in-out infinite; }
@keyframes wpodCup { 50% { transform: translateY(-4px); filter: drop-shadow(0 0 16px var(--sh)) drop-shadow(0 2px 2px #000); } }
.wpod .pod-tile { width: 100%; animation-name: wpodIn; }
@keyframes wpodIn { from { opacity: 0; transform: translateY(26px) scale(.85); } }
.pod-tile .dbox { --w: 112px; --h: 154px; --d: 44px; perspective: 900px; }
.wpod.p1 .pod-tile .dbox { --w: 132px; --h: 181px; --d: 52px; perspective: 1000px; }
.pod-tile::before { --glow: var(--sh); }
.pod-tile .deck-tile-name { font-size: 14px; color: var(--m1); text-shadow: 0 1px 2px #000; }
.wpod.p1 .pod-tile .deck-tile-name { font-size: 16px; }
.pod-tile .deck-tile-sub { font-size: 11px; }
.wpod-step { position: relative; width: 100%; margin-top: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-sizing: border-box;
    border-radius: 6px 6px 2px 2px; border: 1px solid var(--m3); border-bottom-width: 3px;
    background: linear-gradient(180deg, var(--m1) 0%, var(--m2) 38%, var(--m3) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7), inset 0 -10px 18px rgba(0,0,0,.25), 0 8px 18px rgba(0,0,0,.55); transform-origin: bottom; animation: wpodStep .6s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes wpodStep { from { transform: scaleY(0); } }
.wpod.p1 .wpod-step { height: 78px; } .wpod.p2 .wpod-step { height: 54px; animation-delay: .08s; } .wpod.p3 .wpod-step { height: 38px; animation-delay: .16s; }
.wpod-n { font: bold 32px/1 Georgia, serif; color: rgba(40,25,5,.78); text-shadow: 0 1px 0 rgba(255,255,255,.55), 0 -1px 0 rgba(0,0,0,.25); }
.wpod.p1 .wpod-n { font-size: 40px; } .wpod.p3 .wpod-n { font-size: 26px; }
.wpod-l { margin-top: 3px; font: bold 11px/1 Georgia, serif; letter-spacing: 2px; text-transform: uppercase; color: rgba(40,25,5,.85); text-shadow: 0 1px 0 rgba(255,255,255,.45); }
@media (max-width: 600px), (max-height: 500px) {
    .wpodium { gap: 6px; padding-top: 8px; }
    .wpod { width: 32%; }
    @media (min-width: 601px) { .wpodium { gap: 18px; } .wpod { width: 150px; } }
    .wpod-award { height: 40px; } .wpod.p1 .wpod-award { height: 56px; }
    .pod-tile .dbox { --w: 78px; --h: 107px; --d: 30px; }
    .wpod.p1 .pod-tile .dbox { --w: 92px; --h: 126px; --d: 36px; }
    .pod-tile .deck-tile-name { font-size: 12px; } .wpod.p1 .pod-tile .deck-tile-name { font-size: 13px; }
    .wpod.p1 .wpod-step { height: 56px; } .wpod.p2 .wpod-step { height: 40px; } .wpod.p3 .wpod-step { height: 28px; }
    .wpod-n { font-size: 24px; } .wpod.p1 .wpod-n { font-size: 30px; } .wpod.p3 .wpod-n { font-size: 20px; }
    .wpod-l { font-size: 8px; letter-spacing: 1px; }
}
@media (prefers-reduced-motion: reduce) { .wpod-step, .wpod.p1 .wpod-award { animation: none !important; } }
@media (max-height: 500px) and (min-width: 601px) {   /* Handy quer: Treppe flach, Boxen aber nicht kleiner als die übrigen */
    .wpodium { gap: 16px; } .wpod { width: 160px; }
    .pod-tile .dbox { --w: 92px; --h: 126px; --d: 36px; }
    .wpod.p1 .pod-tile .dbox { --w: 108px; --h: 148px; --d: 42px; }
}

/* Simulation im Hintergrund: kleine Anzeige oben in der Mitte (Fortschritt, Restzeit), Klick öffnet das Fenster */
#sim-badge { position: fixed; top: 6px; left: 50%; transform: translateX(-50%); z-index: 99500; min-width: 190px; padding: 5px 12px 6px; border-radius: 10px;
    background: rgba(20, 16, 10, 0.92); border: 1px solid var(--gold-dark); box-shadow: 0 4px 14px rgba(0,0,0,.6); color: var(--text-main); font-size: 12px; cursor: pointer; user-select: none; }
#sim-badge:hover { border-color: var(--gold-light); }
#sim-badge .sb-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#sim-badge .sb-bar { height: 3px; margin-top: 4px; background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden; }
#sim-badge .sb-bar > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transition: width .25s ease-out; }
#sim-badge.done { border-color: #4ade80; animation: sim-badge-pulse 1.6s ease-in-out infinite; }
#sim-badge.done .sb-bar { display: none; }
@keyframes sim-badge-pulse { 0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.6); } 50% { box-shadow: 0 0 16px rgba(74,222,128,.55); } }
/* Einstellungen: Zeile mit Beschriftung + Auswahl (Kartenbilder, Bildqualität je Bereich) */
.cfg-row { display: flex; gap: 6px; align-items: center; }
.cfg-row > label { font-size: 11px; color: var(--text-dim); min-width: 78px; }
.cfg-sel { flex: 1; min-width: 0; background: #0a0705; border: 1px solid var(--border); color: var(--text-main); padding: 3px; border-radius: 3px; font-size: 11px; }
/* Debug: Größe der Zoom-Karte einstellen – schwebendes Feld oben links, bleibt bis "Fertig" offen (über der Zoom-Karte) */
#zoom-tune { position: fixed; left: 12px; top: 12px; z-index: 1000001; width: 260px; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
    background: rgba(10,7,5,.94); border: 1px solid var(--gold-dark); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.8); }
#zoom-tune b { color: var(--gold-light); font-size: 14px; }
#zoom-tune input[type=range] { width: 100%; accent-color: var(--gold); }
#zoom-tune .zt-val { font-size: 12px; color: var(--text-main); }
#zoom-tune .zt-btns { display: flex; gap: 6px; } #zoom-tune .zt-btns button { flex: 1; }
/* ===== Spielfeld-Layout (js/ui.js: layoutBoard, layoutBar, placeAttachments) =====
   Größen kommen aus --field-w / --hand-w und --ui-scale (Spielfeld-Größe im Menü, applyUiZoom). */

/* Reihe je Spieler: eigene Allies links, Equipment/laufende Fähigkeiten rechts, dazwischen immer eine Lücke; der Gegner
   gespiegelt. Jede Karte liegt in einem absolut gesetzten .bf-slot (Position, Überlappung, Stapel und Reihenfolge rechnet
   layoutBoard). Erschöpfen dreht nur die Karte, der Platz bleibt gleich. */
.battlefield-row { position: relative; display: block; width: 100%; flex: 1 1 0; min-height: 0; padding: 0; overflow: visible; }
.bf-ally-zone, .bf-equip-zone { position: absolute; inset: 0; pointer-events: none; }
.bf-slot { position: absolute; width: var(--field-w); height: calc(var(--field-w) * 1.4); pointer-events: auto; }
.bf-slot > .card-wrapper.is-exhausted { margin-inline: 0; }
.bf-slot:hover, .bf-slot:has(> .card-wrapper.touch-active) { z-index: 1000 !important; }
/* Gleiche Allies gestapelt (Stufe 2): untere Karten schauen rechts oben heraus, bedient wird die oberste */
.bf-slot.stack-under { pointer-events: none; }
.stack-count { position: absolute; top: -10px; right: -10px; z-index: 50; padding: 2px 8px; border-radius: 999px; pointer-events: none;
    background: #1a1512; border: 1px solid var(--gold); color: var(--gold-light); font: 900 14px/1 Georgia, serif; box-shadow: 0 2px 8px rgba(0,0,0,.8); }

/* Untere Leiste (Gegner: obere, gespiegelt): verdeckte Ressourcen und offene Quests als ein durchgehender Stapel – je verdeckte
   ein 8-px-Streifen (RES_STRIP), die Quests liegen ohne Lücke darauf; Quest-Breiten setzt layoutBar (mind. 30 %, die letzte ganz) */
.resource-tray { display: flex; flex-direction: row; align-items: flex-end; gap: 0; flex: 0 1 auto; min-width: 0; }
.top-row .resource-tray { flex-direction: row-reverse; align-items: flex-start; }
.res-stack { display: flex; flex: 0 0 auto; min-width: 0; }
.top-row .res-stack { flex-direction: row-reverse; }
.res-card { position: relative; flex: 0 0 auto; width: 8px; height: var(--hand-h); }
.res-card:last-child { width: var(--hand-w); }
.resource-tray.pile .res-card:last-child { width: 8px; }
.active-quests-row { display: flex; flex: 0 1 auto; flex-wrap: nowrap; justify-content: flex-start; gap: 0; max-width: 100%; min-width: 0; }
.top-row .active-quests-row { flex-direction: row-reverse; }
.active-quests-row .quest-card-large { flex: 0 0 auto; min-width: 0; }
/* Hand: Container wächst mit der Spielfeld-Größe (sonst verschwände die eingefahrene Hand bei kleinen Stufen) */
.hand-arc-container { min-width: 0; height: calc(240px * var(--ui-scale, 1)); padding-bottom: calc(10px * var(--ui-scale, 1)); }

/* Angelegte Karten: am oberen Rand der Hostkarte (auch beim Gegner – seine Karten stehen aufrecht), 15 % darüber hinaus,
   gestaffelt um --adx. att-l: bündig links, nach rechts (spätere oben); att-r: bündig rechts, nach links (frühere oben) –
   so bleibt von jeder Karte die linke Ecke mit Name und Kosten sichtbar */
.card-wrapper.attached-card { position: absolute; width: 62%; --cw: auto; margin: 0; z-index: calc(20 + var(--ai, 0)); }
.card-wrapper.attached-card.att-top { top: -15%; }
.card-wrapper.attached-card.att-flush { top: 0; }                 /* gegnerischer Held am oberen Bildrand */
.card-wrapper.attached-card.att-l { left: calc(var(--ai, 0) * var(--adx, 0px)); }
.card-wrapper.attached-card.att-r { right: calc(var(--ai, 0) * var(--adx, 0px)); z-index: calc(40 - var(--ai, 0)); }
.card-wrapper.attached-card:hover { z-index: 60; }
/* Controller dezent am Rand: blau = du, rot = Gegner (CR 400.7b) */
.card-wrapper.attached-card .card-visual { outline: 2px solid var(--att-c); outline-offset: -1px; }
.card-wrapper.attached-card.att-own { --att-c: rgba(96,165,250,.85); }
.card-wrapper.attached-card.att-opp { --att-c: rgba(248,113,113,.85); }

/* Lebensbalken: nur das Maximum (das aktuelle Leben steht groß auf der Heldenkarte) */
.hp-num { display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: Georgia, serif; }
.hp-num span { font-size: 12px; font-weight: bold; color: #b8a78c; }
/* Einstellungen: Schieberegler (Spielfeld-Größe) mit Wert daneben */
.cfg-row input[type=range] { flex: 1; min-width: 0; accent-color: var(--gold); }
.cfg-val { font-size: 11px; color: var(--text-main); min-width: 38px; text-align: right; }
/* Deck-Builder „Anzahlen optimieren“: schlichtes Panel oben in der Liste (bleibt beim Scrollen stehen), je Zeile die empfohlene
   Anzahl mit Pfeil (grün ↑ mehr, rot ↓ weniger, = gleich); − / + sind während des Tests aus */
.db-opt-start { background: linear-gradient(180deg, #c4b5fd, #7c3aed); border-color: #c4b5fd; color: #12081f; box-shadow: 0 2px 10px rgba(139,92,246,.35); }
.db-opt-start:hover { box-shadow: 0 2px 14px rgba(139,92,246,.6); }
#db-opt-panel { position: sticky; top: 0; z-index: 6; margin: 0 0 8px; padding: 8px 10px; border-radius: 6px; background: #15110c;
    border: 1px solid var(--gold-dark); box-shadow: 0 4px 12px rgba(0,0,0,.7); font-size: 12px; color: #cfc4b0; }
#db-opt-panel .dop-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--gold-light); }
#db-opt-panel .dop-status { font-size: 11px; color: #a89880; }
#db-opt-panel.stable .dop-status { color: #4ade80; font-weight: bold; }
#db-opt-panel.bad .dop-status { color: #f87171; font-weight: bold; }
#db-opt-panel .dop-info { margin-top: 4px; }
#db-opt-panel .dop-btns { display: flex; gap: 8px; margin-top: 7px; }
#db-opt-panel .dop-btns button { flex: 1; padding: 6px 8px; font-weight: bold; border-radius: 5px; }
#db-deck-cards.opt .db-row { grid-template-columns: 30px 1fr 22px 44px; }
#db-deck-cards.opt .db-row-btn { display: none; }
.dop-rec { justify-self: end; min-width: 38px; padding: 3px 4px; border-radius: 4px; text-align: center; font: 900 14px/1 Georgia, serif;
    background: rgba(8,6,4,.8); border: 1px solid #4b3f30; color: #a89880; }
.dop-rec.up { color: #4ade80; border-color: #166534; } .dop-rec.down { color: #f87171; border-color: #991b1b; }

/* Touch (Tablet/Handy): Bedienelemente mindestens 44 px hoch (Fingerbreite). Maus-Bedienung bleibt unverändert. */
@media (pointer: coarse) {
    #side-panel button, #side-panel select, #side-panel summary, #side-panel input:not([type=range]):not([type=checkbox]) { min-height: 44px; box-sizing: border-box; }
    #side-panel summary { display: flex; align-items: center; }
    #side-panel #btn-fullscreen { padding: 0 14px !important; font-size: 13px !important; }
    #btn-end-turn { min-height: 44px; }
}

/* Location mit genug Zählern, jetzt aktivierbar: türkis pulsierend (Handkarten/Allies leuchten gelb) */
.card-wrapper.loc-ready .card-visual { --bd: #22d3ee; box-shadow: 0 0 0 0.9cqw #22d3ee, 0 0 5cqw rgba(34,211,238,.8); animation: locReady 1.6s ease-in-out infinite; }
.card-wrapper.loc-ready .card-visual.has-img::after { box-shadow: inset 0 0 0 0.9cqw #22d3ee; }
@keyframes locReady { 50% { box-shadow: 0 0 0 0.9cqw #67e8f9, 0 0 8cqw rgba(103,232,249,.95); } }
/* Prioritätsfenster: jede Option spielbar (gelber Rand wie spielbare Handkarten) */
#choice-modal .cm-play .card-visual { box-shadow: 0 0 0 0.7cqw #facc15, 0 0 3cqw rgba(250,204,21,.45); }
#choice-modal .cm-play:hover .card-visual { box-shadow: 0 0 0 0.9cqw #fde047, 0 0 5cqw rgba(250,204,21,.85); }
/* Hauptmenü „Spielen“: Decks und Spieler/CPU je Platz (Optik wie der Online-Raum: .mp-versus, .mp-deckbox) */
.mm-play-box { width: min(620px, calc(100vw - 32px)); gap: 14px; }
.mm-play .mp-side > b { font: bold 17px Georgia, serif; color: var(--gold-light); }
.mm-play .mp-side > span { font-size: 13px; color: #e8dcc0; }
.mm-ctl.mp-vis-tog { overflow: hidden; margin-top: 2px; }
.mm-ctl.mp-vis-tog button { padding: 7px 16px; font-size: 14px; min-width: 76px; }
.mm-play-mode { text-align: center; font-size: 13px; color: var(--text-dim); min-height: 1.3em; }
.mm-play-btns { display: flex; justify-content: center; gap: 12px; }
.mm-play-btns button { padding: 9px 22px; font-size: 15px; }
.mm-play-go { padding: 11px 38px !important; font-size: 18px !important; font-weight: bold; }
@media (max-height: 520px) { .mm-play-box { padding: 12px 16px; gap: 8px; } .mm-play .mp-versus { padding: 6px; } }
/* Hotseat: schwarzer Zwischenbildschirm beim Spielerwechsel (deckt Hände und Brett ab) */
#hotseat { position: fixed; inset: 0; z-index: 98500; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #000; color: var(--gold-light);
    font-family: Georgia, serif; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; animation: hsIn .3s ease; }
#hotseat.out { opacity: 0; transition: opacity .35s ease; pointer-events: none; }
#hotseat .hs-who { font-size: clamp(38px, 7vw, 76px); font-weight: 900; letter-spacing: 2px; text-shadow: 0 0 30px rgba(201,168,76,.45); }
#hotseat .hs-hero { font-size: clamp(16px, 2.2vw, 24px); color: #e8dcc0; }
#hotseat .hs-sub { font-size: clamp(15px, 2vw, 21px); color: var(--text-dim); }
#hotseat .hs-tap { margin-top: 28px; font-size: 14px; color: #8a7b5c; animation: hsPulse 2s ease-in-out infinite; }
#hotseat .hs-menu { position: absolute; top: 14px; left: 14px; padding: 6px 14px; font-size: 13px; background: transparent; color: #8a7b5c; border-color: #3a3020; }
@keyframes hsIn { from { opacity: 0; } }
@keyframes hsPulse { 50% { opacity: .4; } }
