/* ============ BATTLE HUD — chunky, bright, readable (Fortnite-flavoured) ============ */
#screen-battle { background: #000; }
#battle-container { position: absolute; inset: 0; }
#battle-container canvas { display: block; }

#battle-hud { position: absolute; inset: 0; pointer-events: none; overflow: hidden; user-select: none;
  --blue: #3a6fd8; --red: #c8392b; --ink: #0d1424; --gold: #ffd35a;
  font-family: 'Barlow Condensed', 'Trebuchet MS', sans-serif; color: #fff; }
#battle-hud .blue { color: color-mix(in srgb, var(--blue) 70%, white); }
#battle-hud .red { color: color-mix(in srgb, var(--red) 70%, white); }
#battle-hud.cine > :not(#bh-intro) { opacity: 0; transition: opacity .3s; }
#battle-hud > * { transition: opacity .35s; }
.display { font-family: 'Lilita One', sans-serif; }

/* ---------- top: scoreboard ---------- */
#bh-score { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
.sc-team { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 52px; transform: skewX(-12deg); }
.sc-team > * { transform: skewX(12deg); }
.sc-team.blue { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 85%, white), var(--blue)); border-radius: 10px 0 0 10px; }
.sc-team.red { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 85%, white), var(--red)); border-radius: 0 10px 10px 0; }
#battle-hud .sc-team .sc-name, #battle-hud .sc-team .sc-val { color: #fff; }
.sc-name { font-family: 'Lilita One', sans-serif; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .92; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
.sc-val { font-family: 'Lilita One', sans-serif; font-size: 36px; line-height: 1; text-shadow: 0 3px 0 rgba(0,0,0,.35); min-width: 34px; text-align: center; }
.sc-mid { background: linear-gradient(180deg, #1c2638, #0d1424); padding: 4px 22px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 120px; transform: skewX(-12deg); border-top: 3px solid rgba(255,255,255,.12); }
.sc-mid > * { transform: skewX(12deg); }
#sc-timer { font-family: 'Lilita One', sans-serif; font-size: 30px; line-height: 1; letter-spacing: 1px; }
#sc-timer.urgent { color: #ff5a4a; animation: pulse 1s infinite; }
#sc-sub { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: #9fb0cc; margin-top: 1px; }
@keyframes pulse { 50% { transform: skewX(12deg) scale(1.12); } }
#bh-progress { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); width: 420px; height: 6px; display: flex; gap: 120px; }
.pg { flex: 1; height: 100%; border-radius: 3px; background: rgba(255,255,255,.8); box-shadow: 0 2px 0 rgba(0,0,0,.3); transition: transform .3s; }
.pg.blue { background: var(--blue); transform-origin: right; }
.pg.red { background: var(--red); transform-origin: left; }

/* banners */
#bh-flags { position: absolute; top: 86px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; }
.flag-chip { position: relative; width: 44px; height: 44px; }
.flag-ring { position: absolute; inset: 0; transform: rotate(45deg); border-radius: 8px; }
.flag-core { position: absolute; inset: 5px; transform: rotate(45deg); border-radius: 6px; background: #3a4050; border: 2px solid rgba(255,255,255,.75);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.flag-core span { transform: rotate(-45deg); font-family: 'Lilita One', sans-serif; font-size: 18px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.flag-chip.blue .flag-core { background: var(--blue); }
.flag-chip.red .flag-core { background: var(--red); }
.flag-chip.neutral .flag-core { background: #8a8e98; }
.flag-chip.contested { animation: shake .4s infinite; }
@keyframes shake { 25% { transform: translateX(-1px); } 75% { transform: translateX(1px); } }
#bh-objective { position: absolute; top: 140px; left: 50%; transform: translateX(-50%); font-size: 17px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; background: rgba(13,20,36,.6); padding: 3px 16px; border-radius: 20px; text-shadow: 0 1px 2px #000; white-space: nowrap; }
#bh-objective:empty { display: none; }

/* ---------- minimap + kill feed (top right) ---------- */
#bh-mapwrap { position: absolute; top: 14px; right: 16px; width: 200px; height: 200px; border-radius: 14px; overflow: hidden;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); }
#bh-minimap { width: 100%; height: 100%; display: block; }
#bh-feed { position: absolute; top: 226px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.feed-row { background: rgba(13,20,36,.62); padding: 3px 10px; border-radius: 6px; font-size: 15px; font-weight: 800; display: flex; gap: 7px; align-items: center;
  animation: feedin .25s ease-out; white-space: nowrap; }
.feed-row.me { background: rgba(255,211,90,.22); border: 1px solid rgba(255,211,90,.6); }
.feed-row.obj { background: rgba(13,20,36,.8); }
.feed-row em { font-style: normal; font-size: 13px; }
@keyframes feedin { from { transform: translateX(30px); opacity: 0; } }

/* ---------- crosshair + hit markers ---------- */
#crosshair { position: absolute; top: 50%; left: 50%; width: 0; height: 0; --gap: 8px; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45); border-radius: 1px; transition: all .08s; }
#crosshair i:nth-child(1) { width: 2px; height: 8px; left: -1px; bottom: var(--gap); }
#crosshair i:nth-child(2) { width: 2px; height: 8px; left: -1px; top: var(--gap); }
#crosshair i:nth-child(3) { width: 8px; height: 2px; top: -1px; right: var(--gap); }
#crosshair i:nth-child(4) { width: 8px; height: 2px; top: -1px; left: var(--gap); }
#crosshair b { position: absolute; width: 4px; height: 4px; left: -2px; top: -2px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.5); }
#hitmarker { position: absolute; top: 50%; left: 50%; width: 0; height: 0; opacity: 0; }
#hitmarker i { position: absolute; width: 3px; height: 11px; background: #fff; left: -1.5px; top: -5.5px; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
#hitmarker i:nth-child(1) { transform: rotate(45deg) translateY(-12px); }
#hitmarker i:nth-child(2) { transform: rotate(135deg) translateY(-12px); }
#hitmarker i:nth-child(3) { transform: rotate(225deg) translateY(-12px); }
#hitmarker i:nth-child(4) { transform: rotate(315deg) translateY(-12px); }
#hitmarker.crit i { background: var(--gold); }
#hitmarker.kill i { background: #ff4a3a; height: 14px; }
#hitmarker.block i { background: #9aa8c0; }
#hitmarker.show { animation: hm .3s ease-out; }
@keyframes hm { 0% { opacity: 1; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1); } }

/* damage numbers + overhead bars */
#bh-nums, #bh-bars { position: absolute; inset: 0; }
.dmgnum { position: absolute; left: 0; top: 0; font-family: 'Lilita One', sans-serif; font-size: 26px; color: #fff; will-change: transform;
  -webkit-text-stroke: 1.5px #1a1a24; text-shadow: 0 3px 0 rgba(0,0,0,.45); white-space: nowrap; }
.dmgnum.crit { color: var(--gold); font-size: 34px; }
.dmgnum.block, .dmgnum.glance { color: #b8c4d8; font-size: 18px; letter-spacing: 1px; }
.hbar { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; will-change: transform; }
.hbar i { display: block; width: 46px; height: 6px; background: rgba(0,0,0,.55); border-radius: 3px; overflow: hidden; border: 1px solid rgba(0,0,0,.6); }
.hbar u { display: block; height: 100%; background: linear-gradient(180deg, #ff6a50, #d02a1a); transform-origin: left; transition: transform .15s; }
.hbar.boss i { width: 110px; height: 9px; }
.hbar.boss u { background: linear-gradient(180deg, #ffd35a, #e08a1a); }
.hbar span { font-family: 'Lilita One', sans-serif; font-size: 14px; color: var(--gold); -webkit-text-stroke: 1px #000; letter-spacing: 1px; }
.hbar.ally b { display: block; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent;
  border-top: 9px solid color-mix(in srgb, var(--blue) 75%, white); filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }

/* ---------- toasts / eliminations / banners ---------- */
#bh-toast { position: absolute; top: 36%; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.toast { font-family: 'Lilita One', sans-serif; font-size: 22px; letter-spacing: 2px; -webkit-text-stroke: 1px rgba(0,0,0,.6);
  text-shadow: 0 3px 0 rgba(0,0,0,.4); animation: toast 1.8s ease-out forwards; white-space: nowrap; }
.toast.sever { color: #ff4a3a; font-size: 28px; }
.toast.warn { color: #ffb43a; }
.toast.cry { color: #9adf6a; }
@keyframes toast { 0% { transform: scale(1.8); opacity: 0; } 10% { transform: scale(1); opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
#bh-elim { position: absolute; top: 62%; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0; }
#bh-elim.show { animation: elim 2.2s ease-out forwards; }
.el-top { font-size: 15px; font-weight: 800; letter-spacing: 4px; color: #ff6a50; }
.el-name { font-family: 'Lilita One', sans-serif; font-size: 30px; -webkit-text-stroke: 1px rgba(0,0,0,.5); text-shadow: 0 3px 0 rgba(0,0,0,.4); }
.el-sub { font-size: 16px; font-weight: 800; letter-spacing: 3px; color: var(--gold); }
@keyframes elim { 0% { opacity: 0; transform: translateX(-50%) scale(1.4); } 8% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
#bh-banner { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); font-family: 'Lilita One', sans-serif; font-size: 40px; letter-spacing: 3px;
  padding: 6px 40px; opacity: 0; white-space: nowrap; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
#bh-banner.blue { background: linear-gradient(90deg, transparent, var(--blue) 20%, var(--blue) 80%, transparent); color: #fff !important; }
#bh-banner.red { background: linear-gradient(90deg, transparent, var(--red) 20%, var(--red) 80%, transparent); color: #fff !important; }
#bh-banner.show { animation: banner 2.4s ease-out forwards; }
@keyframes banner { 0% { opacity: 0; transform: translateX(-50%) scaleY(0); } 8% { opacity: 1; transform: translateX(-50%) scaleY(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- vitals (bottom left) ---------- */
#bh-vitals { position: absolute; left: 22px; bottom: 26px; width: 330px; }
.vt-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 4px; }
.vt-name { font-family: 'Lilita One', sans-serif; font-size: 16px; letter-spacing: 1px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.vt-ability { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: #9fb0cc; background: rgba(13,20,36,.6); padding: 1px 8px; border-radius: 4px; }
.vt-ability.ready { color: #1a2a0a; background: #9adf6a; }
.vt-bar { position: relative; height: 26px; background: rgba(13,20,36,.7); border-radius: 6px; overflow: hidden; transform: skewX(-12deg);
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 4px 0 rgba(0,0,0,.3); }
#vt-hp, #vt-hp-lag { position: absolute; inset: 0; transform-origin: left; }
#vt-hp-lag { background: #fff; opacity: .55; }
#vt-hp { background: linear-gradient(180deg, #8af04a, #3cae22); z-index: 1; transition: transform .1s; }
#vt-hp::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 31px, rgba(0,0,0,.18) 31px 33px); }
#vt-hp-num { position: absolute; z-index: 2; right: 12px; top: 0; line-height: 24px; font-family: 'Lilita One', sans-serif; font-size: 18px; transform: skewX(12deg); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
#bh-vitals.low #vt-hp { background: linear-gradient(180deg, #ff7a5a, #d0301a); }
#bh-vitals.low .vt-bar { animation: lowhp .7s infinite; }
@keyframes lowhp { 50% { border-color: #ff4a3a; } }

/* ---------- hotbar (bottom right) ---------- */
#bh-hotbar { position: absolute; right: 18px; bottom: 22px; display: flex; gap: 8px; align-items: flex-end; }
.slot { position: relative; width: 78px; height: 78px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 3px solid rgba(255,255,255,.35); box-shadow: 0 4px 0 rgba(0,0,0,.35); transition: transform .12s; overflow: hidden; }
.slot.uncommon { background: linear-gradient(160deg, #6cc13a, #2d7a1e); }
.slot.rare { background: linear-gradient(160deg, #52aaff, #1f5fc8); }
.slot.legendary { background: linear-gradient(160deg, #ffbf4a, #c4661a); }
.slot.util { width: 54px; height: 54px; background: rgba(13,20,36,.65); }
.slot.sel { border-color: #fff; transform: translateY(-8px); box-shadow: 0 0 0 3px rgba(255,255,255,.25), 0 10px 0 rgba(0,0,0,.25); }
.slot .ico { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.slot.util .ico { font-size: 20px; }
.slot .nm { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; margin-top: 3px; text-shadow: 0 1px 2px rgba(0,0,0,.5); white-space: nowrap; }
.slot .k { position: absolute; top: 3px; left: 6px; font-family: 'Lilita One', sans-serif; font-size: 13px; opacity: .85; }
.slot .ammo { position: absolute; top: 2px; right: 6px; font-family: 'Lilita One', sans-serif; font-size: 16px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }

#bh-prompt { position: absolute; top: 58%; left: 50%; transform: translateX(-50%); font-family: 'Lilita One', sans-serif; font-size: 18px; letter-spacing: 1px;
  background: rgba(13,20,36,.7); padding: 4px 16px; border-radius: 8px; }
#bh-prompt:empty { display: none; }
#bh-hint { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 600; color: rgba(255,255,255,.75); text-shadow: 0 1px 2px #000; white-space: nowrap; }

/* ---------- screen effects ---------- */
#bh-vignette { position: absolute; inset: 0; opacity: 0; --a: .6;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(170,10,0,.7) 100%); }
#bh-vignette.show { animation: vfade .7s ease-out; }
@keyframes vfade { 0% { opacity: var(--a); } 100% { opacity: 0; } }
#bh-block { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at center, transparent 55%, rgba(200,220,255,.4) 100%); }
#bh-block.show { animation: vfade .35s ease-out; }
#bh-blood i { position: absolute; width: var(--s); height: var(--s); transform: translate(-50%,-50%) rotate(var(--r)); opacity: .0; animation: splat 2.6s ease-out forwards;
  background:
    radial-gradient(circle at 50% 50%, rgba(130,0,0,.75) 0 28%, transparent 30%),
    radial-gradient(circle at 78% 30%, rgba(130,0,0,.7) 0 9%, transparent 10%),
    radial-gradient(circle at 25% 72%, rgba(130,0,0,.7) 0 7%, transparent 8%),
    radial-gradient(circle at 70% 80%, rgba(130,0,0,.6) 0 5%, transparent 6%),
    radial-gradient(circle at 20% 25%, rgba(130,0,0,.6) 0 4%, transparent 5%); }
@keyframes splat { 0% { opacity: .9; } 60% { opacity: .6; } 100% { opacity: 0; transform: translate(-50%,-40%) rotate(var(--r)); } }
#bh-dmgdir { position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
#bh-dmgdir i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border-top: 6px solid rgba(255,40,20,.85);
  filter: blur(1px); animation: dd .9s ease-out forwards; }
@keyframes dd { from { opacity: 1; } to { opacity: 0; } }

/* ---------- respawn ---------- */
#bh-respawn { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto;
  background: radial-gradient(ellipse at center, rgba(40,0,0,.25), rgba(10,0,0,.75)); backdrop-filter: grayscale(.85); }
.rs-head { font-family: 'Lilita One', sans-serif; font-size: 64px; letter-spacing: 4px; color: #ff4a3a; -webkit-text-stroke: 2px rgba(0,0,0,.5); text-shadow: 0 5px 0 rgba(0,0,0,.4); }
.rs-by { font-size: 22px; font-weight: 800; letter-spacing: 1px; margin-bottom: 18px; }
.rs-timer { width: 96px; height: 96px; border-radius: 50%; border: 5px solid rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center;
  font-family: 'Lilita One', sans-serif; font-size: 44px; background: rgba(13,20,36,.7); margin-bottom: 20px; }
.rs-timer.ready { font-size: 22px; background: #3cae22; border-color: #b8f08a; animation: pulse2 1s infinite; }
@keyframes pulse2 { 50% { transform: scale(1.08); } }
.rs-label { font-size: 15px; font-weight: 800; letter-spacing: 3px; color: #b8c4d8; margin-bottom: 10px; }
.rs-points { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.rs-pt { position: relative; min-width: 150px; padding: 14px 18px 12px; border-radius: 10px; background: rgba(13,20,36,.8); border: 3px solid rgba(255,255,255,.25);
  font-family: 'Lilita One', sans-serif; font-size: 20px; display: flex; align-items: center; gap: 10px; cursor: pointer; transform: skewX(-8deg); }
.rs-pt > * { transform: skewX(8deg); }
.rs-pt.sel { background: linear-gradient(180deg, color-mix(in srgb, var(--blue) 80%, white), var(--blue)); border-color: #fff; }
.rs-pt .k { position: absolute; top: -10px; left: -6px; width: 22px; height: 22px; border-radius: 5px; background: #fff; color: #0d1424; font-size: 14px;
  display: flex; align-items: center; justify-content: center; }
.rs-pt .ic { font-size: 22px; }
.rs-hint { margin-top: 18px; font-size: 16px; font-weight: 800; letter-spacing: 2px; color: #ffe9b0; }

/* ---------- intro cinematic ---------- */
#bh-intro { position: absolute; inset: 0; }
#bh-intro .lb { position: absolute; left: 0; right: 0; height: 11vh; background: #000; transition: transform .6s ease; }
#bh-intro .lb.top { top: 0; } #bh-intro .lb.bottom { bottom: 0; }
#bh-intro.counting .lb.top { transform: translateY(-100%); } #bh-intro.counting .lb.bottom { transform: translateY(100%); }
#in-title { position: absolute; left: 0; right: 0; top: 30%; text-align: center; opacity: 0; transform: scale(1.15); transition: all .6s cubic-bezier(.2,1.4,.4,1); }
#in-title.show { opacity: 1; transform: scale(1); }
#in-title h1 { font-family: 'Lilita One', sans-serif; font-size: 84px; letter-spacing: 4px; text-transform: uppercase; color: #fff;
  -webkit-text-stroke: 2px rgba(0,0,0,.35); text-shadow: 0 6px 0 rgba(0,0,0,.35), 0 0 40px rgba(0,0,0,.4); line-height: 1; }
#in-title h2 { font-size: 26px; font-weight: 800; letter-spacing: 2px; margin-top: 10px; text-shadow: 0 2px 4px rgba(0,0,0,.7); color: #f2ead4; }
#in-card { position: absolute; bottom: 15vh; left: 6vw; padding: 16px 30px 18px; opacity: 0; transform: translateX(-60px) skewX(-10deg);
  transition: all .45s cubic-bezier(.2,1.3,.4,1); min-width: 360px; border-radius: 6px; box-shadow: 0 8px 0 rgba(0,0,0,.25); }
#in-card > * { transform: skewX(10deg); }
#in-card.blue { background: linear-gradient(120deg, var(--blue), color-mix(in srgb, var(--blue) 60%, black)); }
#in-card.red { left: auto; right: 6vw; transform: translateX(60px) skewX(-10deg); background: linear-gradient(120deg, var(--red), color-mix(in srgb, var(--red) 60%, black)); text-align: right; }
#in-card.show { opacity: 1; transform: translateX(0) skewX(-10deg); }
#battle-hud #in-card * { color: #fff; }
.ic-k { font-size: 16px; font-weight: 800; letter-spacing: 5px; opacity: .85; }
.ic-name { font-family: 'Lilita One', sans-serif; font-size: 54px; line-height: 1; text-transform: uppercase; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.ic-n { font-family: 'Lilita One', sans-serif; font-size: 40px; line-height: 1.1; }
.ic-n small { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 800; letter-spacing: 2px; margin-left: 8px; opacity: .85; }
.ic-comp { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 17px; font-weight: 800; }
#in-card.red .ic-comp { justify-content: flex-end; }
#in-count { position: absolute; top: 40%; left: 50%; transform: translate(-50%,-50%); font-family: 'Lilita One', sans-serif; font-size: 150px; color: #fff;
  -webkit-text-stroke: 3px rgba(0,0,0,.4); text-shadow: 0 8px 0 rgba(0,0,0,.35); }
#in-count.go { color: var(--gold); font-size: 130px; letter-spacing: 6px; }
#in-count.pop { animation: cpop .8s ease-out; }
@keyframes cpop { 0% { transform: translate(-50%,-50%) scale(2.4); opacity: 0; } 20% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(.9); } }
#in-skip { position: absolute; right: 26px; bottom: calc(11vh + 14px); font-size: 14px; font-weight: 800; letter-spacing: 2px; opacity: .7; }
#bh-intro.counting #in-skip { display: none; }

/* ---------- end screen ---------- */
#bh-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto;
  background: radial-gradient(ellipse at center 40%, rgba(13,20,36,.35), rgba(5,8,14,.85)); animation: fadein .6s; }
@keyframes fadein { from { opacity: 0; } }
.end-banner { text-align: center; margin-bottom: 18px; }
.end-banner h1 { font-family: 'Lilita One', sans-serif; font-size: 120px; letter-spacing: 6px; line-height: 1; animation: endpop .7s cubic-bezier(.2,1.5,.4,1);
  -webkit-text-stroke: 3px rgba(0,0,0,.35); text-shadow: 0 8px 0 rgba(0,0,0,.35); }
#bh-end.win .end-banner h1 { background: linear-gradient(180deg, #fff6c8, #ffd35a 45%, #e08a1a); -webkit-background-clip: text; background-clip: text; color: transparent; }
#bh-end.lose .end-banner h1 { color: #ff4a3a; }
.end-banner p { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: #f2ead4; }
@keyframes endpop { 0% { transform: scale(2.2); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.end-score { display: flex; gap: 14px; align-items: baseline; font-family: 'Lilita One', sans-serif; font-size: 30px; margin-bottom: 18px; }
.end-score em { font-family: 'Barlow Condensed', sans-serif; font-style: normal; font-size: 16px; font-weight: 800; letter-spacing: 3px; color: #9fb0cc; }
.end-stats { display: grid; grid-template-columns: repeat(3, 160px); gap: 10px; margin-bottom: 14px; }
.end-stats .stat { background: rgba(13,20,36,.8); border: 2px solid rgba(255,255,255,.15); border-radius: 10px; padding: 10px 12px; text-align: center; transform: skewX(-8deg); }
.end-stats .stat > * { display: block; transform: skewX(8deg); }
.end-stats b { font-family: 'Lilita One', sans-serif; font-size: 38px; font-weight: normal; line-height: 1.05; }
.end-stats span { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #9fb0cc; }
.end-loss { font-size: 16px; font-weight: 600; color: #b8c4d8; margin-bottom: 18px; }
#bh-end .big-btn { font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 24px; letter-spacing: 2px; padding: 12px 44px; }
#battle-hud .big-btn { color: #fff; }
#battle-hud.over > :not(#bh-end) { opacity: 0 !important; }
#battle-hud svg.ic { width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
.slot .ico svg.ic { width: 34px; height: 34px; stroke-width: 1.9; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.slot.util .ico svg.ic { width: 22px; height: 22px; }
.feed-row em svg.ic { width: 15px; height: 15px; opacity: .9; }
.rs-pt .ic svg.ic { width: 22px; height: 22px; }
.ic-comp svg.ic { width: 18px; height: 18px; }
.slot.util.off { width: 66px; }
.slot.util.off .k { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 800; }
#vt-horse { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: #f2d8a8; }
#vt-horse svg.ic { width: 22px; height: 22px; }
.vh-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(13,20,36,.7); border: 1.5px solid rgba(255,255,255,.7); overflow: hidden; transform: skewX(-12deg); }
.vh-bar i { display: block; height: 100%; background: linear-gradient(180deg, #f2c87a, #c88a3a); transform-origin: left; transition: transform .15s; }
#bh-prompt { font-size: 16px; }

/* ---------- glory, streaks, shop ---------- */
#bh-glory { position: absolute; left: 22px; bottom: 112px; display: flex; align-items: center; gap: 6px; font-family: 'Lilita One', sans-serif; font-size: 20px; color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.45); }
#bh-glory span:last-child { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: 2px; color: #f2d8a8; }
#bh-glory svg.ic { width: 22px; height: 22px; }
#bh-gloryfx { position: absolute; left: 140px; bottom: 112px; }
.gfx { position: absolute; left: 0; bottom: 0; white-space: nowrap; font-family: 'Lilita One', sans-serif; font-size: 20px; color: var(--gold); text-shadow: 0 2px 0 rgba(0,0,0,.5); animation: gfx 1.6s ease-out forwards; }
.gfx small { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 1.5px; }
.gfx.spend { color: #ff8a6a; }
@keyframes gfx { 0% { opacity: 0; transform: translateY(8px) scale(1.3); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-28px); } }
#vt-ammo { margin-top: 5px; font-size: 13px; font-weight: 800; letter-spacing: 1.5px; color: #e8dcc0; text-shadow: 0 1px 2px #000; }
#bh-streak { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0; }
#bh-streak.show { animation: banner 3.2s ease-out forwards; }
.sk-n { font-size: 15px; font-weight: 800; letter-spacing: 5px; color: #ffb43a; }
.sk-name { font-family: 'Lilita One', sans-serif; font-size: 52px; letter-spacing: 3px; color: #fff; -webkit-text-stroke: 2px rgba(120,40,0,.6); text-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 30px rgba(255,160,60,.6); }
.sk-desc { font-size: 17px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold); }
#battle-hud.fury #bh-vignette { opacity: 1; animation: furyPulse 1.2s infinite; --a: .5; }
@keyframes furyPulse { 50% { opacity: .5; } }
#battle-hud.ward::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 60%, rgba(255,215,120,.35) 100%); animation: furyPulse 2s infinite; }
.slot.epic { background: linear-gradient(160deg, #c27aff, #6a2cc0); }
.slot.callin { background: linear-gradient(160deg, #ffdf7a, #d07a1a); animation: pulse2 1s infinite; }
.slot .mana { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 5px; border-radius: 3px; background: rgba(0,0,0,.4); overflow: hidden; }
.slot .mana i { display: block; height: 100%; background: linear-gradient(90deg, #ffb43a, #ff5a1a); transform-origin: left; }
.dmgnum.mail { color: #aab4c4; font-size: 18px; }
.dmgnum.pierce { color: #ffb43a; font-size: 18px; letter-spacing: 1px; }
.hbar.elite span { color: #ffb4f0; }
.hbar.ally span { color: #b8d4ff; font-size: 12px; }
.hbar.engine i { width: 90px; height: 8px; }
.hbar.engine span { font-size: 13px; color: #f2d8a8; }
.hbar.engine.ally u { background: linear-gradient(180deg, #7aa8ff, #2c54b0); }
.rs-deploy { pointer-events: auto; font-family: 'Lilita One', sans-serif; font-size: 22px; letter-spacing: 2px; padding: 10px 34px; border-radius: 10px; border: none; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, #6ac04a, #2e8a1e); box-shadow: 0 4px 0 #1a5a10; }
.rs-deploy.wait { background: #4a5468; box-shadow: 0 4px 0 #2a3040; cursor: default; }

/* ---------- kill-streak ladder ---------- */
#bh-ladder { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; gap: 8px; }
.lad { position: relative; width: 128px; padding: 7px 10px 9px 40px; border-radius: 10px; background: rgba(13,20,36,.7); border: 2px solid rgba(255,255,255,.14);
  display: flex; flex-direction: column; transform: skewX(-8deg); }
.lad > * { transform: skewX(8deg); }
.lad-k { position: absolute; top: -8px; left: 8px; width: 18px; height: 18px; border-radius: 5px; background: rgba(255,255,255,.85); color: #0d1424; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.lad-ic { position: absolute; left: 10px; top: 50%; margin-top: -12px; }
.lad-ic svg.ic { width: 24px; height: 24px; color: #8a96ac; }
.lad-name { font-family: 'Lilita One', sans-serif; font-size: 12.5px; letter-spacing: .5px; line-height: 1.1; color: #b8c4d8; white-space: nowrap; }
.lad-sub { font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px; color: #7a869c; }
.lad-bar { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; transform: none; }
.lad-bar u { display: block; height: 100%; background: linear-gradient(90deg, #ffb43a, #ffe27a); transform-origin: left; transition: transform .3s; }
.lad.ready { border-color: var(--gold); background: linear-gradient(180deg, rgba(120,80,10,.85), rgba(60,36,6,.85)); animation: ladGlow 1.2s infinite; }
.lad.ready .lad-ic svg.ic, .lad.aiming .lad-ic svg.ic { color: var(--gold); }
.lad.ready .lad-name, .lad.aiming .lad-name { color: #fff; }
.lad.ready .lad-sub { color: var(--gold); }
.lad.aiming { border-color: #9ad0ff; background: rgba(30,60,110,.85); }
.lad.aiming .lad-sub { color: #9ad0ff; }
.lad.used { opacity: .35; }
@keyframes ladGlow { 50% { box-shadow: 0 0 18px rgba(255,200,80,.55); } }
#bh-aimhint { position: absolute; top: 58%; left: 50%; transform: translateX(-50%); font-size: 15px; font-weight: 800; letter-spacing: 1px; background: rgba(13,20,36,.75); padding: 5px 16px; border-radius: 8px; display: none; }
#battle-hud.targeting #bh-aimhint { display: block; }
#battle-hud.targeting #crosshair i { background: var(--gold); }
#bh-hint { bottom: 4px; font-size: 12px; }

/* ---------- respawn shop ---------- */
#bh-respawn { background: radial-gradient(ellipse at center, rgba(20,10,10,.45), rgba(8,4,4,.82)); }
.rs-panel { width: min(1060px, 94vw); background: rgba(13,20,36,.86); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; padding: 18px 22px 20px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.rs-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.rs-head { font-size: 44px; text-align: left; }
.rs-by { margin-bottom: 0; text-align: left; font-size: 18px; }
.rs-glory { display: flex; align-items: center; gap: 8px; color: var(--gold); }
.rs-glory svg.ic { width: 28px; height: 28px; }
.rs-glory b { font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 40px; line-height: 1; }
.rs-glory span { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: #d8c49a; width: 60px; line-height: 1.1; }
.rs-cols { display: flex; gap: 22px; align-items: stretch; }
.rs-col.shop { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rs-col.side { width: 260px; display: flex; flex-direction: column; gap: 8px; }
.rs-label { font-size: 12px; font-weight: 800; letter-spacing: 3px; color: #8a96ac; margin: 6px 0 2px; text-align: left; }
.sh-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.sh-grid.two { grid-template-columns: repeat(2, 1fr); }
.sh-opt { position: relative; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; text-align: left;
  padding: 9px 10px 8px; border-radius: 10px; cursor: pointer; background: rgba(255,255,255,.05); border: 2px solid rgba(255,255,255,.1); color: #fff; font-family: inherit; transition: border-color .12s, background .12s; }
.sh-ic { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.07); }
.sh-ic svg.ic { width: 20px; height: 20px; color: #e8dcc0; }
.sh-txt b { display: block; font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 15px; letter-spacing: .3px; line-height: 1.1; }
.sh-txt small { display: block; font-size: 11px; color: #9fb0cc; line-height: 1.25; margin-top: 1px; }
.sh-price { grid-column: 2; display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: var(--gold); }
.sh-price svg.ic { width: 12px; height: 12px; }
.sh-price .tick { font-style: normal; color: #8af04a; margin-right: 4px; }
.sh-need { position: absolute; top: 6px; right: 8px; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: #ff8a6a; }
.sh-opt:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.sh-opt.sel { border-color: var(--gold); background: linear-gradient(180deg, rgba(110,80,20,.65), rgba(60,40,10,.65)); }
.sh-opt.poor { opacity: .5; }
.sh-opt.poor:hover { border-color: rgba(255,120,90,.5); }
.rs-points { display: flex; flex-direction: column; gap: 6px; }
.rs-pt { min-width: 0; padding: 9px 12px; font-size: 17px; transform: none; border-radius: 10px; }
.rs-pt > * { transform: none; }
.rs-pt .ic svg.ic { width: 20px; height: 20px; }
.rs-receipt { margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 13.5px; font-weight: 600; }
.rs-receipt div { display: flex; justify-content: space-between; padding: 2px 0; color: #c8d0e0; }
.rs-receipt .tot { border-top: 1px solid rgba(255,255,255,.12); margin-top: 4px; padding-top: 6px; font-weight: 800; color: #fff; }
.rs-receipt .left span:last-child { color: var(--gold); font-weight: 800; }
.rs-msg { min-height: 18px; font-size: 12.5px; font-weight: 700; color: #ff9a7a; line-height: 1.3; }
.rs-deploy { margin-top: auto; width: 100%; }
.rs-hint { font-size: 12px; color: #8a96ac; text-align: center; letter-spacing: 1px; }

/* ---------- shore assault: planning table + tactical view ---------- */
#battle-hud.tactical > #bh-vitals, #battle-hud.tactical > #bh-hotbar, #battle-hud.tactical > #bh-ladder, #battle-hud.tactical > #crosshair,
#battle-hud.tactical > #bh-hint, #battle-hud.tactical > #bh-glory { opacity: 0; }
#bh-tac { position: absolute; inset: 0; pointer-events: none; }
#bh-tac > button { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; font-family: inherit; color: #fff; }
.tac-zone { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,.6);
  background: rgba(13,20,36,.72); min-width: 90px; }
.tac-zone b { font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 14px; letter-spacing: .5px; }
.tac-zone span { display: flex; gap: 3px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--gold); min-height: 12px; }
.tac-zone span svg.ic { width: 14px; height: 14px; }
.tac-zone.chosen { border-color: var(--gold); background: rgba(110,80,20,.85); }
.tac-zone.placeable { border-style: dashed; border-color: var(--gold); }
.tac-zone.threat { border-color: #ff6a50; animation: ladGlow .8s infinite; }
.tac-sq { display: flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 999px; border: 2px solid #b8d4ff; background: color-mix(in srgb, var(--blue) 80%, black); }
.tac-sq b { font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 14px; }
.tac-sq svg.ic { width: 16px; height: 16px; }
.tac-sq.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,211,90,.4); transform-origin: center; }
.tac-sq.manual::after { content: '⚑'; font-size: 11px; color: var(--gold); }
.tac-help { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 800; letter-spacing: 1.5px; color: #e8dcc0; text-shadow: 0 1px 3px #000; }
#bh-plan { position: absolute; left: 18px; top: 90px; width: 340px; padding: 16px; border-radius: 16px; background: rgba(13,20,36,.88); border: 1px solid rgba(255,255,255,.14);
  pointer-events: auto; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.pl-wave { font-size: 12px; font-weight: 800; letter-spacing: 3px; color: var(--gold); }
.pl-title { font-family: 'Lilita One', sans-serif; font-size: 28px; letter-spacing: 1px; line-height: 1.1; }
.pl-recap { margin-top: 4px; font-size: 13px; color: #9adf6a; font-weight: 700; line-height: 1.35; }
.pl-label { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #8a96ac; margin-top: 6px; line-height: 1.4; }
.pl-piece { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 2px solid rgba(255,255,255,.12);
  color: #fff; font-family: inherit; text-align: left; cursor: pointer; }
.pl-piece svg.ic { width: 22px; height: 22px; color: var(--gold); flex-shrink: 0; }
.pl-piece span { flex: 1; display: flex; flex-direction: column; }
.pl-piece b { font-family: 'Lilita One', sans-serif; font-weight: normal; font-size: 15px; }
.pl-piece small { font-size: 11.5px; color: #9fb0cc; }
.pl-piece em { font-style: normal; font-family: 'Lilita One', sans-serif; font-size: 18px; color: var(--gold); }
.pl-piece.sel { border-color: var(--gold); background: rgba(110,80,20,.6); }
.pl-piece:disabled { opacity: .35; cursor: default; }
.pl-note { font-size: 13px; color: #c8d0e0; line-height: 1.4; }
.pl-chosen { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-chosen span { padding: 4px 10px; border-radius: 999px; background: rgba(110,80,20,.8); border: 1px solid var(--gold); font-weight: 800; font-size: 13px; }
.pl-chosen em { font-size: 13px; color: #8a96ac; }
#bh-plan .rs-deploy { margin-top: 6px; }
