/* HUD v2: cut-corner panels with corner brackets, a faint cell-noise surface (Title FX pack), scanlines,
   a radar watermark on the menus (Title FX pack) and cards with the pack's models rendered as icons */
#hud, #panel {
  --cut: 10px; --acc: rgba(57, 255, 224, .85); --acc2: rgba(255, 43, 214, .75);
  --surface: linear-gradient(160deg, rgba(18, 22, 58, .86), rgba(7, 9, 26, .8));
}
.tm, #leftbottom, #weaponbar, #topmid, .slot, #feed > div, #panel .panel, #toast, #lockhint, #buffs .buff {
  background: var(--surface) !important; border: 1px solid rgba(120, 150, 255, .22) !important;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 0 24px rgba(80, 100, 255, .07); border-radius: 0 !important;
}
/* (the absolutely placed HUD pieces keep their position; the rest anchor their decorations) */
.tm, .slot, #feed > div, #panel .panel, #buffs .buff { position: relative; }
.tm::before, #leftbottom::before, #weaponbar::before, #topmid::before, .slot::before, #panel .panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px), url('../assets/ui/cells.png') center / 240px;
  opacity: .5; mix-blend-mode: soft-light;
}
.tm::after, #leftbottom::after, #weaponbar::after, #topmid::after, #panel .panel::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--acc), var(--acc)) top right / 16px 2px no-repeat,
    linear-gradient(var(--acc), var(--acc)) top right / 2px 16px no-repeat,
    linear-gradient(var(--acc2), var(--acc2)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--acc2), var(--acc2)) bottom left / 2px 16px no-repeat,
    linear-gradient(90deg, transparent, rgba(57, 255, 224, .5) 30%, rgba(255, 43, 214, .4) 70%, transparent) top left / 100% 1px no-repeat;
}
#panel .panel::before { opacity: .16; background-size: auto, 320px; }
#leftbottom > *, #weaponbar > *, #topmid > *, .tm > *, #panel .panel > * { position: relative; z-index: 1; }
.tm { padding: 6px 12px 6px 10px; }
#topmid { padding: 3px 18px 5px; }
#clock { letter-spacing: .06em; }

/* health: segmented, with a white trail that catches up after a hit */
#leftbottom .bar.hp { overflow: hidden; background: rgba(0, 0, 0, .6); }
#hpdmg { position: absolute; left: 0; top: 0; height: 100%; width: 100%; background: rgba(255, 255, 255, .75); transition: width .5s .25s ease-out; }
#hpfill { transition: width .08s !important; }
#leftbottom .bar.hp::after, #leftbottom .bar.pack::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(5, 6, 18, .85) calc(10% - 2px) 10%);
}
#leftbottom .bar.pack::after { background: repeating-linear-gradient(90deg, transparent 0 calc(5% - 1px), rgba(5, 6, 18, .7) calc(5% - 1px) 5%); }
#leftbottom .bar span { z-index: 3; }
#bank b { font-family: 'Lilita', sans-serif; font-weight: normal; font-size: 17px; color: #fff; }

/* item slots: rendered models */
.slot { width: 58px; height: 58px; --cut: 8px; }
.slot .mi { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7)); position: relative; z-index: 1; }
.slot .k, .slot .n { z-index: 2; }
.slot .k { font: 11px 'Lilita', sans-serif; color: var(--cyan); }
.slot .n { font: 14px 'Lilita', sans-serif; text-shadow: 0 1px 2px #000; }
.slot:not(.empty) { box-shadow: inset 0 0 18px rgba(57, 255, 224, .12), inset 0 1px 0 rgba(255, 255, 255, .08); }
body.touch .slot { width: 44px; height: 44px; }
body.touch .slot .mi { width: 34px; height: 34px; }

/* power-ups running: icon in a ring that empties as it runs out */
#buffs { position: absolute; left: 50%; bottom: 70px; transform: translateX(-50%); display: flex; gap: 6px; pointer-events: none; }
#buffs .buff { --cut: 7px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
#buffs .buff::before {
  content: ''; position: absolute; inset: 3px; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--f) * 360deg), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%);
}
#buffs .buff .mi { width: 32px; height: 32px; object-fit: contain; position: relative; }
#buffs .buff b { position: absolute; right: 4px; bottom: 1px; font: 12px 'Lilita', sans-serif; text-shadow: 0 1px 2px #000; }
body.touch #buffs { bottom: auto; top: 84px; }

