@font-face { font-family: 'Fredoka'; src: url('../../../../assets/fonts/Fredoka.ttf') format('truetype'); font-weight: 300 700; font-display: swap; }
:root {
  --bg: #0c1210; --panel: #15201c; --panel2: #1c2a25; --line: #2c4038; --text: #e8f3ec; --muted: #8fa89b;
  --acc: #7cff6b; --acc2: #4fc3f7; --bad: #ff5252; --gold: #69f0ae;
  --r0: #c9d1d9; --r1: #4aa3ff; --r2: #b56cff; --r3: #ff5a5a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: Fredoka, system-ui, 'Segoe UI', sans-serif; overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; }
input { font-family: inherit; -webkit-user-select: text; user-select: text; }

.btn { background: var(--panel2); color: var(--text); border: 2px solid var(--line); border-radius: 12px; padding: 10px 16px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform .08s, background .15s, border-color .15s; }
.btn:hover:not(:disabled) { border-color: var(--acc); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--acc); color: #0b200a; border-color: var(--acc); }
.btn.primary:hover:not(:disabled) { background: #a5ff98; }
.btn.big { font-size: 19px; padding: 13px 20px; }
.btn.small { font-size: 13px; padding: 5px 9px; border-radius: 9px; }
.ib { background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.15); color: #fff; border-radius: 10px; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }

/* ---------- Bildschirme ---------- */
.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; background: radial-gradient(ellipse at 50% 40%, rgba(8,14,12,.35) 0%, rgba(4,6,8,.82) 75%); z-index: 10; }
#s-shop { background: rgba(6,10,9,.93); }
.menu-card, .panel { backdrop-filter: blur(6px); background: rgba(21,32,28,.86) !important; }
.logo { animation: logo 3s ease-in-out infinite; }
@keyframes logo { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
.btn.primary { box-shadow: 0 0 22px rgba(124,255,107,.35); }
.card { transition: transform .15s, box-shadow .15s; } .card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.card.r3 { box-shadow: 0 0 18px rgba(255,90,90,.35); } .card.r2 { box-shadow: 0 0 14px rgba(181,108,255,.3); }
.card { animation: cardin .35s backwards; } .card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; } .card:nth-child(4) { animation-delay: .15s; }
@keyframes cardin { from { transform: translateY(16px) scale(.96); opacity: 0; } }
.screen.dim { background: rgba(5,10,8,.78); backdrop-filter: blur(3px); }
.menu-card, .panel { background: var(--panel); border: 2px solid var(--line); border-radius: 20px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.5); margin: auto; }
.panel.wide { max-width: 920px; }
.logo { margin: 0; font-size: clamp(30px, 8vw, 48px); letter-spacing: 1px; line-height: 1; color: var(--acc); text-shadow: 0 4px 0 #1f5a18; text-align: center; }
.logo span { color: #fff; text-shadow: 0 4px 0 #333; }
.tag { text-align: center; color: var(--muted); margin: 10px 0 20px; }
.field { display: block; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.field input, .join-row input { display: block; width: 100%; margin-top: 6px; background: #0e1714; border: 2px solid var(--line); color: var(--text); border-radius: 12px; padding: 11px 14px; font-size: 17px; outline: none; }
.field input:focus, .join-row input:focus { border-color: var(--acc2); }
.btns { display: flex; flex-direction: column; gap: 10px; }
.join-row { display: flex; gap: 8px; }
.join-row input { margin: 0; text-transform: uppercase; letter-spacing: 4px; font-weight: 700; text-align: center; }
.err { color: var(--bad); text-align: center; margin: 12px 0 0; }
.help { margin-top: 18px; color: var(--muted); font-size: 14px; }
.help summary { cursor: pointer; color: var(--text); }
.help li { margin: 6px 0; }
h2 { margin: 0 0 16px; font-size: 26px; }
h3 { margin: 14px 0 8px; font-size: 17px; color: var(--muted); font-weight: 600; }
.row { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 14px; }

/* Figuren */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.chars.small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.char { background: var(--panel2); border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.char:hover { border-color: var(--acc2); }
.char.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.char .head { display: flex; align-items: center; gap: 10px; }
.char canvas { width: 44px; height: 44px; flex: none; }
.char b { font-size: 17px; }
.char small { color: var(--muted); font-size: 13px; }
.char .st { font-size: 12.5px; line-height: 1.35; }
.chars.small .char .st, .chars.small .char small { display: none; }

/* Lobby */
.code-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #0e1714; border: 2px dashed var(--line); border-radius: 14px; padding: 12px 16px; }
.code-box small { color: var(--muted); }
.code { font-size: 40px; font-weight: 700; letter-spacing: 8px; color: var(--acc); }
.code-box > div { flex: 1; min-width: 180px; }
.lobby-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; }
@media (max-width: 700px) { .lobby-grid { grid-template-columns: 1fr; } }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plist li { background: var(--panel2); border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; }
.plist .dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.plist .ch { margin-left: auto; color: var(--muted); font-size: 14px; }
.plist .mode { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#hud button { pointer-events: auto; }
.hud-left { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 6px; width: min(260px, 42vw); }
.bar { position: relative; height: 24px; background: rgba(0,0,0,.6); border: 2px solid rgba(0,0,0,.8); border-radius: 8px; overflow: hidden; }
.bar .fill { position: absolute; inset: 0; width: 100%; transition: width .12s; }
.bar.hp .fill { background: linear-gradient(#ff6b6b, #c62828); }
.bar.xp { height: 16px; }
.bar.xp .fill { background: linear-gradient(#69f0ae, #2e7d32); }
.bar span { position: relative; display: block; text-align: center; font-weight: 700; font-size: 14px; line-height: 20px; text-shadow: 0 1px 2px #000; }
.bar.xp span { font-size: 11px; line-height: 13px; }
.gold { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 20px; text-shadow: 0 2px 2px #000; }
.gold.big { font-size: 26px; }
.shard { display: inline-block; width: 14px; height: 18px; background: var(--gold); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
#mates { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.mate { display: flex; align-items: center; gap: 6px; font-size: 12px; text-shadow: 0 1px 2px #000; }
.mate .mb { flex: 1; height: 6px; background: rgba(0,0,0,.6); border-radius: 3px; overflow: hidden; max-width: 110px; }
.mate .mb i { display: block; height: 100%; background: #ff5252; }
.mate.dead { opacity: .5; }
.hud-center { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 3px #000; }
.wave { font-size: 18px; font-weight: 700; color: var(--muted); }
.timer { font-size: 42px; font-weight: 700; line-height: 1; }
.timer.low { color: #ffd740; }
.bossbar { margin-top: 8px; width: min(420px, 60vw); height: 18px; position: relative; background: rgba(0,0,0,.6); border: 2px solid #000; border-radius: 8px; overflow: hidden; }
.bossbar .fill { position: absolute; inset: 0; background: linear-gradient(#ff5252, #8e0000); }
.bossbar span { position: relative; z-index: 1; font-size: 12px; font-weight: 700; line-height: 14px; }
.hud-right { position: absolute; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; }
.net { font-size: 11px; background: rgba(0,0,0,.5); padding: 3px 7px; border-radius: 6px; color: var(--muted); }
#banner { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); font-size: clamp(30px, 7vw, 60px); font-weight: 700; text-shadow: 0 4px 0 #000, 0 0 30px rgba(0,0,0,.6); white-space: nowrap; animation: pop .35s ease-out; }
#dead-msg { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); background: rgba(0,0,0,.7); padding: 10px 16px; border-radius: 12px; text-align: center; max-width: 90vw; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

#stick { position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.2); z-index: 4; pointer-events: none; }
#knob { position: absolute; left: 35px; top: 35px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.35); }

/* Laden */
#s-shop { align-items: stretch; padding: 10px; }
.shop { width: 100%; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.shop-top h2 { margin: 0; }
.offers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 900px) { .offers { grid-template-columns: repeat(2, 1fr); } }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-height: 190px; position: relative; }
.card.sold { opacity: .3; min-height: 190px; display: flex; align-items: center; justify-content: center; }
.card .nm { font-weight: 700; font-size: 17px; }
.card .ty { font-size: 12px; color: var(--muted); }
.card .ds { font-size: 13.5px; line-height: 1.4; flex: 1; }
.card .buy { margin-top: auto; display: flex; gap: 6px; }
.card .buy .btn { flex: 1; }
.card .lock { position: absolute; right: 8px; top: 8px; background: none; border: none; font-size: 18px; cursor: pointer; opacity: .5; }
.card .lock.on { opacity: 1; }
.card.locked { box-shadow: 0 0 0 2px #ffd740 inset; }
.good { color: #69f0ae; } .bad { color: #ff6e6e; } .fxd { color: #ffd59a; }
.r0 { border-color: var(--r0) !important; } .r1 { border-color: var(--r1) !important; } .r2 { border-color: var(--r2) !important; } .r3 { border-color: var(--r3) !important; }
.t0 { color: var(--r0); } .t1 { color: var(--r1); } .t2 { color: var(--r2); } .t3 { color: var(--r3); }
.shop-actions { display: flex; justify-content: flex-end; }
.inv { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
@media (max-width: 760px) { .inv { grid-template-columns: 1fr; } }
.inv-col { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 4px 12px 12px; }
.wslots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.slot { aspect-ratio: 1; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; padding: 0; color: var(--text); }
.slot canvas { width: 80%; height: 80%; object-fit: contain; }
.slot.empty { opacity: .35; cursor: default; }
.slot.sel { box-shadow: 0 0 0 3px #fff inset; }
.slot .tn { position: absolute; left: 4px; top: 2px; font-size: 11px; font-weight: 700; }
.items { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; }
.it { width: 46px; height: 46px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; cursor: pointer; position: relative; color: var(--text); padding: 0; }
.it .cnt { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.detail { margin-top: 10px; background: #0e1714; border-radius: 10px; padding: 10px; font-size: 13.5px; min-height: 60px; line-height: 1.45; }
.detail .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
table.stats { width: 100%; border-collapse: collapse; font-size: 14px; }
table.stats td { padding: 3px 4px; border-bottom: 1px solid rgba(255,255,255,.05); }
table.stats td:last-child { text-align: right; font-weight: 700; }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-top: 14px; }
.ready-list { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ready-list span { background: var(--panel2); border-radius: 8px; padding: 4px 9px; }
.ready-list span.ok { background: #1f4d22; }
#lvl-box { background: var(--panel); border: 2px solid var(--acc); border-radius: 14px; padding: 6px 14px 14px; }
#lvl-box h3 { color: var(--acc); }
.lvl-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .lvl-cards { grid-template-columns: repeat(2, 1fr); } }
.lvl { background: var(--panel2); border: 2px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center; cursor: pointer; font-size: 16px; font-weight: 700; color: var(--text); }
.lvl:hover { transform: translateY(-2px); }
.lvl small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; z-index: 50; pointer-events: none; }
.toast { background: rgba(0,0,0,.85); border: 1px solid var(--line); padding: 9px 16px; border-radius: 10px; font-size: 15px; animation: fade 3s forwards; max-width: 90vw; text-align: center; }
@keyframes fade { 0% { opacity: 0; transform: translateY(8px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 600px) {
  .timer { font-size: 32px; }
  .hud-left { width: 46vw; }
  .bar { height: 20px; } .bar span { font-size: 12px; line-height: 16px; }
  .card { min-height: 160px; padding: 8px; } .card .ds { font-size: 12.5px; }
  .wslots { grid-template-columns: repeat(6, 1fr); }
  h2 { font-size: 22px; }
}

.board-box { background: #0e1714; border-radius: 12px; padding: 4px 12px 12px; margin: 12px 0; }
.board-acts { margin: 8px 0; }
.board-top tr.me td { color: var(--acc); }
#s-end .panel { max-width: 520px; }
.it > span:first-child { font-size: 22px; line-height: 1; }
#tip { position: fixed; z-index: 100; max-width: 320px; background: rgba(8,14,12,.96); border: 1px solid var(--acc); border-radius: 10px; padding: 9px 12px; font-size: 13.5px; line-height: 1.45; pointer-events: none; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
[data-stat] { cursor: help; }
.stl { border-bottom: 1px dotted rgba(255,255,255,.25); }
table.stats .q { color: var(--muted); font-size: 10px; border: 1px solid var(--line); border-radius: 50%; padding: 0 4px; }
table.stats tr[data-stat]:hover td { background: rgba(124,255,107,.07); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #22302b; color: var(--muted); }
.tag.fit { background: #24461f; color: #b9f6ca; }
.tag.star { background: #4d3d10; color: #ffd740; }
.card { animation: none !important; }
.offers.anim .card { animation: cardin .35s backwards !important; }
.offers.anim .card:nth-child(2) { animation-delay: .05s !important; } .offers.anim .card:nth-child(3) { animation-delay: .1s !important; } .offers.anim .card:nth-child(4) { animation-delay: .15s !important; }
#shop-main.blocked { opacity: .35; pointer-events: none; }
#lvl-cards .card.crate { grid-column: 1 / -1; max-width: 420px; min-height: 0; }
.card .buy .btn + .btn { flex: 1; }
.lobby-set { margin-top: 12px; background: var(--panel2); border-radius: 10px; padding: 10px 12px; }
.lobby-set .opts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.lobby-set .btn.on { border-color: var(--acc); background: #24461f; }
.char-info { margin-top: 10px; background: #0e1714; border-radius: 10px; padding: 10px; font-size: 13.5px; line-height: 1.45; }
.cbonus { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.cbrow { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; }
.cbrow b { min-width: 120px; }
.cb { padding: 2px 7px; border-radius: 6px; background: #1a2420; color: #5f7268; }
.cb.on { background: #24461f; color: #b9f6ca; }
.cb-warn { font-size: 12.5px; color: #ffd59a; }
.danger-box { margin-top: 14px; background: #0e1714; border-radius: 12px; padding: 10px 12px; }
.dg-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.dg-row { align-items: center; }
.dg-l { font-size: 14px; margin-right: 6px; }
.btn.dg { min-width: 42px; font-weight: 700; color: #fff; }
.btn.dg1 { background: #1f3a24; } .btn.dg2 { background: #3a3a1f; } .btn.dg3 { background: #4a321b; } .btn.dg4 { background: #4a1f1b; } .btn.dg5 { background: #3d0f1d; }
.btn.dg.on { border-color: #fff; box-shadow: 0 0 0 2px #ff5252; }
.dg-d { font-size: 13px; }
.lobby-dg { margin-top: 10px; }
.dsrc { display: grid; grid-template-columns: 130px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.dsrc i { display: block; height: 9px; border-radius: 5px; background: linear-gradient(90deg, #7cff6b, #4fc3f7); }
.dsrc b { text-align: right; }
#hint { position: absolute; left: 50%; top: 104px; transform: translateX(-50%); z-index: 60; background: rgba(8,14,12,.92); border: 2px solid var(--acc); border-radius: 14px; padding: 10px 16px; font-size: 16px; max-width: min(560px, 92vw); text-align: center; pointer-events: none; animation: hintin .3s ease-out; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
@keyframes hintin { from { transform: translate(-50%, -10px); opacity: 0; } }

.offers { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important; }
.path-map { font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.path-map .pm { background: var(--panel2); border-radius: 8px; padding: 2px 8px; }
.path-map .pm.cur { background: #24461f; color: #b9f6ca; }
#path-box { background: var(--panel); border: 2px solid #ffd740; border-radius: 14px; padding: 4px 14px 14px; box-shadow: 0 0 30px rgba(255,215,64,.15); }
#path-box h3 { color: #ffd740; }
.path-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 760px) { .path-cards { grid-template-columns: 1fr; } }
.pcard { background: var(--panel2); border: 2px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: var(--text); text-align: left; transition: transform .12s, border-color .12s; }
.pcard:hover { transform: translateY(-3px); border-color: #ffd740; }
.pcard.mine { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc) inset; }
.pcard .pic { font-size: 34px; line-height: 1; }
.pcard .pn { font-size: 18px; font-weight: 700; }
.pcard .risk { color: #ff8a80; font-size: 13px; }
.pcard .perm { font-size: 12px; color: #ffd740; }
.pcard .boss { font-size: 12.5px; color: var(--muted); }
.pcard .votes { font-size: 12.5px; color: #b9f6ca; min-height: 16px; }
.wave small { font-size: 13px; opacity: .8; }
#map-ov { position: fixed; inset: 0; z-index: 70; background: rgba(4,8,6,.88); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 10px; overflow-y: auto; }
.map-panel { width: 100%; max-width: 760px; background: linear-gradient(#1c2a22, #121b16); border: 2px solid #5d4c2e; border-radius: 18px; padding: 14px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.6); margin: auto; }
.map-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.map-head h2 { margin: 0; color: #ffd740; }
#map-svg svg { width: 100%; height: auto; display: block; }
#map-svg .edge { stroke: #4b5a50; stroke-width: 3; stroke-dasharray: 6 7; }
#map-svg .edge.done { stroke: #69f0ae; stroke-width: 6; stroke-dasharray: none; }
#map-svg .edge.open { stroke: #ffd740; stroke-width: 4; stroke-dasharray: 10 6; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
#map-svg .node circle { fill: #26332c; stroke: #5f7268; stroke-width: 3; }
#map-svg .node.done circle { fill: #1f4d22; stroke: #69f0ae; }
#map-svg .node.cur circle { fill: #2e6b33; stroke: #b9f6ca; stroke-width: 5; }
#map-svg .node.open circle { fill: #4d3d10; stroke: #ffd740; stroke-width: 4; }
#map-svg .node.open.click { cursor: pointer; }
#map-svg .node.open.click:hover circle { fill: #6b5416; }
#map-svg .node.mine circle { stroke: #7cff6b; stroke-width: 6; }
#map-svg .node.boss circle { fill: #4a1b1b; stroke: #ff5252; stroke-width: 5; }
#map-svg .node text.ic { font-size: 24px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#map-svg .node.boss text.ic { font-size: 34px; }
#map-svg .node text.vt { font-size: 12px; fill: #b9f6ca; text-anchor: middle; pointer-events: none; }
#map-svg .node text.nm { font-size: 11px; fill: #c9d6cf; text-anchor: middle; pointer-events: none; }
#map-svg .pulse { fill: none; stroke: #ffd740; stroke-width: 3; opacity: .7; animation: pulse 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.map-info { background: #0e1714; border-radius: 10px; padding: 8px 12px; margin: 8px 0; min-height: 40px; font-size: 14px; }
.map-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.map-legend b { color: var(--text); }
.passive { font-size: 13px; font-weight: 700; background: rgba(0,0,0,.55); border-radius: 8px; padding: 3px 8px; align-self: flex-start; text-shadow: 0 1px 2px #000; }
.pd { color: #ffd740; }

/* ===== Alles auf eine Seite (kein Scrollen) ===== */
.screen { overflow: hidden; }
.menu-card, .panel { max-height: calc(100dvh - 24px); overflow: hidden; display: flex; flex-direction: column; }
.panel h2 { margin-bottom: 10px; }
#s-shop { padding: 8px; align-items: stretch; }
.shop { height: calc(100dvh - 16px); max-width: 1300px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.shop-top { flex: none; display: flex; align-items: center; gap: 14px; }
.shop-top h2 { font-size: 20px; white-space: nowrap; margin: 0; }
.shop-top .path-map { flex: 1; min-width: 0; font-size: 13px; }
.gold.big { font-size: 24px; }
#shop-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 230px; grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
#shop-main.blocked { opacity: 1; pointer-events: none; }
.offers-wrap { grid-column: 1; grid-row: 1; }
.offers-head { display: flex; align-items: center; justify-content: space-between; }
.offers-head h3 { margin: 0 0 4px; }
.offers { gap: 8px; }
.card { min-height: 0 !important; padding: 8px 10px; gap: 3px; }
.card .nm { font-size: 15px; }
.card .ds { font-size: 12.5px; line-height: 1.3; }
.card .buy .btn { padding: 7px 10px; font-size: 14px; }
.inv-col { grid-column: 1; grid-row: 2; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 2px 12px 10px; }
.inv-col h3 { margin: 6px 0 4px; font-size: 15px; }
.wslots { flex: none; gap: 5px; }
.slot { aspect-ratio: auto; height: 52px; }
.items { flex: none; }
.it { width: 40px; height: 40px; }
.detail { flex: 1; min-height: 40px; overflow: auto; margin-top: 6px; }
.stats-col { grid-column: 2; grid-row: 1 / span 2; min-height: 0; overflow: hidden; padding: 2px 10px 8px; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; }
.stats-col h3 { margin: 6px 0; display: flex; justify-content: space-between; align-items: center; }
.stats2 .srow { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; padding: 2px 3px; border-bottom: 1px solid rgba(255,255,255,.05); cursor: help; }
.stats2 .srow:hover { background: rgba(124,255,107,.07); }
.shop-foot { flex: none; position: static; padding: 0; background: none; }
.stats-toggle, .stats-close { display: none !important; }
#lvl-box { position: absolute; inset: 0; z-index: 8; background: rgba(5,10,8,.78); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; border: none; padding: 16px; box-shadow: none; }
#lvl-box.hidden { display: none !important; }
.lvl-inner { background: var(--panel); border: 2px solid var(--acc); border-radius: 16px; padding: 6px 18px 18px; width: 100%; max-width: 920px; }
.lvl-inner h3 { color: var(--acc); }
@media (max-width: 860px) {
  #shop-main { grid-template-columns: minmax(0, 1fr); }
  .stats-col { display: none; }
  .stats-col.open { display: block; position: absolute; right: 8px; top: 50px; bottom: 60px; width: 250px; z-index: 9; overflow: auto; }
  .stats-toggle, .stats-close { display: inline-flex !important; }
  .card .ds { font-size: 11.5px; }
}
@media (max-height: 760px) {
  .card .ds { font-size: 11.5px; line-height: 1.25; }
  .card .tags { display: none; }
  .slot { height: 44px; }
  .shop-top h2 { font-size: 17px; }
}
/* Figurenwahl kompakt */
.chars.compact { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.chars.compact .char { padding: 8px; gap: 2px; align-items: center; text-align: center; }
.chars.compact .char .head { flex-direction: column; gap: 2px; }
.chars.compact .char .st, .chars.compact .char > small { display: none; }
.chars.compact .char canvas { width: 40px; height: 40px; }
.chars.compact .char b { font-size: 14px; }
.chars.small .char { padding: 6px 8px; }
.chars.small .char canvas { width: 30px; height: 30px; }
.chars.small { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.char-info { height: 122px; box-sizing: border-box; overflow-y: auto; font-size: 13px; line-height: 1.4; } /* feste Hoehe: sonst springt das Fenster beim Drueberfahren */
#s-chars .char-info { margin-top: 10px; background: #0e1714; border-radius: 10px; padding: 10px; }
/* Karte passt in den Bildschirm */
#map-ov { overflow: hidden; }
.map-panel { max-height: calc(100dvh - 20px); display: flex; flex-direction: column; padding: 10px 16px; }
#map-svg { flex: 1; min-height: 0; display: flex; justify-content: center; }
#map-svg svg { width: auto !important; max-width: 100%; height: 100% !important; max-height: calc(100dvh - 250px); }
.map-info { flex: none; margin: 6px 0; }
.map-leg { flex: none; font-size: 13px; }
.map-leg summary { cursor: pointer; color: var(--muted); }
.map-leg .map-legend { max-height: 140px; overflow: auto; margin-top: 6px; }
/* Ende */
#s-end .panel { overflow: hidden; }
#end-stats { font-size: 13px; }
.board-top tr:nth-child(n+7) { display: none; }
.offers { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }

/* Viele Spieler (bis 15): Listen kompakt, damit alles auf eine Seite passt */
.plist.many { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; }
.plist.many li { padding: 4px 8px; gap: 6px; font-size: 12.5px; min-width: 0; }
.plist.many li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist.many .ch { font-size: 11.5px; }
.plist.many .mode { display: none; }
#mates.many { display: grid; grid-template-columns: repeat(2, 128px); gap: 2px 10px; }
#mates.many .mate { font-size: 10.5px; gap: 4px; white-space: nowrap; overflow: hidden; }
#mates.many .mate .mb { max-width: 54px; height: 5px; }
.ready-list.many { gap: 4px; font-size: 12px; }
.ready-list.many span { padding: 2px 6px; }
/* Lobby kompakt: 18 Figuren + bis zu 15 Spieler auf einer Seite */
#s-lobby .panel { padding: 16px 20px; }
#s-lobby h2 { margin: 0 0 8px; }
#s-lobby h3 { margin: 8px 0 6px; }
#s-lobby .code-box { padding: 8px 14px; }
#s-lobby .code { font-size: 30px; }
#chars-lobby { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 4px; }
#chars-lobby .char { padding: 3px 6px; min-width: 0; }
#chars-lobby .char .head { gap: 5px; min-width: 0; }
#chars-lobby .char canvas { width: 24px; height: 24px; }
#chars-lobby .char b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#s-lobby .char-info { height: 104px; font-size: 12px; margin-top: 6px; background: #0e1714; border-radius: 10px; padding: 8px 10px; }
#s-lobby #b-tut-reset { margin-top: 6px; font-size: 11px; padding: 4px 8px; }
#s-lobby #lobby-hint { margin: 6px 0; }
#s-lobby .lobby-set { margin-top: 6px; padding: 8px 10px; }