:root {
  --bg: #0d0f1a; --panel: rgba(22, 25, 46, .78); --panel2: #232842; --line: rgba(255, 255, 255, .09); --text: #eef0fa; --dim: #98a0bd;
  --gold: #ffcf4a; --accent: #7c6cff; --accent2: #a99cff; --good: #5ed67a; --bad: #ff5d5d; --ink: #1a1024;
  --fd: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif; --fb: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 var(--fb); overflow: hidden; }
/* không cuộn nảy / vuốt-lùi trang bằng touchpad */
html, body { overscroll-behavior: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3, h4 { font-family: var(--fd); margin: 0; line-height: 1.1; }
svg { display: block; }
.ico { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -.25em; flex: none; }
.dim { color: var(--dim); } .center { text-align: center; justify-content: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* ---------- Animation của art SVG ---------- */
svg * { transform-box: fill-box; }
.a-float { animation: aFloat 3s ease-in-out infinite; }
.a-sway { animation: aSway 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
.a-glow { animation: aGlow 1.8s ease-in-out infinite; transform-origin: center; }
.a-blink { animation: aBlink 4.2s infinite; transform-origin: center; }
.a-squash { animation: aSquash 1.6s ease-in-out infinite; transform-origin: 50% 100%; }
.a-flap { animation: aFlap .5s ease-in-out infinite; transform-origin: center; }
.still * { animation: none !important; }
@keyframes aFloat { 50% { transform: translateY(-4px); } }
@keyframes aSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
@keyframes aGlow { 50% { opacity: .55; transform: scale(1.18); } }
@keyframes aBlink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes aSquash { 50% { transform: scale(1.06, .92); } }
@keyframes aFlap { 50% { transform: scaleY(.55); } }
.demo .d-fly { animation: dFly 1.4s ease-in infinite; }
.demo .d-pop { animation: dPop 1.4s ease-out infinite; transform-origin: center; }
.demo .d-pop.late { animation-delay: .1s; }
.demo .d-pulse { animation: dPulse 1.4s ease-in-out infinite; transform-origin: left center; }
.demo circle.d-pulse { transform-origin: center; }
.demo .d-grow { animation: dGrow 1.8s ease-out infinite; transform-origin: center; }
.demo .d-drop { animation: dDrop 1.4s ease-in infinite; }
.demo .d-dash { animation: dDash 1.6s cubic-bezier(.2, .8, .2, 1) infinite; }
.demo .d-trail { animation: dTrail 1.6s ease-out infinite; transform-origin: left center; }
.demo .d-blink { animation: dBlink .9s steps(2) infinite; }
@keyframes dFly { 0% { transform: translateX(0); opacity: 1; } 70%, 100% { transform: translateX(112px); opacity: 1; } 71% { opacity: 0; } }
@keyframes dPop { 0%, 62% { transform: scale(0); opacity: 0; } 70% { opacity: .6; } 100% { transform: scale(1); opacity: 0; } }
@keyframes dPulse { 0%, 100% { opacity: .15; transform: scale(.85); } 45% { opacity: .65; transform: scale(1); } }
@keyframes dGrow { 0% { transform: scaleY(0); } 25%, 80% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }
@keyframes dDrop { 0% { transform: translateY(-60px); opacity: 0; } 60% { transform: translateY(0); opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes dDash { 0%, 15% { transform: translateX(0); } 55%, 100% { transform: translateX(104px); } }
@keyframes dTrail { 0%, 15% { transform: scaleX(0); opacity: .7; } 55% { transform: scaleX(1); opacity: .7; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes dBlink { 50% { opacity: .2; } }

/* ---------- Nền ---------- */
#lobby { position: fixed; inset: 0; overflow: auto; }
.sky { position: fixed; inset: 0; background: radial-gradient(900px 600px at 50% 105%, #4b2f8f 0%, transparent 70%), radial-gradient(700px 500px at 85% 0%, #1f3f7a 0%, transparent 70%), linear-gradient(#0b0d1c, #171334 60%, #241647); overflow: hidden; z-index: 0; }
.stars { position: absolute; inset: -50%; background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfd8ff, transparent), radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent), radial-gradient(1px 1px at 60px 190px, #ffe9c2, transparent), radial-gradient(1px 1px at 260px 40px, #fff, transparent); background-size: 300px 240px; opacity: .7; animation: drift 120s linear infinite; }
.stars.s2 { background-size: 420px 360px; opacity: .4; animation-duration: 200s; }
@keyframes drift { to { transform: translate(300px, 240px); } }
.moon { position: absolute; right: 9%; top: 7%; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8dc, #ffe39a 60%, #d9a94a); box-shadow: 0 0 80px 20px rgba(255, 220, 140, .25); }
.twr { position: absolute; left: 50%; bottom: -30px; width: min(46vh, 380px); transform: translateX(-50%); opacity: .28; filter: saturate(.8); }
.fog { position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(13, 15, 26, .92)); }

/* ---------- Thành phần chung ---------- */
.logo { font: 800 26px/1 var(--fd); letter-spacing: .5px; text-shadow: 0 3px 0 #000a; white-space: nowrap; }
.logo em { font-style: normal; color: var(--gold); } .logo small { font-size: .55em; color: var(--accent2); }
.logo.big { font-size: 44px; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 34px; border-radius: 16px; font: 800 20px var(--fd); color: #2b1a00; background: linear-gradient(#ffe27a, #ffb627); border: 3px solid var(--ink); box-shadow: 0 5px 0 #a86a00, 0 10px 24px rgba(255, 182, 39, .35); transition: transform .08s, filter .15s; }
.cta:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); } .cta:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #a86a00; }
.cta.sm { padding: 7px 16px; font-size: 15px; border-radius: 12px; border-width: 2.5px; box-shadow: 0 4px 0 #a86a00; }
.cta.alt { color: #06280f; background: linear-gradient(#9ff0a8, #46c96a); box-shadow: 0 4px 0 #1f7a3a; }
.cta.off { filter: grayscale(.9) brightness(.7); }
.ghost { padding: 10px 22px; border-radius: 14px; font: 700 16px var(--fd); border: 2px solid var(--line); background: rgba(255, 255, 255, .05); }
.ghost:hover { border-color: var(--accent2); }
.tag { display: inline-block; font: 600 11px var(--fb); letter-spacing: .6px; text-transform: uppercase; color: var(--c, var(--accent2)); background: rgba(255, 255, 255, .07); border-radius: 999px; padding: 2px 10px; }
.pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.pips i { width: 9px; height: 9px; border-radius: 3px; background: #343a5c; transform: skewX(-12deg); } .pips i.on { background: var(--gold); box-shadow: 0 0 6px rgba(255, 207, 74, .6); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 6px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1.5px solid var(--line); font-size: 13px; white-space: nowrap; }
.chip b { font-weight: 700; } .chip.fx { border-color: rgba(255, 207, 74, .5); background: rgba(255, 207, 74, .1); } .chip.goldC { border-color: var(--gold); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; } .chips.center { justify-content: center; }
.passive { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #dfe3f7; background: rgba(0, 0, 0, .3); border-radius: 10px; padding: 6px 10px; text-align: left; }
.passive .ico { font-size: 18px; }
.pedestal { position: relative; width: 150px; margin: 0 auto; }
.pedestal::before { content: ""; position: absolute; left: 8%; right: 8%; bottom: -4%; height: 22%; border-radius: 50%; background: radial-gradient(closest-side, var(--c, #7c6cff), transparent); opacity: .75; filter: blur(4px); }
.pedestal::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 1%; height: 9%; border-radius: 50%; background: #000; opacity: .35; }
.pedestal .mage { position: relative; z-index: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.pedestal.lg { width: min(34vh, 260px); } .pedestal.xl { width: min(34vh, 270px); }
.cost { display: inline-flex; gap: 8px; margin-left: 4px; font: 700 13px var(--fb); } .cost span { display: inline-flex; align-items: center; gap: 2px; } .cost .no { color: #b00020; }
.tier { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; font: 800 12px var(--fd); font-style: normal; color: #1a1024; background: #c9cede; border: 2px solid var(--ink); }
.tier.tD { background: #7fe08a; } .tier.tC { background: #6fc3ff; } .tier.tB { background: #c79bff; }
.ib { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .07); border: 1.5px solid var(--line); font: 800 18px var(--fd); }
.ib:hover { border-color: var(--accent2); } .ib .ico { font-size: 18px; }

/* ---------- Onboarding ---------- */
.onb { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.onb h1 { font-size: 34px; text-shadow: 0 3px 0 #0008; }
.steps { display: flex; align-items: center; gap: 8px; } .steps span { width: 46px; height: 3px; background: #3a4066; border-radius: 2px; }
.steps i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--fd); font-style: normal; background: #2a2f52; color: var(--dim); border: 2px solid #3a4066; }
.steps i.on { background: var(--gold); color: #2b1a00; border-color: #fff3c0; box-shadow: 0 0 16px rgba(255, 207, 74, .6); } .steps i.done { background: var(--good); color: #06280f; border-color: #c6ffd2; }
.heroes { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.hero { width: 250px; padding: 18px 16px 16px; border-radius: 22px; background: linear-gradient(rgba(40, 44, 80, .85), rgba(22, 25, 46, .9)); border: 3px solid transparent; display: flex; flex-direction: column; gap: 9px; align-items: center; transition: transform .18s, border-color .18s, filter .18s; filter: saturate(.75) brightness(.85); }
.hero:hover { filter: none; transform: translateY(-4px); }
.hero.on { filter: none; border-color: var(--c); transform: translateY(-8px) scale(1.04); box-shadow: 0 18px 50px -10px var(--c), inset 0 0 40px -18px var(--c); }
.hero h3 { font-size: 26px; color: var(--c); } .hero .pedestal { width: 170px; }
.statrow { display: flex; flex-direction: column; gap: 4px; align-self: stretch; padding: 0 22px; } .statrow span { display: flex; align-items: center; justify-content: space-between; }
.forge { display: flex; gap: 30px; align-items: center; justify-content: center; flex-wrap: wrap; }
.forgeRight { display: flex; flex-direction: column; gap: 14px; width: min(520px, 92vw); }
.orbs { display: flex; gap: 12px; justify-content: center; }
.orb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 18px; border: 3px solid transparent; background: rgba(255, 255, 255, .05); transition: transform .15s; min-width: 92px; }
.orb .elem { width: 64px; transition: transform .2s; } .orb b { font: 700 14px var(--fd); color: var(--c); } .orb small { font-size: 10.5px; color: var(--dim); }
.orb:hover .elem { transform: scale(1.08) rotate(-6deg); }
.orb.on { border-color: var(--c); background: rgba(255, 255, 255, .1); box-shadow: 0 0 30px -6px var(--c); transform: translateY(-4px); }
.orb.sm { min-width: 84px; padding: 8px; } .orb.sm .elem { width: 44px; }
.elcard { background: var(--panel); border: 2px solid var(--c); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left; box-shadow: 0 0 40px -16px var(--c); }
.role { font: 800 20px var(--fd); color: var(--c); }
.gift { display: flex; gap: 12px; align-items: center; background: rgba(0, 0, 0, .3); border-radius: 14px; padding: 10px; }
.giftIco { width: 64px; flex: none; } .giftTxt { flex: 1; min-width: 0; } .gift small { color: var(--gold); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; } .gift h4 { font-size: 20px; margin-bottom: 4px; }
.giftSet { display: flex; gap: 10px; margin-top: 6px; } .giftSk { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 12px; } .giftSk .giftIco { width: 52px; }
.giftDemo { width: 150px; flex: none; background: #0006; border-radius: 10px; }
@media (max-width: 760px) { .giftDemo { display: none; } .hero { width: 200px; } }

/* ---------- Modal ---------- */
/* margin:auto căn giữa an toàn: hộp cao hơn màn hình thì không bị cắt mất phần trên như place-items:center */
#overlay { position: fixed; inset: 0; background: rgba(6, 7, 14, .8); backdrop-filter: blur(5px); display: flex; z-index: 30; padding: 16px; overflow: auto; }
.modal { position: relative; background: linear-gradient(#2a2f58, #171a33); border: 3px solid #4a5196; border-radius: 24px; padding: 26px 28px; max-width: 560px; width: 100%; margin: auto; box-shadow: 0 30px 80px #000c; display: flex; flex-direction: column; gap: 14px; animation: modalIn .28s cubic-bezier(.2, 1.4, .4, 1); overflow: hidden; }
.modal.wide { max-width: 640px; } .modal > * { position: relative; }
@keyframes modalIn { from { transform: scale(.85); opacity: 0; } }
.title { font-size: 34px; text-align: center; color: var(--gold); text-shadow: 0 3px 0 #0009; } .title.lose { color: #ff8f8f; }
.rays { position: absolute !important; left: 50%; top: 0; width: 900px; height: 900px; margin: -360px 0 0 -450px; background: repeating-conic-gradient(rgba(255, 207, 74, .16) 0 10deg, transparent 10deg 20deg); animation: spin 30s linear infinite; mask: radial-gradient(closest-side, #000 20%, transparent 70%); -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 70%); pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.rewards { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.rw { display: flex; flex-direction: column; align-items: center; gap: 6px; font: 700 15px var(--fd); }
.rwI { width: 78px; height: 78px; border-radius: 20px; background: rgba(0, 0, 0, .4); border: 2px solid rgba(255, 207, 74, .5); display: grid; place-items: center; box-shadow: 0 0 24px -6px var(--gold); }
.rwI .ico { font-size: 40px; } .rwI .skico { width: 62px; } .rwI.num { font: 800 40px var(--fd); color: var(--gold); }
.pop { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) backwards; }
@keyframes pop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
.vsBoss { display: flex; flex-direction: column; align-items: center; font: 800 20px var(--fd); } .vsBoss .mob { width: 120px; } .vsBoss.beat .mob { filter: grayscale(.8) brightness(.8); transform: rotate(8deg); }
.tipBox { display: flex; gap: 10px; align-items: center; background: rgba(255, 207, 74, .1); border: 1.5px solid rgba(255, 207, 74, .4); border-radius: 12px; padding: 10px 12px; } .tipBox .ico { font-size: 22px; }
.xbtn { position: absolute !important; right: 14px; top: 10px; font: 800 26px var(--fd); color: var(--dim); z-index: 2; }
.settings h4 { font-size: 15px; color: var(--accent2); text-transform: uppercase; letter-spacing: 1px; }
.setRow { display: flex; gap: 10px; align-items: center; } .setRow label { font-weight: 700; }
.setRow input { flex: 1; font: 600 15px var(--fb); color: var(--text); background: #0006; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; outline: 0; } .setRow input:focus { border-color: var(--accent); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode { border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: left; background: #0004; } .mode b { display: block; font: 700 14px var(--fd); } .mode small { color: var(--dim); font-size: 11px; }
.mode.on { border-color: var(--gold); background: rgba(255, 207, 74, .1); }
.ctls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.ctl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; } .ctl .keys { display: flex; gap: 3px; align-items: center; min-width: 92px; justify-content: flex-end; } .ctl .keys .ico { font-size: 22px; }
.kc { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 7px; font: 800 12px var(--fd); color: #1a1024; background: linear-gradient(#fff, #cfd4ea); border: 2px solid var(--ink); box-shadow: 0 2px 0 #7b82a6; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.pod { display: flex; flex-direction: column; align-items: center; width: 130px; font-size: 13px; } .pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .pod small { color: var(--dim); }
.podA { position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #0006; border: 3px solid #c9cede; margin-bottom: 4px; overflow: visible; } .podA .portrait { border-radius: 50%; }
.crownI { position: absolute; top: -26px; left: 50%; margin-left: -15px; font-size: 30px; animation: aFloat 2s infinite; }
.podB { width: 100%; margin-top: 6px; border-radius: 12px 12px 0 0; background: linear-gradient(#5b62a8, #33386a); display: flex; flex-direction: column; align-items: center; padding-top: 6px; border: 2px solid var(--ink); border-bottom: 0; }
.podB span { font: 800 26px var(--fd); } .podB em { font-style: normal; font-weight: 700; color: var(--gold); display: flex; gap: 3px; align-items: center; }
.p1 .podB { height: 104px; background: linear-gradient(#ffd45e, #c98a12); color: #2b1a00; } .p1 .podB em { color: #2b1a00; } .p1 .podA { border-color: var(--gold); width: 76px; height: 76px; }
.p2 .podB { height: 84px; } .p3 .podB { height: 70px; background: linear-gradient(#c48a5a, #7a4a22); } .pod.me b { color: var(--gold); }
.myRes { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; } .bigN { font: 800 30px var(--fd); color: var(--gold); margin-right: 6px; }
.board { display: flex; flex-direction: column; gap: 3px; max-height: 26vh; overflow: auto; }
.brow { display: flex; align-items: center; gap: 8px; padding: 3px 10px; border-radius: 10px; background: #0004; font-size: 13px; } .brow i { width: 20px; font-style: normal; color: var(--dim); font-weight: 700; } .brow .portrait { width: 26px; border-radius: 50%; background: #0006; } .brow b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .brow span { display: flex; gap: 3px; align-items: center; color: var(--dim); min-width: 56px; }
.brow.me { background: rgba(255, 207, 74, .16); outline: 1.5px solid var(--gold); }
#toast { position: fixed; left: 50%; bottom: 160px; transform: translateX(-50%); background: #000d; padding: 9px 18px; border-radius: 12px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 40; font-weight: 600; border: 1.5px solid var(--bad); }
#toast.show { opacity: 1; }

/* ---------- Sảnh ---------- */
.home { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: 300px minmax(360px, 1fr) minmax(380px, 460px); grid-template-rows: auto minmax(0, 1fr); gap: 14px; padding: 14px 18px 18px; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.pchip { display: flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); text-align: left; }
.pchip:hover { border-color: var(--accent2); } .pchip .portrait { width: 40px; border-radius: 50%; background: #0006; } .pchip b { display: block; line-height: 1.1; } .pchip small { color: var(--dim); font-size: 11.5px; }
.cur { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.cc { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 7px; border-radius: 999px; background: var(--panel); border: 1.5px solid var(--line); font-weight: 700; } .cc .ico { font-size: 19px; } .cc.gold { color: var(--gold); border-color: rgba(255, 207, 74, .4); }
.panel { background: var(--panel); border: 1.5px solid var(--line); border-radius: 20px; padding: 14px; backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.panel > h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; } .panel > h2 small { font: 600 13px var(--fb); color: var(--dim); }
.badge { margin-left: auto; font: 700 12px var(--fb); color: #2b1a00; background: var(--gold); border-radius: 999px; padding: 2px 10px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { transform: scale(1.07); box-shadow: 0 0 16px rgba(255, 207, 74, .7); } }

.floors { position: relative; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 120px; overflow: auto; padding: 12px 8px 4px 10px; justify-content: safe center; }
.fl { position: relative; display: flex; align-items: center; gap: 10px; padding: 16px 12px; border-radius: 16px; border: 2px solid transparent; background: linear-gradient(90deg, var(--fc1, #2a2f52), var(--fc2, #1c2038)); }
.fl.f1 { --fc1: #2f6b33; --fc2: #1d3a2a; } .fl.f2 { --fc1: #1f5540; --fc2: #142c2c; } .fl.f3 { --fc1: #5a5650; --fc2: #2c2a30; }
.fl.future { filter: saturate(.4) brightness(.7); } .fl.locked { opacity: .55; border-style: dashed; border-color: #3a4066; background: none; }
.fl.cur { border-color: var(--gold); box-shadow: 0 0 24px -8px var(--gold); }
.flNum { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 22px var(--fd); background: #0006; border: 2px solid #fff3; flex: none; }
.flTxt { flex: 1; min-width: 0; } .flTxt b { display: block; font: 700 16px var(--fd); } .flTxt small { color: #d6dbf3; font-size: 11.5px; display: flex; align-items: center; gap: 3px; }
.xpb { position: relative; height: 14px; margin-top: 5px; border-radius: 7px; background: #0008; overflow: hidden; } .xpb i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f7dff, #c7b8ff); border-radius: 7px; } .xpb span { position: absolute; inset: 0; text-align: center; font: 700 10px/14px var(--fb); text-shadow: 0 1px 2px #000; }
.guard { position: relative; width: 60px; height: 60px; border-radius: 50%; background: #0007; border: 2px solid #fff3; flex: none; padding: 5px; }
.guard.beat .mob { filter: grayscale(1) brightness(.6); } .gk { position: absolute; right: -4px; bottom: -4px; font-size: 20px; }
.guard.ready { border-color: var(--gold); animation: pulse 1.2s infinite; }
.youAt { position: absolute; left: -9px; top: -9px; width: 30px; border-radius: 50%; border: 2px solid var(--gold); background: #1c2038; overflow: hidden; }
.soulRow { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 12px; background: #0005; } .soulRow .ico { font-size: 22px; } .soulRow small { margin-left: 6px; color: var(--dim); font-size: 12px; }

.stage { display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 10px; min-height: 0; }
/* Ô nhân vật co theo chỗ còn lại của cột giữa: màn thấp thì pháp sư nhỏ lại trước, các nút không bị đẩy khỏi màn hình */
.heroBox { flex: 1 1 0; min-height: 150px; max-height: 340px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.heroBox .pedestal.xl { width: auto; height: 100%; aspect-ratio: 4 / 5; } .heroBox .pedestal.xl .mage { width: auto; height: 100%; }
.arrow { width: 44px; height: 64px; border-radius: 14px; font: 800 34px/1 var(--fd); color: var(--dim); background: rgba(255, 255, 255, .05); } .arrow:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nameplate { display: flex; align-items: center; gap: 10px; } .nameplate h2 { font-size: 30px; color: var(--c); text-shadow: 0 3px 0 #0008; }
.ringRow { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #0005; border: 1.5px solid var(--line); }
.ringRow .lbl { font: 700 12px var(--fb); color: var(--dim); text-transform: uppercase; letter-spacing: .6px; margin-right: 2px; } .ringRow.hasNew .lbl { color: var(--gold); }
.rsock { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid var(--c, #3a4066); background: #0006; transition: transform .15s; } .rsock .elem { width: 36px; }
button.rsock:hover, .rsock.open { transform: scale(1.12); box-shadow: 0 0 18px -2px var(--c); }
.rsock.empty { border-style: dashed; opacity: .5; } .rsock.empty .ico { font-size: 16px; }
.rsock.new { animation: pulse 1s infinite; border-color: var(--gold); }
.ringPop { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); background: #262b50; border: 2px solid #4a5196; border-radius: 18px; padding: 12px; z-index: 5; box-shadow: 0 20px 50px #000a; animation: ringPopIn .2s; }
@keyframes ringPopIn { from { transform: translateX(-50%) scale(.85); opacity: 0; } } /* giữ translateX: không lệch / tràn cột lúc mở */
.rpT { font: 700 13px var(--fd); text-align: center; margin-bottom: 8px; color: var(--dim); } .rpO { display: flex; gap: 8px; }
.loadout { position: relative; } .lrow { display: flex; gap: 10px; }
.lslot { position: relative; width: 70px; height: 70px; border-radius: 18px; display: grid; place-items: center; background: #0006; border: 2.5px dashed #3a4066; transition: transform .12s; }
.lslot .skico { width: 100%; } .lslot:not(.empty):not(.lock) { border: 0; }
button.lslot:hover { transform: translateY(-3px); } .lslot.sel { outline: 3px solid var(--gold); outline-offset: 3px; animation: pulse 1.2s infinite; }
.lslot kbd { position: absolute; left: -6px; top: -6px; min-width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 800 12px var(--fd); color: #1a1024; background: linear-gradient(#fff, #cfd4ea); border: 2px solid var(--ink); }
.lslot .lv { position: absolute; right: -5px; bottom: -5px; min-width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 800 11px var(--fd); font-style: normal; background: var(--gold); color: #2b1a00; border: 2px solid var(--ink); }
.lslot .plus { font: 800 30px var(--fd); color: #4a5196; } .lslot.lock { opacity: .5; } .lslot.lock .ico { font-size: 22px; }
.lslot.bad .skico { filter: grayscale(1) brightness(.6); } .warnI { position: absolute; right: -6px; top: -6px; font-size: 20px; }
.hintB { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); white-space: nowrap; font: 600 12px var(--fb); color: #2b1a00; background: var(--gold); padding: 3px 12px; border-radius: 999px; }
.play { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 44px 12px 30px; border-radius: 22px; color: #fff; background: linear-gradient(#9d8dff, #5a45e6); border: 3px solid var(--ink); box-shadow: 0 6px 0 #2f2196, 0 14px 40px rgba(124, 108, 255, .5); animation: playPulse 2.2s ease-in-out infinite; transition: transform .08s; text-align: left; }
.play .ico { font-size: 40px; } .play b { display: block; font: 800 28px/1 var(--fd); letter-spacing: 1px; text-shadow: 0 2px 0 #0006; } .play small { font-size: 12.5px; opacity: .9; }
.play:hover { filter: brightness(1.1); } .play:active { transform: translateY(5px); box-shadow: 0 1px 0 #2f2196; }
.play.gold { color: #2b1a00; background: linear-gradient(#ffe27a, #ffb627); box-shadow: 0 6px 0 #a86a00, 0 14px 40px rgba(255, 182, 39, .5); } .play.gold b { text-shadow: none; }
@keyframes playPulse { 50% { box-shadow: 0 6px 0 #2f2196, 0 14px 60px rgba(124, 108, 255, .85); } }

.filters { display: flex; gap: 6px; align-items: center; }
.fb { height: 36px; min-width: 36px; padding: 0 6px; border-radius: 12px; display: grid; place-items: center; background: #0005; border: 2px solid transparent; font: 700 13px var(--fd); opacity: .6; }
.fb .elem { width: 24px; } .fb .ico { font-size: 18px; } .fb:hover { opacity: 1; } .fb.on { opacity: 1; border-color: var(--gold); background: rgba(255, 207, 74, .12); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 10px; align-content: start; overflow: auto; flex: 1; min-height: 150px; padding: 6px; margin: -6px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 15px; transition: transform .1s; }
.tile:hover { transform: translateY(-3px) scale(1.04); z-index: 1; } .tile.sel { outline: 3px solid #fff; outline-offset: 2px; }
.tile.lockd .skico { filter: saturate(.65) brightness(.5); } .tile.can .skico { filter: none; } .tile.unmet .skico { filter: saturate(.3) brightness(.7); }
.tile .tier { position: absolute; left: -4px; top: -4px; min-width: 18px; height: 18px; font-size: 11px; }
.tile .lvp { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); } .tile .lvp .pips i { width: 6px; height: 6px; border-radius: 2px; border: 1px solid #0008; }
.tile .lk { position: absolute; inset: 0; font-style: normal; } .tile .lk .ico { position: absolute; right: -4px; top: -5px; font-size: 20px; filter: drop-shadow(0 2px 2px #000); } .tile .lk b { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font: 800 11px var(--fd); color: #fff; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.tile .bang { position: absolute; right: -5px; top: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--fd); font-style: normal; color: #2b1a00; background: var(--gold); border: 2px solid var(--ink); z-index: 1; }
.tile .eq { position: absolute; right: -5px; bottom: -5px; min-width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; font: 800 11px var(--fd); font-style: normal; color: #1a1024; background: linear-gradient(#fff, #cfd4ea); border: 2px solid var(--ink); }
.detail { flex: none; border-radius: 16px; padding: 9px 11px; background: linear-gradient(135deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .25)); border: 2px solid var(--c); box-shadow: inset 0 0 40px -22px var(--c); display: flex; flex-direction: column; gap: 6px; }
.dTop { display: flex; gap: 10px; align-items: center; } .dIco { width: 46px; flex: none; } .dHead { flex: 1; min-width: 0; } .dHead h3 { font-size: 18px; display: flex; align-items: center; gap: 6px; white-space: nowrap; } .dHead h3 small { font: 600 11.5px var(--fb); color: var(--dim); }
.req { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-top: 2px; } .rq .ico { font-size: 18px; } .req .warn { margin-left: 8px; font-size: 11.5px; } .rq.no { filter: grayscale(1); opacity: .45; } .req .pips { margin-left: 8px; }
.dDemo { width: 104px; flex: none; background: #0007; border-radius: 10px; }
.desc { margin: 0; font-size: 12px; line-height: 1.35; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.detail .chips { gap: 4px; } .detail .chip { font-size: 11.5px; padding: 1px 7px 1px 4px; gap: 3px; } .detail .chip .ico { font-size: 13px; } .chip.fx[title] { cursor: help; }
.chip.up { border-color: rgba(110, 231, 135, .45); cursor: help; } .chip.up i { font-style: normal; font-weight: 700; color: #8ff0a4; }
.warn { display: flex; gap: 6px; align-items: center; color: #ff9c9c; font-size: 12.5px; font-weight: 600; }
.dAct { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 36px; } .dAct .cta.sm { padding: 5px 12px; font-size: 14px; } .resQ { width: 30px; height: 30px; color: var(--gold); border-color: var(--gold); }
.equip { display: flex; gap: 6px; }
.key { width: 34px; height: 34px; border-radius: 10px; font: 800 15px var(--fd); color: #1a1024; background: linear-gradient(#fff, #cfd4ea); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 #7b82a6; }
.key:hover:not(:disabled) { transform: translateY(-1px); } .key.on { background: linear-gradient(#ffe27a, #ffb627); box-shadow: 0 3px 0 #a86a00; } .key:disabled { opacity: .35; }
.lockNote { display: flex; gap: 6px; align-items: center; color: var(--dim); font-weight: 600; }
.coach { align-self: center; font: 600 12.5px var(--fb); color: #2b1a00; background: var(--gold); border-radius: 999px; padding: 4px 14px; animation: aFloat 1.6s infinite; } .coach .ico { font-size: 14px; }
/* Màn hẹp vẫn giữ 3 cột vừa một màn hình (không cuộn); phần còn thiếu do fitUI() trong main.js thu nhỏ đều. */
@media (max-width: 1180px) {
  .home { grid-template-columns: 260px minmax(330px, 1fr) minmax(350px, 420px); }
  .cur .cc:not(.gold) b { display: none; }
}

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; user-select: none; font-family: var(--fb); }
#hud > * { position: absolute; }
/* Cửa sổ nhỏ: thu nhỏ đều các khối HUD (--hz do main.js tính theo kích thước cửa sổ). #fly dùng toạ độ màn hình thật nên giữ nguyên. */
#hud > :not(#fly):not(#vig) { zoom: calc(var(--hz, 1) * var(--tz, 1)); }
#vig { inset: 0; box-shadow: inset 0 0 160px 40px rgba(255, 30, 30, .55); opacity: 0; transition: opacity .25s; }
.bar { position: relative; height: 18px; background: #000a; border: 2px solid var(--ink); border-radius: 9px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#8df0a0, #37b85a); transition: width .12s; }
.bar b { position: absolute; top: 0; bottom: 0; background: #fffd; }
.bar span { position: absolute; inset: 0; text-align: center; font: 700 11px/14px var(--fb); text-shadow: 0 1px 2px #000; }
.bar.mp { height: 13px; } .bar.mp i { background: linear-gradient(#8fc4ff, #3277e6); } .bar.mp span { line-height: 9px; font-size: 9.5px; }
#tl { left: 14px; top: 12px; display: grid; grid-template-columns: auto auto; gap: 4px 10px; align-items: center; }
#ava { position: relative; width: 74px; height: 74px; } #ava svg { position: absolute; inset: 0; transform: rotate(-90deg); }
#ava .trk { fill: #000a; stroke: #2a2f52; stroke-width: 7; } #ava .prg { fill: none; stroke: #a99cff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .3s; } #ava.full .prg { stroke: var(--gold); }
#avaP { position: absolute; inset: 10px; border-radius: 50%; overflow: hidden; background: #1c2038; } #avaP svg { position: static; transform: none; }
#avaL { position: absolute; right: -4px; bottom: -2px; min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--fd); color: #2b1a00; background: var(--gold); border: 2.5px solid var(--ink); }
#floorTag { font: 700 14px var(--fd); text-shadow: 0 2px 3px #000; } #souls { display: flex; gap: 2px; font-size: 20px; } #xpTxt { font: 600 11px var(--fb); color: #d6dbf3; text-shadow: 0 1px 2px #000; display: flex; gap: 8px; align-items: center; }
#hint { grid-column: 1 / -1; max-width: 250px; font: 600 12px var(--fb); color: #2b1a00; background: var(--gold); border-radius: 10px; padding: 4px 10px; } #hint:empty { display: none; }
#res { display: flex; gap: 6px; } #res span { display: flex; align-items: center; gap: 4px; padding: 1px 9px 1px 3px; border-radius: 999px; background: #000a; border: 1.5px solid var(--line); font: 800 14px var(--fd); } #res .ico { font-size: 18px; } #res .hidden { display: none; }
#goldChip { color: var(--gold); } #res span.gain { animation: resGain .32s; } #ava.gain { animation: avaGain .32s; }
@keyframes resGain { 35% { transform: scale(1.28); background: #5a4300; border-color: var(--gold); box-shadow: 0 0 14px var(--gold); } } @keyframes avaGain { 35% { transform: scale(1.1); filter: brightness(1.5) drop-shadow(0 0 10px #a99cff); } }
#fly { inset: 0; overflow: hidden; z-index: 5; } #fly i { position: absolute; left: 0; top: 0; width: 22px; height: 22px; font-size: 22px; line-height: 0; filter: drop-shadow(0 0 6px #ffcf4acc) drop-shadow(0 2px 2px #000); will-change: transform; }
#obj { grid-column: 1 / -1; width: 270px; display: flex; flex-direction: column; gap: 3px; background: rgba(10, 12, 28, .72); border: 1.5px solid var(--gold); border-radius: 12px; padding: 6px 9px 7px; font: 500 11.5px var(--fb); color: #dfe3f7; } #obj:empty, #obj.hidden { display: none; }
#obj h4 { display: flex; align-items: center; gap: 5px; font: 800 11.5px var(--fd); color: var(--gold); letter-spacing: .5px; margin: 0 0 1px; } #obj h4 .ico { font-size: 14px; }
#obj div { display: flex; gap: 7px; align-items: flex-start; opacity: .55; } #obj div.cur { opacity: 1; } #obj div.done { opacity: .75; } #obj div.done b { text-decoration: line-through; }
#obj div > i { flex: none; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 800 10.5px var(--fd); font-style: normal; background: #3a4066; } #obj div.cur > i { background: var(--gold); color: #2b1a00; animation: pulse 1.4s infinite; } #obj div > i .ico { font-size: 17px; }
#obj span { flex: 1; display: flex; flex-direction: column; gap: 2px; } #obj b { font: 700 12.5px var(--fd); } #obj div.cur b { color: #fff; font-size: 13.5px; } #obj small { font-size: 11px; line-height: 1.25; color: #c9cee6; }
#obj em { height: 6px; border-radius: 3px; background: #000a; overflow: hidden; margin-top: 1px; } #obj em u { display: block; height: 100%; background: linear-gradient(90deg, #7c6cff, #c79bff); transition: width .3s; }
#obj.new { animation: objNew 1.1s 3; } @keyframes objNew { 50% { box-shadow: 0 0 0 3px var(--gold), 0 0 26px var(--gold); background: rgba(70, 52, 0, .8); } }
.bn.goal { animation-duration: 8s; flex-wrap: wrap; justify-content: center; gap: 4px 10px; padding: 8px 46px; font-size: 16px; white-space: normal; max-width: min(760px, 92vw); border-radius: 18px; } .bn.goal small { flex-basis: 100%; text-align: center; font: 800 12px var(--fd); color: var(--gold); letter-spacing: 3px; } .bn.goal span { display: flex; align-items: center; gap: 5px; white-space: nowrap; } .bn.goal em { color: var(--gold); font-style: normal; font-size: 20px; }
#streak { left: 50%; top: 23%; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; font-family: var(--fd); text-align: center; white-space: nowrap; --c: var(--gold); }
#streak.on { display: flex; animation: mkIn 3s forwards; } #streak small { display: flex; align-items: center; gap: 6px; font: 700 15px var(--fd); color: #fff; text-shadow: 0 2px 3px #000; letter-spacing: 1px; } #streak small em { width: 10px; height: 10px; border-radius: 50%; }
#streak b { font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: 3px; color: var(--c); -webkit-text-stroke: 2px #1a1024; paint-order: stroke fill; text-shadow: 0 4px 0 #000, 0 0 26px var(--c); } #streak u { text-decoration: none; font: 700 13px var(--fd); color: #fff; text-shadow: 0 2px 3px #000; }
#streak.k3 b { font-size: 46px; } #streak.k4 b { font-size: 54px; } #streak.k5 b { font-size: 64px; animation: mkShake .12s 14; } #streak.me b { font-size: 60px; } #streak.me.k4 b { font-size: 70px; } #streak.me.k5 b { font-size: 84px; } #streak.me small { color: var(--gold); font-size: 18px; }
#streak:not(.me) { top: 15%; flex-direction: row; align-items: center; gap: 8px; padding: 2px 14px; border-radius: 999px; background: #0007; filter: opacity(.82); } #streak:not(.me) small { font-size: 16px; } #streak:not(.me) b { font-size: 18px; letter-spacing: 1px; -webkit-text-stroke-width: 1px; text-shadow: 0 2px 0 #000; animation: none; } #streak:not(.me) u { font-size: 12px; }
@keyframes mkIn { 0% { transform: translateX(-50%) scale(3); opacity: 0; } 9% { transform: translateX(-50%) scale(.9); opacity: 1; } 14% { transform: translateX(-50%) scale(1.06); } 18%, 82% { transform: translateX(-50%) scale(1); opacity: 1; } 100% { transform: translateX(-50%) scale(1.15); opacity: 0; } }
@keyframes mkShake { 25% { transform: translate(-3px, 2px) rotate(-1deg); } 75% { transform: translate(3px, -2px) rotate(1deg); } }
#feed u { text-decoration: none; font: 800 10px var(--fd); letter-spacing: .5px; }
#dead .by { display: flex; align-items: center; gap: 10px; font-size: 20px; color: #e6e9f5; text-shadow: 0 2px 3px #000; } #dead .by i { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #1c2038; border: 3px solid #ff6b6b; display: grid; place-items: center; font-size: 34px; } #dead .by i svg { width: 100%; height: 100%; } #dead .by b { font-size: 26px; }
#tc { left: 50%; top: 8px; transform: translateX(-50%); width: min(340px, 34vw); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#clock { font: 800 26px/1 var(--fd); text-shadow: 0 3px 0 #000a; display: flex; align-items: center; gap: 6px; }
#timeline { position: relative; width: 100%; height: 8px; border-radius: 4px; background: #000a; border: 1.5px solid var(--ink); } #tlf { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: linear-gradient(90deg, #7c6cff, #c79bff); }
#tlm span { position: absolute; top: -8px; margin-left: -10px; font-size: 20px; filter: drop-shadow(0 1px 2px #000); } #tlm span.past { filter: grayscale(1) brightness(.6); }
#bossbar { width: 100%; display: flex; align-items: center; gap: 6px; margin-top: 8px; } #bossP { width: 38px; flex: none; } #bossbar .bar { flex: 1; height: 20px; } #bossbar .bar i { background: linear-gradient(#ff8d7a, #d6332c); } #bossbar .bar span { line-height: 16px; font-size: 12px; }
#banner { left: 50%; top: 104px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; } #banner.tut { top: 196px; }
.bn { display: flex; align-items: center; gap: 8px; padding: 5px 18px; border-radius: 999px; background: linear-gradient(90deg, transparent, #000c 15%, #000c 85%, transparent); font: 700 15px var(--fd); white-space: nowrap; animation: bnIn 3.6s forwards; text-shadow: 0 2px 3px #000; }
.bn .ico { font-size: 22px; } .bn.big { font-size: 26px; color: var(--gold); padding: 8px 40px; letter-spacing: 1px; } .bn.big .ico { font-size: 34px; }
.bn.kill { color: #ff8f8f; font-size: 22px; }
@keyframes bnIn { 0% { transform: scale(.4); opacity: 0; } 8% { transform: scale(1.12); opacity: 1; } 14% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#tr { right: 14px; top: 12px; width: 210px; font-size: 12.5px; }
#net { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 6px; padding: 2px 8px; border-radius: 8px; background: #0009; font: 600 11px/1.5 ui-monospace, Menlo, monospace; color: #aeb4d0; white-space: nowrap; }
#net b { font-weight: 700; color: #7ee08a; } #net b.warn { color: #ffd166; } #net b.bad { color: #ff6b6b; }
#top5 { background: #000a; border-radius: 12px; padding: 6px 8px; border: 1.5px solid var(--line); }
#top5 div { display: flex; align-items: center; gap: 6px; padding: 1.5px 0; } #top5 i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 800 10px var(--fd); font-style: normal; background: #3a4066; flex: none; } #top5 div:nth-child(1) i { background: var(--gold); color: #2b1a00; }
#top5 em { width: 9px; height: 9px; border-radius: 50%; flex: none; } #top5 span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #top5 b { font-weight: 700; } #top5 .me { color: var(--gold); }
#feed { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; } #feed div { display: flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11.5px; background: #0009; border-radius: 8px; padding: 2px 8px; animation: feedIn .25s; } #feed .ico { font-size: 14px; } #feed .me { outline: 1.5px solid var(--gold); color: var(--gold); }
@keyframes feedIn { from { transform: translateX(30px); opacity: 0; } }
#loot { left: 14px; bottom: 64px; display: flex; flex-direction: column-reverse; gap: 4px; } #loot div { display: flex; align-items: center; gap: 5px; font: 700 14px var(--fd); background: #000a; border-radius: 999px; padding: 2px 12px 2px 6px; animation: lootIn 2.4s forwards; } #loot .ico { font-size: 18px; }
@keyframes lootIn { 0% { transform: translateX(-30px); opacity: 0; } 10% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
#bc { left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
#bars { width: 380px; display: flex; flex-direction: column; gap: 3px; }
#chan { position: relative; width: 300px; height: 22px; border-radius: 11px; background: #000b; border: 2px solid var(--gold); overflow: hidden; margin-bottom: 4px; } #chan i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffb627, #fff3a0); } #chan span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; font: 800 12px var(--fd); color: #2b1a00; }
#slots { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; border-radius: 20px; background: linear-gradient(#22264a, #14172e); border: 2.5px solid var(--ink); box-shadow: 0 6px 20px #0009, inset 0 1px 0 #fff2; }
.hs { position: relative; width: 62px; height: 62px; border-radius: 15px; pointer-events: auto; transition: transform .08s; }
.hs .ic { position: absolute; inset: 0; } .hs .ic .skico, .hs .ic .ico { width: 100%; height: 100%; }
.hs.pot { width: 50px; height: 50px; border-radius: 50%; background: #0c2a16; border: 2.5px solid var(--ink); margin-left: 8px; } .hs.pot .ic { inset: 7px; }
.hs.off { opacity: .4; background: #0006; border: 2px dashed #3a4066; display: grid; place-items: center; } .hs.off .ico { font-size: 20px; }
.hs kbd { position: absolute; left: -6px; top: -7px; min-width: 21px; height: 21px; border-radius: 7px; display: grid; place-items: center; font: 800 11.5px var(--fd); color: #1a1024; background: linear-gradient(#fff, #cfd4ea); border: 2px solid var(--ink); z-index: 3; }
.hs .mn { position: absolute; right: -4px; bottom: -5px; padding: 0 5px; border-radius: 7px; font: 800 10.5px var(--fd); font-style: normal; background: #2460c9; border: 1.5px solid var(--ink); z-index: 3; }
.hs .cdm { position: absolute; inset: 1px; border-radius: inherit; background: conic-gradient(transparent calc((1 - var(--p, 0)) * 360deg), rgba(8, 9, 20, .82) 0); z-index: 1; }
.hs .cdt { position: absolute; inset: 0; display: grid; place-items: center; font: 800 22px var(--fd); z-index: 2; text-shadow: 0 2px 3px #000; }
.hs.nomana .ic { filter: grayscale(.8) brightness(.6); } .hs.nomana .mn { background: var(--bad); }
.hs.aim { transform: translateY(-6px) scale(1.08); filter: drop-shadow(0 0 10px #fff); } .hs.queued { animation: queued .7s ease-in-out infinite alternate; } @keyframes queued { from { filter: drop-shadow(0 0 3px #ffcf4a); } to { filter: drop-shadow(0 0 12px #ffcf4a) brightness(1.25); } } .hs.ready { animation: rdy .35s; }
@keyframes rdy { 40% { transform: scale(1.18); filter: brightness(1.8); } }
#minimap { right: 14px; bottom: 14px; width: 210px; height: 210px; border-radius: 50%; background: #000a; border: 4px solid #2c3160; box-shadow: 0 0 0 2.5px var(--ink), 0 8px 24px #000a; overflow: hidden; } #mini { width: 100%; height: 100%; }
#sysBtns { left: 14px; bottom: 14px; display: flex; gap: 6px; pointer-events: auto; } #sysBtns .ib { width: 34px; height: 34px; background: #000a; }
#dead { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(closest-side, rgba(40, 0, 10, .2), rgba(10, 0, 4, .7)); font-family: var(--fd); text-align: center; }
#dead h2 { font-size: 52px; color: #ff6b6b; text-shadow: 0 4px 0 #000; animation: modalIn .4s; } #dead .cnt { font-size: 80px; font-weight: 800; line-height: 1; } #dead .lost { display: flex; gap: 10px; }
#score { left: 50%; top: 50%; transform: translate(-50%, -50%); background: #0d0f1af0; border: 2px solid #4a5196; border-radius: 16px; padding: 12px 16px; min-width: 420px; }
#score table { width: 100%; border-collapse: collapse; font-size: 13px; } #score td, #score th { padding: 2.5px 8px; text-align: left; } #score th { color: var(--dim); font-weight: 600; } #score tr.me td { color: var(--gold); font-weight: 700; } #score em { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
#howto { left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: auto; background: linear-gradient(#2a2f58, #171a33); border: 3px solid #4a5196; border-radius: 22px; padding: 18px 22px; box-shadow: 0 30px 80px #000c; display: flex; flex-direction: column; gap: 12px; align-items: center; animation: howIn .3s; }
@keyframes howIn { from { transform: translate(-50%, -50%) scale(.85); opacity: 0; } }
#howto h3 { font-size: 24px; color: var(--gold); } .how { display: flex; gap: 12px; } .how div { width: 132px; background: #0005; border-radius: 14px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; }
.how .pic { height: 44px; display: flex; align-items: center; gap: 3px; font-size: 38px; } .how .pic .kc { font-size: 14px; min-width: 30px; height: 30px; } .how b { font: 700 14px var(--fd); color: var(--accent2); } .howNote { margin: 0; max-width: 620px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 12.5px; color: var(--dim); }
#splash { inset: 0; display: flex; align-items: center; justify-content: center; gap: 30px; background: linear-gradient(100deg, rgba(60, 20, 120, .85) 49.5%, #000 49.5% 50.5%, rgba(120, 20, 30, .85) 50.5%); animation: splash 2.2s forwards; font-family: var(--fd); }
#splash .side { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 280px; text-align: center; } #splash .mage { width: 190px; } #splash .mob { width: 210px; } #splash h2 { font-size: 34px; text-shadow: 0 4px 0 #000; } #splash .vs { font: 800 80px var(--fd); color: var(--gold); text-shadow: 0 6px 0 #000; animation: pop .5s .2s backwards; }
#splash .side:first-child { animation: slideL .5s; } #splash .side:last-child { animation: slideR .5s; }
@keyframes splash { 0% { opacity: 0; } 8%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } } @keyframes slideL { from { transform: translateX(-200px); } } @keyframes slideR { from { transform: translateX(200px); } }
@media (max-width: 1050px) {
  #tr { width: 170px; } #minimap { width: 140px; height: 140px; } #bars { width: 300px; } .hs { width: 52px; height: 52px; } #tc { width: min(260px, 30vw); } #clock { font-size: 20px; } #floorTag { display: none; } .how div { width: 104px; }
}

.fl:not(:last-child)::after { content: ""; position: absolute; left: 30px; top: 100%; width: 4px; height: 12px; background: #3a4066; }
.fl.done::after, .fl.cur::after { background: var(--gold); }

/* ---------- Autocast ---------- */
.hs .au { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); padding: 1px 7px; border-radius: 7px; font: 800 9.5px var(--fd); font-style: normal; letter-spacing: .5px; color: #aab0cc; background: #23284a; border: 1.5px solid var(--ink); z-index: 4; cursor: pointer; pointer-events: auto; user-select: none; opacity: .8; transition: transform .08s; }
.hs .au::before { content: ""; position: absolute; inset: -7px -8px -5px; } /* vùng bấm rộng hơn chữ */
.hs .au:hover { opacity: 1; color: #fff; transform: translateX(-50%) scale(1.15); }
.hs.pot .au { left: 68%; }
.hs.auto .au { color: #2b1a00; background: var(--gold); opacity: 1; }
.hs.auto::after { content: ""; position: absolute; inset: -4px; border-radius: 18px; padding: 3px; background: conic-gradient(from var(--ang, 0deg), #ffcf4a, #fff6c0, #ff9d2e, #ffcf4a); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: autoSpin 2.2s linear infinite; z-index: 0; pointer-events: none; }
.hs.pot.auto::after { border-radius: 50%; }
.hs.casting { transform: scale(1.1); filter: brightness(1.4); }
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes autoSpin { to { --ang: 360deg; } }
.autoTag { font: 800 9px var(--fd); font-style: normal; color: #2b1a00; background: var(--gold); border-radius: 6px; padding: 0 5px; border: 1.5px solid var(--ink); }
#minimap { pointer-events: auto; cursor: pointer; }

/* ---------- Bản đầy đủ theo GDD: 8 nguyên tố, tháp 10 tầng, lò rèn, cửa hàng, nhiệm vụ, xếp hạng ---------- */
.tier.tA { background: #ffb347; } .tier.tS { background: linear-gradient(135deg, #ff7ad0, #ffd92e); }
.orbs.o8 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.floors.t10 { justify-content: flex-start; gap: 8px; } .floors.t10 .fl { padding: 8px 10px; }
.rsock.idle { opacity: .4; filter: grayscale(.6); }
.rsock.aff:not(.idle) { box-shadow: 0 0 10px -1px var(--c), inset 0 0 6px -2px var(--c); }
.passive.aff .elem { width: 18px; } .passive.aff em { color: #7dffa8; font-style: normal; font-weight: 700; } .passive.aff em.off { color: #9aa0bd; font-weight: 400; }
.chip.affC .elem, .shopChar small .elem { width: 14px; vertical-align: -2px; }
.ringRow { flex-wrap: wrap; justify-content: center; max-width: 520px; } .ringRow .rsock { width: 40px; height: 40px; } .ringRow .rsock .elem { width: 30px; }
.ringPop .rpO { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.lslot.ult { border-color: var(--gold); box-shadow: 0 0 16px -6px var(--gold); margin-left: 10px; }
.playRow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 12px; } .playRow .play { margin-top: 0; }
.playMain { display: flex; align-items: center; gap: 10px; } .ib.lg { width: 52px; height: 52px; border-radius: 16px; } .ib.lg .ico { font-size: 26px; }
.pagesC { display: flex; gap: 4px; flex-wrap: wrap; max-width: 330px; } .pagesC .cc { padding: 2px 7px; font-size: 12px; }
.tabs { display: flex; gap: 5px; } .tabB { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 12px; background: #0005; border: 2px solid transparent; font: 700 11.5px var(--fd); opacity: .65; }
.tabB .ico { font-size: 20px; } .tabB:hover { opacity: 1; } .tabB.on { opacity: 1; border-color: var(--gold); background: rgba(255, 207, 74, .12); }
.tabB i { position: absolute; right: 2px; top: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; font: 800 11px var(--fd); font-style: normal; color: #2b1a00; background: var(--gold); border: 2px solid var(--ink); }
.filters { flex-wrap: wrap; } .filters .fb { height: 32px; min-width: 32px; } .filters.tf small { margin-left: auto; }
.dHead h3 small { font: 600 12px var(--fb); color: var(--dim); }
.vlist { display: flex; flex-direction: column; gap: 8px; overflow: auto; flex: 1; min-height: 0; padding-right: 4px; } .vlist h4 { margin-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 15px; } .vlist h4 small { font: 600 12px var(--fb); }
.note { font-size: 12px; margin: 4px 0 0; }
.gearRow, .shopChar, .cosI, .qrow { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: #0004; border: 1.5px solid var(--line); }
.gIco { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #0006; flex: none; } .gIco .ico { font-size: 30px; }
.gTxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .gTxt b { font: 700 14px var(--fd); } .gTxt b em { font: 600 12px var(--fb); color: var(--gold); font-style: normal; } .gTxt small { color: var(--dim); font-size: 12px; }
.gAct { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; } .gAct .cta.sm { padding: 4px 10px; font-size: 13px; }
.lockNote.sm { font-size: 12px; opacity: .8; } .ghost.sm { padding: 4px 12px; font-size: 13px; border-radius: 10px; }
.dAct .try { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 12px; font-size: 14px; } .dAct .try svg { width: 18px; height: 18px; }
.staffRow { flex-wrap: wrap; } .staffRow .gTxt { flex: 1 1 180px; }
.staffPick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; flex: 1 1 100%; }
.staffPick small { grid-column: span 4; color: var(--dim); font-size: 11px; text-align: center; } .gTxt small.gNext { color: #9fe0a8; }
.staffPick button { display: grid; place-items: center; padding: 5px 0; border-radius: 9px; border: 1.5px solid var(--line); background: rgba(0, 0, 0, .28); cursor: pointer; border-bottom: 3px solid var(--c); }
.staffPick button:hover { background: rgba(255, 255, 255, .08); } .staffPick button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); } .staffPick .ico { font-size: 19px; }
button.staffLine { border: 0; cursor: pointer; font-family: inherit; margin-top: 4px; } button.staffLine:hover { background: rgba(0, 0, 0, .45); }
#pasv { flex-wrap: wrap; } #pasv span { flex: 1 1 200px; }
.shopChar.on, .cosI.on { border-color: var(--gold); } .scP { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #0006; border: 2px solid var(--c); flex: none; }
.cosI .sw { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink); flex: none; }
.bpHead, .bpT { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 6px; align-items: center; } .bpHead b { font: 700 12px var(--fd); text-align: center; color: var(--dim); }
.bpList { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow: auto; flex: none; }
.bpT > i { font: 800 13px var(--fd); font-style: normal; text-align: center; color: var(--dim); } .bpT.ok > i { color: var(--gold); }
.bpR { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 5px; border-radius: 9px; background: #0005; border: 1.5px solid var(--line); font-size: 12px; white-space: nowrap; overflow: hidden; }
.bpR:not(:disabled) { border-color: var(--gold); background: rgba(255, 207, 74, .15); animation: pulse 1.4s infinite; } .bpR.got { opacity: .4; text-decoration: line-through; } .bpR.paid { border-style: dashed; }
.qrow.ok { border-color: var(--gold); } .qrow.got { opacity: .5; } .qRw { display: flex; gap: 6px; font-size: 12.5px; white-space: nowrap; } .qrow .xpb { margin-top: 3px; }
.brow .ttl { font: 600 11px var(--fb); color: var(--gold); font-style: normal; }
/* Hộp có danh sách dài (cài đặt, hướng dẫn tài nguyên): cao tối đa bằng màn hình, danh sách cuộn bên trong, nút đóng luôn thấy */
.modal.settings { max-width: 640px; max-height: 100%; } .setScroll { flex: 0 1 auto; min-height: 120px; display: flex; flex-direction: column; gap: 10px; overflow: auto; padding-right: 6px; } .setScroll h4 { display: flex; align-items: center; gap: 10px; }
.kGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 14px; } .kRow { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.kRow select { font: 600 12px var(--fb); color: var(--text); background: #0008; border: 1.5px solid var(--line); border-radius: 8px; padding: 3px 6px; }
.kb { min-width: 58px; cursor: pointer; } .kb.wait { background: var(--gold); color: #2b1a00; animation: pulse 1s infinite; }
.adB { margin-left: 6px; border-color: var(--gold); }
.hs.ult { margin-left: 8px; } .hs.ult::before { content: ""; position: absolute; inset: -4px; border-radius: 18px; border: 2px solid var(--gold); pointer-events: none; }
.hs.free .mn { background: var(--good); } .hs.flash { background: #3a2f0c; margin-left: 4px; }
#tutBox { position: absolute; left: 50%; top: 92px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 22px; border-radius: 16px; background: rgba(20, 23, 46, .9); border: 2.5px solid var(--gold); font: 700 17px var(--fd); text-align: center; max-width: 560px; box-shadow: 0 8px 30px #000a; }
#tutBox b { font-size: 12px; color: var(--gold); letter-spacing: 1px; }
@media (max-width: 1280px) { .pagesC { max-width: 190px; } .tabB span { display: none; } }

/* nội tại nhân vật hiện trong trận */
#pasv { grid-column: 1 / -1; max-width: 270px; display: flex; align-items: center; gap: 7px; font: 500 11.5px var(--fb); line-height: 1.25; color: #dfe3f7; background: rgba(10, 12, 28, .62); border: 1.5px solid var(--line); border-radius: 10px; padding: 4px 9px 4px 6px; }
#pasv:empty { display: none; } #pasv .ico { font-size: 20px; flex: none; } #pasv b { display: block; font: 700 11px var(--fd); color: var(--gold); letter-spacing: .3px; }

/* hướng dẫn kiếm tài nguyên */
button.cc { cursor: pointer; color: inherit; font: inherit; font-weight: 700; } button.cc.gold { color: var(--gold); } button.cc:hover, .pagesC[data-a]:hover .cc { border-color: var(--gold); } .pagesC[data-a] { cursor: pointer; }
.resB { font: 800 16px var(--fd); color: var(--gold); }
.resG section { background: #0004; border-radius: 14px; padding: 10px 12px; } .resG h4 { font-size: 16px; } .resG h4 small { font: 500 11.5px var(--fb); color: #aab1d6; } .resG h4 .ico { font-size: 22px; }
.resG ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.resG li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; } .resG li .ico { font-size: 17px; } .resG li b { color: var(--gold); white-space: nowrap; font-size: 12px; }
.resG p { margin: 6px 0 0; font-size: 12px; }
.resLink { display: flex; align-items: center; gap: 6px; margin-top: 6px; background: none; border: 0; padding: 0; color: var(--gold); font: 600 12px var(--fb); text-decoration: underline; cursor: pointer; text-align: left; } .resLink .ico { font-size: 16px; }

#tip { position: fixed; left: 0; top: 0; z-index: 9999; max-width: 300px; padding: 7px 11px; border-radius: 10px; background: #0b0e1cf2; border: 1.5px solid #3b4470; color: #e6e9f5; font: 600 12.5px/1.4 var(--fb, system-ui, sans-serif); white-space: pre-line; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .1s; box-shadow: 0 6px 18px #0008; }
#tip.on { opacity: 1; visibility: visible; }

/* rune sức mạnh đang có hiệu lực */
#runeBuffs { display: flex; gap: 6px; justify-content: center; min-height: 0; }
.rb { position: relative; width: 40px; height: 40px; border-radius: 12px; background: #14172e; border: 2.5px solid var(--c); box-shadow: 0 0 12px var(--c); display: grid; place-items: center; pointer-events: auto; }
.rb .ico { width: 24px; height: 24px; }
.rb b { position: absolute; right: -5px; bottom: -6px; min-width: 18px; padding: 0 3px; border-radius: 7px; font: 800 11px var(--fd); text-align: center; color: #1a1024; background: var(--c); border: 1.5px solid var(--ink); }
/* hiệu ứng bất lợi đang dính: ô tròn nền đỏ sẫm, nảy lên khi mới dính */
.rb.db { border-radius: 50%; background: radial-gradient(#3a1424, #1a0c16); box-shadow: 0 0 10px var(--c), inset 0 0 8px #ff3b3b55; animation: dbIn .22s ease-out; }
.rb.db b { min-width: 22px; }
@keyframes dbIn { from { transform: scale(1.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Tổng kết khi chết + icon skill ở kill feed */
#feed .skico { width: 16px; height: 16px; } #feed span { display: inline-flex; }
#dead .rc { width: min(440px, 92vw); display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; background: rgba(12, 8, 22, .82); border: 1.5px solid var(--line); font-family: inherit; text-align: left; pointer-events: auto; }
#dead .rc i { font-style: normal; flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-size: 20px; position: relative; } #dead .rc i svg { width: 100%; height: 100%; }
#dead .kb { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; margin-bottom: 2px; border-bottom: 1px solid var(--line); font-size: 15px; } #dead .kb span { color: #ff8f8f; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; } #dead .kb b { font-size: 17px; }
#dead .rr { display: flex; align-items: center; gap: 8px; font-size: 13px; } #dead .rr .nm { flex: 0 0 150px; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; } #dead .rr .nm b, #dead .rr .nm em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #dead .rr .nm em { font-style: normal; font-size: 10.5px; color: #a9afc8; }
#dead .rr .bar { flex: 1; height: 8px; border-radius: 4px; background: #ffffff1a; overflow: hidden; } #dead .rr .bar u { display: block; height: 100%; background: linear-gradient(90deg, #ff5d5d, #ffb27a); border-radius: 4px; } #dead .rr .n { flex: 0 0 42px; text-align: right; font-weight: 800; }
#dead .ft { font-size: 11.5px; color: #a9afc8; text-align: right; }
#dead .ld { display: flex; align-items: center; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); } #dead .ld span { font-size: 12px; color: #a9afc8; margin-right: auto; } #dead .ld i { width: 34px; height: 34px; } #dead .ld i.no { border-radius: 8px; border: 1.5px dashed var(--line); } #dead .ld sub { position: absolute; right: -3px; bottom: -3px; font-size: 10px; font-weight: 800; background: #120a1c; border-radius: 6px; padding: 0 4px; line-height: 14px; }

/* Tài khoản: Google / Apple */
.acctSec { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #0004; border: 1.5px solid var(--line); }
.acctSec p { margin: 0; font-size: 13px; }
.acctRow { display: flex; align-items: center; gap: 8px; font-size: 13px; } .acctRow .ico { color: #62e07c; } .acctRow span { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.authBox { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; min-height: 44px; }
.gbtn { min-width: 250px; min-height: 40px; display: flex; justify-content: center; align-items: center; color: var(--dim); font-size: 12px; }
.abtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 250px; height: 40px; border-radius: 20px; background: #000; color: #fff; border: 1px solid #fff5; font: 600 14px var(--fb); cursor: pointer; }
.abtn:hover { background: #1a1a1a; } .abtn svg { width: 17px; height: 17px; margin-top: -2px; }
.onbAuth { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.codeIn input { font: 700 14px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; text-transform: uppercase; padding: 6px 10px; min-width: 0; }
.codeIn input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--fb); font-weight: 600; }
.onbAuth .codeIn { width: 100%; max-width: 340px; }
.pvCode.bCode b { font: 800 22px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 2px; text-align: center; overflow-wrap: anywhere; }
.demo .d-spin { animation: dSpin 2.4s linear infinite; }
@keyframes dSpin { to { transform: rotate(360deg); } }

/* Phòng riêng đấu với bạn bè */
.pvBtn { display: flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, .05); text-align: left; } .pvBtn:hover { border-color: var(--accent2); }
.pvBtn .ico { font-size: 22px; } .pvBtn span { display: flex; flex-direction: column; line-height: 1.15; } .pvBtn b { font: 700 15px var(--fd); } .pvBtn small { color: var(--dim); font-size: 11.5px; }
.pvBtn.on { border-color: var(--gold); background: rgba(255, 207, 74, .12); }
.pvBox { display: flex; flex-direction: column; gap: 10px; } .pvBox.pvNew { align-items: center; } .pvBox.pvNew .setRow { width: 100%; max-width: 320px; }
.pvOr { color: var(--dim); font-size: 13px; }
#pvIn { text-transform: uppercase; letter-spacing: 4px; text-align: center; font: 800 18px var(--fd); min-width: 0; }
.pvCode { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: #0005; border: 2px dashed var(--gold); }
.pvCode small { color: var(--dim); font-weight: 700; letter-spacing: 1px; } .pvCode b { font: 800 30px var(--fd); letter-spacing: 6px; color: var(--gold); user-select: all; }
.pvCfg { justify-content: center; flex-wrap: wrap; } .pvCfg select { font: 600 14px var(--fb); color: var(--text); background: #0008; border: 2px solid var(--line); border-radius: 10px; padding: 6px 8px; }
.pvHead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 700; } .pvHead small { color: var(--dim); font-weight: 500; font-size: 12px; text-align: right; }

/* ---------- Vừa một màn hình (không cần cuộn) ---------- */
/* Màn thấp (laptop 13–15", cửa sổ trình duyệt còn thanh địa chỉ / dock): gọn khoảng cách và chi tiết phụ để mọi nút nằm trong màn hình. */
@media (max-height: 860px) {
  .onb { gap: 10px; padding: 14px 24px; } .logo.big { font-size: 34px; } .onb h1 { font-size: 26px; }
  .hero { width: 230px; padding: 12px 14px; gap: 6px; } .hero .pedestal { width: 116px; } .hero h3 { font-size: 22px; } .statrow { gap: 2px; }
  .forge { gap: 20px; } .pedestal.lg { width: min(30vh, 220px); } .forgeRight { gap: 10px; } .orb { padding: 6px 10px; } .orb .elem { width: 48px; }
  .home { gap: 10px; padding: 10px 14px 12px; } .panel { padding: 10px 12px; gap: 8px; }
  .stage { gap: 6px; } .stage .passive { padding: 4px 10px; font-size: 12px; } .nameplate h2 { font-size: 26px; }
  .ringRow { padding: 4px 10px; } .ringRow .rsock { width: 34px; height: 34px; } .ringRow .rsock .elem { width: 26px; }
  .lslot { width: 60px; height: 60px; border-radius: 15px; }
  .playRow { margin-top: 4px; } .play { padding: 9px 34px 9px 22px; } .play .ico { font-size: 34px; } .play b { font-size: 25px; }
  .grid { min-height: 96px; }
}
@media (max-height: 760px) {
  .modal { padding: 18px 22px; gap: 10px; } .title { font-size: 28px; } .board { max-height: 20vh; }
  .p1 .podB { height: 80px; } .p2 .podB { height: 64px; } .p3 .podB { height: 52px; } .podB span { font-size: 22px; }
  .rwI { width: 64px; height: 64px; } .rwI .ico { font-size: 32px; } .rwI .skico { width: 50px; } .vsBoss .mob { width: 96px; }
}
@media (max-height: 700px) {
  .onb .steps { display: none; } .hero .pedestal { width: 96px; }
  .heroBox { min-height: 120px; } .stage .passive { padding: 3px 9px; line-height: 1.3; }
  .tabB { padding: 4px 2px; } .tabB .ico { font-size: 18px; }
}
/* Điện thoại dọc: game cần chuột + bàn phím nên không chơi được ở đây; giữ bố cục xếp chồng, cuộn như trang thường, nút Chơi lên đầu. */
@media (max-width: 760px) and (orientation: portrait) {
  .home { height: auto; min-height: 100%; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; padding: 10px; }
  .stage { order: 1; } .book { order: 2; } .towerP { order: 3; } .grid { max-height: 240px; }
  .heroBox { flex: none; min-height: 0; } .heroBox .pedestal.xl { height: auto; width: min(44vw, 200px); } .heroBox .pedestal.xl .mage { width: 100%; height: auto; }
  .top { flex-wrap: wrap; gap: 8px; } .stage > *, .panel > * { max-width: 100%; min-width: 0; } .logo { font-size: 20px; } .pchip small { display: none; } .dDemo { display: none; } .cur .cc:not(.gold) { display: none; }
}

/* ---------- Thông báo (banner ở sảnh / onboarding, popup) + liên hệ ---------- */
@media (min-width: 761px), (orientation: landscape) { .home.hasNews { grid-template-rows: auto auto minmax(0, 1fr); } }
.newsBar { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 1100px; min-width: 0; margin: 0 auto; }
.onb .newsBar { max-width: 760px; }
.nb.info, .newsPop.info { --nc: var(--accent2); } .nb.event, .newsPop.event { --nc: var(--gold); } .nb.update, .newsPop.update { --nc: var(--good); }
.nb.warning, .newsPop.warning { --nc: #ff9d5d; } .nb.maintenance, .newsPop.maintenance { --nc: #ff7a45; }
.nb { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--panel); border: 1.5px solid var(--nc); box-shadow: 0 4px 14px #0006; }
.nb.maintenance { background: linear-gradient(90deg, rgba(255, 122, 69, .25), var(--panel) 60%); }
.nbMain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; white-space: nowrap; overflow: hidden; }
.nbMain em { flex: none; font: 800 11px var(--fd); font-style: normal; text-transform: uppercase; letter-spacing: .6px; color: var(--nc); }
.nbMain b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nbMain span { flex: 1 1 0; min-width: 0; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.nbMain small { flex: none; margin-left: auto; padding-left: 8px; font-size: 13px; font-weight: 600; }
.nbMain:hover b { text-decoration: underline; }
.cd { font-variant-numeric: tabular-nums; color: var(--gold); font-weight: 700; }
.nbL { flex: none; font: 700 13px var(--fd); color: var(--ink); background: var(--nc); padding: 3px 10px; border-radius: 8px; text-decoration: none; }
.nbX { flex: none; font: 800 20px/1 var(--fd); color: var(--dim); padding: 0 4px; } .nbX:hover { color: var(--text); }
.newsPop { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.newsPop p { margin: 0; line-height: 1.55; overflow-wrap: anywhere; } .newsPop .npSub { color: var(--dim); }
.npTag { align-self: center; display: inline-flex; align-items: center; gap: 6px; font: 800 12px var(--fd); text-transform: uppercase; letter-spacing: .8px; padding: 3px 12px; border-radius: 99px; background: rgba(255, 255, 255, .06); border: 1.5px solid var(--nc); color: var(--nc); }
.btnL { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; } .cta.btnL { color: #2b1a00; }
.contact p { margin: 0 0 8px; } .contact a:not(.btnL) { color: var(--accent2); } .contact small { display: block; margin-top: 8px; }
.onbFoot { font-size: 12px; margin: 0; } .onbFoot a { color: var(--accent2); }
#toast.info { border-color: var(--accent2); }
@media (max-width: 760px) and (orientation: portrait) { .nbMain span { display: none; } }

/* ---------- Dungeon Quest (Adventurers' Guild) ---------- */
#bossbar.ally .bar i { background: linear-gradient(#8dffa5, #2fae58); }
#tutBox.say { top: auto; bottom: 178px; flex-direction: row; align-items: baseline; gap: 10px; max-width: 640px; padding: 8px 18px; font: 600 15px var(--fb); text-align: left; border-width: 2px; animation: sayIn .25s; pointer-events: none; }
#tutBox.say b { font: 800 13px var(--fd); white-space: nowrap; letter-spacing: .5px; }
@keyframes sayIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.pvBtn.guildBtn { border-color: #8a6b2e; background: rgba(255, 207, 74, .08); } .pvBtn.guildBtn:hover { border-color: var(--gold); } .pvBtn.guildBtn.wait { opacity: .7; }
.guild { display: flex; flex-direction: column; gap: 10px; width: 520px; max-width: 100%; text-align: left; }
.guild .center { text-align: center; }
.guild .gHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 12px var(--fb); color: var(--dim); letter-spacing: .4px; text-transform: uppercase; }
.guild h3 { font: 800 24px var(--fd); color: var(--gold); margin: 0; line-height: 1.1; }
.guild .gGiver { font: 600 13px var(--fb); color: #c9cee6; }
.guild .gBrief { font: 500 14.5px/1.5 var(--fb); color: #e8ebfa; background: #0005; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 9px 12px; }
.guild ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font: 600 13.5px var(--fb); color: #dfe3f7; }
.guild .gMeta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.guild .gNote { font: 500 12px var(--fb); color: var(--dim); text-align: center; }
.guildCard { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 207, 74, .07); border: 1.5px solid #8a6b2e; }
.guildCard b { font: 800 15.5px var(--fd); color: var(--gold); } .guildCard p { margin: 0; font: 500 12.5px/1.4 var(--fb); color: #dfe3f7; }
.guildCard .row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }

/* Hộp thoại NPC (Dungeon Quest): chân dung + tên + câu thoại chạy chữ + lựa chọn */
#dlg { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); width: min(720px, calc(100vw - 24px)); display: flex; gap: 14px; align-items: stretch; padding: 14px 18px; border-radius: 18px; background: linear-gradient(#1b1f3f, #12152c); border: 2.5px solid var(--gold); box-shadow: 0 14px 44px #000c, inset 0 0 0 2px #0006; pointer-events: auto; cursor: pointer; z-index: 6; animation: sayIn .2s; user-select: none; }
#dlg .dPort { flex: 0 0 92px; height: 92px; border-radius: 14px; background: radial-gradient(#3a4280, #1a1e3e); border: 2px solid #8a6b2e; display: grid; place-items: center; overflow: hidden; }
#dlg .dPort svg { width: 84px; height: 84px; }
#dlg .dBody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
#dlg .dName { font: 800 17px var(--fd); color: var(--gold); letter-spacing: .4px; min-height: 20px; }
#dlg .dText { margin: 0; min-height: 46px; font: 500 15.5px/1.5 var(--fb); color: #eef0ff; }
#dlg .dNext { align-self: flex-end; font: 600 11.5px var(--fb); color: var(--dim); animation: dNext 1.1s infinite; }
#dlg .dCh { display: flex; flex-direction: column; gap: 6px; }
#dlg .dCh:empty { display: none; }
#dlg .dCh button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 12px; border-radius: 10px; border: 1.5px solid #4a5290; background: #232850; color: #fff; font: 600 14px var(--fb); cursor: pointer; }
#dlg .dCh button:hover { border-color: var(--gold); background: #2d3468; }
#dlg .dCh button b { flex: 0 0 22px; height: 22px; border-radius: 6px; background: var(--gold); color: #1a1024; font: 800 13px var(--fd); display: grid; place-items: center; }
#dlg.narr .dPort, #dlg.narr .dName { display: none; }
#dlg.narr .dText { font-style: italic; color: #d9dcf2; text-align: center; padding: 6px 10px; }
@keyframes dNext { 50% { opacity: .35; } }
@media (max-width: 640px) { #dlg { bottom: 120px; padding: 10px 12px; gap: 10px; } #dlg .dPort { flex-basis: 60px; height: 60px; } #dlg .dPort svg { width: 54px; height: 54px; } #dlg .dText { font-size: 14px; } }

/* Bảng nhiệm vụ của Hội: ba tờ yêu cầu bằng giấy da ghim trên bảng gỗ */
.modal.gboard { max-width: 940px; }
.guild.gWide { width: 860px; }
.gBoard { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 22px 18px 20px; border-radius: 16px; background: repeating-linear-gradient(90deg, #6b4526 0 46px, #5e3b1f 46px 48px), #6b4526; border: 4px solid #3f2713; box-shadow: inset 0 0 30px #0009; }
.gNotice { position: relative; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; text-align: left; padding: 20px 14px 12px; border: 0; border-radius: 4px 10px 6px 12px; background: linear-gradient(160deg, #f6e9c6, #e2cc98); color: #3a2613; cursor: pointer; box-shadow: 0 6px 14px #0008; transition: transform .15s, box-shadow .15s; font: 500 13px/1.4 var(--fb); }
.gNotice.n0 { transform: rotate(-1.6deg); } .gNotice.n1 { transform: rotate(.8deg) translateY(6px); } .gNotice.n2 { transform: rotate(-.6deg); }
.gNotice:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 14px 26px #000a; z-index: 1; }
.gNotice .gPin { position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8f8f, #b5332c); box-shadow: 0 3px 4px #0008; }
.gNotice .gKind { display: flex; align-items: center; gap: 5px; font: 800 11px var(--fd); letter-spacing: 1px; text-transform: uppercase; color: #7a4a1e; }
.gNotice .gKind .ico { width: 15px; height: 15px; }
.gNotice .gStars { position: absolute; top: 18px; right: 12px; }
.gStars { font-size: 13px; color: #c9861a; letter-spacing: 1px; } .gStars i { font-style: normal; opacity: .28; }
.gNotice .gTitle { font: 800 19px/1.15 var(--fd); color: #4a2a10; }
.gNotice .gBy { display: flex; align-items: center; gap: 7px; font: 700 12.5px var(--fb); color: #6b4526; }
.gFace { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #fff5; border: 2px solid #a5753c; display: inline-grid; place-items: center; overflow: hidden; } .gFace svg { width: 30px; height: 30px; }
.gNotice .gText { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; color: #4a3520; }
.gNotice .gFoot { margin-top: auto; padding-top: 8px; width: 100%; display: flex; justify-content: space-between; border-top: 1.5px dashed #a5753c; font: 800 14px var(--fd); color: #6b3d10; }
.gNotice .gFoot span { display: flex; align-items: center; gap: 4px; } .gNotice .gFoot .ico { width: 17px; height: 17px; }
.guild .gHead .gKind { display: flex; align-items: center; gap: 6px; color: var(--gold); } .guild .gHead .gKind .ico { width: 15px; height: 15px; }
.guild .gGiver { display: flex; align-items: center; gap: 10px; } .guild .gGiver .gFace { width: 46px; height: 46px; background: #0004; border-color: #8a6b2e; } .guild .gGiver .gFace svg { width: 40px; height: 40px; }
.guild .gGiver b { color: #fff; } .guild .gGiver small { display: block; font: 500 11.5px var(--fb); color: var(--dim); }
.guildCard .gRow { padding-top: 6px; border-top: 1px solid #8a6b2e55; } .guildCard .gRow span { display: flex; flex-direction: column; min-width: 0; } .guildCard b.sm { font-size: 13.5px; } .guildCard .gRow .ico { width: 12px; height: 12px; vertical-align: -2px; }
@media (max-width: 760px) { .gBoard { grid-template-columns: 1fr; gap: 14px; padding: 16px 12px; } .gNotice.n0, .gNotice.n1, .gNotice.n2 { transform: none; } .gNotice .gText { -webkit-line-clamp: 3; } }

/* ---------- Cảm ứng (html.touch do main.js đặt khi thiết bị dùng ngón tay) ---------- */
#joy, #rot { display: none; }
html.touch { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html.touch input, html.touch textarea { -webkit-user-select: text; user-select: text; }
/* cụm skill về góc phải cho ngón cái phải và to hơn (--tz nhân thêm vào --hz); minimap lên góc trên phải; bảng xếp hạng lùi sang trái minimap */
html.touch #bc { --tz: 1.4; left: auto; right: max(14px, env(safe-area-inset-right)); transform: none; align-items: flex-end; }
html.touch #slots { touch-action: none; }
html.touch .hs kbd { display: none; }
html.touch #minimap { top: 12px; bottom: auto; right: max(14px, env(safe-area-inset-right)); width: 150px; height: 150px; }
html.touch #tr { right: calc(max(14px, env(safe-area-inset-right)) + 162px); }
html.touch #tl, html.touch #sysBtns { left: max(14px, env(safe-area-inset-left)); }
html.touch #sysBtns { --tz: 1.4; }
html.touch #tip { display: none; }
/* joystick nổi: mờ ở góc trái khi rảnh, nhảy tới chỗ ngón tay khi chạm nửa trái sân (game.js đặt left / top) */
html.touch #hud:not(.hidden) ~ #joy { display: block; position: fixed; left: calc(max(20px, env(safe-area-inset-left)) + 110px); top: calc(100% - 100px); width: 0; height: 0; pointer-events: none; opacity: .35; z-index: 4; }
#joy::before { content: ""; position: absolute; left: -56px; top: -56px; width: 112px; height: 112px; border-radius: 50%; background: #fff1; border: 2px solid #fff4; }
#joy i { position: absolute; left: -24px; top: -24px; width: 48px; height: 48px; border-radius: 50%; background: #fff6; border: 2px solid #fffa; }
html.touch #joy.on { opacity: .85; }
@media (orientation: portrait) {
  html.touch #hud:not(.hidden) ~ #rot { display: grid; place-items: center; position: fixed; inset: 0; z-index: 50; background: var(--bg); text-align: center; }
  #rot b { display: block; font: 800 24px var(--fd); color: var(--gold); } #rot span { color: var(--dim); }
  #rot div::before { content: ""; display: block; width: 46px; height: 76px; margin: 0 auto 18px; border: 3px solid var(--text); border-radius: 10px; animation: rotHint 2s ease-in-out infinite; }
}
@keyframes rotHint { 0%, 25% { transform: none; } 60%, 100% { transform: rotate(-90deg); } }