/* weapon bar */
#weaponbar { padding: 8px 14px; gap: 12px; }
#wname { color: #fff; text-shadow: 0 0 8px rgba(57, 255, 224, .55); }

/* menus */
#panel { background: radial-gradient(ellipse at center, rgba(20, 10, 50, .45), rgba(0, 0, 0, .55)); }
#panel .panel { --cut: 18px; padding: 18px 20px; box-shadow: 0 0 40px rgba(80, 60, 255, .28), inset 0 1px 0 rgba(255, 255, 255, .08); }
#panel .panel.wide { background: url('../assets/ui/radar_dim.png') right -70px top -80px / 300px no-repeat, var(--surface) !important; }
#panelbody h2 {
  font-size: 26px; flex-wrap: wrap; text-shadow: 0 0 14px rgba(57, 255, 224, .35); padding-bottom: 8px; margin-bottom: 6px;
  border-bottom: 1px solid transparent; border-image: linear-gradient(90deg, var(--cyan), var(--pink) 60%, transparent) 1;
}
#panelbody h2 .kicker { flex-basis: 100%; font-size: 11px; letter-spacing: .35em; color: var(--pink); text-shadow: 0 0 8px rgba(255, 43, 214, .6); margin-bottom: -4px; }
#panelbody h2 .lvl { font-size: 13px; padding: 2px 8px; color: #08081a; background: var(--cyan); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); letter-spacing: .1em; }
#panelbody h2 .mi.head { width: 44px; height: 44px; object-fit: contain; }
.grid { gap: 10px; }
.card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto 1fr auto; column-gap: 10px; align-items: start;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)); border: 1px solid rgba(120, 150, 255, .25); border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: transform .12s, border-color .12s, background .12s; padding: 10px;
}
.card .ic {
  grid-row: 1 / 4; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; font-size: 30px;
  background: radial-gradient(circle at 50% 55%, rgba(57, 255, 224, .22), transparent 65%);
}
.card .ic .mi { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .6)); transition: transform .2s; }
.card .cn { margin: 0; }
.card .cost {
  justify-self: start; padding: 2px 9px; font: 13px 'Lilita', sans-serif; letter-spacing: .05em; color: #08081a; background: #ffd23b;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.card:hover:not(.no) { transform: translateY(-2px); border-color: var(--cyan); background: linear-gradient(160deg, rgba(57, 255, 224, .14), rgba(255, 43, 214, .05)); }
.card:hover:not(.no) .ic .mi { transform: scale(1.12) rotate(-4deg); }
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .14) 50%, transparent 65%); transform: translateX(-120%); }
.card:hover:not(.no)::after { transform: translateX(120%); transition: transform .6s ease-out; }
.card.no { filter: grayscale(.85); }
.card.owned .cost { background: var(--cyan); }
.epics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.epic {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; font: 14px 'Lilita', sans-serif;
  background: rgba(255, 177, 59, .12); border: 1px solid rgba(255, 177, 59, .5); clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}
.epic .mi { width: 32px; height: 32px; object-fit: contain; }
body.touch .card { grid-template-columns: 48px 1fr; }
body.touch .card .ic, body.touch .card .ic .mi { width: 48px; height: 48px; }

/* ------------------------------------------------------------------ HUD v3: scale, layout, labels
   Everything scales with the screen (bigger on large monitors) times the HUD size from the menu. */
