:root {
  --void: #07060b;
  --stone: #13101a;
  --stone2: #1c1825;
  --stone3: #282233;
  --edge: #3a3346;
  --bone: #ece3cf;
  --ash: #8f8699;
  --ember: #ffb347;
  --ember-deep: #d9541e;
  --spirit: #7fe3ff;
  --blood: #e0384a;
  --moss: #7be07a;
  --epic: #ffb347;
  --rare: #7fe3ff;
  --common: #a69db2;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", monospace;
  --notch: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  --notch-s: polygon(4px 0, calc(100% - 4px) 0, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px), 0 4px);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: var(--void); color: var(--bone); font-family: var(--mono);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
/* Filmkorn über allem */
body::after {
  content: ""; position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain { 0% { transform: translate(0,0) } 25% { transform: translate(-3%,2%) } 50% { transform: translate(2%,-3%) } 75% { transform: translate(-2%,-1%) } 100% { transform: translate(0,0) } }
#screen { position: fixed; left: 0; top: 0; image-rendering: pixelated; cursor: crosshair; }
.hidden { display: none !important; }
img.pt { image-rendering: pixelated; display: inline-block; vertical-align: middle; max-width: 100%; }

/* ---------- HUD ---------- */
#hud { position: fixed; left: 0; right: 0; top: 0; pointer-events: none; z-index: 10; }
.xpline { height: 5px; background: rgba(7,6,11,.85); border-bottom: 1px solid #000; }
.xpline .fill { height: 100%; width: 0; background: linear-gradient(90deg, #2f8a5a, var(--moss)); box-shadow: 0 0 10px var(--moss); transition: width .25s ease-out; }
.hud-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 14px; gap: 12px; }
.hud-left { display: flex; align-items: center; gap: 8px; width: min(300px, 40vw); }
.hud-center { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.hud-right { display: flex; align-items: center; gap: 10px; }
.lvl {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: var(--void);
  background: linear-gradient(#ffe39a, var(--ember) 55%, var(--ember-deep));
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 6px rgba(255,179,71,.5));
}
.bar { position: relative; flex: 1; height: 16px; background: #0b0910; outline: 1px solid var(--edge); outline-offset: 2px; overflow: hidden; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; transition: width .18s ease-out; }
.bar.hp .fill { background: linear-gradient(#ff7a6e 0 35%, var(--blood) 35% 80%, #8a1a28 80%); }
.bar::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(0,0,0,.45) 9px 10px); }
.bar span {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%); z-index: 1;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000;
}
.bar.boss { width: min(440px, 62vw); height: 12px; outline-color: #5a2040; }
.bar.boss .fill { background: linear-gradient(#ff9ad5 0 35%, #c0307a 35% 80%, #6a1040 80%); box-shadow: 0 0 12px #c0307a; }
#waveText { white-space: nowrap;
  font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--bone);
  text-shadow: 0 0 12px rgba(0,0,0,.9), 2px 2px 0 #000; display: flex; align-items: center; gap: 10px;
}
#waveText::before, #waveText::after { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--ember)); }
#waveText::after { transform: scaleX(-1); }
#bossName { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: #ff9ad5; text-shadow: 0 0 8px #c0307a, 1px 1px 0 #000; }
#infoText { font-size: 14px; font-weight: 700; letter-spacing: 1px; color: var(--ash); text-shadow: 2px 2px 0 #000; }
#pauseBtn {
  pointer-events: auto; width: 34px; height: 34px; display: flex; gap: 5px; align-items: center; justify-content: center;
  background: var(--stone2); border: 1px solid var(--edge); cursor: pointer; clip-path: var(--notch-s);
}
#pauseBtn i { width: 4px; height: 13px; background: var(--bone); }
#pauseBtn:hover { background: var(--stone3); }
#pauseBtn:hover i { background: var(--ember); }

/* ---------- Banner ---------- */
#banner { position: fixed; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; opacity: 0; z-index: 9; }
#banner.show { animation: bannerIn 1.7s cubic-bezier(.2,.8,.2,1) forwards; }
#banner .big img { filter: drop-shadow(0 0 18px rgba(255,140,40,.45)); }
#banner .small { font-size: clamp(12px, 1.8vw, 16px); margin-top: 10px; letter-spacing: 4px; text-transform: uppercase; color: var(--ash); text-shadow: 2px 2px 0 #000; }
@keyframes bannerIn {
  0% { opacity: 0; transform: translateY(14px) scale(1.15); filter: blur(4px); }
  14% { opacity: 1; transform: none; filter: none; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* ---------- Screens ---------- */
#screens {
  position: fixed; inset: 0; display: none; z-index: 20;
  align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
  background: radial-gradient(ellipse at center, rgba(7,6,11,.35), rgba(7,6,11,.9));
}
#screens.show { display: flex; animation: fadeIn .25s ease-out; }
#screens.title { background: radial-gradient(ellipse at 50% 60%, transparent 20%, rgba(7,6,11,.85)); }
@keyframes fadeIn { from { opacity: 0; } }
.panel {
  position: relative; width: min(780px, 100%); max-height: 100%; overflow-y: auto; overflow-x: hidden;
  padding: 26px 28px; text-align: center;
  background: linear-gradient(180deg, rgba(28,24,37,.97), rgba(15,12,20,.97));
  border: 2px solid var(--edge); clip-path: var(--notch);
  animation: rise .35s cubic-bezier(.2,.9,.25,1.15) backwards;
}
.panel::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,179,71,.12); pointer-events: none; }
.panel.narrow { width: min(480px, 100%); }
.panel.bare { background: none; border: 0; clip-path: none; }
.panel.bare::before { display: none; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
h2.ptitle { margin: 0 0 14px; line-height: 0; }
.logo { margin: 0 0 6px; line-height: 0; }
.logo img { filter: drop-shadow(0 0 24px rgba(255,120,30,.4)); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 36px rgba(255,120,30,.65)); } }
.sub { color: var(--ash); font-size: 13px; letter-spacing: 1px; }
.tagline { color: var(--ash); font-size: 13px; letter-spacing: 6px; text-transform: uppercase; }
p { line-height: 1.6; margin: 10px 0; color: #cfc6d8; }
.menu { display: flex; flex-direction: column; gap: 9px; align-items: center; margin-top: 18px; }
.menu > * { animation: rise .4s cubic-bezier(.2,.9,.25,1.1) backwards; }
.menu > *:nth-child(2) { animation-delay: .05s; } .menu > *:nth-child(3) { animation-delay: .1s; } .menu > *:nth-child(4) { animation-delay: .15s; }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
button.btn {
  position: relative; font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 2px; text-transform: uppercase;
  min-width: 270px; padding: 12px 22px; cursor: pointer; color: var(--bone);
  background: var(--stone2); border: 1px solid var(--edge); clip-path: var(--notch-s);
  transition: background .15s, color .15s, transform .08s;
}
button.btn::before { content: "›"; position: absolute; left: 12px; top: 50%; transform: translate(-6px,-50%); opacity: 0; color: var(--ember); transition: .15s; }
button.btn:hover { background: var(--stone3); color: var(--ember); }
button.btn:hover::before { opacity: 1; transform: translate(0,-50%); }
button.btn:active { transform: translateY(2px); }
button.btn.primary { background: linear-gradient(180deg, #3a1c0e, #200f08); border-color: #7a3a14; color: var(--ember); text-shadow: 0 0 10px rgba(255,140,40,.5); }
button.btn.primary:hover { background: linear-gradient(180deg, #4e2612, #2a140a); color: #ffd690; }
button.btn.small { min-width: 0; font-size: 11px; padding: 8px 12px; letter-spacing: 1px; color: var(--ash); }
button.btn.small:hover { color: var(--bone); }
button.btn .hint { display: block; font-size: 10px; color: var(--ash); font-weight: 400; margin-top: 4px; letter-spacing: 1px; text-transform: none; }
.controls { margin-top: 20px; font-size: 11px; color: #6e6678; line-height: 1.9; }
kbd { border: 1px solid var(--edge); border-bottom-width: 2px; padding: 0 5px; color: var(--bone); background: var(--stone); font-family: var(--mono); }

/* Helden */
.heroes { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-card {
  position: relative; width: 260px; padding: 18px 16px 16px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, var(--stone2), var(--stone)); border: 1px solid var(--edge); clip-path: var(--notch);
  transition: transform .15s, border-color .15s;
}
.hero-card .pedestal { position: relative; height: 120px; display: grid; place-items: center; }
.hero-card .pedestal::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,120,.22), transparent 65%); transition: .2s; }
.hero-card img { position: relative; width: 112px; height: 112px; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)); }
.hero-card:hover { transform: translateY(-4px); border-color: var(--ember); }
.hero-card:hover .pedestal::before { background: radial-gradient(circle, rgba(255,200,120,.4), transparent 65%); }
.hero-card:hover img { animation: bob .5s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.hero-card h3 { margin: 8px 0 6px; color: var(--ember); letter-spacing: 3px; text-transform: uppercase; font-size: 16px; }
.hero-card p { font-size: 12.5px; margin: 6px 0; }
.hero-card .stats { font-size: 11px; color: var(--ash); letter-spacing: 1px; }

/* Power-Karten */
.cards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.card {
  position: relative; width: 206px; min-height: 250px; padding: 18px 14px 14px; cursor: pointer;
  background: linear-gradient(180deg, var(--stone2), var(--stone)); border: 1px solid var(--common); clip-path: var(--notch);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  animation: deal .45s cubic-bezier(.2,.9,.25,1.2) backwards; transition: transform .15s, filter .15s;
}
.card:nth-child(2) { animation-delay: .08s; } .card:nth-child(3) { animation-delay: .16s; }
@keyframes deal { from { transform: translateY(40px) rotate(-4deg) scale(.85); opacity: 0; } }
.card:hover { transform: translateY(-6px); filter: brightness(1.18); }
.card .icon { width: 72px; height: 72px; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.card img { width: 56px; height: 56px; image-rendering: pixelated; }
.card .name { font-weight: 800; font-size: 15px; letter-spacing: 1px; color: var(--bone); text-transform: uppercase; }
.card .desc { font-size: 12.5px; color: #b7aec2; line-height: 1.45; flex: 1; }
.card .rar { font-size: 10px; font-weight: 800; letter-spacing: 3px; }
.card .stk { font-size: 10px; color: var(--ember); letter-spacing: 2px; }
.card .key { font-size: 10px; color: #5e5668; }
.card.r1 .rar { color: var(--common); }
.card.r2 { border-color: var(--rare); background: linear-gradient(180deg, #16232c, var(--stone)); }
.card.r2 .rar { color: var(--rare); text-shadow: 0 0 8px rgba(127,227,255,.5); }
.card.r2 .icon { background: radial-gradient(circle, rgba(127,227,255,.2), transparent 70%); }
.card.r3 { border-color: var(--epic); background: linear-gradient(180deg, #2c1a0c, var(--stone)); }
.card.r3::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,210,140,.18) 45%, transparent 60%) no-repeat;
  background-size: 250% 100%; animation: shimmer 2.2s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.card.r3 .rar { color: var(--epic); text-shadow: 0 0 10px rgba(255,160,40,.7); }
.card.r3 .icon { background: radial-gradient(circle, rgba(255,170,60,.3), transparent 70%); }

/* Powerliste */
.plist { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0; }
.pchip { display: flex; align-items: center; gap: 6px; background: var(--stone); padding: 5px 9px; border: 1px solid var(--edge); font-size: 11px; letter-spacing: .5px; }
.pchip img { width: 20px; height: 20px; image-rendering: pixelated; }
h3.sec { margin: 16px 0 6px; font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--ash); }

/* Tabellen */
table.stats { margin: 12px auto; border-collapse: collapse; font-size: 13px; min-width: 300px; }
table.stats td { padding: 7px 12px; border-bottom: 1px solid #2a2433; text-align: left; color: #cfc6d8; }
table.stats tr:nth-child(odd) td { background: rgba(255,255,255,.02); }
table.stats td:last-child { text-align: right; color: var(--ember); font-weight: 800; }
.record { color: var(--epic); font-weight: 800; letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,160,40,.6); }
.lb { margin-top: 12px; }

@media (max-width: 640px) {
  .hud-left { width: 46vw; }
  #waveText { font-size: 11px; letter-spacing: 1px; }
  #waveText::before, #waveText::after { width: 10px; }
  .card { width: 100%; min-height: 0; flex-direction: row; text-align: left; }
  .card .icon { width: 48px; height: 48px; flex: none; }
  .card img { width: 40px; height: 40px; }
  button.btn { min-width: 220px; }
}

/* ---------- Tutorial ---------- */
#tut { position: fixed; left: 0; right: 0; top: 64px; display: flex; justify-content: center; pointer-events: none; z-index: 12; }
#tut .tut {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 24px 10px;
  background: linear-gradient(180deg, rgba(19,16,26,.88), rgba(7,6,11,.92)); border: 1px solid var(--edge); clip-path: var(--notch);
  animation: rise .5s cubic-bezier(.2,.9,.25,1.2) backwards;
}
#tut .tut-title { line-height: 0; }
#tut .tut-sub { font-size: 12px; color: var(--ash); letter-spacing: 1px; }
.keys { display: grid; grid-template-columns: repeat(3, 40px); grid-template-rows: 40px 40px; gap: 5px; }
.keys .k:nth-child(1) { grid-column: 2; grid-row: 1; }
.keys .k:nth-child(2) { grid-column: 1; grid-row: 2; }
.keys .k:nth-child(3) { grid-column: 2; grid-row: 2; }
.keys .k:nth-child(4) { grid-column: 3; grid-row: 2; }
.k {
  display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--bone);
  background: linear-gradient(180deg, #2c2638, #1a1622); border: 1px solid var(--edge); border-bottom: 4px solid #0b0910;
  transition: transform .06s, background .1s, color .1s; animation: keyPulse 1.6s ease-in-out infinite;
}
.k.wide { width: 220px; height: 46px; letter-spacing: 4px; font-size: 13px; }
.k.on { transform: translateY(3px); border-bottom-width: 1px; background: linear-gradient(180deg, #4e2612, #2a140a); color: var(--ember); animation: none; box-shadow: 0 0 16px rgba(255,140,40,.5); }
@keyframes keyPulse { 50% { box-shadow: 0 0 12px rgba(255,179,71,.25); } }
.tut-icon { font-size: 34px; color: var(--ember); text-shadow: 0 0 14px rgba(255,140,40,.6); animation: bob 1s steps(2) infinite; }
#tut .skipbtn { pointer-events: auto; background: none; border: 0; color: #6e6678; font-family: var(--mono); font-size: 11px; letter-spacing: 1px; cursor: pointer; }
#tut .skipbtn:hover { color: var(--bone); }

/* ---------- Boss-Auftritt (Kino) ---------- */
#cine { position: fixed; inset: 0; pointer-events: none; z-index: 15; }
#cine .lb { position: absolute; left: 0; right: 0; height: 13vh; background: #000; transition: transform .7s cubic-bezier(.7,0,.2,1); }
#cine .lb.top { top: 0; transform: translateY(-100%); }
#cine .lb.bot { bottom: 0; transform: translateY(100%); }
#cine.on .lb { transform: none; }
#cine .cine-card { position: absolute; left: 0; right: 0; top: 60%; text-align: center; opacity: 0; }
#cine .cine-card.show { animation: cardIn 2.4s cubic-bezier(.2,.8,.2,1) forwards; }
#cine .cine-card .name img { filter: drop-shadow(0 0 22px rgba(200,60,255,.55)); }
#cine .cine-card .epi { margin-top: 12px; font-size: clamp(12px, 1.7vw, 16px); letter-spacing: 6px; text-transform: uppercase; color: #cdb8e8; text-shadow: 0 0 12px rgba(160,80,255,.7), 2px 2px 0 #000; }
#cine .cine-card .line { width: min(520px, 70vw); height: 1px; margin: 12px auto 0; background: linear-gradient(90deg, transparent, #c080ff, transparent); transform-origin: center; animation: lineGrow 1s .2s ease-out backwards; }
@keyframes lineGrow { from { transform: scaleX(0); } }
@keyframes cardIn {
  0% { opacity: 0; transform: translateX(-60px); letter-spacing: 20px; filter: blur(6px); }
  18% { opacity: 1; transform: none; filter: none; }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(40px); }
}
#cine .skip { position: absolute; right: 18px; bottom: calc(13vh - 28px); font-size: 11px; color: #6e6678; letter-spacing: 2px; opacity: 0; transition: opacity .4s .6s; }
#cine.on .skip { opacity: 1; }
#cine.on ~ #hud, body.cine #hud { opacity: 0; }
#hud { transition: opacity .4s; }

/* ---------- Codes & Mod-Menü ---------- */
.codebox { display: flex; gap: 8px; justify-content: center; margin: 16px 0 6px; }
.codebox input {
  width: 190px; padding: 10px 12px; font-family: var(--mono); font-size: 18px; font-weight: 800; letter-spacing: 6px; text-transform: uppercase; text-align: center;
  color: var(--ember); background: #0b0910; border: 1px solid var(--edge); outline: none; clip-path: var(--notch-s);
}
.codebox input:focus { border-color: var(--ember); box-shadow: 0 0 14px rgba(255,140,40,.35); }
.code-ok { color: var(--moss); font-size: 13px; }
.code-bad { color: var(--blood); font-size: 13px; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mod-tog.on { color: var(--moss) !important; border-color: #2f8a5a; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 34vh; overflow-y: auto; padding: 4px; }
.modpow { display: flex; align-items: center; gap: 6px; padding: 5px 8px; font-family: var(--mono); font-size: 11px; text-align: left; color: var(--bone); background: var(--stone); border: 1px solid var(--edge); cursor: pointer; }
.modpow:hover { background: var(--stone3); }
.modpow.r2 { border-color: #2a5a6a; } .modpow.r3 { border-color: #7a4a14; }
.modpow.full { opacity: .35; cursor: default; }
.modpow img { width: 22px; height: 22px; image-rendering: pixelated; }

/* ---------- Pixel-Rahmen im Spielstil (überschreibt die alten Formen) ---------- */
html, body { cursor: var(--cursor); }
#screen { cursor: var(--cross); }
button, .card, .hero-card, .modpow, [data-act] { cursor: var(--cursor) !important; }
.panel {
  clip-path: none; border: 24px solid transparent; background: none;
  border-image: var(--fr-panel) 8 fill / 24px / 0 stretch; image-rendering: pixelated;
  padding: 10px 14px;
}
.panel::before { display: none; }
.panel.bare { border: 0; border-image: none; }
button.btn {
  clip-path: none; border: 12px solid transparent; background: none !important;
  border-image: var(--fr-btn) 4 fill / 12px / 0 stretch; image-rendering: pixelated;
  padding: 2px 14px; min-height: 52px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
button.btn::before { display: none; }
button.btn.primary { border-image-source: var(--fr-btn-p); }
button.btn:hover { border-image-source: var(--fr-btn-h); }
button.btn:hover img.pt { filter: brightness(1.25) drop-shadow(0 0 6px rgba(255,160,60,.55)); }
button.btn:active { transform: translateY(2px); }
button.btn.small { min-height: 40px; padding: 0 8px; }
button.btn img.pt { pointer-events: none; }
.card, .hero-card {
  clip-path: none; border: 24px solid transparent; background: none !important;
  border-image: var(--fr-c1) 8 fill / 24px / 0 stretch; image-rendering: pixelated; padding: 4px 6px;
}
.card.r2 { border-image-source: var(--fr-c2); }
.card.r3 { border-image-source: var(--fr-c3); }
.card.relic { border-image-source: var(--fr-relic); }
.card.relic .rar { color: #e0a8ff; text-shadow: 0 0 10px rgba(190,110,255,.8); }
.card.relic .icon { background: radial-gradient(circle, rgba(190,110,255,.35), transparent 70%); }
.card.r3::after { inset: -10px; }
.hero-card:hover, .card:hover { border-image-source: var(--fr-c3); }
.pchip.relic { border-color: #7a40b0; }
#pauseBtn { clip-path: none; border: 12px solid transparent; border-image: var(--fr-btn) 4 fill / 12px / 0 stretch; image-rendering: pixelated; background: none; width: 46px; height: 46px; padding: 0; }
#tut .tut { clip-path: none; border: 24px solid transparent; background: none; border-image: var(--fr-panel) 8 fill / 24px / 0 stretch; image-rendering: pixelated; padding: 4px 12px; }

/* Lagerfeuer-Titel: Menü als Steintafel rechts neben dem Feuer */
#screens.title { justify-content: flex-end; padding-right: 7vw; background: linear-gradient(90deg, transparent 40%, rgba(7,6,11,.55)); }
#screens.title .panel.bare {
  width: min(430px, 100%); border: 24px solid transparent; border-image: var(--fr-panel) 8 fill / 24px / 0 stretch; image-rendering: pixelated; padding: 6px 10px;
}
#screens.title .controls { margin-top: 12px; }
@media (max-width: 860px) { #screens.title { justify-content: center; padding-right: 16px; background: rgba(7,6,11,.45); } }

/* Pixel-Übergang */
#wipe { position: fixed; inset: 0; width: 100%; height: 100%; display: none; z-index: 60; image-rendering: pixelated; pointer-events: none; }
button.btn { min-height: 44px; min-width: 240px; }
button.btn.small { min-height: 36px; }
.menu { gap: 6px; margin-top: 12px; }
.panel { scrollbar-width: thin; scrollbar-color: #3a3346 transparent; }
.panel::-webkit-scrollbar { width: 6px; } .panel::-webkit-scrollbar-thumb { background: #3a3346; }
#screens.title .logo img { height: auto !important; width: 100%; max-width: 360px; }
#screens.title .tagline { font-size: 11px; letter-spacing: 3px; }

/* ---------- HUD unten: Fähigkeit, Ultimate, Tränke ---------- */
#hudBottom { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 14px; pointer-events: none; z-index: 10; }
#hudBottom .slot {
  position: relative; width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden;
  border: 12px solid transparent; border-image: var(--fr-btn) 4 fill / 12px / 0 stretch; image-rendering: pixelated; box-sizing: border-box;
}
#hudBottom .slot .ico { position: relative; z-index: 1; font-size: 20px; line-height: 1; color: var(--bone); text-shadow: 0 0 8px rgba(127,246,255,.6); }
#hudBottom #slotPot .ico { color: #ff7a8a; text-shadow: 0 0 8px rgba(255,90,110,.6); }
#hudBottom .slot.empty { opacity: .45; }
#hudBottom .slot .cd { position: absolute; left: -12px; right: -12px; bottom: -12px; height: 0; background: rgba(7,6,11,.75); z-index: 2; }
#hudBottom .slot .cnt { position: absolute; right: -8px; bottom: -10px; z-index: 3; font-size: 12px; font-weight: 800; color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
#hudBottom .key { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-size: 9px; font-weight: 800; letter-spacing: 1px; color: var(--ash); text-shadow: 1px 1px 0 #000; white-space: nowrap; }
#hudBottom .ultwrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#hudBottom .ultbar { width: min(260px, 34vw); height: 14px; background: #0b0910; outline: 1px solid var(--edge); outline-offset: 2px; overflow: hidden; }
#hudBottom .ultbar .fill { height: 100%; width: 0; background: linear-gradient(90deg, #a0561e, var(--ember), #ffe9a0); transition: width .2s; }
#hudBottom .ultlbl { font-size: 10px; letter-spacing: 3px; color: var(--ash); text-shadow: 1px 1px 0 #000; }
#hudBottom .ultwrap .key { top: -16px; }
#hudBottom.ready .ultbar { outline-color: var(--ember); box-shadow: 0 0 18px rgba(255,170,60,.8); animation: ultPulse .8s ease-in-out infinite; }
#hudBottom.ready .ultlbl { color: var(--ember); }
@keyframes ultPulse { 50% { box-shadow: 0 0 6px rgba(255,170,60,.4); } }
body.cine #hudBottom { opacity: 0; }

/* Begleiter-Karten */
.petcard .icon img { width: 64px; height: auto; }
.petcard.sel .rar { color: var(--moss) !important; }
.petcard.locked { opacity: .75; }
.petbar { width: 80%; height: 6px; background: #0b0910; outline: 1px solid var(--edge); }
.petbar i { display: block; height: 100%; background: linear-gradient(90deg, #6a3412, var(--ember)); }

/* ---------- Power-Auswahl: Effekte ---------- */
#screens.lvlscr { background: radial-gradient(ellipse at 50% 55%, rgba(30,18,10,.55), rgba(7,6,11,.92)); }
.lvlwrap { position: relative; display: grid; place-items: center; width: 100%; }
.lvlwrap .rays {
  position: absolute; width: 140vmax; height: 140vmax; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; opacity: .18;
  background: repeating-conic-gradient(from 0deg, rgba(255,210,140,.5) 0deg 6deg, transparent 6deg 18deg);
  mask-image: radial-gradient(circle, #000 0, transparent 45%); -webkit-mask-image: radial-gradient(circle, #000 0, transparent 45%);
  animation: spin 24s linear infinite;
}
.lvlwrap.rar2 .rays { background: repeating-conic-gradient(from 0deg, rgba(127,227,255,.55) 0deg 6deg, transparent 6deg 18deg); opacity: .22; }
.lvlwrap.rar3 .rays { background: repeating-conic-gradient(from 0deg, rgba(255,179,71,.8) 0deg 7deg, transparent 7deg 16deg); opacity: .35; animation-duration: 10s; }
@keyframes spin { to { rotate: 360deg; } }
.lvlpanel { width: min(820px, 100%); }
.card { animation: flipIn .55s cubic-bezier(.2,.9,.3,1.25) backwards; animation-delay: var(--d, 0s); transform-style: preserve-3d; position: relative; overflow: visible; }
@keyframes flipIn { 0% { transform: perspective(700px) rotateY(95deg) translateY(30px) scale(.8); opacity: 0; filter: brightness(3); } 60% { filter: brightness(1.6); } 100% { transform: none; opacity: 1; filter: none; } }
.card:hover { transform: translateY(-8px) scale(1.03); }
.card .preview { font-size: 11px; line-height: 1.6; color: var(--ash); min-height: 18px; }
.card .preview b { color: var(--bone); font-weight: 700; }
.card .preview em { color: var(--moss); font-style: normal; font-weight: 800; }
.card .preview { opacity: .65; transition: opacity .15s; }
.card:hover .preview { opacity: 1; }
.card .spk { position: absolute; bottom: 10%; width: 3px; height: 3px; background: #fff; box-shadow: 0 0 6px 2px currentColor; pointer-events: none; animation: spk 2s linear infinite; opacity: 0; }
.card.r2 .spk { color: #7fe3ff; } .card.r3 .spk { color: #ffb347; width: 4px; height: 4px; }
@keyframes spk { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-190px); opacity: 0; } }
.card.r3 { animation: flipIn .7s cubic-bezier(.2,.9,.3,1.25) backwards, epicGlow 1.6s ease-in-out infinite; animation-delay: var(--d, 0s), .8s; }
@keyframes epicGlow { 50% { filter: drop-shadow(0 0 14px rgba(255,170,60,.75)) brightness(1.08); } }
.card.ghost { pointer-events: none; animation: none !important; }

/* ================= Schatzkammer, Truhen, Skins, Täglich ================= */
.gem { color: var(--ember); text-shadow: 0 0 8px rgba(255,160,60,.8); margin-right: 3px; }
#wallet {
  position: fixed; top: 14px; right: 18px; z-index: 30; display: flex; align-items: center; gap: 4px;
  padding: 2px 12px; font-size: 18px; font-weight: 800; color: var(--bone); letter-spacing: 1px;
  border: 12px solid transparent; border-image: var(--fr-btn-p) 4 fill / 12px / 0 stretch; image-rendering: pixelated;
}
#wallet.bump { animation: bump .5s cubic-bezier(.2,.9,.3,1.6); }
@keyframes bump { 40% { transform: scale(1.3); filter: brightness(1.6); } }
.panel.treasury { width: min(900px, 100%); }
.tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.tabbtn { min-width: 130px !important; }
.tabbtn.on { border-image-source: var(--fr-btn-h) !important; }
.tabbtn.on img.pt { filter: brightness(1.3) drop-shadow(0 0 6px rgba(255,160,60,.6)); }

.chests { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.chestcard {
  width: 230px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 8px;
  border: 24px solid transparent; border-image: var(--fr-c1) 8 fill / 24px / 0 stretch; image-rendering: pixelated;
}
.chestcard.c-rune { border-image-source: var(--fr-c2); }
.chestcard.c-mythic { border-image-source: var(--fr-c3); }
.chestcard .cimg { height: 110px; display: grid; place-items: center; position: relative; }
.chestcard .cimg::before { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255,190,110,.25), transparent 65%); animation: breathe 3s ease-in-out infinite; }
.chestcard.c-rune .cimg::before { background: radial-gradient(circle, rgba(127,227,255,.3), transparent 65%); }
.chestcard.c-mythic .cimg::before { background: radial-gradient(circle, rgba(255,120,240,.35), transparent 65%); }
.chestcard .cimg img { position: relative; width: 128px; image-rendering: pixelated; animation: chestIdle 2.4s ease-in-out infinite; }
.chestcard:hover .cimg img { animation: chestShake .35s linear infinite; }
@keyframes chestIdle { 50% { transform: translateY(-4px); } }
@keyframes chestShake { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.chestcard .name { font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.odds { width: 100%; font-size: 11px; color: var(--ash); }
.odds div { display: flex; align-items: center; gap: 6px; padding: 2px 0; border-bottom: 1px dashed #2a2433; }
.odds i { width: 8px; height: 8px; display: inline-block; box-shadow: 0 0 6px currentColor; }
.odds b { margin-left: auto; color: var(--bone); }
button.btn.poor { opacity: .45; filter: grayscale(.6); }

.skinrow { margin-bottom: 8px; }
.skins { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.skin {
  width: 118px; padding: 8px 4px 6px; text-align: center; cursor: pointer; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent); border: 2px solid #2a2433; outline: 1px solid #07060b;
  transition: transform .12s, border-color .12s;
}
.skin img { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0,0,0,.6)); }
.skin.r1 { border-color: #2a6a86; } .skin.r2 { border-color: #6a3aa0; } .skin.r3 { border-color: #a0561e; box-shadow: 0 0 14px rgba(255,170,60,.25); }
.skin:hover { transform: translateY(-3px); }
.skin.locked img { filter: brightness(0) drop-shadow(0 0 4px var(--rc)); opacity: .55; }
.skin.locked .sn { color: #5e5668; }
.skin.eq { background: linear-gradient(180deg, rgba(123,224,122,.12), transparent); border-color: var(--moss); }
.skin .sn { font-size: 11px; font-weight: 800; color: var(--bone); margin-top: 4px; }
.skin .sr { font-size: 9px; letter-spacing: 2px; color: var(--rc); }
.skin.eq .sr { color: var(--moss); }

.daily { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.day { position: relative; padding: 8px 4px; text-align: center; background: var(--stone); border: 2px solid #2a2433; }
.day .dn { font-size: 10px; letter-spacing: 2px; color: var(--ash); text-transform: uppercase; }
.day .dv { font-size: 16px; font-weight: 800; color: var(--bone); margin-top: 6px; min-height: 30px; display: grid; place-items: center; }
.day .dv img { width: 40px; image-rendering: pixelated; }
.day.done { opacity: .45; }
.day .chk { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; color: var(--moss); text-shadow: 0 0 10px rgba(123,224,122,.6); }
.day.today { border-color: var(--ember); animation: todayPulse 1.2s ease-in-out infinite; }
.day.big { background: linear-gradient(180deg, #1a2430, var(--stone)); border-color: #2a6a86; }
@keyframes todayPulse { 50% { box-shadow: 0 0 18px rgba(255,170,60,.55); transform: translateY(-2px); } }
@media (max-width: 640px) { .daily { grid-template-columns: repeat(4, 1fr); } }
.earned { color: var(--ash); font-size: 13px; }
.earned b { color: var(--ember); }

/* Truhen-Bühne */
#chestStage { position: fixed; inset: 0; z-index: 70; display: none; cursor: var(--cursor); }
#chestStage.on { display: block; }
#chestStage canvas { position: absolute; inset: 0; image-rendering: pixelated; }
#chestStage .cs-hint { position: absolute; bottom: 6%; left: 0; right: 0; text-align: center; font-size: 11px; letter-spacing: 3px; color: #6e6678; transition: opacity .3s; }
#chestStage .cs-info { position: absolute; left: 0; right: 0; top: 6%; bottom: 0; text-align: center; opacity: 0; pointer-events: none; }
#chestStage .cs-info.show { opacity: 1; pointer-events: auto; transition: opacity .3s .35s; }
#chestStage .cs-rar { animation: rarIn .8s .3s cubic-bezier(.2,.9,.3,1.5) backwards; line-height: 0; }
#chestStage .cs-rar img { filter: drop-shadow(0 0 24px rgba(255,190,110,.6)); }
@keyframes rarIn { from { transform: scale(2.6); opacity: 0; filter: blur(6px); } }
#chestStage .cs-name { margin-top: 14px; font-size: clamp(14px, 2vw, 20px); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: var(--bone); text-shadow: 2px 2px 0 #000; }
#chestStage .cs-tag { display: inline-block; margin-top: 8px; padding: 3px 12px; font-size: 12px; font-weight: 800; letter-spacing: 3px; }
#chestStage .cs-tag.new { color: #07060b; background: var(--moss); box-shadow: 0 0 16px rgba(123,224,122,.6); animation: bump .6s .9s backwards; }
#chestStage .cs-tag.dup { color: var(--ember); border: 1px solid #7a3a14; }
#chestStage .row { position: absolute; left: 0; right: 0; bottom: 8%; }

#screens { overflow-x: hidden; }

/* ================= Animationen & Feinschliff ================= */
:root { --ease-out: cubic-bezier(.16,1,.3,1); --ease-back: cubic-bezier(.34,1.56,.64,1); }
/* Lebensleiste: Geisterbalken, Treffer, Heilung */
.bar.hp .ghost { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(#fff3e0, #ffb0a0); opacity: .75; transition: width .55s .3s var(--ease-out); }
.bar.hp .fill { transition: width .12s linear; z-index: 1; }
.bar.hp .healglow { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(150,255,150,.7), transparent); }
.bar.hp.hit { animation: barHit .35s var(--ease-out); }
.bar.hp.heal .healglow { animation: healSweep .6s ease-out; }
@keyframes barHit { 0% { transform: translateX(0); filter: brightness(2.2); } 20% { transform: translateX(-4px); } 45% { transform: translateX(3px); } 70% { transform: translateX(-2px); } 100% { transform: none; filter: none; } }
@keyframes healSweep { 0% { opacity: 1; transform: translateX(-100%); } 100% { opacity: 0; transform: translateX(100%); } }
/* Level-Abzeichen */
#lvText.pop { animation: lvPop .6s var(--ease-back); }
@keyframes lvPop { 0% { transform: scale(1); } 30% { transform: scale(1.7) rotate(12deg); filter: brightness(2) drop-shadow(0 0 14px #ffd27a); } 100% { transform: scale(1); } }
/* EP-Leiste mit Funkel-Kopf */
.xpline .fill { position: relative; transition: width .35s var(--ease-out); }
.xpline .fill::after { content: ""; position: absolute; right: -3px; top: -2px; width: 6px; height: 9px; background: #eaffea; box-shadow: 0 0 10px 3px #7be07a; animation: xpHead 1s ease-in-out infinite; }
@keyframes xpHead { 50% { opacity: .5; box-shadow: 0 0 4px 1px #7be07a; } }
/* Wellen-Text */
#waveText.swap { animation: waveSwap .55s var(--ease-out); }
@keyframes waveSwap { 0% { opacity: 0; transform: translateY(-12px); letter-spacing: 8px; } 100% { opacity: 1; transform: none; } }
/* Ultimate voll */
#hudBottom.flash .ultbar { animation: ultFlash .6s ease-out, ultPulse .8s .6s ease-in-out infinite; }
@keyframes ultFlash { 0% { box-shadow: 0 0 40px 12px rgba(255,210,120,1); filter: brightness(2.2); } 100% { box-shadow: 0 0 18px rgba(255,170,60,.8); } }
/* Splitter im Run */
#runGems { font-size: 14px; font-weight: 800; color: var(--bone); text-shadow: 2px 2px 0 #000; min-width: 54px; text-align: right; }
#runGems.tick b { display: inline-block; animation: gemTick .25s var(--ease-back); }
@keyframes gemTick { 50% { transform: scale(1.35); color: var(--ember); } }

/* Menüs: weichere Übergänge */
#screens.show { animation: fadeIn .3s var(--ease-out); }
.panel { animation: panelIn .45s var(--ease-out) backwards; }
@keyframes panelIn { 0% { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
.menu > * { animation: itemIn .45s var(--ease-out) backwards; }
.menu > *:nth-child(1) { animation-delay: .06s; } .menu > *:nth-child(2) { animation-delay: .11s; } .menu > *:nth-child(3) { animation-delay: .16s; }
.menu > *:nth-child(4) { animation-delay: .21s; } .menu > *:nth-child(5) { animation-delay: .26s; } .menu > *:nth-child(6) { animation-delay: .31s; }
@keyframes itemIn { 0% { opacity: 0; transform: translateX(26px); } 100% { opacity: 1; transform: none; } }
/* Buttons: Glanz beim Hover, Federn beim Drücken */
button.btn { position: relative; overflow: hidden; transition: transform .18s var(--ease-back), filter .15s; }
button.btn::after { content: ""; position: absolute; top: -20px; bottom: -20px; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,230,180,.35), transparent); transform: skewX(-20deg); opacity: 0; pointer-events: none; }
button.btn:hover { transform: translateY(-2px); }
button.btn:hover::after { animation: sheen .7s ease-out; }
button.btn:active { transform: translateY(2px) scale(.96); transition-duration: .05s; }
@keyframes sheen { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 0; } }
/* Heldenkarten & Skins: sanftes Schweben */
.hero-card, .skin, .chestcard { transition: transform .25s var(--ease-back); }
.hero-card:hover { transform: translateY(-6px) scale(1.02); }
/* Titel-Logo schwebt */
#screens.title .logo img { animation: logoFloat 5s ease-in-out infinite, breathe 4s ease-in-out infinite; }
@keyframes logoFloat { 50% { transform: translateY(-5px); } }
/* Banner weicher */
#banner.show { animation: bannerIn 1.8s var(--ease-out) forwards; }

/* Tägliche Belohnung */
.streak { margin: 4px 0 10px; font-size: 13px; color: var(--bone); letter-spacing: 1px; }
.streak b { color: var(--ember); }
.daily .day { animation: dayIn .5s var(--ease-back) backwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes dayIn { 0% { opacity: 0; transform: translateY(16px) scale(.85); } 100% { opacity: 1; transform: none; } }
.day .dv b { font-size: 18px; }
.day .dv small { display: block; font-size: 9px; color: var(--ash); letter-spacing: 1px; margin-top: 2px; }
.day.t-chest .dv img { width: 44px; animation: chestIdle 2.4s ease-in-out infinite; }
.day.big .dv img { width: 56px; }
.day.big { background: linear-gradient(180deg, #2a1608, var(--stone)); border-color: #a0561e; }
.day.today { animation: dayIn .5s var(--ease-back) backwards, todayPulse 1.2s 0.6s ease-in-out infinite; animation-delay: calc(var(--i) * 60ms), .6s; }
.day.claiming { animation: claimFlip .65s var(--ease-out) forwards !important; z-index: 2; }
@keyframes claimFlip { 0% { transform: none; } 40% { transform: perspective(500px) rotateY(90deg) scale(1.15); filter: brightness(2.5); } 100% { transform: perspective(500px) rotateY(0) scale(1.08); filter: brightness(1.4) drop-shadow(0 0 16px #ffb347); } }
.day.chestpop .dv img { animation: chestShake .12s linear 6, bump .5s .72s var(--ease-back); }
.wheelicon { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #a0561e; background: conic-gradient(#3a3346 0 45deg, #4a2a5a 0 90deg, #2a4a6a 0 135deg, #6a3a1a 0 180deg, #5a2a7a 0 225deg, #1a5a6a 0 270deg, #3a3346 0 315deg, #8a5a10 0); animation: spin 6s linear infinite; }
.flygem { position: fixed; z-index: 90; font-size: 20px; color: var(--ember); text-shadow: 0 0 10px rgba(255,160,60,.9), 0 0 2px #fff; pointer-events: none; }
.toast { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px auto; padding: 8px 14px; width: fit-content; background: linear-gradient(90deg, rgba(160,86,30,.25), rgba(160,86,30,.05)); border-left: 3px solid var(--ember); animation: itemIn .45s var(--ease-out); }
.toast img { width: 40px; image-rendering: pixelated; }

/* ---------- Combo ---------- */
#combo { position: fixed; right: 22px; top: 38%; z-index: 11; pointer-events: none; text-align: right; opacity: 0; transform: translateX(30px); transition: opacity .25s, transform .35s cubic-bezier(.16,1,.3,1); }
#combo.on { opacity: 1; transform: none; }
#combo b { display: block; font-size: 44px; line-height: 1; font-weight: 900; color: #fff; text-shadow: 3px 3px 0 #000, 0 0 18px rgba(255,255,255,.35); font-family: var(--mono); }
#combo span { font-size: 11px; letter-spacing: 6px; color: var(--ash); text-shadow: 1px 1px 0 #000; }
#combo i { display: block; height: 3px; margin-top: 4px; margin-left: auto; background: var(--bone); transition: width .1s linear; }
#combo.t1 b { color: #7fe3ff; text-shadow: 3px 3px 0 #000, 0 0 18px rgba(127,227,255,.7); }
#combo.t2 b { color: #c080ff; text-shadow: 3px 3px 0 #000, 0 0 22px rgba(192,128,255,.8); }
#combo.t3 b { color: #ffb347; text-shadow: 3px 3px 0 #000, 0 0 26px rgba(255,179,71,.9); }
#combo.t4 b { color: #ff5a5a; text-shadow: 3px 3px 0 #000, 0 0 30px rgba(255,90,90,1); animation: comboShake .12s linear infinite; }
#combo.t1 i { background: #7fe3ff; } #combo.t2 i { background: #c080ff; } #combo.t3 i { background: #ffb347; } #combo.t4 i { background: #ff5a5a; }
#combo.burst b { animation: comboBurst .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes comboBurst { 0% { transform: scale(2.2) rotate(-8deg); filter: brightness(2.5); } 100% { transform: none; } }
@keyframes comboShake { 25% { transform: translate(-1px,1px); } 75% { transform: translate(1px,-1px); } }
body.cine #combo { opacity: 0; }

/* ================= Kleine Fenster: alles skaliert mit --ui ================= */
#screens > *, #hud, #hudBottom, #combo, #wallet, #tut, #banner, #chestStage .cs-info { zoom: var(--ui, 1); }
body.compact #screens { padding: 8px; }
body.compact .hud-row { padding: 6px 8px; }
body.compact #combo b { font-size: 34px; }
body.compact .controls { display: none; }
body.tiny .card .desc { font-size: 11px; }
body.tiny .card .preview { display: none; }
body.tiny #waveText::before, body.tiny #waveText::after { display: none; }
@media (max-height: 520px) {
  .card { min-height: 0; }
  .card .icon { height: 52px; }
  .heroes .hero-card .pedestal { height: 80px; }
  .heroes .hero-card img { width: 80px; height: 80px; }
}

/* ================= Karten bestätigen ================= */
.card { transition: transform .28s cubic-bezier(.34,1.56,.64,1), filter .25s, opacity .25s; }
.card.dim { opacity: .55; filter: grayscale(.45) brightness(.8); transform: scale(.96); }
.card.sel { transform: translateY(-12px) scale(1.06); filter: brightness(1.15) drop-shadow(0 0 16px rgba(255,190,110,.55)); z-index: 2; }
.card.sel::before { content: "✓"; position: absolute; top: -18px; left: 50%; translate: -50% 0; width: 26px; height: 26px; display: grid; place-items: center; font-weight: 900; color: #07060b; background: var(--ember); box-shadow: 0 0 14px rgba(255,170,60,.8); animation: bump .4s cubic-bezier(.34,1.56,.64,1); z-index: 3; }
.confirmbar { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.confirmbar .chosen { font-size: 13px; letter-spacing: 1px; color: var(--ash); min-height: 18px; }
.confirmbar .chosen b { color: var(--ember); }
.confirmbar .chosen.nudge { animation: barHit .35s; color: var(--bone); }
button.btn.confirm[disabled] { opacity: .35; filter: grayscale(1); pointer-events: none; }
button.btn.confirm.ready { animation: confirmReady .5s cubic-bezier(.34,1.56,.64,1), confirmPulse 1.4s .5s ease-in-out infinite; }
@keyframes confirmReady { 0% { transform: scale(.85); filter: brightness(2); } 100% { transform: none; } }
@keyframes confirmPulse { 50% { filter: brightness(1.25) drop-shadow(0 0 10px rgba(255,170,60,.7)); } }

/* ================= Feinschliff ================= */
#screens.leaving, .leaving { position: fixed; inset: 0; z-index: 19; display: flex; align-items: center; justify-content: center; padding: 16px; }
#screens.show { backdrop-filter: blur(2px); }
#screens.title { backdrop-filter: none; }
/* HUD auf leichten Platten statt frei schwebend */
.hud-left, .hud-center #waveText, .hud-right { background: linear-gradient(180deg, rgba(11,9,16,.72), rgba(11,9,16,.35)); padding: 6px 10px; border: 1px solid rgba(58,51,70,.6); border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.hud-center #waveText { padding: 4px 14px; }
#hudBottom { background: linear-gradient(0deg, rgba(11,9,16,.72), rgba(11,9,16,.2)); padding: 22px 16px 8px; border: 1px solid rgba(58,51,70,.5); border-bottom: 0; }
/* weiche Übergänge auf allen interaktiven Elementen */
.skin, .chestcard, .hero-card, .day, .modpow, .tabbtn { transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .2s, opacity .2s, border-color .2s; }
.skin:hover, .chestcard:hover, .modpow:hover { transform: translateY(-4px); filter: brightness(1.12); }
.hero-card { animation: panelIn .5s cubic-bezier(.16,1,.3,1) backwards; }
.hero-card:nth-child(2) { animation-delay: .08s; } .hero-card:nth-child(3) { animation-delay: .16s; }
.chestcard { animation: panelIn .5s cubic-bezier(.16,1,.3,1) backwards; }
.chestcard:nth-child(2) { animation-delay: .08s; } .chestcard:nth-child(3) { animation-delay: .16s; }
.skin { animation: dayIn .45s cubic-bezier(.34,1.56,.64,1) backwards; }
h2.ptitle img { animation: titleIn .55s cubic-bezier(.16,1,.3,1) backwards; }
@keyframes titleIn { 0% { opacity: 0; transform: translateY(-10px) scale(1.08); filter: blur(3px) brightness(2); } 100% { opacity: 1; transform: none; filter: none; } }
