/* mehrspieler.css (v414 MP) – Nickname-Schritt (#nickw, Hintergrund wie willkommen.css), roter Punkt + Pulsieren am Menü,
   Lobby-Fenster #mpdlg, Duell-Ansicht #duell (Welt-Kulisse, zwei Figuren, Herzen, Aufgabe + Ziffernblock). Logik: ui/mehrspieler.js */
/* ---- Nickname ---- */
#nickw{overflow-y:auto}
.nk-box{width:min(560px,94vw);margin:auto;padding:max(16px,env(safe-area-inset-top)) 14px max(18px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;text-align:center;gap:.6rem}
.nk-box .fe-titel{font-size:clamp(1.5rem,5.5vw,2.4rem)}
.nk-zeile{display:flex;gap:8px;width:100%;max-width:440px}
.nk-in{flex:1;min-width:0;font:inherit;font-size:1.5rem;font-weight:800;padding:.45em .7em;border-radius:16px;border:3px solid #fbbf24;background:#0f0b2acc;color:#fff;text-align:center}
.nk-in::placeholder{color:#ffffff66;font-weight:600}
.nk-wuerfel{font-size:1.6rem;border-radius:16px;border:3px solid #ffffff44;background:#ffffff1f;color:#fff;padding:0 .5em;cursor:pointer}
.nk-mp{display:flex;gap:10px;align-items:flex-start;text-align:left;max-width:440px;padding:10px 14px;border-radius:16px;background:#ffffff14;cursor:pointer}
.nk-mp input{width:26px;height:26px;flex:none;margin-top:2px;accent-color:#22c55e}.nk-mp small{display:block;color:#ddd6fe;font-weight:600}
.nk-fehl{min-height:1.3em;margin:0;color:#fecaca;font-weight:800}
#nickw.halten{pointer-events:none}
/* ---- Menü: roter Punkt, Pulsieren bis zum ersten Duell ---- */
#hb{position:relative}
#hb.mpdot-an::after{content:"";position:absolute;top:2px;right:2px;width:14px;height:14px;border-radius:50%;background:#ef4444;border:2px solid #fff;box-shadow:0 0 8px #ef4444}
#hb.mppuls{animation:mppuls 1s ease-in-out infinite}
#hb.mppuls{box-shadow:0 0 0 4px #fbbf2466,0 0 18px #fbbf24}
@keyframes mppuls{0%,100%{transform:scale(1)}50%{transform:scale(1.28)}}
#menu .mpdot{margin-left:auto;width:14px;height:14px;border-radius:50%;background:#ef4444;box-shadow:0 0 8px #ef4444;flex:none}
#mpl.mppuls{animation:mpzeile 1s ease-in-out infinite;outline:3px solid #fbbf24}
#mpl.mppuls{background:#fbbf2433}
@keyframes mpzeile{50%{transform:scale(1.05)}}
@keyframes mpschw{50%{transform:rotate(-14deg) scale(1.15)}}   /* Schwerter in der Einladung (.mp-gross) */
/* ---- Lobby (v428 MPF: Rahmen, Reiterlose Gruppen, Tipp-Leisten und Fuß aus fenster.css .ofen) ---- */
#mpdlg.ofen{width:min(94vw,540px)}   /* Höhe: .ofen.kurz (fenster.css) */
#mpbox{flex:0 1 auto;min-height:0;display:flex;flex-direction:column}   /* Höhe nach Inhalt (nicht bis max-height strecken) */
#mpbox .opanes{flex:0 1 auto;display:flex;flex-direction:column;gap:10px}
.mp-ich{margin:0;align-self:center;padding:4px 12px;border-radius:99px;background:#ffffff0f;color:#ddd6fe;font-weight:700;font-size:.9rem}.mp-ich b{color:var(--gold)}
.mp-leer{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 0}
.mp-bild{font-size:3rem;line-height:1}
.mp-text{margin:0;text-align:center;font-weight:700;line-height:1.5}.mp-text small{font-weight:600;color:#ffffffa6}
.mp-hinweis{margin:0;padding:8px 12px;border-radius:12px;background:#fbbf2433;border:1px solid #fbbf2480;font-weight:800;text-align:center}
.mp-liste{list-style:none;margin:0;padding:2px 12px;display:grid;border-radius:18px;background:#ffffff0a}
.mp-liste li{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid #ffffff1f}.mp-liste li:first-child{border-top:0}
.mp-nick{flex:1;min-width:0;font-weight:900;font-size:1.1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mp-liste em{color:#ffffffa6;font-weight:700;font-size:.9rem}
.mp-abz{flex:none;display:inline-grid;place-items:center;width:38px;height:38px;border-radius:50%;font-style:normal;font-weight:900;font-size:1.1rem;color:#1b1640;box-shadow:inset 0 -3px 0 #0003}
.mp-ja{background:#dc2626;color:#fff;font-weight:900;box-shadow:inset 0 -3px 0 #0004}.mp-liste .mp-ja{flex:none;padding:10px 14px}
.mp-nein{background:#334155;color:#fff}
/* Namensschilder „Anna ⚔️ Ben“ */
.mp-vs{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px}
.mp-schild{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;padding:10px 6px;border-radius:18px;background:var(--tief,#0f0b2a);box-shadow:inset 0 -4px 0 #0006}
.mp-schild b{max-width:100%;font-size:1.05rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mp-schild .mp-abz{width:46px;height:46px;font-size:1.35rem}
.mp-x{font-size:2.2rem;line-height:1}
.mp-einl{display:flex;flex-direction:column;gap:10px;text-align:center}.mp-einl .ogr{text-align:left;margin:0}
.mp-gross{display:inline-block;animation:mpschw 1.2s ease-in-out infinite}   /* v418 SB: nur so breit wie das Symbol */
.mp-titel{font-size:1.2rem;font-weight:800;margin:0;text-align:center}.mp-titel b{color:var(--gold)}
/* Schlachtfeld: Weltfarben bleiben (mpChipStil), gewählt = goldener Ring */
#mpw button{background:linear-gradient(var(--ov,#0000),var(--ov,#0000)),linear-gradient(var(--c1),var(--c2));color:var(--tx,#1f2937);font-weight:800;box-shadow:inset 0 -3px 0 #0003}
#mpw [aria-pressed=true]{box-shadow:inset 0 0 0 3px var(--gold),inset 0 0 0 5px #fff}
/* ---- Duell in der Spielwelt (v416 MW1): Gegner steht an der Stelle des Monsters, Monster/Käfig/Truhe/Hexe ruhen unsichtbar ---- */
.scene.duell #monw,.scene.duell #cagew,.scene.duell #cageb,.scene.duell .cgw,.scene.duell .cgb,.scene.duell #loot,.scene.duell .wit,.scene.duell .wbub,.scene.duell .sscene,.scene.duell .hshout{visibility:hidden}   /* v420: laufende Erzähl-Szene steht eingefroren unsichtbar darunter; v441 DT1 (Nutzer): auch die hintere Tor-Ebene #cageb und die durchlaufenden Klone .cgw/.cgb (sonst stand ein halbes Tor im Duell) */
body.duell-an #hb,body.duell-an #rsb{visibility:hidden}
#gegner{position:absolute;z-index:33;right:2%;bottom:15px;height:calc((100% - var(--hud,0px))*.74);aspect-ratio:170/230;max-width:38%;pointer-events:none}
.gg-fig{width:100%;height:100%}.gg-fig svg{width:100%;height:100%;overflow:visible;scale:-1 1}   /* gespiegelt per scale-Eigenschaft: Schwimm-Animation (transform) bleibt frei */
#gegner.walk .lg1,#gegner.walk .ar2{animation:sw .45s ease-in-out infinite alternate}#gegner.walk .lg2,#gegner.walk .ar1{animation:sw .45s ease-in-out infinite alternate-reverse}#gegner.walk .ar2{animation-name:swa}
/* v416 MW3: Welt 5 – Gegner schwimmt wie die Heldin (hero.css v318 N12), nur gespiegelt: Kopf voraus nach links */
.scene.w5 #gegner .hshd{display:none}
.scene.w5 #gegner .gg-fig>svg{transform-origin:50% 55%;rotate:-78deg;scale:-.86 .86;translate:-30% -10%;animation:hswim 3.2s ease-in-out infinite alternate}
.scene.w5 #gegner .lg1,.scene.w5 #gegner.walk .lg1{animation:hkick .55s ease-in-out infinite alternate}.scene.w5 #gegner .lg2,.scene.w5 #gegner.walk .lg2{animation:hkick .55s ease-in-out infinite alternate-reverse}
.scene.w5 #gegner.walk .lg1,.scene.w5 #gegner.walk .lg2{animation-duration:.3s}
.scene.w5 #gegner .ar1,.scene.w5 #gegner.walk .ar1{animation:hstroke 1.6s ease-in-out infinite}.scene.w5 #gegner .ar2,.scene.w5 #gegner.walk .ar2{animation:hstroke2 1.6s ease-in-out infinite}
.gg-kopf{position:absolute;left:50%;bottom:100%;translate:-50% 0;display:flex;flex-direction:column;align-items:center;gap:1px;color:#fff;white-space:nowrap}
.gg-kopf b{font-size:clamp(.85rem,2.6vw,1.15rem);font-weight:900;padding:1px 10px;border-radius:999px;background:#0f0b2acc;max-width:44vw;overflow:hidden;text-overflow:ellipsis}
.gg-h{display:flex;gap:1px}.gg-h svg{width:clamp(1.1em,3.4vw,1.6em);height:auto}
/* v421 GA: Angriffs-Posen des Gegners wie bei der Heldin (hero.css): Stab kippt, Wurf, Bogen, Schwert-Hieb; Lauf zur Heldin per Web-Animation auf .gg-fig */
#gegner.zaubert .ar2.ar2{animation:hzaub .64s ease-in-out}#gegner.wirft .ar2.ar2{animation:hwurf .52s ease-in-out}#gegner.zielt .ar2.ar2{animation:hwurf .9s ease-in-out}#gegner.hieb .swd{animation:hslash 1.4s ease-in-out}
#gegner.hieb .lg1,#gegner.hieb .ar1{animation:sw .3s ease-in-out 4 alternate}#gegner.hieb .lg2{animation:sw .3s ease-in-out 4 alternate-reverse}
.gg-fig.au{animation:ggau .6s ease-in-out}@keyframes ggau{20%,60%{transform:translateX(-6%) rotate(-4deg);opacity:.55}40%,80%{transform:translateX(6%) rotate(4deg);opacity:1}}
.gg-fig.jubel{animation:ggjubel .7s ease-in-out 3}@keyframes ggjubel{50%{transform:translateY(-14%)}}
.gg-fig.ko{transform-origin:50% 100%;animation:ggko 1s cubic-bezier(.4,-.3,.6,1) forwards}@keyframes ggko{60%{transform:rotate(-80deg) translateY(10%);opacity:1}100%{transform:rotate(-90deg) translateY(10%);opacity:0}}
#dumsg{position:absolute;z-index:76;left:50%;top:calc(var(--hud,0px) + (100% - var(--hud,0px))*.3);translate:-50% -50%;text-align:center;font-weight:900;font-size:clamp(1.4rem,5vw,2.2rem);color:#fff;text-shadow:0 3px 0 #000,0 0 14px #000;pointer-events:none;width:min(90%,560px)}
#dumsg small{display:block;font-size:.6em;margin-top:.2em}
#dumsg.an{animation:dumitte .5s cubic-bezier(.2,1.6,.4,1)}@keyframes dumitte{0%{transform:scale(.3);opacity:0}100%{transform:scale(1);opacity:1}}
#dumsg.gross{font-size:clamp(2rem,8vw,4rem);color:#fde047}#dumsg.zahl{font-size:clamp(3rem,13vw,6rem)}#dumsg.los{font-size:clamp(3rem,12vw,5.5rem);color:#86efac}
#dumsg.gut{color:#86efac}#dumsg.schlecht{color:#fecaca}
#duraus{position:absolute;z-index:77;right:8px;top:calc(var(--hud,0px) + 8px);padding:6px 12px;border-radius:12px;border:2px solid #ffffff55;background:#0f0b2acc;color:#fff;font:inherit;font-weight:800;cursor:pointer;touch-action:manipulation}
#duerg{position:absolute;z-index:80;left:50%;top:44%;translate:-50% -50%;display:flex;flex-direction:column;align-items:center;gap:.3em;padding:.5em 1em .8em;border-radius:24px;background:#0f0b2ae6;border:3px solid #fbbf24;box-shadow:0 10px 30px #000a;color:#fde047;text-align:center;font-weight:900;font-size:clamp(1.5rem,6vw,2.6rem);width:max-content;max-width:92%;animation:dumitte .5s cubic-bezier(.2,1.6,.4,1)}
#duerg.niederlage{color:#e0e7ff;border-color:#a5b4fc}#duerg small{color:#fff;font-size:.5em}#duerg .du-pokal{font-size:1.5em;line-height:1}
#duerg button{margin-top:.3em;padding:.6em 1.4em;font:inherit;font-size:.55em;font-weight:900;border:0;border-radius:999px;background:linear-gradient(#fde047,#f59e0b);color:#3b0764;box-shadow:0 6px 18px #000a;cursor:pointer;touch-action:manipulation}
.du-flug{position:fixed;z-index:460;width:2.4em;height:2.4em;margin:-1.2em 0 0 -1.2em;pointer-events:none;animation:duflug .9s cubic-bezier(.4,0,.2,1) forwards}.du-flug svg{width:100%;height:100%}
@keyframes duflug{0%{transform:translate(0,0) scale(1.2)}50%{transform:translate(calc(var(--dx)*.5),calc(var(--dy)*.5 - 40px)) scale(2)}100%{transform:translate(var(--dx),var(--dy)) scale(1)}}
@media (prefers-reduced-motion:reduce){#hb.mppuls,#mpl.mppuls,.mp-gross,.gg-fig.jubel,.gg-fig.au,#gegner.zaubert .ar2.ar2,#gegner.wirft .ar2.ar2,#gegner.zielt .ar2.ar2,#gegner.hieb .swd,.scene.w5 #gegner .gg-fig>svg,.scene.w5 #gegner .lg1,.scene.w5 #gegner .lg2,.scene.w5 #gegner .ar1,.scene.w5 #gegner .ar2{animation:none}}