:root { --uibase: 1; --uiuser: 1; }
@media (min-width: 1100px) { :root { --uibase: 1.15; } }
@media (min-width: 1600px) { :root { --uibase: 1.35; } }
@media (min-width: 2200px) { :root { --uibase: 1.6; } }
body.touch { --uibase: 1; }
#teamsbox, #topmid, #minimap, #slots, #weaponbar, #feed, #buffs, #leftcol, #todbtn, #menubtn, #prompt, #channel, #devstats {
  zoom: calc(var(--uibase) * var(--uiuser));
}
/* chat sits above the vitals in one column, so the two can never overlap */
#leftcol { position: absolute; left: 12px; bottom: 14px; width: 340px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
#leftcol #chat { position: static; width: auto; pointer-events: auto; }
#leftcol #leftbottom { position: relative; left: auto; bottom: auto; width: auto; padding: 10px 12px 9px; gap: 5px; }
#leftbottom .hplabel { display: flex; align-items: baseline; gap: 6px; margin: 0; }
#leftbottom .hplabel span, .packlabel span:first-child, #bank .dim { font: 12px 'Lilita', sans-serif; letter-spacing: .16em; color: #9fa8ff; }
#leftbottom .hplabel b { font-size: 28px; line-height: 1; }
#leftbottom .hplabel small { font: 14px 'Lilita', sans-serif; color: #8f97d8; }
#leftbottom .hplabel em { margin-left: auto; font: 13px 'Lilita', sans-serif; font-style: normal; color: #8fe3ff; text-shadow: 0 0 6px rgba(120, 220, 255, .6); }
#leftbottom .bar.hp { height: 18px; }
.packlabel { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.packlabel span:first-child { color: #ffcf7a; }
#packitems { font: 14px 'Lilita', sans-serif; color: #fff; letter-spacing: .04em; }
#packnum { margin-left: auto; font: 14px 'Lilita', sans-serif; font-weight: normal; color: #ffd23b; }
#leftbottom .bar.pack { height: 14px; }
#leftbottom .bar.pack span#packtext { font: 10px/13px 'Lilita', sans-serif; letter-spacing: .1em; color: #fff; }
#bank { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 16px; }
#bank b { font-size: 19px; }
#bank .dim { margin: 0; }
#bank .hint { margin-left: auto; font-size: 10px; color: #7f88c8; }
body.touch #leftcol { left: 8px; bottom: 8px; width: 42vw; }
body.touch #leftbottom .hplabel b { font-size: 20px; }
body.touch #bank .hint { display: none; }

/* menu button and the menu itself */
#menubtn { position: absolute; top: 10px; left: calc(50% + 110px); width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--edge); background: var(--glass); color: #fff; font-size: 18px; cursor: pointer; pointer-events: auto; backdrop-filter: blur(6px); }
#menubtn:hover { border-color: var(--cyan); }
body.touch #menubtn { top: 4px; left: calc(50% + 90px); width: 28px; height: 28px; font-size: 15px; }
#menu { pointer-events: auto; z-index: 30; background: rgba(4, 4, 14, .55); }
#menu .panel { width: min(470px, 94vw); max-height: 92vh; overflow: auto; }
#menu h2 { display: flex; flex-direction: column; font-size: 30px; }
#menu h2 .kicker { font-size: 10px; letter-spacing: .2em; }
.screen input[type=range] { width: 160px; padding: 0; clip-path: none; border: none; background: none; box-shadow: none; accent-color: #39ffe0; }
.set .rv { min-width: 52px; text-align: right; font: 13px 'Lilita', sans-serif; font-weight: normal; color: #fff; }
.set input[type=range] { margin-left: auto; }
.menurow { display: flex; justify-content: center; margin-top: 14px; }
.menurow .btn { min-width: 220px; }

/* stats overlay (F3) */
#devstats { position: absolute; right: 12px; bottom: 92px; min-width: 230px; padding: 7px 10px; display: grid; gap: 1px; pointer-events: none;
  font: 12px ui-monospace, Consolas, monospace; color: #cfd4ff; background: rgba(6, 8, 22, .78); border: 1px solid rgba(120, 150, 255, .3); }
#devstats div { display: flex; justify-content: space-between; gap: 14px; }
#devstats span { color: #7f88c8; }
#devstats b { font-weight: normal; color: #fff; }
#devstats .warn b { color: #ffd23b; }
#devstats .bad b { color: #ff5a5a; }
/* weapon: stacked above the item slots on the right (centred it ran into the vitals on 1280-wide screens) */
#weaponbar { left: auto; right: 12px; bottom: 90px; transform: none; width: 300px; flex-wrap: wrap; gap: 6px 8px; padding: 8px 12px; }
#wname { flex: 1 1 100%; min-width: 0; }
#wheat { flex: 1 1 100%; width: auto; height: 14px; }
#weaponbar .chip { flex: 1; text-align: center; }
#slots { justify-content: flex-end; }
#leftcol { width: 310px; }
#bank .hint { display: none; }
#devstats { right: auto; left: 12px; bottom: auto; top: 170px; }
body.touch #weaponbar { right: auto; left: 50%; bottom: auto; top: 44px; width: auto; flex-wrap: nowrap; transform: translateX(-50%) scale(.82); }
body.touch #wname { flex: none; }
body.touch #wheat { flex: none; width: 110px; }

/* ------------------------------------------------------------------ inventory */
#invbtn { pointer-events: auto; margin-left: 6px; font: 11px 'Lilita', sans-serif; letter-spacing: .08em; color: #fff; cursor: pointer; padding: 2px 8px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 207, 122, .5); clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
#invbtn:hover { background: rgba(255, 207, 122, .2); }
body.touch #invbtn { font-size: 12px; padding: 4px 10px; }
/* what you just picked up */
#pickups { display: flex; flex-direction: column; gap: 4px; }
#pickups .pk { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; background: linear-gradient(90deg, rgba(10, 12, 32, .85), rgba(10, 12, 32, .35));
  border-left: 3px solid var(--rc); animation: pkin .25s ease-out; transition: opacity .5s, transform .5s; }
#pickups .pk.out { opacity: 0; transform: translateX(-20px); }
#pickups .pk img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 6px var(--rc)); }
#pickups .pk b { display: block; font: 15px 'Lilita', sans-serif; font-weight: normal; color: var(--rc); text-shadow: 0 0 8px var(--rc), 0 1px 2px #000; }
#pickups .pk small { display: block; font-size: 12px; color: #dfe3ff; }
@keyframes pkin { from { opacity: 0; transform: translateX(-24px); } }
/* inventory panel */
.invsec { margin-top: 4px; }
.invsec .label .dim { font: 11px system-ui, sans-serif; letter-spacing: 0; text-transform: none; color: #7f88c8; margin-left: 8px; }
.its { display: flex; flex-wrap: wrap; gap: 8px; }
.it { position: relative; width: 70px; height: 70px; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--rc) 22%, transparent), rgba(255, 255, 255, .03) 70%);
  border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); cursor: help; transition: transform .1s, border-color .1s; }
