@font-face { font-family: Cinzel; src: url(/fonts/cinzel-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Cinzel; src: url(/fonts/cinzel-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0c0812; --bg2: #160e22; --panel: rgba(30, 20, 44, .88); --panel2: rgba(46, 30, 66, .9);
  --line: rgba(232, 196, 106, .22); --gold: #e8c46a; --gold2: #ffdf8a; --text: #f1e9ff; --muted: #a497bb;
  --red: #ff4a5a; --green: #5ad87a; --blue: #4aa8ff;
  --rR: #4aa8ff; --rSR: #c05aff; --rSSR: #ffc83a; --rUR: #ff5a8a;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 15px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background-image:
    radial-gradient(ellipse at 20% -10%, rgba(255, 106, 61, .18), transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(179, 107, 255, .2), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(61, 184, 255, .12), transparent 60%);
  background-attachment: fixed; overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; }
h1, h2, h3, .cinzel { font-family: Cinzel, Georgia, serif; letter-spacing: .03em; margin: 0; }
h2 { font-size: 19px; color: var(--gold2); }
h3 { font-size: 15px; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; }
.gap { height: 10px; }
.hidden { display: none !important; }
.gold { color: var(--gold2); }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ── Layout ── */
#app { min-height: 100%; }
.shell { max-width: 1180px; margin: 0 auto; padding: calc(var(--safe-t) + 56px) 12px calc(var(--nav-h) + var(--safe-b) + 16px); }
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; padding: calc(var(--safe-t) + 6px) 10px 6px;
  background: linear-gradient(180deg, rgba(12, 8, 18, .97), rgba(12, 8, 18, .82)); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 8px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid var(--gold); flex: none; position: relative; cursor: pointer; }
.avatar svg { width: 100%; height: 100%; }
.pinfo { line-height: 1.1; min-width: 0; cursor: pointer; }
.pinfo b { font-family: Cinzel, serif; font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.pinfo span { font-size: 11px; color: var(--gold); }
.curs { margin-left: auto; display: flex; gap: 6px; }
.cur { background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 3px 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.cur i { font-style: normal; }

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 20; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: linear-gradient(0deg, rgba(10, 6, 16, .99), rgba(20, 12, 30, .95)); border-top: 1px solid var(--line);
  display: flex; justify-content: center; backdrop-filter: blur(8px);
}
.nav-in { display: flex; width: 100%; max-width: 720px; }
.nav button {
  flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10.5px; color: var(--muted); position: relative; cursor: pointer; font-family: Cinzel, serif; font-weight: 700;
}
.nav button .ic { font-size: 22px; filter: grayscale(.6) brightness(.8); transition: transform .15s; }
.nav button.on { color: var(--gold2); }
.nav button.on .ic { filter: none; transform: translateY(-3px) scale(1.12); }
.nav button.on::before { content: ''; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.badge { position: absolute; top: 6px; right: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: #fff; font: 700 10px/17px system-ui; text-align: center; padding: 0 4px; box-shadow: 0 0 6px var(--red); }
.dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); }

/* ── Panels & Buttons ── */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; position: relative; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.panel + .panel { margin-top: 10px; }
.panel.glow { box-shadow: 0 0 0 1px rgba(232, 196, 106, .35), 0 8px 30px rgba(232, 196, 106, .12); }
.ptitle { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.btn {
  border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; font-family: Cinzel, serif; font-size: 13.5px;
  background: linear-gradient(180deg, #ffe28a, #d59a2a 60%, #b0761a); color: #2a1604; box-shadow: 0 3px 0 #6a4208, 0 4px 12px rgba(232, 164, 60, .3);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35); transition: transform .08s, filter .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6a4208; }
.btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.btn.alt { background: linear-gradient(180deg, #5a3c8a, #3a2460); color: var(--text); box-shadow: 0 3px 0 #1e1034; text-shadow: none; }
.btn.red { background: linear-gradient(180deg, #ff6a6a, #b82a3a); color: #fff; box-shadow: 0 3px 0 #5a1018; text-shadow: none; }
.btn.green { background: linear-gradient(180deg, #7aff9a, #2a9a4a); color: #062a10; box-shadow: 0 3px 0 #0e4a1e; }
.btn.ghost { background: rgba(255, 255, 255, .06); color: var(--text); box-shadow: none; border: 1px solid var(--line); text-shadow: none; }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.big { padding: 14px 18px; font-size: 16px; }
.btn.full { width: 100%; }
.btn .cost { font-family: system-ui; font-size: 11px; opacity: .85; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); font-size: 12px; cursor: pointer; white-space: nowrap; }
.chip.on { background: rgba(232, 196, 106, .22); border-color: var(--gold); color: var(--gold2); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.tabs { display: flex; gap: 4px; background: rgba(0, 0, 0, .35); padding: 4px; border-radius: 12px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px 10px; border-radius: 9px; font-family: Cinzel, serif; font-weight: 700; font-size: 12.5px; color: var(--muted); cursor: pointer; position: relative; white-space: nowrap; }
.tabs button.on { background: linear-gradient(180deg, rgba(232, 196, 106, .28), rgba(232, 196, 106, .1)); color: var(--gold2); }
.bar { height: 8px; background: rgba(0, 0, 0, .55); border-radius: 5px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 5px; transition: width .3s; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
.stat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.stat-list div { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.stat-list span { color: var(--muted); }
.kv { display: flex; justify-content: space-between; font-size: 13px; }

/* ── Heldenkarten ── */
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; }
@media (min-width: 700px) { .hgrid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); } }
.hcard {
  position: relative; aspect-ratio: 5 / 6.4; border-radius: 12px; overflow: hidden; cursor: pointer; background: #1a1024;
  border: 2px solid var(--rc, #888); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .5), inset 0 0 14px rgba(0, 0, 0, .6);
  transition: transform .12s;
}
.hcard:active { transform: scale(.96); }
.hcard .portrait { position: absolute; inset: 0; width: 100%; height: 100%; }
.hcard.r-R { --rc: var(--rR); }
.hcard.r-SR { --rc: var(--rSR); }
.hcard.r-SSR { --rc: var(--rSSR); box-shadow: 0 0 12px rgba(255, 200, 58, .35), inset 0 0 14px rgba(0, 0, 0, .6); }
.hcard.r-UR { --rc: transparent; border-color: transparent; background: linear-gradient(#1a1024, #1a1024) padding-box, conic-gradient(from var(--a, 0deg), #ff5a8a, #ffd24a, #5affb4, #4aa8ff, #c05aff, #ff5a8a) border-box; animation: urspin 4s linear infinite; box-shadow: 0 0 16px rgba(255, 90, 138, .4); }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes urspin { to { --a: 360deg; } }
.hcard .rar { position: absolute; top: 4px; right: 5px; font: 800 11px Cinzel, serif; color: var(--rc); text-shadow: 0 0 4px #000, 0 0 2px #000; }
.hcard.r-UR .rar { background: linear-gradient(90deg, #ff5a8a, #ffd24a, #5affb4); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 2px #000); }
.hcard .fac { position: absolute; top: 3px; left: 4px; font-size: 13px; filter: drop-shadow(0 0 2px #000); }
.hcard .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 5px 4px; background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .6) 60%, transparent); }
.hcard .nm { font: 700 11.5px Cinzel, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .lv { font-size: 10.5px; color: var(--gold); display: flex; justify-content: space-between; }
.stars { color: #ffd24a; font-size: 10px; letter-spacing: -1px; text-shadow: 0 0 3px #000; }
.stars.asc { color: #ff5ad8; }
.hcard.locked { filter: grayscale(1) brightness(.35); }
.hcard.sel::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; color: var(--gold2); background: rgba(0, 0, 0, .45); text-shadow: 0 0 10px var(--gold); }
.hcard .tag { position: absolute; top: 20px; left: 4px; font-size: 9.5px; background: var(--gold); color: #2a1604; border-radius: 4px; padding: 0 4px; font-weight: 800; }
.hcard .pdot { position: absolute; top: 22px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ── Items ── */
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 7px; }
.islot {
  position: relative; aspect-ratio: 1; border-radius: 10px; cursor: pointer; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--ic) 38%, transparent), rgba(10, 6, 16, .9) 75%);
  border: 2px solid var(--ic); box-shadow: inset 0 0 10px rgba(0, 0, 0, .7);
}
.islot .icon { width: 72%; height: 72%; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); }
.islot .enh { position: absolute; top: 1px; right: 4px; font: 800 11px system-ui; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.islot .il { position: absolute; bottom: 1px; left: 4px; font: 700 9.5px system-ui; color: #ddd; text-shadow: 0 0 3px #000; }
.islot .eqd { position: absolute; bottom: 1px; right: 3px; width: 16px; height: 16px; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold); }
.islot .eqd svg { width: 100%; height: 100%; }
.islot .lk { position: absolute; top: 1px; left: 3px; font-size: 10px; }
.islot .socks { position: absolute; bottom: 2px; right: 3px; display: flex; gap: 1px; }
.islot .socks i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid #aaa; background: #000; }
.islot .socks i.f { background: var(--g); border-color: #fff; }
.islot.empty { --ic: #3a2e4a; background: rgba(0, 0, 0, .35); border-style: dashed; color: var(--muted); font-size: 11px; text-align: center; }
.islot.empty .slabel { font-size: 10px; font-family: Cinzel, serif; }
.islot.set::before { content: ''; position: absolute; top: 3px; left: 3px; width: 7px; height: 7px; transform: rotate(45deg); background: var(--sc); box-shadow: 0 0 5px var(--sc); }
.eqgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 700px) { .eqgrid { grid-template-columns: repeat(7, 1fr); } }
.gem { width: 34px; height: 34px; }
.gem.lg { width: 52px; height: 52px; }
.gem.sm { width: 22px; height: 22px; }
.affix { display: flex; justify-content: space-between; font-size: 13px; padding: 2px 0; }
.affix.main { font-weight: 700; color: var(--gold2); font-size: 14px; }
.sockrow { display: flex; gap: 8px; flex-wrap: wrap; }
.sock { width: 50px; height: 50px; border-radius: 50%; border: 2px dashed #6a5a7a; display: grid; place-items: center; cursor: pointer; background: rgba(0, 0, 0, .4); }
.sock.f { border-style: solid; border-color: var(--gold); box-shadow: 0 0 10px rgba(232, 196, 106, .3); }

/* ── Lager ── */
.camp-scene {
  position: relative; border-radius: 16px; overflow: hidden; min-height: 250px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 140, 40, .45), transparent 45%), linear-gradient(180deg, #1a1030 0%, #2a1638 45%, #3a1a1a 75%, #1a0e0a 100%);
}
.camp-scene .stars-bg { position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 30% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 15%, #fff, transparent), radial-gradient(1px 1px at 85% 30%, #fff, transparent), radial-gradient(1px 1px at 50% 25%, #ffd, transparent), radial-gradient(1px 1px at 20% 40%, #fff, transparent), radial-gradient(1px 1px at 92% 8%, #fff, transparent); opacity: .8; animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .35; } }
.camp-scene .moon { position: absolute; top: 16px; right: 22px; width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8e0, #e8d8a8); box-shadow: 0 0 30px rgba(255, 240, 200, .5); }
.camp-scene .mountains { position: absolute; left: 0; right: 0; bottom: 60px; height: 90px; background: linear-gradient(135deg, transparent 40%, #1a0e24 40.5%) 0 0/120px 90px repeat-x, linear-gradient(225deg, transparent 40%, #1a0e24 40.5%) 0 0/120px 90px repeat-x; opacity: .9; }
.camp-scene .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(180deg, #2a160e, #120806); }
.fire { position: absolute; left: 50%; bottom: 34px; width: 40px; height: 56px; transform: translateX(-50%); }
.fire i { position: absolute; bottom: 0; left: 50%; width: 26px; height: 44px; margin-left: -13px; border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 80%, #fff6a0, #ffb020 40%, #ff4a1a 75%, transparent 76%); animation: flame 0.6s ease-in-out infinite alternate; filter: blur(.5px); transform-origin: 50% 100%; }
.fire i:nth-child(2) { width: 18px; height: 32px; margin-left: -18px; animation-delay: .2s; opacity: .85; }
.fire i:nth-child(3) { width: 18px; height: 30px; margin-left: 0; animation-delay: .35s; opacity: .85; }
.fire::after { content: ''; position: absolute; bottom: -6px; left: -10px; right: -10px; height: 10px; border-radius: 4px; background: repeating-linear-gradient(60deg, #5a3a1a 0 8px, #3a2410 8px 14px); }
@keyframes flame { from { transform: scaleY(1) skewX(-3deg); } to { transform: scaleY(1.15) skewX(4deg); } }
.camp-team { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 4px; padding: 0 10px; }
.camp-team .mini { width: 17%; max-width: 86px; aspect-ratio: 5 / 6; border-radius: 10px; overflow: hidden; border: 2px solid var(--rc); animation: bob 2.6s ease-in-out infinite; box-shadow: 0 6px 16px rgba(0, 0, 0, .6); }
.camp-team .mini:nth-child(2) { animation-delay: .4s; margin-bottom: 14px; }
.camp-team .mini:nth-child(3) { animation-delay: .8s; margin-right: 50px; }
.camp-team .mini:nth-child(4) { animation-delay: 1.2s; margin-left: 0; }
.camp-team .mini:nth-child(5) { animation-delay: 1.6s; margin-bottom: 14px; }
.camp-team .mini svg { width: 100%; height: 100%; display: block; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.camp-hud { position: absolute; top: 10px; left: 12px; right: 76px; }
.camp-hud .chap { font-family: Cinzel, serif; font-size: 12px; color: var(--gold); }
.camp-hud .stg { font-family: Cinzel, serif; font-size: 20px; font-weight: 700; text-shadow: 0 2px 8px #000; }
.afk-chest { display: flex; gap: 12px; align-items: center; }
.afk-chest .chest-svg { width: 84px; flex: none; cursor: pointer; filter: drop-shadow(0 0 12px rgba(255, 210, 74, .35)); }
.afk-chest.full .chest-svg { animation: wiggle 1.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(-4deg); } 20% { transform: rotate(4deg); } 30% { transform: rotate(-2deg); } 40% { transform: rotate(0); } }
.afk-rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; }
.afk-rates div { background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 4px 6px; text-align: center; }
.twocol { display: grid; gap: 10px; }
@media (min-width: 900px) { .twocol { grid-template-columns: 1.1fr 1fr; align-items: start; } .twocol > * + * { margin-top: 0 !important; } }

/* ── Abenteuer-Karten ── */
.mode { position: relative; border-radius: 14px; overflow: hidden; padding: 14px; min-height: 110px; cursor: pointer; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; }
.mode + .mode { margin-top: 10px; }
.mode h2 { font-size: 20px; text-shadow: 0 2px 6px #000; }
.mode .ic { position: absolute; right: 12px; top: 8px; font-size: 44px; opacity: .85; filter: drop-shadow(0 0 10px rgba(0, 0, 0, .8)); }
.mode.locked { filter: grayscale(.9) brightness(.55); }
.modes { display: grid; gap: 10px; }
@media (min-width: 700px) { .modes { grid-template-columns: 1fr 1fr; } .mode + .mode { margin-top: 0; } }

/* ── Modals ── */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(4, 2, 8, .72); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(3px); animation: fadein .15s; }
@media (min-width: 700px) { .modal-wrap { align-items: center; } }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: linear-gradient(180deg, #221634, #150d20); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 14px 14px calc(14px + var(--safe-b)); animation: slideup .22s cubic-bezier(.2, .9, .3, 1.1); position: relative; }
.modal.wide { max-width: 860px; }
@media (min-width: 700px) { .modal { border-radius: 18px; } }
.modal .x { position: absolute; top: 8px; right: 10px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; z-index: 2; }
.modal h2 { margin-right: 36px; margin-bottom: 8px; }
@keyframes fadein { from { opacity: 0; } }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }

#toasts { position: fixed; top: calc(var(--safe-t) + 60px); left: 0; right: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(20, 12, 30, .96); border: 1px solid var(--gold); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; box-shadow: 0 6px 20px rgba(0, 0, 0, .6); animation: toast 2.6s forwards; max-width: 90vw; }
.toast.err { border-color: var(--red); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ── Belohnungen ── */
.rewards { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rw { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 58px; padding: 6px 4px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); font-size: 11.5px; animation: pop .35s backwards; }
.rw .e { font-size: 22px; line-height: 1; }
.rw .islot { width: 50px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ── Helden-Detail ── */
.hdetail { display: grid; gap: 12px; }
@media (min-width: 800px) { .hdetail { grid-template-columns: 300px 1fr; align-items: start; } }
.hero-big { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 5 / 6; border: 2px solid var(--rc); max-width: 360px; margin: 0 auto; width: 100%; }
.hero-big .portrait { width: 100%; height: 100%; display: block; }
.hero-big .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(0deg, rgba(0, 0, 0, .95), transparent); }
.hero-big .ov h2 { font-size: 22px; }
.hero-big .rarbig { position: absolute; top: 8px; right: 10px; font: 800 22px Cinzel, serif; color: var(--rc); text-shadow: 0 0 10px var(--rc), 0 0 3px #000; }
.hero-big .pw { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .6); border: 1px solid var(--gold); border-radius: 8px; padding: 2px 8px; font-weight: 800; color: var(--gold2); font-size: 13px; }
.hearts { color: #ff5a8a; letter-spacing: -1px; }

/* ── Team-Editor ── */
.formation { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 10px; }
.formation .fs { grid-column: span 2; aspect-ratio: 5 / 6.4; border-radius: 12px; border: 2px dashed #5a4a6a; display: grid; place-items: center; color: var(--muted); font-size: 11px; position: relative; cursor: pointer; background: rgba(0, 0, 0, .3); overflow: hidden; }
.formation .fs.front1 { grid-column: 2 / span 2; }
.formation .fs.front2 { grid-column: 4 / span 2; }
.formation .fs .hcard { position: absolute; inset: 0; aspect-ratio: auto; }
.formation .lbl { grid-column: 1 / -1; font: 700 11px Cinzel, serif; color: var(--gold); text-align: center; margin: -2px 0 -4px; }

/* ── Beschwörung ── */
.banner { position: relative; border-radius: 16px; overflow: hidden; padding: 14px; border: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; }
.banner + .banner { margin-top: 10px; }
.banner .chest-svg { width: 110px; }
.banner.b-standard { background: linear-gradient(120deg, rgba(90, 60, 20, .7), rgba(30, 16, 40, .9)); }
.banner.b-mythic { background: linear-gradient(120deg, rgba(120, 30, 140, .7), rgba(20, 10, 40, .9)); }
.banner.b-gear { background: linear-gradient(120deg, rgba(40, 80, 120, .6), rgba(16, 16, 30, .9)); }
.banner.b-gems { background: linear-gradient(120deg, rgba(20, 110, 80, .6), rgba(10, 20, 20, .9)); }
.banner .heroes-peek { position: absolute; right: -10px; top: -6px; display: flex; opacity: .22; pointer-events: none; }
.banner .heroes-peek svg { width: 70px; height: 84px; }
.pull-stage { position: fixed; inset: 0; z-index: 70; background: radial-gradient(ellipse at 50% 50%, #2a1840, #07040c 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.pull-stage .chest-svg { width: min(56vw, 240px); cursor: pointer; }
.pull-stage .chest-wrap { position: relative; display: grid; place-items: center; }
.pull-stage .chest-wrap.shake .chest-svg { animation: shake .12s linear infinite; }
.pull-stage .chest-wrap.open .chest-lid { transform: translateY(-40px) rotate(-18deg); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 20% 100%; }
.pull-stage .burst { position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--bc, #fff); box-shadow: 0 0 60px 30px var(--bc, #fff); opacity: 0; }
.pull-stage .open .burst { animation: burst 1s ease-out forwards; }
.pull-stage .rays { position: absolute; width: 520px; height: 520px; background: repeating-conic-gradient(from 0deg, var(--bc, #fff) 0 6deg, transparent 6deg 22deg); border-radius: 50%; mask: radial-gradient(circle, #000 10%, transparent 65%); -webkit-mask: radial-gradient(circle, #000 10%, transparent 65%); opacity: 0; animation: spin 8s linear infinite; pointer-events: none; }
.pull-stage .open .rays { opacity: .35; transition: opacity .6s; }
@keyframes shake { 0% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-3px, 1px) rotate(-2deg); } 50% { transform: translate(3px, -1px) rotate(2deg); } 75% { transform: translate(-2px, -2px) rotate(-1deg); } }
@keyframes burst { 0% { opacity: 1; transform: scale(.5); } 100% { opacity: 0; transform: scale(18); } }
@keyframes spin { to { transform: rotate(360deg); } }
.pull-hint { margin-top: 16px; font-family: Cinzel, serif; color: var(--gold); animation: twinkle 1s infinite alternate; }
.pull-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; width: 100%; max-width: 640px; }
@media (max-width: 500px) { .pull-grid { grid-template-columns: repeat(3, 1fr); } .pull-grid.one { grid-template-columns: 1fr; max-width: 220px; } }
.pull-grid.one { grid-template-columns: 1fr; max-width: 240px; }
.flip { perspective: 800px; aspect-ratio: 5 / 6.4; cursor: pointer; }
.flip .inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.3, 1.3, .5, 1); transform-style: preserve-3d; }
.flip.shown .inner { transform: rotateY(180deg); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; overflow: hidden; }
.flip .back { background: linear-gradient(135deg, #3a2460, #140a20); border: 2px solid var(--rc); display: grid; place-items: center; font-size: 30px; box-shadow: 0 0 18px var(--rc); }
.flip .back::after { content: '✦'; color: var(--rc); text-shadow: 0 0 12px var(--rc); }
.flip .front { transform: rotateY(180deg); }
.flip .front .hcard { position: absolute; inset: 0; aspect-ratio: auto; }
.flip.r-UR .back, .flip.r-SSR .back { animation: glowpulse .8s ease-in-out infinite alternate; }
@keyframes glowpulse { to { box-shadow: 0 0 34px var(--rc), 0 0 10px #fff; } }
.flip .newtag { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 3; background: var(--red); color: #fff; font: 800 10px system-ui; padding: 1px 6px; border-radius: 6px; opacity: 0; }
.flip.shown .newtag { opacity: 1; transition: opacity .3s .4s; }
.flip .ptag { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); z-index: 3; background: #3a2460; color: var(--gold2); font: 700 10px system-ui; padding: 1px 6px; border-radius: 6px; white-space: nowrap; opacity: 0; }
.flip.shown .ptag { opacity: 1; transition: opacity .3s .4s; }
.cutin-name { font: 800 22px Cinzel, serif; text-align: center; margin-top: 10px; }

/* ── Kampf ── */
.battle { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 50%, #2a1a3a, #0a0610 75%); overflow: hidden; }
.battle .bg-arena { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(255, 120, 60, .12), transparent 60%), repeating-radial-gradient(circle at 50% 52%, transparent 0 40px, rgba(232, 196, 106, .04) 40px 41px); pointer-events: none; }
.battle .bhead { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 12px 6px; }
.battle .bhead h3 { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 6vh, 70px); padding: 6px 8px calc(var(--safe-b) + 12px); max-width: 720px; width: 100%; margin: 0 auto; }
.side { display: flex; flex-direction: column; gap: 8px; }
.side.enemy { flex-direction: column; }
.side.ally { flex-direction: column-reverse; }
.brow { display: flex; justify-content: center; gap: 8px; }
.unit { position: relative; width: min(19vw, 104px); transition: transform .18s ease-out, opacity .5s, filter .5s; }
.unit .pf { position: relative; aspect-ratio: 5 / 6; border-radius: 10px; overflow: hidden; border: 2px solid var(--rc); box-shadow: 0 4px 12px rgba(0, 0, 0, .6); }
.unit .pf svg { width: 100%; height: 100%; display: block; }
.unit.boss .pf { border-color: #ff2a4a; box-shadow: 0 0 16px rgba(255, 42, 74, .6); }
.unit .hp, .unit .en { height: 6px; margin-top: 3px; border-radius: 3px; background: rgba(0, 0, 0, .7); overflow: hidden; position: relative; }
.unit .en { height: 4px; margin-top: 2px; }
.unit .hp i { display: block; height: 100%; background: linear-gradient(90deg, #3aff7a, #9aff5a); transition: width .25s; }
.unit.foe .hp i { background: linear-gradient(90deg, #ff3a4a, #ff8a5a); }
.unit .hp b { position: absolute; top: 0; right: 0; height: 100%; background: rgba(120, 200, 255, .85); transition: width .25s; }
.unit .en i { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #fff06a); transition: width .25s; }
.unit .en.full i { box-shadow: 0 0 8px #fff06a; animation: twinkle .4s infinite alternate; }
.unit .ulv { position: absolute; bottom: 2px; left: 3px; font: 700 9.5px system-ui; text-shadow: 0 0 3px #000; }
.unit .stunned { position: absolute; inset: 0; display: none; place-items: center; font-size: 24px; background: rgba(0, 0, 0, .35); }
.unit.stun .stunned { display: grid; }
.unit.dead { opacity: .25; filter: grayscale(1); transform: scale(.9) !important; }
.unit.act-a { transform: translateY(-18px) scale(1.06); z-index: 3; }
.unit.act-b { transform: translateY(18px) scale(1.06); z-index: 3; }
.unit.cast { z-index: 3; filter: drop-shadow(0 0 12px #fff06a) brightness(1.25); transform: scale(1.1); }
.unit.hit .pf { animation: hitshake .25s; }
.unit.hit .pf::after { content: ''; position: absolute; inset: 0; background: rgba(255, 60, 60, .45); animation: fadeout .3s forwards; }
.unit.healed .pf::after { content: ''; position: absolute; inset: 0; background: rgba(90, 255, 140, .35); animation: fadeout .4s forwards; }
@keyframes hitshake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
@keyframes fadeout { to { opacity: 0; } }
.fnum { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: 900 16px system-ui; color: #fff; text-shadow: 0 0 3px #000, 0 2px 0 #000; pointer-events: none; z-index: 5; animation: floatup .9s ease-out forwards; white-space: nowrap; }
.fnum.crit { color: #ffd24a; font-size: 21px; }
.fnum.crit::before { content: 'KRIT! '; font-size: 11px; }
.fnum.heal { color: #5aff8a; }
.fnum.sh { color: #7ad7ff; }
.fnum.miss { color: #bbb; font-size: 13px; }
.fnum.info { color: #ff9aff; font-size: 12px; }
.fnum.dot { color: #c07aff; font-size: 14px; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -4px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -38px) scale(1); } }
.vs-line { text-align: center; font: 800 12px Cinzel, serif; color: rgba(232, 196, 106, .45); letter-spacing: .4em; }
.cutin { position: absolute; left: 0; right: 0; top: 38%; height: 120px; z-index: 10; pointer-events: none; display: flex; align-items: center; overflow: hidden; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .85) 15%, rgba(0, 0, 0, .85) 85%, transparent); animation: cutin .9s ease-out forwards; }
.cutin.b { flex-direction: row-reverse; }
.cutin .cp { height: 150px; width: 125px; flex: none; margin: 0 14px; animation: cutslide .9s ease-out; }
.cutin .cp svg { width: 100%; height: 100%; }
.cutin .ct { flex: 1; font: 800 clamp(18px, 5vw, 28px) Cinzel, serif; color: #fff; text-shadow: 0 0 14px var(--fc, #ffd24a), 0 2px 0 #000; padding: 0 12px; }
.cutin.b .ct { text-align: right; }
.cutin .streak { position: absolute; inset: 0; background: repeating-linear-gradient(100deg, transparent 0 30px, rgba(255, 255, 255, .05) 30px 32px); animation: streak .9s linear; }
@keyframes cutin { 0% { opacity: 0; transform: scaleY(.2); } 15% { opacity: 1; transform: scaleY(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cutslide { from { transform: translateX(-60px); } }
@keyframes streak { from { background-position: 0 0; } to { background-position: 300px 0; } }
.bresult { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; background: rgba(6, 3, 10, .82); animation: fadein .3s; }
.bresult .title { font: 800 clamp(34px, 11vw, 64px) Cinzel, serif; letter-spacing: .05em; animation: pop .5s; }
.bresult .title.win { background: linear-gradient(180deg, #fff6c0, #ffc83a 50%, #c8761a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 20px rgba(255, 200, 58, .6)); }
.bresult .title.lose { color: #9a8aaa; }
.dmg-meter { width: 100%; max-width: 380px; }
.dmg-meter .dm { display: grid; grid-template-columns: 26px 1fr 60px; gap: 6px; align-items: center; font-size: 11.5px; margin: 3px 0; }
.dmg-meter .dm svg { width: 26px; height: 30px; border-radius: 5px; }

/* ── Roguelike ── */
.rogue-path { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.rnode { width: 96px; padding: 12px 6px; border-radius: 14px; text-align: center; cursor: pointer; border: 2px solid var(--nc); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--nc) 30%, transparent), rgba(0, 0, 0, .6)); transition: transform .12s; }
.rnode:active { transform: scale(.95); }
.rnode .i { font-size: 30px; }
.rnode b { display: block; font: 700 12px Cinzel, serif; margin-top: 2px; }
.floors { display: flex; gap: 4px; justify-content: center; margin: 8px 0; }
.floors i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.floors i.done { background: var(--gold); }
.floors i.cur { background: var(--red); box-shadow: 0 0 6px var(--red); }
.relic { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, .35); border: 1px solid var(--rlc, var(--line)); font-size: 12px; }
.relic-card { padding: 12px; border-radius: 12px; border: 2px solid var(--rlc); background: rgba(0, 0, 0, .35); cursor: pointer; text-align: center; }
.relic-card .i { font-size: 34px; }
.rteam { display: flex; gap: 6px; justify-content: center; }
.rteam .m { width: 58px; }
.rteam .m .pf { aspect-ratio: 5 / 6; border-radius: 8px; overflow: hidden; border: 2px solid var(--rc); }
.rteam .m .pf svg { width: 100%; height: 100%; display: block; }
.rteam .m.dead { filter: grayscale(1) brightness(.4); }

/* ── Rangliste ── */
.lb-row { display: grid; grid-template-columns: 36px 40px 1fr auto; gap: 8px; align-items: center; padding: 7px 6px; border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: pointer; }
.lb-row.me { background: rgba(232, 196, 106, .12); border-radius: 8px; }
.lb-row .rk { font: 800 15px Cinzel, serif; text-align: center; color: var(--muted); }
.lb-row .rk.r1 { color: #ffd24a; font-size: 20px; }
.lb-row .rk.r2 { color: #dfe8ff; font-size: 18px; }
.lb-row .rk.r3 { color: #e0955a; font-size: 17px; }
.lb-row .av { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); }
.lb-row .av svg { width: 100%; height: 100%; }
.lb-row .v { font-weight: 800; color: var(--gold2); }

/* ── Quests ── */
.quest { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.quest .qb { flex: 1; min-width: 0; }
.quest .qn { font-size: 13.5px; }
.quest.done { opacity: .5; }
.act-track { position: relative; height: 12px; margin: 26px 8px 30px; background: rgba(0, 0, 0, .5); border-radius: 6px; }
.act-track > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 6px; }
.act-track .ach { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 26px; cursor: pointer; filter: grayscale(1) brightness(.6); text-align: center; }
.act-track .ach.ready { filter: none; animation: wiggle 1.2s infinite; }
.act-track .ach.got { filter: none; opacity: .45; }
.act-track .ach small { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); }

/* ── Läden ── */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.offer { background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; }
.offer.sold { opacity: .4; }
.offer .big { font-size: 32px; line-height: 1; }
.offer .islot { width: 62px; }

/* ── Login ── */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 16px; }
.login .logo { font: 800 clamp(36px, 11vw, 64px) Cinzel, serif; text-align: center; background: linear-gradient(180deg, #fff6c0, #ffc83a 45%, #b8561a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 22px rgba(255, 140, 60, .45)); line-height: 1; }
.login .sub { font-family: Cinzel, serif; color: var(--muted); letter-spacing: .25em; font-size: 12px; text-align: center; }
.login .trio { display: flex; justify-content: center; margin-top: 8px; }
.login .trio .hcard { width: 110px; }
.login .trio .hcard:nth-child(1) { transform: rotate(-8deg) translate(18px, 8px); }
.login .trio .hcard:nth-child(2) { z-index: 2; width: 130px; }
.login .trio .hcard:nth-child(3) { transform: rotate(8deg) translate(-18px, 8px); }
.login form { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
input, select { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .45); color: var(--text); font: inherit; font-size: 16px; }
input:focus { outline: 2px solid var(--gold); }

.empty-note { padding: 24px; text-align: center; color: var(--muted); }
.pulse { animation: glowpulse 1s infinite alternate; }
.lvlup { animation: pop .3s; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(232, 196, 106, .3); border-radius: 3px; }
