@font-face { font-family: "PixelifyPS"; src: url("../assets/fonts/PixelifyPS-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PixelifyPS"; src: url("../assets/fonts/PixelifyPS-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #120d24;
  --panel: rgba(20, 15, 44, 0.84);
  --panel-b: rgba(255, 255, 255, 0.16);
  --txt: #f4f1ff;
  --mut: #b4aed4;
  --gold: #ffd84a;
  --gold2: #ff9d2e;
  --red: #ff5a5a;
  --green: #5be37a;
  --blue: #5fb8ff;
  --font: "PixelifyPS", "Trebuchet MS", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { font-variant-ligatures: none; margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--txt); font-family: var(--font); user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
canvas#game { position: fixed; inset: 0; display: block; background: #1a1626; cursor: crosshair; touch-action: none; }
button { font-family: var(--font); color: var(--txt); cursor: pointer; }
img { -webkit-user-drag: none; }
.panel { background: var(--panel); border: 2px solid var(--panel-b); border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }

/* ---------- chips de tipo ---------- */
.tchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 4px; border-radius: 999px; background: color-mix(in srgb, var(--tc) 88%, #000 12%); border: 1.5px solid rgba(255, 255, 255, 0.55); color: var(--tx, #fff); font-size: 13px; font-weight: 700; line-height: 1; text-shadow: var(--ts, 0 1px 2px rgba(0, 0, 0, 0.7)); white-space: nowrap; vertical-align: middle; }
.tchip img { width: 17px; height: 17px; border-radius: 50%; flex: none; }
.tchip b { margin-left: 3px; padding: 1px 5px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); color: #fff; font-size: 12px; text-shadow: none; }
.tchip.sm { font-size: 11px; padding: 1px 7px 1px 3px; gap: 3px; }
.tchip.sm img { width: 14px; height: 14px; }
.tchip.sm b { font-size: 11px; padding: 0 4px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud #feed, #hud #banner, #hud #toast, #hud #stickZone.off { pointer-events: none; }

#feed { position: absolute; left: 10px; top: 10px; width: 280px; display: flex; flex-direction: column; gap: 4px; }
#feed .fi { font-size: 13px; padding: 3px 9px; border-radius: 8px; background: rgba(15, 11, 34, 0.7); border-left: 4px solid #8d86b8; animation: fin 0.25s ease-out; }
#feed .fi.me { border-left-color: var(--gold); color: var(--gold); }
#feed .fi.bad { border-left-color: var(--red); color: #ffb0b0; }
@keyframes fin { from { transform: translateX(-20px); opacity: 0; } to { transform: none; opacity: 1; } }

.banner { position: absolute; top: 64px; left: 50%; transform: translate(-50%, -10px); max-width: 92vw; padding: 7px 22px; border-radius: 14px; font-size: 26px; font-weight: 700; text-align: center; color: #fff; background: rgba(15, 11, 34, 0.82); border: 2px solid var(--panel-b); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.2s, transform 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.banner.warn { color: #ffc46b; border-color: rgba(255, 170, 60, 0.8); }
.banner.danger { color: #ff9be6; border-color: rgba(190, 80, 255, 0.9); background: rgba(40, 10, 60, 0.85); animation: bpulse 0.5s infinite alternate; }
.banner.good { color: var(--gold); border-color: rgba(255, 216, 74, 0.7); }
@keyframes bpulse { from { box-shadow: 0 0 0 rgba(190, 80, 255, 0); } to { box-shadow: 0 0 22px rgba(190, 80, 255, 0.7); } }
#toast { position: absolute; top: 124px; left: 50%; transform: translate(-50%, -8px); font-size: 20px; font-weight: 700; padding: 5px 16px; border-radius: 10px; background: rgba(15, 11, 34, 0.78); border: 2px solid var(--panel-b); opacity: 0; transition: opacity 0.2s, transform 0.2s; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.good { color: var(--gold); border-color: rgba(255, 216, 74, 0.6); }

#hudTR { position: absolute; top: 10px; right: 10px; width: 216px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
#hudTR > * { pointer-events: auto; }
#topBtns { display: flex; gap: 6px; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--panel-b); background: var(--panel); display: grid; place-items: center; padding: 0; transition: transform 0.1s, background 0.15s; }
.iconbtn:hover { background: rgba(60, 48, 120, 0.95); transform: translateY(-1px); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn svg { width: 21px; height: 21px; }
.iconbtn.off { color: var(--red); }
#status { display: flex; gap: 6px; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
.schip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; background: var(--panel); border: 2px solid var(--panel-b); font-size: 14px; font-weight: 700; white-space: nowrap; }
.schip b { font-size: 19px; color: var(--gold); line-height: 1; }
.schip span { color: var(--mut); font-weight: 400; }
.schip .sdot { width: 10px; height: 10px; border-radius: 50%; background: #b66bff; box-shadow: 0 0 8px #b66bff; }
.schip.warn { border-color: #ffa63c; color: #ffd08a; }
.schip.warn .sdot { background: #ffa63c; box-shadow: 0 0 8px #ffa63c; }
.schip.danger { border-color: #c45bff; color: #f0b8ff; animation: bpulse 0.6s infinite alternate; }
#lb { width: 100%; padding: 6px 7px 5px; }
#lbList { list-style: none; margin: 0; padding: 0; }
#lbList li { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 1px 6px; border-left: 4px solid var(--tc, #888); margin-bottom: 2px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); cursor: default; }
#lbList li .rk { width: 14px; text-align: right; color: var(--mut); flex: none; }
#lbList li .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#lbList li .lv { color: var(--mut); font-size: 11px; flex: none; }
#lbList li .lv::before { content: "Nv"; margin-right: 1px; }
#lbList li .xp { color: #d9d2ff; font-variant-numeric: tabular-nums; flex: none; min-width: 34px; text-align: right; }
#lbList li.me { background: rgba(255, 216, 74, 0.2); color: var(--gold); font-weight: 700; }
#lbList li.extra { margin-top: 4px; }

#minimap { position: absolute; right: 10px; bottom: 10px; width: 168px; height: 168px; border-radius: 12px; border: 2px solid var(--panel-b); background: #0c0a1c; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4); }

/* ---------- barra inferior ---------- */
#hudBot { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0 auto; width: min(780px, calc(100vw - 400px)); min-width: 600px; pointer-events: none; display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
#hudBot > * { pointer-events: auto; }
#hudRow { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 0; }
#buffs { display: flex; gap: 5px; min-height: 0; pointer-events: auto; }
#gear { display: flex; gap: 5px; pointer-events: auto; }
.gslot { position: relative; width: 36px; height: 36px; border-radius: 9px; border: 2px solid var(--rc, rgba(255,255,255,0.25)); background: rgba(10, 6, 28, 0.85); box-shadow: 0 0 8px color-mix(in srgb, var(--rc, #000) 45%, transparent); overflow: hidden; }
.gslot.empty { border-style: dashed; box-shadow: none; background: rgba(255, 255, 255, 0.05); }
.gslot img { width: 100%; height: 100%; object-fit: contain; padding: 3px; image-rendering: pixelated; display: block; }
.buff { position: relative; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--bc, #fff); background: rgba(10, 6, 28, 0.85); overflow: hidden; }
.buff img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.buff i { position: absolute; right: 1px; bottom: 0; font: 700 11px var(--font); font-style: normal; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
#pbar { display: flex; align-items: center; gap: 10px; padding: 8px 10px; transition: box-shadow 0.2s; }
#pbar.invuln { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45), 0 4px 14px rgba(0, 0, 0, 0.35); }
.pLeft { position: relative; flex: none; width: 66px; height: 66px; cursor: pointer; }
#portrait { width: 66px; height: 66px; image-rendering: pixelated; background: rgba(255, 255, 255, 0.06); border-radius: 50%; border: 2px solid var(--panel-b); display: block; }
.plevel { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 0 8px; border-radius: 9px; background: linear-gradient(180deg, #ffe86a, #ffa42e); color: #3a2000; font-size: 12px; font-weight: 700; white-space: nowrap; border: 2px solid #5a3200; }
.pMid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pTop { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.pname { font-size: 17px; font-weight: 700; color: var(--gold); overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); min-width: 40px; max-width: 130px; flex: 0 0 auto; }
.pstage { font-size: 12px; color: var(--mut); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chips { display: inline-flex; gap: 4px; margin-left: auto; cursor: pointer; flex: none; }
.bar { position: relative; border-radius: 8px; background: rgba(0, 0, 0, 0.6); border: 2px solid rgba(255, 255, 255, 0.2); overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; font-style: normal; }
.bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bar.hp { height: 21px; }
.bar.hp span { font-size: 13px; }
.bar.hp i#hpGhost { background: rgba(255, 255, 255, 0.6); }
.bar.hp i#hpFill { background: linear-gradient(180deg, #5be37a, #2c9a4c); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25); }
.bar.hp.low { border-color: #ff5a5a; animation: lowhp 0.5s infinite alternate; }
@keyframes lowhp { from { box-shadow: 0 0 0 rgba(255, 60, 60, 0); } to { box-shadow: 0 0 12px rgba(255, 60, 60, 0.9); } }
.bar.mp { height: 15px; }
.bar.mp span { font-size: 11px; }
.bar.mp i { background: linear-gradient(180deg, #5ab8ff, #2a6fd6); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.bar.xp { height: 7px; border-width: 1px; border-radius: 5px; }
.bar.xp i { background: linear-gradient(90deg, #ffe86a, #ffa42e); }

#slots { display: flex; align-items: flex-end; gap: 5px; flex: none; }
.sslit { width: 2px; height: 40px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); margin: 0 3px; align-self: center; }
.slot { position: relative; width: 52px; height: 52px; padding: 0; border-radius: 12px; border: 3px solid var(--rc, rgba(255, 255, 255, 0.28)); background: #1a1436; overflow: hidden; flex: none; touch-action: none; transition: transform 0.08s, border-color 0.2s, box-shadow 0.2s; }
.slot.basic { width: 42px; height: 42px; border-radius: 10px; margin-right: 2px; cursor: default; }
.slot .sico { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot .skey { position: absolute; top: 2px; left: 3px; padding: 0 4px; border-radius: 5px; background: rgba(0, 0, 0, 0.65); font-size: 10px; font-weight: 700; color: #fff; }
.slot.basic .skey { font-size: 8px; padding: 0 3px; }
.slot .smana { position: absolute; right: 2px; bottom: 11px; padding: 0 4px; border-radius: 5px; background: rgba(5, 25, 70, 0.85); color: #8fd0ff; font-size: 11px; font-weight: 700; }
.slot .spips { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: center; gap: 2px; }
.slot .spips i { width: 7px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
.slot .spips i.on { background: var(--gold); box-shadow: 0 0 3px var(--gold); }
.slot .scd { position: absolute; inset: 0; background: conic-gradient(rgba(6, 3, 20, 0.8) calc(var(--p, 0) * 360deg), transparent 0); pointer-events: none; }
.slot .snm { position: absolute; inset: 0; background: rgba(20, 50, 150, 0.5); display: none; pointer-events: none; }
.slot.nomana .snm { display: block; }
.slot.nomana .sico { filter: saturate(0.4) brightness(0.75); }
.slot .scdn { position: absolute; inset: 0; display: grid; place-items: center; font-size: 19px; color: #fff; text-shadow: 0 2px 3px #000, 0 0 4px #000; pointer-events: none; }
.slot .lockI { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.55); }
.slot .lockI svg { width: 24px; height: 24px; }
.slot.ult { width: 60px; height: 60px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 12px color-mix(in srgb, var(--rc) 55%, transparent); }
.slot.dodge, .slot.cons { width: 46px; height: 46px; }
.slot.dodge .skey { font-size: 8px; }
.slot .sico { image-rendering: auto; }
.slot.cons .sico { object-fit: contain; padding: 5px; image-rendering: pixelated; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--rc) 28%, transparent), transparent 70%); }
.slot .scnt { position: absolute; right: 2px; bottom: 1px; padding: 0 4px; border-radius: 5px; background: rgba(0, 0, 0, 0.8); color: #fff; font-size: 11px; font-weight: 700; }
.slot.ready { box-shadow: 0 0 10px color-mix(in srgb, var(--rc, #ffd84a) 70%, transparent); }
.slot.ult.ready { box-shadow: 0 0 16px var(--rc), 0 0 4px #fff inset; }
.slot.basic { border-color: rgba(255, 255, 255, 0.35); }
.slot.empty { --rc: rgba(255,255,255,0.25); border-style: dashed; background: rgba(255, 255, 255, 0.05); }
.slot.locked { border-style: dotted; opacity: 0.6; background: rgba(0, 0, 0, 0.35); }
.slot.pop { animation: spop 0.4s ease-out; }
@keyframes spop { 0% { transform: scale(1); } 35% { transform: scale(1.18); box-shadow: 0 0 20px #fff; } 100% { transform: scale(1); } }
.slot:active { transform: scale(0.94); }

/* ---------- toque ---------- */
#stickZone { display: none; position: absolute; left: 0; top: 22%; width: 52%; bottom: 0; touch-action: none; }
body.touch #stickZone { display: block; }
#stickBase { position: fixed; width: 124px; height: 124px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity 0.15s; }
#stickBase.on { opacity: 1; }
#stickKnob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); border: 3px solid rgba(255, 255, 255, 0.85); transform: translate(-50%, -50%); }

body.touch #hudBot { width: min(430px, calc(100vw - 330px)); min-width: 300px; left: 0; right: 150px; margin: 0 auto; }
body.touch #slots { position: fixed; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(3, 58px); gap: 7px; z-index: 6; }
body.touch .sslit { display: none; }
body.touch .slot, body.touch .slot.ult, body.touch .slot.dodge, body.touch .slot.cons { width: 58px; height: 58px; border-radius: 50%; border-width: 3px; }
body.touch .slot.basic { display: none; }
body.touch .slot .skey { display: none; }
body.touch .slot .smana { right: 50%; transform: translateX(50%); bottom: 12px; }
body.touch .slot .spips { bottom: 1px; }
body.touch #gear { display: none; }
body.touch #minimap { right: auto; left: 10px; top: 10px; bottom: auto; width: 96px; height: 96px; opacity: 0.94; }
body.touch #feed { left: 116px; top: 10px; width: 230px; }

/* ---------- evolucao ---------- */
#evoFx { position: fixed; inset: 0; z-index: 8; pointer-events: none; overflow: hidden; }
.evoFlash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.evoFlash::before { content: ""; position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; background: repeating-conic-gradient(rgba(255, 255, 255, 0) 0 8deg, rgba(255, 244, 180, 0.65) 8deg 16deg); opacity: 0; }
#evoFx.go .evoFlash { animation: evoflash 1.9s ease-in-out forwards; }
#evoFx.go .evoFlash::before { animation: rays 1.9s linear forwards; }
@keyframes evoflash { 0% { opacity: 0; } 6% { opacity: 0.85; } 16% { opacity: 0.1; } 40% { opacity: 0.22; } 52% { opacity: 0.7; } 64% { opacity: 0.2; } 78% { opacity: 0.9; } 90% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes rays { 0% { opacity: 0; transform: rotate(0); } 25% { opacity: 0.55; } 80% { opacity: 0.8; } 100% { opacity: 0; transform: rotate(50deg); } }
.evoBanner { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); text-align: center; opacity: 0; width: 92vw; }
#evoFx.go .evoBanner { animation: ebanner 2.9s ease-out forwards; }
.evoT { font-size: clamp(38px, 8vw, 76px); font-weight: 700; color: #fff; text-shadow: 0 0 18px #ffe36a, 0 0 40px #ffb02e, 0 4px 0 #b36b00; letter-spacing: 2px; }
.evoS { font-size: clamp(16px, 3vw, 26px); color: #fff8d0; text-shadow: 0 2px 4px #000; margin-top: 4px; }
@keyframes ebanner { 0% { opacity: 0; transform: translateX(-50%) scale(0.6); } 12% { opacity: 1; transform: translateX(-50%) scale(1.15); } 22% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-18px); } }

/* ---------- sobreposicoes ---------- */
.overlay { position: fixed; inset: 0; z-index: 15; display: flex; align-items: center; justify-content: center; background: rgba(8, 5, 24, 0.5); }
.overlay.dim { background: rgba(8, 5, 24, 0.74); }
.overlay .box { width: min(440px, 92vw); max-height: 96vh; overflow-y: auto; padding: 20px 20px 22px; text-align: center; background: rgba(24, 18, 54, 0.96); border: 2px solid var(--panel-b); border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); animation: pop 0.25s ease-out; touch-action: pan-y; }
.overlay .box.wide { width: min(520px, 94vw); }
@keyframes pop { from { transform: scale(0.88); opacity: 0; } to { transform: none; opacity: 1; } }
.overlay h2 { margin: 0 0 6px; font-size: 34px; color: var(--red); text-shadow: 0 3px 0 #5a1010; }
#pauseBox { z-index: 14; }
#pauseBox h2 { color: var(--gold); text-shadow: 0 3px 0 #6b4500; }
#endBox.win .box { border-color: var(--gold); box-shadow: 0 0 40px rgba(255, 216, 74, 0.35), 0 10px 40px rgba(0, 0, 0, 0.5); }
#endBox.win h2 { color: var(--gold); text-shadow: 0 3px 0 #6b4500, 0 0 24px rgba(255, 216, 74, 0.7); }
#endBox { z-index: 16; }
.deathBy { color: var(--mut); font-size: 17px; margin-bottom: 2px; }
.endPlace { font-size: 52px; font-weight: 700; color: var(--gold); text-shadow: 0 3px 0 #6b4500; line-height: 1; margin: 2px 0 2px; }
#endSprite { width: 96px; height: 96px; image-rendering: pixelated; margin: 2px auto; display: block; }
#endStats { width: 100%; border-collapse: collapse; margin: 6px 0 6px; font-size: 17px; }
#endStats th { text-align: left; color: var(--mut); font-weight: 400; padding: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
#endStats td { text-align: right; font-weight: 700; padding: 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.endSkillsT { color: var(--mut); font-size: 13px; margin-top: 4px; }
.endSkills { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 4px 0 6px; }
.es { position: relative; width: 42px; height: 42px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, 0.3); overflow: hidden; background: #1a1436; }
.es img { width: 100%; height: 100%; object-fit: cover; }
.es.gear img { object-fit: contain; padding: 4px; image-rendering: pixelated; }
.es b { position: absolute; right: 1px; bottom: 0; font-size: 12px; padding: 0 4px; border-radius: 5px 0 0 0; background: rgba(0, 0, 0, 0.75); color: var(--gold); }
.newRec { margin: 4px 0 8px; font-size: 24px; font-weight: 700; color: var(--gold); text-shadow: 0 0 14px rgba(255, 216, 74, 0.7); animation: pulse 0.6s infinite alternate; }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 1; } }
.btns { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 8px; }
.btns .bigbtn { font-size: 24px; padding: 9px 40px; }
.bigbtn { font-size: 28px; font-weight: 700; padding: 10px 56px; border-radius: 16px; border: 0; color: #3a2000; background: linear-gradient(180deg, #ffe86a, #ffa42e); box-shadow: 0 6px 0 #b4600b, 0 10px 18px rgba(0, 0, 0, 0.4); transition: transform 0.08s, box-shadow 0.08s, filter 0.15s; }
.bigbtn:hover { filter: brightness(1.08); }
.bigbtn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b4600b, 0 4px 10px rgba(0, 0, 0, 0.4); }
.bigbtn:disabled { filter: grayscale(0.8) brightness(0.7); cursor: wait; }
.btn2 { font-size: 18px; padding: 9px 22px; border-radius: 12px; border: 2px solid var(--panel-b); background: rgba(40, 30, 90, 0.9); }
.btn2:hover { background: rgba(70, 55, 140, 0.95); }
.btn2:disabled { opacity: 0.4; cursor: default; }
.help { margin: 12px auto 0; max-width: 760px; color: var(--mut); font-size: 14px; line-height: 1.4; }

/* ---------- cartas de nivel ---------- */
#cardsOv { z-index: 17; }
.cardsBox { width: min(860px, 98vw); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cardsTitle { font-size: clamp(24px, 4vw, 38px); font-weight: 700; color: var(--gold); text-shadow: 0 3px 0 #6b4500, 0 0 20px rgba(255, 216, 74, 0.4); text-align: center; }
.cardRow { display: flex; gap: 16px; justify-content: center; align-items: stretch; flex-wrap: wrap; }
.pcard { position: relative; width: 236px; min-height: 322px; padding: 34px 14px 16px; border-radius: 18px; border: 3px solid var(--rc); background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 24%, #1b1538), #140f2d 75%); color: #fff; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 0 0 var(--rc); animation: cardIn 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; transition: transform 0.14s, box-shadow 0.14s; touch-action: manipulation; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-10px) scale(1.04); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 26px var(--rc); outline: none; }
.pcard.r-epic { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 30%, #1b1538), #140f2d 75%); animation: cardIn 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both, epicGlow 1.6s ease-in-out infinite alternate; }
.pcard.chosen { transform: translateY(-14px) scale(1.1); box-shadow: 0 0 40px var(--rc); transition: transform 0.3s, opacity 0.3s; }
.pcard.fade { opacity: 0.15; transform: scale(0.92); transition: transform 0.3s, opacity 0.3s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(60px) rotate(-4deg) scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes epicGlow { from { box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 8px var(--rc); } to { box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 28px var(--rc); } }
.pcard .rtag { position: absolute; top: 9px; right: 10px; padding: 1px 9px; border-radius: 9px; background: var(--rc); color: #14102a; font-size: 12px; font-weight: 700; }
.pcard .ckey { position: absolute; top: 8px; left: 10px; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); border: 2px solid rgba(255, 255, 255, 0.4); font-size: 14px; font-weight: 700; }
.pcard .ctag { font-size: 12px; letter-spacing: 1.5px; color: var(--rc); font-weight: 700; margin-top: 2px; }
.pcard .cico { width: 88px; height: 88px; border-radius: 20px; border: 3px solid var(--rc); background: rgba(0, 0, 0, 0.4); overflow: hidden; display: grid; place-items: center; box-shadow: 0 0 18px color-mix(in srgb, var(--rc) 50%, transparent); }
.pcard .cico img { width: 100%; height: 100%; object-fit: cover; }
.pcard .cico.upg { color: var(--rc); }
.pcard .cico svg { width: 56px; height: 56px; }
.pcard .cname { font-size: 23px; font-weight: 700; color: #fff; line-height: 1.05; }
.pcard .clv { font-size: 16px; color: var(--gold); font-weight: 700; }
.pcard .cstat { display: flex; gap: 10px; font-size: 13px; }
.pcard .cstat span { padding: 0 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.45); }
.pcard .cstat .cm { color: #8fd0ff; }
.pcard .cstat .cm::before { content: "MP "; opacity: 0.7; }
.pcard .cstat .cc { color: #ffd08a; }
.pcard .cdesc { font-size: 14px; line-height: 1.35; color: #d9d2ff; margin-top: 2px; }
.cardsFoot { display: flex; gap: 10px; }

/* ---------- tabela de tipos ---------- */
#typePanel { z-index: 30; }
.tpBox { width: min(1080px, 97vw); max-height: 95vh; display: flex; flex-direction: column; background: rgba(22, 16, 50, 0.97); border: 2px solid var(--panel-b); border-radius: 18px; box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55); animation: pop 0.22s ease-out; overflow: hidden; touch-action: pan-y; }
.tpHead { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid var(--panel-b); flex-wrap: wrap; }
.tpHead h2 { margin: 0; font-size: 26px; color: var(--gold); text-shadow: 0 2px 0 #6b4500; }
.tpForms { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.tpForm { display: flex; align-items: center; gap: 6px; padding: 3px 12px 3px 4px; border-radius: 999px; border: 2px solid var(--panel-b); background: rgba(40, 30, 90, 0.85); font-size: 14px; }
.tpForm canvas { width: 32px; height: 32px; image-rendering: pixelated; }
.tpForm.sel { border-color: var(--gold); background: rgba(90, 65, 160, 0.95); box-shadow: 0 0 10px rgba(255, 216, 74, 0.35); }
.tpForm:hover { background: rgba(70, 55, 140, 0.95); }
.tpX { font-size: 26px; line-height: 1; flex: none; }
.tpBody { display: flex; gap: 16px; padding: 12px 14px 14px; overflow: auto; align-items: flex-start; flex: 1; }
.tpLists { flex: 1 1 380px; min-width: 280px; display: flex; flex-direction: column; gap: 9px; }
.tpYou { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 18px; }
.tpYou b { color: #fff; }
.tpNote { font-size: 13px; color: var(--mut); }
.tpSec { padding: 7px 9px 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border-left: 5px solid #888; }
.tpSec.strong { border-left-color: #4cf070; }
.tpSec.weak { border-left-color: #ff5a5a; }
.tpSec.resisted { border-left-color: #ffae42; }
.tpSec.noeff { border-left-color: #8a8fa3; }
.tpSec.resists { border-left-color: #5fb8ff; }
.tpSec.immune { border-left-color: #c45bff; }
.tpSecT { font-size: 14px; font-weight: 700; margin-bottom: 5px; color: #fff; }
.tpSec.strong .tpSecT { color: #7dff9a; }
.tpSec.weak .tpSecT { color: #ff9a9a; }
.tpChips { display: flex; flex-wrap: wrap; gap: 5px; }
.tpChips .none { color: var(--mut); font-size: 13px; }
.tpMat { flex: 0 0 auto; }
.tpMatT { font-size: 13px; color: var(--mut); margin-bottom: 6px; }
.matrix { --cs: 25px; display: grid; grid-template-columns: repeat(var(--n), var(--cs)); grid-auto-rows: var(--cs); gap: 1px; padding: 4px; border-radius: 10px; background: rgba(0, 0, 0, 0.35); width: max-content; }
.matrix .mh { display: grid; place-items: center; }
.matrix .mh img { width: calc(var(--cs) - 6px); height: calc(var(--cs) - 6px); border-radius: 50%; }
.matrix .mc { display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.05); color: #fff; cursor: default; }
.matrix .mc.s { background: rgba(50, 190, 95, 0.85); }
.matrix .mc.r { background: rgba(225, 70, 70, 0.8); }
.matrix .mc.z { background: rgba(8, 6, 20, 0.95); color: #8a8fa3; }
.matrix .ra { box-shadow: inset 0 2px 0 var(--gold), inset 0 -2px 0 var(--gold); }
.matrix .mh.row.ra { box-shadow: inset 2px 0 0 var(--gold), inset 0 2px 0 var(--gold), inset 0 -2px 0 var(--gold); background: rgba(255, 216, 74, 0.25); }
.matrix .cdf { box-shadow: inset 2px 0 0 #5fb8ff, inset -2px 0 0 #5fb8ff; }
.matrix .mh.col.cdf { box-shadow: inset 2px 0 0 #5fb8ff, inset -2px 0 0 #5fb8ff, inset 0 2px 0 #5fb8ff; background: rgba(95, 184, 255, 0.25); }
.matrix .ra.cdf { box-shadow: inset 0 2px 0 var(--gold), inset 0 -2px 0 var(--gold), inset 2px 0 0 #5fb8ff, inset -2px 0 0 #5fb8ff; }
.matrix .hr:not(.mh), .matrix .hc:not(.mh) { filter: brightness(1.35); }
.matrix .mh.hr, .matrix .mh.hc { background: rgba(255, 255, 255, 0.2); }

/* ---------- menu ---------- */
#menu { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overflow-x: hidden; background: radial-gradient(ellipse at 50% 20%, rgba(70, 40, 140, 0.45), rgba(10, 7, 28, 0.8) 70%); touch-action: pan-y; display: flex; flex-direction: column; align-items: center; }
.menuBox { width: min(1180px, 96vw); margin: auto; padding: 14px 10px 18px; text-align: center; }
.logo { margin: 4px 0 6px; line-height: 0.95; font-weight: 700; display: flex; flex-direction: column; align-items: center; }
.logo .l1 { font-size: clamp(22px, 4.2vw, 36px); color: #9fd8ff; letter-spacing: 6px; text-shadow: 0 3px 0 #1b4a85, 0 0 16px rgba(95, 184, 255, 0.6); }
.logo .l2 { font-size: clamp(40px, 8vw, 72px); background: linear-gradient(180deg, #fff2a0 10%, #ffc72e 55%, #ff8a1f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 3px #2a3f9c; paint-order: stroke fill; filter: drop-shadow(0 5px 0 #1a2870) drop-shadow(0 0 18px rgba(255, 196, 60, 0.45)); letter-spacing: 2px; }
.sub { margin: 6px 0 10px; color: var(--mut); font-size: clamp(14px, 2.2vw, 18px); }
.row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 13px; color: var(--mut); }
.field input { width: 220px; max-width: 80vw; font-family: var(--font); font-size: 18px; padding: 7px 10px; border-radius: 10px; border: 2px solid var(--panel-b); background: rgba(8, 5, 24, 0.7); color: #fff; outline: none; user-select: text; -webkit-user-select: text; touch-action: auto; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 216, 74, 0.25); }
.seg { display: flex; border-radius: 10px; overflow: hidden; border: 2px solid var(--panel-b); }
.seg button { padding: 8px 14px; font-size: 16px; background: rgba(8, 5, 24, 0.7); border: 0; }
.seg button.sel { background: linear-gradient(180deg, #ffe86a, #ffa42e); color: #3a2300; font-weight: 700; }
.pickLabel { margin: 8px 0 7px; font-size: 15px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 820px; margin: 0 auto; }
.mode { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 14px; border: 2px solid var(--panel-b); background: var(--panel); text-align: left; transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s; }
.mode b { font-size: 20px; color: #fff; }
.mode span { font-size: 13px; color: var(--mut); line-height: 1.25; }
.mode:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.45); }
.mode.sel { border-color: var(--gold); background: rgba(70, 50, 140, 0.8); box-shadow: 0 0 0 2px rgba(255, 216, 74, 0.3), 0 0 20px rgba(255, 216, 74, 0.28); }
.mode.sel b { color: var(--gold); }
#cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 7px; margin-bottom: 8px; }
.card { background: var(--panel); border: 2px solid var(--panel-b); border-radius: 14px; padding: 6px 5px 7px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s; outline: none; }
.card canvas { width: 64px; height: 64px; image-rendering: pixelated; }
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.5); }
.card.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 216, 74, 0.35), 0 0 20px rgba(255, 216, 74, 0.35); background: rgba(70, 50, 140, 0.75); }
.card .cn { font-size: 16px; font-weight: 700; }
.card .ctypes { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.card .cl { font-size: 11px; color: var(--mut); margin-top: 1px; }
.menuCols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.colR { position: sticky; top: 8px; }
.lineInfo { margin: 0; padding: 8px 10px; border-radius: 14px; background: var(--panel); border: 2px solid var(--panel-b); display: flex; flex-direction: column; gap: 6px; }
.liForms { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }
.liArrow { font-size: 30px; color: var(--gold); padding: 0 4px; }
.liForm { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 8px; }
.liForm canvas { width: 56px; height: 56px; image-rendering: pixelated; }
.liForm .fn { font-size: 15px; font-weight: 700; }
.liForm .fl { font-size: 11px; color: var(--mut); }
.liForm .ftypes { display: flex; gap: 3px; margin-top: 2px; }
.liRows { display: flex; flex-direction: column; gap: 4px; }
.liRow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.liRow b { color: #7dff9a; margin-right: 4px; }
.liRow.weak b { color: #ff9a9a; }
.liRow i { color: var(--mut); }
.menuBtns { position: sticky; bottom: 0; z-index: 2; display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 4px; padding: 14px 0 8px; background: linear-gradient(180deg, rgba(10, 7, 28, 0), rgba(10, 7, 28, 0.92) 45%); }
.best { margin-top: 10px; color: #fff; font-size: 15px; }
.cred { margin: 10px auto 0; max-width: 760px; color: #8f89b2; font-size: 11px; line-height: 1.35; }
.loadTxt { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--mut); font-size: 14px; }

#dbg { position: fixed; left: 8px; bottom: 8px; z-index: 50; font: 12px monospace; background: rgba(0, 0, 0, 0.7); color: #9f9; padding: 3px 7px; border-radius: 6px; pointer-events: none; }

/* ---------- telas medias ---------- */
@media (max-width: 980px) {
  .menuCols { grid-template-columns: 1fr; }
  .colR { position: static; }
  .lineInfo { margin: 0 auto; max-width: 560px; }
}
@media (max-width: 1080px) {
  #hudBot { width: min(680px, calc(100vw - 290px)); min-width: 560px; }
  #minimap { width: 130px; height: 130px; }
  .slot { width: 50px; height: 50px; }
  .slot.basic { width: 38px; height: 38px; }
}

/* ---------- celular em paisagem e telas baixas ---------- */
@media (max-height: 520px) {
  #feed .fi { font-size: 11px; padding: 2px 7px; }
  #feed { width: 210px; }
  .banner { top: 8px; font-size: 18px; padding: 4px 14px; }
  #toast { top: 52px; font-size: 14px; padding: 3px 12px; }
  #hudTR { width: 168px; top: 8px; right: 8px; gap: 4px; }
  .iconbtn { width: 30px; height: 30px; }
  .iconbtn svg { width: 18px; height: 18px; }
  .schip { padding: 1px 8px; font-size: 12px; }
  .schip b { font-size: 15px; }
  #lb { padding: 4px 5px 3px; }
  #lbList li { font-size: 11px; padding: 0 4px; margin-bottom: 1px; gap: 4px; }
  #lbList li:nth-child(n+4):not(.me):not(.extra) { display: none; }
  #minimap { width: 92px; height: 92px; }
  #hudBot { bottom: 6px; }
  #pbar { padding: 5px 8px; gap: 8px; }
  .pLeft, #portrait { width: 48px; height: 48px; }
  .plevel { font-size: 10px; padding: 0 6px; bottom: -5px; }
  .pname { font-size: 14px; }
  .pstage { font-size: 10px; }
  .bar.hp { height: 17px; } .bar.hp span { font-size: 11px; }
  .bar.mp { height: 12px; } .bar.mp span { font-size: 9px; }
  .bar.xp { height: 5px; }
  .buff { width: 24px; height: 24px; }
  .menuBox { padding: 4px 8px 12px; }
  .logo { flex-direction: row; gap: 10px; justify-content: center; align-items: baseline; }
  .logo .l1 { font-size: 20px; letter-spacing: 3px; }
  .logo .l2 { font-size: 36px; -webkit-text-stroke: 2px #2a3f9c; }
  .sub { display: none; }
  .row { margin-bottom: 4px; gap: 10px; }
  .field input { font-size: 15px; padding: 5px 8px; width: 180px; }
  .seg button { padding: 5px 10px; font-size: 14px; }
  .pickLabel { margin: 4px 0 4px; font-size: 12px; }
  .modes { gap: 6px; }
  .mode { padding: 5px 9px; } .mode b { font-size: 16px; } .mode span { font-size: 11px; }
  #cards { display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; margin-bottom: 6px; touch-action: pan-x; }
  .card { flex: 0 0 112px; padding: 3px 4px 4px; }
  .card canvas { width: 46px; height: 46px; }
  .card .cn { font-size: 14px; }
  .card .cl { display: none; }
  .menuCols { grid-template-columns: 1fr; gap: 4px; }
  .lineInfo { padding: 4px 8px; margin: 4px auto 6px; }
  .liForm canvas { width: 40px; height: 40px; }
  .liArrow { font-size: 20px; }
  .liForm .fl { display: none; }
  .liRows { display: none; }
  .bigbtn { font-size: 22px; padding: 6px 34px; box-shadow: 0 4px 0 #b4600b; }
  .btn2 { font-size: 15px; padding: 6px 14px; }
  .help { margin-top: 6px; font-size: 12px; }
  .best { margin-top: 4px; font-size: 13px; }
  .cred { display: none; }
  .overlay h2 { font-size: 26px; }
  .overlay .box { padding: 12px 14px 14px; }
  .endPlace { font-size: 38px; }
  #endSprite { width: 64px; height: 64px; }
  #endStats { font-size: 14px; }
  .cardsBox { gap: 6px; }
  .cardsTitle { font-size: 22px; }
  .cardRow { gap: 10px; flex-wrap: nowrap; }
  .pcard { width: 182px; min-height: 0; padding: 26px 8px 10px; gap: 3px; }
  .pcard .cico { width: 52px; height: 52px; border-radius: 14px; }
  .pcard .cico svg { width: 34px; height: 34px; }
  .pcard .cname { font-size: 17px; }
  .pcard .clv { font-size: 13px; }
  .pcard .cdesc { font-size: 11.5px; line-height: 1.25; }
  .pcard .cstat { font-size: 11px; }
  .pcard .rtag { font-size: 10px; top: 6px; right: 7px; }
  .pcard .ckey { width: 20px; height: 20px; font-size: 12px; top: 5px; left: 7px; }
  .pcard .ctag { font-size: 10px; margin-top: 0; }
  .tpHead { padding: 5px 10px; gap: 8px; }
  .tpHead h2 { font-size: 18px; }
  .tpForm { font-size: 12px; padding: 2px 9px 2px 3px; } .tpForm canvas { width: 24px; height: 24px; }
  .tpBody { padding: 8px 10px 10px; gap: 10px; }
  .matrix { --cs: 14px; }
  .matrix .mc { font-size: 9px; }
  .tpMatT { font-size: 11px; margin-bottom: 3px; }
  .tpYou { font-size: 14px; } .tpNote { font-size: 11px; }
  .tpSec { padding: 4px 7px 5px; } .tpSecT { font-size: 12px; margin-bottom: 3px; }
  .tchip { font-size: 11px; } .tchip img { width: 14px; height: 14px; }
  .tpLists { gap: 6px; }
}
@media (max-width: 720px) and (min-height: 521px) {
  #hudBot { width: calc(100vw - 20px); min-width: 0; }
  #hudTR { width: 170px; }
  #minimap { width: 100px; height: 100px; bottom: auto; top: 10px; right: auto; left: 10px; }
  #feed { left: 118px; width: 200px; }
  .pcard { width: 92%; min-height: 0; }
  .cardRow { flex-direction: column; align-items: center; }
  .matrix { --cs: 15px; }
}

/* ---------- kit da linha no menu ---------- */
.liKit { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.liKit > b { font-size: 13px; color: var(--mut); font-weight: 400; }
.kitI { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); border: 2px solid #9fb0c8; font-size: 13px; }
.kitI.t1 { border-color: #4da3ff; }
.kitI.t2 { border-color: #c45bff; box-shadow: 0 0 10px rgba(196, 91, 255, 0.45); }
.kitI img { width: 30px; height: 30px; border-radius: 7px; display: block; }
.kitI i { position: absolute; left: 2px; top: 0; font-style: normal; font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 4px; background: rgba(0, 0, 0, 0.7); }
.kitI em { font-style: normal; }

/* ---------- mochila ---------- */
#btnBag.on { background: rgba(90, 70, 190, 0.95); border-color: var(--gold); }
#btnBag svg { width: 21px; height: 21px; }
#bag { position: absolute; right: 10px; top: 56px; width: min(430px, calc(100vw - 20px)); max-height: calc(100vh - 230px); display: flex; flex-direction: column; z-index: 20; overflow: hidden; }
.bagHead { display: flex; align-items: center; gap: 10px; padding: 8px 10px 6px 14px; border-bottom: 1px solid var(--panel-b); }
.bagTitle { font-size: 20px; color: var(--gold); }
.bagHint { flex: 1; font-size: 12px; color: var(--mut); }
.bagX { width: 30px; height: 30px; font-size: 22px; line-height: 1; }
.bagBody { overflow-y: auto; padding: 4px 12px 12px; touch-action: pan-y; }
.bagBody h4 { margin: 12px 0 6px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mut); }
.bagGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bagCard { display: flex; gap: 8px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 2px solid color-mix(in srgb, var(--rc, #fff) 60%, transparent); cursor: pointer; min-width: 0; }
.bagCard.empty { border-style: dashed; border-color: rgba(255, 255, 255, 0.2); cursor: default; opacity: 0.8; }
.bagCard.sel { background: rgba(255, 255, 255, 0.11); box-shadow: 0 0 0 2px var(--rc, #fff) inset; }
.bagIco { position: relative; flex: none; width: 46px; height: 46px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); display: grid; place-items: center; }
.bagIco img { width: 38px; height: 38px; image-rendering: pixelated; object-fit: contain; }
.bagCnt { position: absolute; right: -4px; bottom: -4px; padding: 0 5px; border-radius: 8px; background: #000a; font-size: 12px; font-weight: 700; }
.bagTx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bagSlotN { font-size: 11px; color: var(--mut); font-style: normal; }
.bagNm { font-size: 15px; line-height: 1.1; }
.bagRar { font-size: 11px; opacity: 0.9; }
.bagLines { list-style: none; margin: 3px 0 0; padding: 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 1px; }
.bagLines b { color: var(--green); }
.bagDesc { margin: 3px 0 0; font-size: 12.5px; line-height: 1.25; color: #dcd7f4; }
.bagMut { color: var(--mut); font-size: 12px; font-style: normal; }
.bagBtns { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.bagB { padding: 3px 9px; border-radius: 8px; border: 1.5px solid var(--panel-b); background: rgba(255, 255, 255, 0.08); font-size: 12px; }
.bagB:hover { background: rgba(255, 255, 255, 0.18); }
.bagB.drop { border-color: rgba(255, 110, 110, 0.55); color: #ffc0c0; }
.bagB.use { border-color: rgba(110, 255, 150, 0.55); color: #c4ffd4; }
.bagTbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.bagTbl td { padding: 2px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.bagTbl td:first-child { color: var(--mut); width: 45%; }
.bagTbl b { color: var(--green); }
@media (max-width: 700px) { .bagGrid { grid-template-columns: 1fr; } #bag { top: 50px; max-height: calc(100vh - 200px); } }

/* ---------- ranking ---------- */
#lb { cursor: pointer; }
#lb.open { background: rgba(20, 15, 44, 0.92); }
#lb.open #lbList li:nth-child(n+4) { display: flex; }
#lb.open #lbList li[hidden] { display: none; }
.rkTitle { color: var(--gold) !important; text-shadow: 0 3px 0 #6b4500 !important; }
.rkTabs { display: flex; gap: 6px; justify-content: center; margin: 4px 0 10px; }
.rkTabs button { padding: 6px 14px; border-radius: 10px; border: 2px solid var(--panel-b); background: rgba(255, 255, 255, 0.06); font-size: 14px; }
.rkTabs button.sel { border-color: var(--gold); background: rgba(255, 216, 74, 0.18); color: var(--gold); }
.rkBody { max-height: 52vh; overflow-y: auto; margin-bottom: 10px; }
.rkEmpty { color: var(--mut); padding: 18px 8px; }
.rkTbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.rkTbl th { color: var(--mut); font-size: 11px; font-weight: 400; text-transform: uppercase; padding: 2px 5px; text-align: left; }
.rkTbl td { padding: 4px 5px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-align: left; }
.rkTbl td.c1 { border-left: 4px solid var(--tc, #888); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkTbl td.c0, .rkTbl th.c0 { width: 24px; text-align: right; color: var(--mut); }
.rkTbl td.c2 { font-weight: 700; color: #e6e0ff; }
.rkTbl td.c3, .rkTbl td.c4, .rkTbl td.c5 { color: var(--mut); font-variant-numeric: tabular-nums; }
.rkTbl tr.top1 td.c0 { color: #ffd84a; } .rkTbl tr.top2 td.c0 { color: #d4dbe6; } .rkTbl tr.top3 td.c0 { color: #d99a5b; }
.rkTbl tr.me td { background: rgba(255, 216, 74, 0.18); color: var(--gold); }
#rankBox { z-index: 40; }
.endRank { font-size: 15px; color: var(--mut); margin: 6px 0 4px; }
.endRank.in { color: var(--gold); font-weight: 700; }
.endBoard { max-height: 132px; overflow-y: auto; margin-bottom: 8px; }
.endBoard .rkTbl { font-size: 12.5px; }
.endBoard .rkTbl td { padding: 2px 4px; }

/* ---------- progressao: mutador, cartas bloqueadas, perfil ---------- */
.mutRow { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 8px auto 0; font-size: 14px; color: var(--mut); }
.mutRow select { font-family: var(--font); font-size: 16px; padding: 5px 10px; border-radius: 10px; border: 2px solid var(--panel-b); background: rgba(8, 5, 24, 0.85); color: #fff; outline: none; cursor: pointer; max-width: 70vw; }
.mutRow select:focus { border-color: var(--gold); }
.card { position: relative; }
.card.locked { filter: grayscale(0.85) brightness(0.65); cursor: not-allowed; }
.card.locked:hover { transform: none; }
.card .lockB { position: absolute; inset: 8px 0 auto 0; height: 62px; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: #fff; font-size: 13px; pointer-events: none; }
.card.locked .lockB { display: flex; }
.card .lockB svg { width: 24px; height: 24px; filter: drop-shadow(0 2px 3px #000); }
.card .lockB b { background: rgba(0, 0, 0, 0.7); padding: 1px 8px; border-radius: 8px; font-size: 12px; }
.card .cstars { position: absolute; top: 3px; right: 6px; color: var(--gold); font-size: 11px; letter-spacing: 1px; text-shadow: 0 1px 2px #000; }
.ndot { display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 8px #ff5a5a; vertical-align: middle; animation: bpulse 0.8s infinite alternate; }
#mutChip { border-color: #ffa63c; }

#hubBox { z-index: 40; }
.hubBoxIn { width: min(780px, 96vw) !important; text-align: left !important; padding: 14px 18px 18px !important; }
.hbTop { display: flex; align-items: center; justify-content: space-between; }
.hbTop h2 { margin: 0 !important; font-size: 30px !important; color: var(--gold) !important; text-shadow: 0 3px 0 #5a3a05 !important; }
.hbX { width: 36px; height: 36px; font-size: 26px; line-height: 1; }
.hbTabs { display: flex; gap: 6px; margin: 10px 0 12px; flex-wrap: wrap; }
.hbTabs button { padding: 6px 14px; border-radius: 10px; border: 2px solid var(--panel-b); background: rgba(40, 30, 90, 0.7); font-size: 16px; }
.hbTabs button.sel { background: linear-gradient(180deg, #ffe86a, #ffa42e); color: #3a2300; font-weight: 700; border-color: transparent; }
.hbBody { max-height: min(62vh, 560px); overflow-y: auto; padding-right: 4px; touch-action: pan-y; }
.hbBody h3 { margin: 14px 0 7px; font-size: 15px; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; }
.hbBody h3 small { color: var(--mut); letter-spacing: 0; text-transform: none; font-weight: 400; margin-left: 8px; font-size: 13px; }
.hbHelp { margin: 0 0 6px; font-size: 13px; color: var(--mut); }
.hbHead { display: flex; gap: 14px; align-items: center; }
.hbLv { width: 74px; height: 74px; flex: none; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #ffe86a, #ff9d2e); color: #3a2300; border: 3px solid #fff3b8; box-shadow: 0 0 22px rgba(255, 190, 60, 0.45); line-height: 1; }
.hbLv small { font-size: 12px; font-weight: 700; } .hbLv b { font-size: 32px; }
.hbInfo { flex: 1; min-width: 0; }
.hbName { font-size: 22px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbBar, .qb, .emBar { position: relative; height: 16px; margin: 5px 0; border-radius: 9px; background: rgba(8, 5, 24, 0.8); border: 2px solid var(--panel-b); overflow: hidden; }
.hbBar i, .qb i, .emBar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #5be37a, #b6ff5a); transition: width 0.9s ease-out; }
.hbBar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 13px; text-shadow: 0 1px 2px #000; }
.hbNext { font-size: 13px; color: var(--mut); } .hbNext b { color: #fff; }
.hbStats { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.hbStats div { padding: 6px 8px; border-radius: 10px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); text-align: center; }
.hbStats b { display: block; font-size: 19px; color: #fff; } .hbStats span { font-size: 11px; color: var(--mut); }
.hbMast { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.ms { padding: 5px 4px 6px; border-radius: 12px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ms.max { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 216, 74, 0.3); }
.ms.lock { opacity: 0.5; filter: grayscale(0.8); }
.ms canvas, .dcCol canvas { image-rendering: pixelated; }
.ms b { font-size: 14px; } .ms .stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; } .ms .lk { font-size: 12px; color: var(--mut); }
.mb { display: block; width: 78%; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; } .mb u { display: block; height: 100%; background: var(--gold); }
.qList, .achList { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.q, .ach { padding: 8px 10px; border-radius: 12px; background: rgba(8, 5, 24, 0.55); border: 2px solid var(--panel-b); }
.q.t1 { border-color: rgba(77, 163, 255, 0.5); } .q.t2 { border-color: rgba(196, 91, 255, 0.55); }
.q.done, .ach.done { border-color: var(--green); background: rgba(40, 110, 60, 0.35); }
.q .qt, .ach .an { font-size: 15px; font-weight: 700; } .ach .ad { font-size: 12px; color: var(--mut); min-height: 28px; }
.q .qb, .ach .qb { height: 10px; margin: 6px 0 3px; }
.qs { display: flex; justify-content: space-between; font-size: 12px; color: var(--mut); } .qs b { color: var(--gold); font-weight: 700; }
.dcBox { display: flex; gap: 12px; flex-wrap: wrap; }
.dcCol { flex: 1 1 220px; padding: 10px; border-radius: 14px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.dcCol small { color: var(--gold); text-transform: uppercase; font-size: 12px; letter-spacing: 1px; } .dcCol span { font-size: 13px; color: var(--mut); }
.dcCol b { font-size: 18px; } .dcBio { text-align: center; margin-top: 8px; font-size: 14px; color: var(--mut); } .dcBio b { color: #fff; } .mdot.s { display: inline-block; width: 12px; height: 12px; margin: 0 4px 0 0; vertical-align: middle; }
.mdot { width: 40px; height: 40px; border-radius: 50%; display: block; margin: 8px 0; }
.dcGoal { margin: 10px 0 2px; font-size: 18px; color: #fff; text-align: center; } .dcGoal small { display: block; font-size: 12px; color: var(--mut); }
.dcRec { text-align: center; font-size: 15px; color: var(--mut); } .dcRec b { color: var(--gold); font-size: 18px; } .dcRec em { color: var(--green); font-style: normal; margin-left: 6px; }
.dcBtn { text-align: center; margin: 10px 0 4px; }
.dcHist { width: 100%; border-collapse: collapse; font-size: 14px; } .dcHist td { padding: 3px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); } .dcHist tr.ok td { color: var(--green); }
.pvBox { position: relative; height: 150px; margin: 4px 0 8px; border-radius: 14px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.pvT { font-size: 13px; font-weight: 700; } .pvN { font-size: 24px; }
.pvBox canvas { position: relative; z-index: 1; image-rendering: pixelated; margin-top: -2px; }
.pvA { position: absolute; bottom: 14px; left: 50%; width: 120px; height: 24px; margin-left: -60px; border: 3px dashed #fff; border-radius: 50%; animation: pvspin 6s linear infinite; }
@keyframes pvspin { to { transform: rotate(360deg); } }
.rb { animation: rbh 3s linear infinite; } .rb2 { background: conic-gradient(red, orange, yellow, lime, cyan, blue, magenta, red) !important; } .rb3 { animation: rbb 3s linear infinite, pvspin 6s linear infinite; }
@keyframes rbh { 0% { color: #ff6b6b; } 17% { color: #ffd84a; } 34% { color: #6fe07d; } 50% { color: #5fe0ff; } 67% { color: #7a8cff; } 84% { color: #ff8ad8; } 100% { color: #ff6b6b; } }
@keyframes rbb { 0% { border-color: #ff6b6b; } 25% { border-color: #ffd84a; } 50% { border-color: #5fe0ff; } 75% { border-color: #ff8ad8; } 100% { border-color: #ff6b6b; } }
.ttList, .swList { display: flex; flex-wrap: wrap; gap: 6px; }
.tt { padding: 4px 11px; border-radius: 999px; border: 2px solid var(--tc, #888); background: rgba(8, 5, 24, 0.6); color: var(--tc, #fff); font-size: 14px; font-weight: 700; }
.tt.sel { background: var(--tc); color: #1b1530; } .tt.lock { opacity: 0.35; cursor: not-allowed; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 9px; border-radius: 12px; border: 2px solid var(--panel-b); background: rgba(8, 5, 24, 0.6); font-size: 12px; min-width: 70px; }
.sw i { width: 26px; height: 26px; border-radius: 50%; display: block; border: 2px solid rgba(255, 255, 255, 0.6); line-height: 22px; text-align: center; font-style: normal; }
.sw.sel { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 216, 74, 0.4); } .sw.lock { opacity: 0.4; cursor: not-allowed; } .sw small { color: var(--mut); font-size: 11px; }
.endMeta { margin: 10px auto 4px; max-width: 460px; padding: 8px 12px; border-radius: 14px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); text-align: left; }
.emHead { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; } .emHead span { color: var(--mut); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; } .emHead b { font-size: 18px; } .emHead em { color: var(--gold); font-style: normal; font-size: 18px; font-weight: 700; }
.emBar { height: 12px; } .emParts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--mut); } .emParts b { color: #cfe9ff; }
.emUp { margin-top: 5px; color: var(--green); font-size: 14px; font-weight: 700; } .emDaily { margin-top: 5px; font-size: 14px; color: #ffd08a; }
.emNotes { margin-top: 5px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--gold); }
@media (max-width: 640px) { .modes { grid-template-columns: 1fr; } .hubBoxIn { padding: 10px 10px 14px !important; } .hbBody { max-height: 66vh; } }
@media (max-height: 520px) { .mutRow { margin-top: 4px; } .hbBody { max-height: 56vh; } .modes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mode span { display: none; } }

/* volume: barra no menu, na pausa e ao passar o mouse no alto-falante */
.volRow { display: flex; align-items: center; gap: 8px; }
.volRow .volBtn { width: 34px; height: 34px; flex: none; }
.volRow.off .volBtn { color: #ff8a8a; }
.volSl { -webkit-appearance: none; appearance: none; width: 140px; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold)) 0 / var(--p, 100%) 100% no-repeat, rgba(255, 255, 255, 0.18); outline: none; cursor: pointer; touch-action: pan-y; }
.volSl::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
.volSl::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--gold); }
.volRow.off .volSl { opacity: 0.55; }
.volPct { min-width: 38px; text-align: right; font-size: 15px; color: #fff; }
.volBox { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 4px 0 10px; font-size: 13px; color: var(--mut); }
.volPop { position: fixed; z-index: 60; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--panel-b); background: var(--panel); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.volPop[hidden] { display: none; }

/* cosmeticos de nivel alto: molduras, efeitos de derrota e emotes */
.sw canvas.fsw { display: block; width: 112px; height: 34px; }
.sw i.gl { font-size: 15px; line-height: 22px; background: rgba(255, 255, 255, 0.08); }
.dpBox { display: flex; justify-content: center; margin: 4px 0 8px; border-radius: 14px; background: rgba(8, 5, 24, 0.55); border: 1px solid var(--panel-b); overflow: hidden; }
.dpBox canvas { width: 300px; max-width: 100%; height: auto; image-rendering: pixelated; }
.emList { display: flex; flex-wrap: wrap; gap: 6px; }
.emList .em { padding: 4px 10px; border-radius: 12px; border: 2px solid var(--ec, #fff); background: rgba(8, 5, 24, 0.7); color: var(--ec, #fff); font-size: 13px; font-weight: 700; }
.emList .em.lock { opacity: 0.4; } .emList .em small { color: var(--mut); margin-left: 6px; font-size: 11px; font-weight: 400; }
#btnEmote.on { background: rgba(90, 70, 190, 0.95); border-color: var(--gold); }
#btnEmote svg { width: 21px; height: 21px; }
#emoteBar { position: fixed; left: 50%; bottom: 112px; transform: translateX(-50%); z-index: 19; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 8px; max-width: min(640px, 94vw); pointer-events: auto; }
#emoteBar button { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 12px 5px; border-radius: 12px; border: 2px solid var(--ec, #fff); background: rgba(8, 5, 24, 0.8); color: var(--ec, #fff); font-size: 14px; font-weight: 700; min-width: 64px; }
#emoteBar button:hover { background: rgba(60, 48, 120, 0.95); }
#emoteBar button.lock { opacity: 0.4; cursor: not-allowed; }
#emoteBar kbd { position: absolute; top: -7px; left: -5px; font: 700 10px monospace; background: #14101e; border: 1px solid var(--panel-b); border-radius: 5px; padding: 0 4px; color: var(--mut); }
#emoteBar small { color: var(--mut); font-size: 10px; font-weight: 400; }
@media (max-width: 700px) { #emoteBar { bottom: 150px; } }

/* treino guiado */
#tutBox { position: fixed; left: 50%; top: 104px; transform: translateX(-50%); z-index: 21; width: min(520px, calc(100vw - 20px)); padding: 10px 14px 12px; pointer-events: auto; }
.tutHead { display: flex; align-items: center; gap: 10px; }
.tutN { font-size: 12px; color: var(--mut); white-space: nowrap; }
.tutBar { flex: 1; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.tutBar i { display: block; height: 100%; background: var(--gold); transition: width 0.4s; }
.tutT { font-size: 20px; color: var(--gold); margin-top: 4px; }
.tutD { margin: 4px 0 8px; font-size: 14px; line-height: 1.4; }
.tutBtns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tutBtns .btn2 { padding: 6px 12px; font-size: 13px; }
@media (max-width: 700px) { #tutBox { top: 84px; } .tutD { font-size: 13px; } }

/* musica: segunda linha de volume */
.volWho { min-width: 58px; font-size: 13px; color: var(--mut); text-align: left; }
#volMenuHost, #volPauseHost, .volPop { display: flex; flex-direction: column; gap: 6px; }
.volRow.musRow .volBtn { font-size: 18px; line-height: 1; }
.volRow.off .volWho { opacity: 0.6; }

/* selo da tecla de atalho em cima do botao (some no toque) */
.iconbtn { position: relative; }
.keyBadge { position: absolute; right: -4px; bottom: -5px; min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box; border-radius: 6px; background: var(--gold); color: #1a1233; border: 1.5px solid var(--panel-b); font-size: 10px; font-weight: 800; line-height: 12px; text-align: center; pointer-events: auto; cursor: inherit; }
.btn2 > .keyBadge { position: static; display: inline-block; vertical-align: middle; margin: -3px 0 0 8px; height: 16px; padding: 0 5px; line-height: 13px; font-size: 10px; }
body.touch .keyBadge { display: none; }