.it:hover { transform: translateY(-2px); border-color: var(--rc); }
.it img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); pointer-events: none; }
.it b { position: absolute; right: 5px; bottom: 2px; font: 14px 'Lilita', sans-serif; font-weight: normal; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px #000; pointer-events: none; }
.its .none { font-size: 13px; color: #7f88c8; padding: 6px 0; }
/* hover tooltip (outside the HUD so it isn't scaled) */
#tip { position: fixed; left: 0; top: 0; z-index: 60; max-width: 260px; padding: 8px 11px; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: rgba(8, 10, 26, .95); border: 1px solid rgba(120, 150, 255, .4); box-shadow: 0 6px 20px rgba(0, 0, 0, .5); font-size: 13px; color: #dfe3ff;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
#tip.show { opacity: 1; }
#tip b { display: block; font: 17px 'Lilita', sans-serif; font-weight: normal; letter-spacing: .03em; }
#tip i { display: block; font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #9fa8ff; margin-top: 1px; }
#tip p { margin: 5px 0 0; line-height: 1.35; }
#tip em { display: block; margin-top: 5px; font-style: normal; color: #ffd23b; }

/* ------------------------------------------------------------------ phones (touch): keep the thumbs' corners free
   top left: compact vitals (+ pickups under them) · top middle: clock, buttons, the teams in a row · top right: minimap
   bottom left: the stick · bottom middle: items · bottom right: action buttons. The weapon panel is left out: heat shows
   on the crosshair ring and the ⚡ / dash buttons light up when ready. */
body.touch #leftcol { top: 6px; bottom: auto; left: 8px; width: 210px; flex-direction: column-reverse; gap: 4px; }
body.touch #leftcol #leftbottom { padding: 5px 8px 6px; gap: 3px; }
body.touch #leftbottom .hplabel span, body.touch .packlabel span:first-child, body.touch #bank .dim { font-size: 9px; letter-spacing: .1em; }
body.touch #leftbottom .hplabel b { font-size: 16px; }
body.touch #leftbottom .hplabel small, body.touch #leftbottom .hplabel em { font-size: 10px; }
body.touch #leftbottom .bar.hp { height: 10px; }
body.touch #leftbottom .bar.pack { height: 8px; }
body.touch #leftbottom .bar.pack span#packtext { display: none; }
body.touch .packlabel { margin-top: 1px; gap: 6px; }
body.touch #packitems, body.touch #packnum { font-size: 11px; }
body.touch #invbtn { padding: 3px 9px; font-size: 11px; }
body.touch #bank { font-size: 12px; gap: 8px; margin-top: 1px; }
body.touch #bank b { font-size: 13px; }
body.touch #pickups .pk img { width: 24px; height: 24px; }
body.touch #pickups .pk b { font-size: 12px; }
body.touch #pickups .pk small { font-size: 10px; }
body.touch #weaponbar { display: none; }
body.touch #teamsbox { top: 44px; left: 50%; transform: translateX(-50%); flex-direction: row; gap: 4px; }
body.touch .tm { min-width: 0; grid-template-columns: 8px auto 34px; gap: 5px; padding: 2px 7px; font-size: 10px; }
body.touch .tm .nm { max-width: 64px; }
body.touch #buffs { top: 70px; }
body.touch .tbtn.fs { top: 4px; right: auto; left: calc(50% + 120px); width: 28px; height: 28px; font-size: 13px; border-radius: 8px; }
body.touch #devstats { top: auto; bottom: 6px; left: 50%; transform: translateX(-50%); min-width: 0; font-size: 10px; }
body.touch #feed { top: 104px; }
@media (orientation: landscape) and (max-height: 500px) {
  body.touch .tbtn.fs { top: 4px; right: auto; }
  body.touch #leftcol { width: 190px; }
}

body.touch #packitems { white-space: nowrap; }
body.touch #leftcol { width: 220px; }
body.touch #devstats { bottom: auto; top: 150px; left: 8px; transform: none; }

/* ------------------------------------------------------------------ scoreboard (hold Tab / 📊 on phones) */
#boardbtn { position: absolute; top: 10px; left: calc(50% + 150px); width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--edge); background: var(--glass); color: #fff; font-size: 16px; cursor: pointer; pointer-events: auto; backdrop-filter: blur(6px); zoom: calc(var(--uibase) * var(--uiuser)); }
#boardbtn:hover, #boardbtn.on { border-color: var(--cyan); }
body.touch #boardbtn { top: 4px; left: calc(50% + 152px); width: 28px; height: 28px; font-size: 13px; zoom: 1; }
#scoreboard { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); width: min(820px, 94vw); padding: 14px 18px 10px; pointer-events: none; z-index: 8;
  background: linear-gradient(160deg, rgba(18, 22, 58, .94), rgba(7, 9, 26, .92)); border: 1px solid rgba(120, 150, 255, .3);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); box-shadow: 0 0 40px rgba(80, 60, 255, .3);
  zoom: calc(var(--uibase) * var(--uiuser)); }
body.touch #scoreboard { pointer-events: auto; top: 40px; padding: 8px 10px 6px; zoom: 1; max-height: calc(100vh - 50px); overflow: auto; }
#scoreboard .sbhead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, var(--cyan), var(--pink) 60%, transparent) 1; }
#scoreboard .sbhead b { font: 22px 'Lilita', sans-serif; font-weight: normal; letter-spacing: .04em; text-shadow: 0 0 12px rgba(57, 255, 224, .4); }
#scoreboard .sbhead span { color: #9fa8ff; font-size: 13px; }
#scoreboard .sbhead small { margin-left: auto; color: #6c7299; font-size: 11px; }
#scoreboard table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#scoreboard th { font: 11px 'Lilita', sans-serif; font-weight: normal; letter-spacing: .14em; text-transform: uppercase; color: #8f97d8; text-align: left; padding: 4px 8px; }
#scoreboard td { padding: 6px 8px; font-size: 14px; border-top: 1px solid rgba(120, 150, 255, .12); white-space: nowrap; }
#scoreboard .n { text-align: right; }
#scoreboard tr.me td { background: rgba(57, 255, 224, .08); }
#scoreboard tr.off td { opacity: .5; }
#scoreboard .sw { display: inline-block; width: 10px; height: 10px; margin-right: 7px; transform: skewX(-15deg); box-shadow: 0 0 6px currentColor; }
#scoreboard td:first-child { font: 15px 'Lilita', sans-serif; letter-spacing: .02em; }
#scoreboard .cap { color: #ffd23b; }
#scoreboard .you { color: var(--cyan); font-size: 10px; letter-spacing: .14em; }
#scoreboard .dim { color: #6c7299; }
#scoreboard .good { color: #4cd97a; } #scoreboard .warn { color: #ffd23b; } #scoreboard .bad { color: #ff5a5a; }
#scoreboard .hqbar { display: inline-block; width: 80px; height: 8px; background: rgba(0, 0, 0, .5); vertical-align: middle; }
#scoreboard .hqbar i { display: block; height: 100%; }
body.touch #scoreboard td { font-size: 12px; padding: 4px 5px; }
body.touch #scoreboard td:first-child { font-size: 13px; }
body.touch #scoreboard .hqbar { width: 48px; }

/* ------------------------------------------------------------------ levels, gear tags, set bonuses */
.lvrow { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
#lvlnum { min-width: 46px; height: 22px; padding: 0 8px; display: flex; align-items: center; justify-content: center; gap: 2px; font: 15px 'Lilita', sans-serif; font-weight: normal; color: #08081a;
  background: linear-gradient(135deg, #ffd23b, #ff9d3b); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
#lvlnum::before { content: 'LV '; font-size: 10px; }
.bar.xp { flex: 1; height: 8px !important; background: rgba(0, 0, 0, .55); }
#xpfill { height: 100%; width: 0; background: linear-gradient(90deg, #ff9d3b, #ffd23b); box-shadow: 0 0 8px rgba(255, 210, 59, .6); transition: width .3s; }
#xptext { position: absolute; inset: 0; font: 9px/8px 'Lilita', sans-serif; letter-spacing: .1em; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
body.touch #lvlnum { min-width: 36px; height: 16px; font-size: 11px; padding: 0 6px; }
body.touch .bar.xp { height: 6px !important; }
body.touch #xptext { display: none; }
.tag .nm .lv, #scoreboard .lv { display: inline-block; min-width: 16px; margin-right: 5px; padding: 0 3px; font: 11px/14px 'Lilita', sans-serif; text-align: center; color: #08081a; background: #ffd23b; border-radius: 3px; }
.tagchip { display: inline-block; margin: 4px 4px 0 0; padding: 1px 7px; font: 10px 'Lilita', sans-serif; letter-spacing: .08em; color: var(--sc); border: 1px solid var(--sc);
  background: color-mix(in srgb, var(--sc) 14%, transparent); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.sets.compact { margin-top: 8px; }
.setcard { padding: 7px 10px; border-left: 3px solid var(--sc); background: rgba(255, 255, 255, .03); opacity: .6; }
.setcard.live { opacity: 1; background: color-mix(in srgb, var(--sc) 10%, transparent); box-shadow: inset 0 0 14px color-mix(in srgb, var(--sc) 18%, transparent); }
.setcard b { display: flex; font: 14px 'Lilita', sans-serif; font-weight: normal; color: var(--sc); }
.setcard b span { margin-left: auto; color: #cfd4ff; }
.setcard .sb { display: flex; gap: 6px; font-size: 12px; color: #8f97d8; margin-top: 3px; line-height: 1.3; }
.setcard .sb i { font-style: normal; font: 10px/14px 'Lilita', sans-serif; min-width: 14px; height: 14px; text-align: center; background: rgba(255, 255, 255, .08); }
.setcard .sb.on { color: #fff; }
.setcard .sb.on i { background: var(--sc); color: #08081a; }
.card.gear .tags { margin-top: 2px; }
.card.gear.owned { border-color: var(--cyan); }
.it.emptyslot { border-style: dashed; opacity: .5; }
.it.emptyslot::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; font: 24px 'Lilita', sans-serif; color: #8f97d8; }
