/* Lanefall in the browser: the look of assets/ui/inventory.html + assets/ui/build_hud.html (the designs the Roblox UI
   was built from): blocks with a top and a side face on slabs lit in #42F0A5, Fredoka; the game's HUD numbers outside
   build mode in Press Start 2P like Roblox's HUD. */
:root { --c: #42F0A5; --h: 154; --h2: 172; --text: #fff; --muted: hsl(var(--h) 30% 84%); --ink: hsl(var(--h) 70% 6%); --line: hsl(var(--h) 60% 3%);
  --gold: #ffc640; --ok: #3fd46a; --bad: #ff4a4a; --deco: #b08cff; --tick: #8fc0ff;
  --stroke: -2px 0 #000, 2px 0 #000, 0 -2px #000, 0 2px #000, -1.5px -1.5px #000, 1.5px -1.5px #000, -1.5px 1.5px #000, 1.5px 1.5px #000;
  --block: hsl(var(--h) 30% 15%); --block-top: hsl(var(--h) 30% 38%); --block-side: hsl(var(--h2) 35% 8%);
  --bevel: inset 3px 3px 0 hsl(var(--h) 30% 32%), inset -3px -3px 0 hsl(var(--h) 35% 8%);
  --lit: linear-gradient(160deg, var(--c), hsl(var(--h2) 85% 45%)); --lit-top: hsl(var(--h) 90% 85%); --lit-side: hsl(var(--h2) 80% 26%);
  --lit-bevel: inset 3px 3px 0 hsl(var(--h) 90% 82%), inset -3px -3px 0 hsl(var(--h2) 80% 34%), 0 0 22px var(--c); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #120e1c; color: var(--text); font: 15px/1.4 "Fredoka", sans-serif; user-select: none; }
canvas { display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
.out { text-shadow: var(--stroke); }
#ui { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#load { position: fixed; inset: 0; display: grid; place-items: center; background: #120e1c; font: 600 22px Fredoka; color: var(--c); z-index: 10; }
#load.err { color: #ff6060; font-size: 13px; line-height: 2; padding: 40px; white-space: pre-wrap; place-items: start; }

/* blocks: a front + a top and a side face, black outlines */
.blk { position: relative; --d: 8px; --top: hsl(var(--h) 30% 30%); --side: hsl(var(--h2) 35% 7%); border: 0;
  background: hsl(var(--h) 30% 15%); box-shadow: 0 0 0 3px var(--line), inset 3px 3px 0 hsl(var(--h) 30% 28%), inset -3px -3px 0 hsl(var(--h) 35% 8%); }
.blk::before, .slab::before { content: ""; position: absolute; left: 0; bottom: 100%; width: 100%; height: var(--d); background: var(--top); box-shadow: 0 0 0 3px var(--line); transform: skewX(-45deg); transform-origin: 0 100%; pointer-events: none; }
.blk::after, .slab::after { content: ""; position: absolute; left: 100%; top: 0; width: var(--d); height: 100%; background: var(--side); box-shadow: 0 0 0 3px var(--line); transform: skewY(-45deg); transform-origin: 0 0; pointer-events: none; }
.slab { position: relative; --d: 12px; --top: hsl(var(--h) 30% 24%); --side: hsl(var(--h2) 35% 6%); text-shadow: 2px 2px 0 var(--line);
  background: url(img/dust.png) 0 0 / 192px, linear-gradient(hsl(var(--h) 80% 22%), hsl(var(--h2) 75% 9%));
  box-shadow: 0 0 0 3px var(--line), inset 0 0 0 3px hsl(var(--h) 30% 24%), inset 0 0 50px hsl(var(--h) 60% 3%), 0 0 40px hsl(var(--h) 85% 55% / .4);
  animation: rise 12s linear infinite; }
@keyframes rise { to { background-position: 0 -192px, 0 0; } }
.lit { --top: var(--lit-top); --side: var(--lit-side); color: #04231a; text-shadow: none; background: var(--lit); box-shadow: 0 0 0 3px var(--line), var(--lit-bevel); }
.red { --top: #ffb0b0; --side: #8a1f1f; background: var(--bad); color: #2a0606; text-shadow: none; box-shadow: 0 0 0 3px var(--line), inset 3px 3px 0 #ffb0b0, inset -3px -3px 0 #b82a2a; }
h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: 2px; color: var(--c); font-weight: 600; text-shadow: var(--stroke); }
kbd { display: inline-grid; place-items: center; position: relative; min-width: 30px; height: 30px; padding: 0 7px; margin: 0 9px 0 0; font: 600 15px "Fredoka"; color: #fff; text-shadow: none;
  background: hsl(var(--h) 25% 20%); box-shadow: 0 0 0 3px #000, inset 2px 2px 0 hsl(var(--h) 30% 40%), inset -2px -2px 0 hsl(var(--h) 35% 9%), 5px 5px 0 0 hsl(var(--h2) 35% 7%), 5px 5px 0 3px #000; }

/* the top bar */
#top { position: fixed; left: 50%; top: 26px; transform: translateX(-50%); display: flex; padding: 8px 6px; z-index: 2; }
.stat { display: flex; align-items: center; gap: 10px; padding: 2px 18px; border-right: 3px solid hsl(var(--h) 60% 4% / .7); }
.stat:last-child { border: 0; }
.stat small { display: block; font-size: 12px; letter-spacing: 1px; color: var(--muted); line-height: 1; }
.stat b { display: block; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.stat b s { text-decoration: none; font-size: 14px; color: var(--muted); }
.ico { width: 24px; height: 24px; flex: none; box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #fff5, inset -3px -3px 0 #0006; }
.ico.el { border-radius: 2px; }
.corebar { width: 120px; height: 14px; background: #0e1118; box-shadow: 0 0 0 3px #000; margin-top: 4px; }
.corebar i { display: block; height: 100%; background: var(--ok); transition: width .2s; }

/* the characters down the left side and the templates down the right */
.side { position: fixed; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.side.l { left: 0; } .side.r { right: 0; align-items: flex-end; }
.side.l h4 { margin-left: 16px; } .side.r h4 { margin-right: 16px; }
.unit { position: relative; width: 330px; height: 76px; cursor: pointer; transition: translate .12s; }
.unit:hover { translate: 8px 0; }
.unit.on { translate: 14px 0; }
.unit.on .fade { box-shadow: inset 6px 0 0 #fff, inset 0 0 0 3px var(--c); }
.unit .fade, .unit .fx { position: absolute; inset: 0; }
.unit .fade { background: linear-gradient(90deg, hsl(var(--e) 90% 42%), hsl(var(--e) 85% 26% / .85) 34%, hsl(var(--e) 85% 20% / .35) 68%, #0000); box-shadow: inset 6px 0 0 hsl(var(--e) 95% 68%); }
.unit .fx { background: var(--fx); opacity: .5; -webkit-mask-image: linear-gradient(90deg, #000, #0000 72%); mask-image: linear-gradient(90deg, #000, #0000 72%); }
.unit img { position: absolute; left: 18px; bottom: 0; width: 68px; height: 76px; object-fit: contain; filter: drop-shadow(0 2px 0 #000); }
.unit .txt { position: absolute; left: 92px; top: 7px; right: 8px; }
.unit .txt b { display: block; font-size: 21px; line-height: 1.15; font-weight: 600; }
.unit .txt b small { font-size: 12px; color: #fffa; margin-left: 8px; font-weight: 500; }
.unit .txt em { display: block; font-style: normal; font-size: 12px; letter-spacing: 1.5px; color: hsl(var(--e) 95% 78%); line-height: 1.3; }
.unit .txt span { display: block; font-size: 13px; color: #fffd; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit kbd { position: absolute; left: 10px; top: 4px; z-index: 1; min-width: 24px; height: 20px; font-size: 11px; margin: 0; padding: 0 4px; box-shadow: 0 0 0 2px #000, inset 2px 2px 0 hsl(var(--h) 30% 40%), inset -2px -2px 0 hsl(var(--h) 35% 9%); }
body:not(.building) .unit kbd { display: none; }
.unit.placed .txt b::after { content: "PLACED"; margin-left: 9px; font-size: 11px; letter-spacing: 1.5px; color: var(--ok); vertical-align: 3px; }
.tpl { position: relative; width: 340px; height: 108px; }
.tpl .map { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(270deg, #000 24%, #0000 56%); mask-image: linear-gradient(270deg, #000 24%, #0000 56%); overflow: hidden; }
.tpl .map svg { position: absolute; right: 12px; top: -30px; width: 168px; height: 168px; transform: perspective(700px) rotateX(50deg); }
.tpl .rim { position: absolute; right: 0; top: 0; width: 6px; height: 100%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.tpl .txt { position: absolute; left: 34px; top: 14px; }
.tpl .txt b { display: block; font-size: 20px; font-weight: 600; line-height: 1.15; }
.tpl .txt em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tpl .txt i { display: inline-block; font-style: normal; font-size: 13px; font-weight: 600; padding: 1px 12px; margin-right: 8px; cursor: pointer; text-shadow: none; box-shadow: 0 0 0 3px #000, inset 2px 2px 0 #fff4, inset -2px -2px 0 #0005; }
.tpl .txt i:hover { filter: brightness(1.2); }
.sv { background: hsl(var(--h) 60% 34%); } .ld { background: #c08a1c; }
.tpl.empty .rim { background: #3a4a44; box-shadow: none; } .tpl.empty .txt b { color: var(--muted); }
.clearbtn { margin: 6px 16px 0 0; padding: 8px 16px; font: 600 14px Fredoka; letter-spacing: 1.5px; }

/* buttons in the corners */
.done { position: fixed; right: 26px; bottom: 26px; width: 250px; height: 50px; display: grid; place-items: center; font: 600 22px "Fredoka"; letter-spacing: 2px; cursor: pointer; z-index: 3; }
.done kbd { position: absolute; right: 14px; top: 9px; margin: 0; }
.ctl { position: fixed; left: 26px; bottom: 26px; height: 50px; padding: 0 16px 0 14px; display: flex; align-items: center; font: 600 18px "Fredoka"; letter-spacing: 1.5px; cursor: pointer; z-index: 3; }
.ctl.inv { bottom: 92px; }
.ctl.on { outline: 3px solid var(--c); }
#help { position: fixed; left: 26px; bottom: 160px; width: 500px; padding: 8px 14px 6px; z-index: 4; display: none; }
#help.show { display: block; }
#help .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
#help h5 { margin: 8px 0 4px; font-size: 12px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
#help p { margin: 0 0 9px; display: flex; align-items: center; font-size: 15px; }
#help p kbd { height: 26px; min-width: 26px; font-size: 13px; }

/* the hotbar */
#hot { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); display: none; gap: 6px; padding: 9px; z-index: 3; }
body.building #hot { display: flex; }
.slot { position: relative; width: 74px; height: 70px; cursor: pointer; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: scale .12s; }
.slot:hover img { scale: 1.15; }
.slot b { position: absolute; left: 4px; top: 0; z-index: 1; font-size: 12px; font-weight: 500; color: var(--rc, var(--muted)); }
.slot.on { outline: 3px solid var(--c); box-shadow: 0 0 14px var(--c); }
.slot.drop { outline: 3px dashed var(--c); }

/* the inventory drawer */
#drawer { position: fixed; left: 50%; top: 104px; bottom: 120px; width: min(1060px, calc(100vw - 720px)); min-width: 640px; transform: translateX(-50%); padding: 15px; display: none; flex-direction: column; z-index: 4; }
body.building.drawer #drawer { display: flex; }
#drawer .head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.find { position: relative; display: block; flex: 1; }
.find i { position: absolute; z-index: 1; left: 13px; top: 50%; width: 11px; height: 11px; margin-top: -9px; border: 3px solid var(--muted); border-radius: 50%; }
.find i::after { content: ""; position: absolute; left: 8px; top: 8px; width: 3px; height: 8px; background: var(--muted); transform: rotate(-45deg); transform-origin: 0 0; }
.find input { font: inherit; font-size: 15px; color: var(--text); width: 100%; padding: 10px 12px 10px 38px; border: 0; background: hsl(var(--h) 40% 3%);
  box-shadow: 0 0 0 3px var(--line), inset 3px 3px 0 #000, inset -3px -3px 0 hsl(var(--h) 30% 24%); outline: none; }
.find input:hover { box-shadow: 0 0 0 3px var(--line), inset 0 0 0 3px color-mix(in srgb, var(--c) 55%, transparent); }
.find input:focus { box-shadow: 0 0 0 3px var(--line), inset 0 0 0 3px var(--c), 0 0 14px color-mix(in srgb, var(--c) 60%, transparent); }
.tix { display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 18px; font-weight: 700; color: var(--tick); background: hsl(215 55% 9%); box-shadow: 0 0 0 3px var(--line), inset 0 0 0 2px hsl(215 60% 32%); }
.tk { display: block; width: 32px; height: 20px; }
.tabs { width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); box-shadow: inset 0 -3px 0 hsl(var(--h) 30% 22%); }
.tabs button { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 9px 0 12px; background: none; border: 0; color: var(--muted); text-shadow: inherit; font-size: 18px; font-weight: 600; }
.tabs button:hover { color: var(--rc); background: linear-gradient(transparent 30%, color-mix(in srgb, var(--rc) 12%, transparent)); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--rc) 55%, transparent); }
.tabs button.on { color: var(--rc); background: linear-gradient(transparent 30%, color-mix(in srgb, var(--rc) 24%, transparent)); box-shadow: inset 0 -4px 0 var(--rc), 0 12px 16px -10px var(--rc); }
.n { padding: 0 7px; font-size: 12px; color: var(--muted); background: hsl(var(--h) 35% 6% / .8); box-shadow: 0 0 0 2px var(--line); }
i.role { display: inline-block; width: 9px; height: 9px; box-shadow: inset 3px 3px 0 #fff6, inset -3px -3px 0 #0007, 0 0 0 2px #000; }
i.role.all { background: conic-gradient(var(--ok) 0 25%, var(--bad) 0 50%, var(--gold) 0 75%, var(--deco) 0); }
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 8px; align-content: start; padding: 12px 12px 0 0; }
.grid { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--c) transparent; }
.cell { position: relative; padding: 4px 2px 6px; cursor: pointer; text-align: center; min-width: 0; }
.cell img { display: block; width: 100%; height: 74px; object-fit: contain; transition: scale .15s; }
.cell:hover img { scale: 1.2; }
.cell::after { content: ""; position: absolute; left: 14%; right: 14%; top: 60px; height: 18px; z-index: -1; background: radial-gradient(closest-side, var(--rc), transparent); opacity: 0; transition: opacity .15s; }
.cell:hover::after { opacity: .6; } .cell.on::after { opacity: .95; left: 0; right: 0; }
.cell .name { font-size: 11px; font-weight: 600; line-height: 1.15; height: 2.3em; overflow: hidden; overflow-wrap: anywhere; color: var(--rc); text-shadow: 2px 2px 0 var(--line); }
.cell.dim img { filter: brightness(.38) saturate(.5); }
.cell .price { display: flex; justify-content: center; align-items: center; gap: 3px; position: absolute; left: 0; right: 0; top: 48px; z-index: 3; font-size: 16px; font-weight: 700; color: var(--tick); text-shadow: var(--stroke); }
.cell .price .tk { width: 20px; height: 13px; }
.cell .cond { position: absolute; left: 0; right: 0; top: 30px; font-size: 11px; color: var(--gold); text-shadow: var(--stroke); }
.muted { color: var(--muted); }
.vars { border-top: 3px solid var(--line); box-shadow: inset 0 3px 0 hsl(var(--h) 30% 28%); margin-top: 10px; padding-top: 11px; }
.vars:empty { display: none; }
.vars .title { color: var(--c); margin-bottom: 2px; font-size: 18px; font-weight: 700; }
.vars .title .muted { font-size: 12px; font-weight: 400; margin-left: 8px; }

/* the buy question */
#ask { position: fixed; inset: 0; z-index: 8; display: none; align-items: center; justify-content: center; background: hsl(var(--h) 60% 2% / .74); }
#ask.show { display: flex; }
#ask .box { min-width: 400px; padding: 22px 28px 26px; text-align: center; }
#ask h3 { margin: 0; font-size: 17px; font-weight: 600; }
#ask .box img { width: 180px; height: 140px; object-fit: contain; display: block; margin: 6px auto 0; }
#ask .what { font-size: 24px; font-weight: 700; color: var(--rc); }
#ask .fam-row { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
#ask .fam-row img { width: 56px; height: 52px; margin: 0; }
#ask .pay { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 10px; font-size: 24px; font-weight: 700; color: var(--tick); }
#ask .pay .tk { width: 40px; height: 25px; }
#ask .short { color: var(--bad); } #ask .left { color: var(--muted); font-size: 14px; }
#ask .yn { display: flex; justify-content: center; gap: 30px; margin-top: 18px; }
#ask .yn button { min-width: 124px; padding: 12px 20px; font-size: 21px; font-weight: 700; color: var(--ink); text-shadow: none; --d: 6px; }
#ask .yes { --top: #a8f5c0; --side: #1c7a3c; background: var(--ok); box-shadow: 0 0 0 3px var(--line), inset 3px 3px 0 #a8f5c0, inset -3px -3px 0 #1f9a48; }
#ask .yes.off { --top: var(--block-top); --side: var(--block-side); background: var(--block); box-shadow: 0 0 0 3px var(--line), var(--bevel); color: var(--muted); cursor: default; }

/* messages */
#hand { position: fixed; bottom: 104px; left: 50%; transform: translateX(-50%); font-size: 15px; font-weight: 600; text-shadow: var(--stroke); display: none; z-index: 3; }
body.building #hand { display: block; }
#noroute { position: fixed; top: 112px; left: 50%; transform: translateX(-50%); background: #a01818; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px #ff6060; padding: 10px 18px; font: 600 16px Fredoka; letter-spacing: 1px; display: none; z-index: 3; }
body.blocked #noroute { display: block; }
body.blocked.drawer.building #noroute { display: none; }
#toast { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); font: 700 30px Fredoka; text-shadow: var(--stroke); opacity: 0; transition: opacity .3s; text-align: center; line-height: 1.2; pointer-events: none; z-index: 3; }
#toast small { font-size: 18px; }
#toast.show { opacity: 1; }
.dragging { position: fixed; z-index: 20; width: 80px; height: 80px; pointer-events: none; translate: -50% -50%; opacity: .9; }

#reward { position: fixed; inset: 0; display: none; place-items: center; background: #000a; z-index: 9; }
#reward.show { display: grid; }
#reward .box { padding: 28px 36px; text-align: center; animation: slam .45s cubic-bezier(.2, 1.6, .4, 1); }
#reward h1 { font-size: 40px; color: var(--gold); margin: 0 0 18px; text-shadow: var(--stroke); }
#reward .tiles { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
#reward .tile { background: #0006; box-shadow: 0 0 0 3px #000; padding: 10px 14px; font-size: 13px; min-width: 80px; letter-spacing: 1px; }
#reward .tile b { display: block; font-size: 22px; margin-top: 4px; color: #fff; }
#reward button { padding: 12px 40px; font: 700 20px Fredoka; }
@keyframes slam { from { transform: scale(2.4); opacity: 0; } }

.hp { position: absolute; left: 0; top: 0; width: 50px; height: 8px; background: #0e1118; outline: 2px solid #000; }
.hp.boss { width: 110px; height: 14px; }
.hp i { display: block; height: 100%; }
.dmg { position: absolute; left: 0; top: 0; font: 700 17px Fredoka; text-shadow: var(--stroke); white-space: nowrap; }

/* the hub: station titles, prompt bubbles (Prompts.client), NPC dialogue (DialogueScreen) */
.title { position: absolute; left: 0; top: 0; font-family: "Press Start 2P"; text-shadow: 0 0 0 #000, -3px 0 #000, 3px 0 #000, 0 -3px #000, 0 3px #000; white-space: nowrap; }
.prompt { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; background: #0b0f16ee; box-shadow: 0 0 0 2px #00beff, 0 0 14px #00beff66; font: 600 15px Fredoka; animation: pop .18s; }
.prompt kbd { margin: 0; }
.prompt b { display: block; letter-spacing: 1px; } .prompt small { color: var(--muted); }
@keyframes pop { from { scale: .6; opacity: 0; } }
#talk { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(820px, 90vw); padding: 18px 22px 16px 150px; min-height: 150px; display: none; z-index: 6; }
#talk.show { display: block; }
#talk img { position: absolute; left: 16px; bottom: 12px; width: 120px; height: 140px; object-fit: contain; }
#talk h3 { margin: 0; font-size: 22px; color: var(--nc); text-shadow: var(--stroke); }
#talk em { font-style: normal; font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
#talk p { font-size: 18px; line-height: 1.35; margin: 8px 0 12px; min-height: 48px; }
#talk .btns { display: flex; gap: 14px; justify-content: flex-end; } #talk button { padding: 8px 20px; font: 600 15px Fredoka; }
.hubbtn { bottom: 158px; }
body.building .hubbtn { display: none; }

/* the intro (IntroScreen) */
body.cinema #top, body.cinema .side, body.cinema .done, body.cinema .ctl, body.cinema #hand, body.cinema #hot, body.cinema #noroute { display: none !important; }
#intro { position: fixed; inset: 0; z-index: 12; display: none; pointer-events: none; }
#intro .bar { position: absolute; left: 0; right: 0; height: 11vh; background: #000; }
#intro .bar.top { top: 0; } #intro .bar.bottom { bottom: 0; display: grid; place-items: center; }
#intro .fade { position: absolute; inset: 0; background: #000; opacity: 1; }
/* the choice: design B (assets/ui/guardian_picker.html) */
#intro .pick { position: absolute; inset: 11vh 0; pointer-events: auto; --el: #00beff; font: 18px/1.15 Fredoka; }
#intro .cap { position: absolute; left: 4vw; top: 4vh; }
#intro .lbl { font: 11px "Press Start 2P"; color: var(--el); }
#intro .cap h2 { margin: 10px 0 8px; font: 36px "Press Start 2P"; text-shadow: 0 0 16px var(--el), -3px 0 #000, 3px 0 #000, 0 3px #000; }
#intro .pside { position: absolute; right: 3vw; top: 3vh; width: min(520px, 38vw); display: flex; flex-direction: column; gap: 14px; }
#intro .tl .n { display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center; cursor: pointer; padding: 4px 0; }
#intro .tl .dot { width: 58px; height: 58px; border: 3px solid #2a3350; background: #0d1120 center 15% / 130% no-repeat; }
#intro .tl .n:last-of-type .dot { background-size: 60%; background-position: center; filter: grayscale(.4); }
#intro .tl .n.on .dot { border-color: var(--el); box-shadow: 0 0 16px var(--el); }
#intro .tl .link { width: 3px; height: 16px; margin-left: 28px; background: linear-gradient(var(--el), transparent); }
#intro .t1 { font: 11px "Press Start 2P"; } #intro .t2 { color: #8a96b8; font-size: 15px; margin-top: 4px; }
#intro .spell { border: 3px solid var(--el); background: linear-gradient(135deg, color-mix(in srgb, var(--el) 18%, #0d1120), #0d1120cc 60%); padding: 14px 16px; }
#intro .tw { font: 11px "Press Start 2P"; color: var(--el); margin-bottom: 8px; }
#intro .twt { color: var(--el); margin-top: 8px; }
#intro .row { display: flex; gap: 18px; margin-top: 12px; align-items: center; }
#intro .hit { display: grid; grid-template-columns: repeat(9, 12px); gap: 2px; }
#intro .hit i { width: 12px; height: 12px; background: #1d2338; display: block; }
#intro .hit i.on { background: var(--el); box-shadow: 0 0 6px var(--el); } #intro .hit i.me { background: #fff; }
#intro .stats { flex: 1; display: flex; flex-direction: column; gap: 6px; }
#intro .stat { display: grid; grid-template-columns: 62px 1fr 46px; gap: 8px; align-items: center; font-size: 15px; }
#intro .stat span:first-child { font: 8px "Press Start 2P"; }
#intro .sbar { height: 11px; background: #1d2338; position: relative; }
#intro .sbar b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--el); box-shadow: 0 0 8px var(--el); }
#intro .choose { position: relative; align-self: flex-start; font: 13px "Press Start 2P"; padding: 16px 28px; color: #fff; background: color-mix(in srgb, var(--el) 30%, #0b0d15); border: 3px solid var(--el); box-shadow: 0 0 18px var(--el); cursor: pointer; }
#intro .choose:hover { filter: brightness(1.2); }
#intro .spark { position: absolute; bottom: 100%; width: 8px; height: 8px; background: var(--el); box-shadow: 0 0 8px var(--el); animation: sparkup 1.4s ease-out forwards; pointer-events: none; }
@keyframes sparkup { to { transform: translate(var(--dx), -110px); opacity: 0; } }
#intro .medals { position: absolute; left: 0; right: 0; bottom: -11vh; height: 11vh; display: flex; justify-content: center; gap: 18px; align-items: center; }
#intro .medal { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 3px solid #2a3350; background: #0d1120 center 15% / 125% no-repeat; cursor: pointer; transform: translateY(-14px); transition: all .25s; }
#intro .medal img { position: absolute; left: 50%; top: -18px; width: 22px; translate: -50% 0; image-rendering: pixelated; }
#intro .medal.on { border-color: var(--c); box-shadow: 0 0 18px var(--c); transform: translateY(-24px) scale(1.15); }
body.cinema .hp, body.cinema .dmg { display: none; }

/* the title screen and the save slots (menu.js) */
#menu { position: fixed; inset: 0; z-index: 15; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 46px;
  background: radial-gradient(ellipse at 50% 45%, #0000 0%, #05060bcc 75%); }
#menu .logo { font: 76px "Press Start 2P"; color: #fff; text-shadow: 0 0 30px #42F0A5, -6px 0 #000, 6px 0 #000, 0 -6px #000, 0 6px #000, 0 10px #000; }
#menu .logo.small { font-size: 40px; }
#menu .big { width: 380px; height: 74px; font: 700 28px Fredoka; letter-spacing: 3px; --d: 10px; }
#menu .slots { width: min(720px, 92vw); padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 12px; }
#menu .slots h4 { font-size: 16px; margin: 0 0 4px; }
#menu .list { display: flex; flex-direction: column; gap: 12px; }
#menu .slot-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--e, #42F0A5) 34%, #0b0f16), #0b0f16cc 70%);
  box-shadow: 0 0 0 3px #000, inset 6px 0 0 var(--e, #42F0A5); }
#menu .slot-row.empty { background: #0b0f16aa; box-shadow: 0 0 0 3px #000, inset 6px 0 0 #3a4a44; }
#menu .num { font: 22px "Press Start 2P"; width: 40px; text-align: center; color: var(--e, var(--muted)); text-shadow: var(--stroke); }
#menu .what { flex: 1; } #menu .what b { display: block; font-size: 22px; text-shadow: var(--stroke); } #menu .what span { color: var(--muted); font-size: 14px; }
#menu .slot-row button { padding: 10px 16px; font: 700 15px Fredoka; letter-spacing: 1px; }
#menu .back { align-self: flex-start; margin-top: 4px; padding: 9px 22px; font: 600 15px Fredoka; color: #fff; }
body.cinema .title, body.cinema .prompt { display: none !important; }

/* real icons (the ones uploaded to Roblox: assets/ui/png, assets/fx/el_*) */
img.ico { width: 28px; height: 28px; image-rendering: pixelated; box-shadow: none; object-fit: contain; filter: drop-shadow(0 2px 0 #000); }
.ctl img { width: 26px; height: 26px; image-rendering: pixelated; margin-right: 10px; filter: drop-shadow(0 2px 0 #000); }
/* at the hub: no building, no island HUD (user, 2026-11-16: "build is disabled when you're on spawn, same for the
   templates, clear plot and the wave, core gold diamonds etc") */
body.athub #top, body.athub .done, body.athub #tpls, body.athub .inv, body.athub .hubbtn, body.athub #hot, body.athub #noroute { display: none !important; }
body.athub #ctlbtn { bottom: 26px; }

/* training grounds (training.js): the button, and the controls panel while you're in the room */
.trainbtn { bottom: 224px; }
body.athub .trainbtn { bottom: 92px; }
body.building .trainbtn, body.intraining .trainbtn { display: none; }
body.athub.intraining .hubbtn { display: flex !important; bottom: 92px; }
#trainhud { position: fixed; left: 26px; top: 26px; padding: 12px 18px 14px; display: none; z-index: 3; font: 500 15px Fredoka; }
body.intraining #trainhud { display: block; }
#trainhud h4 { margin: 0 0 8px; color: #ffd23c; letter-spacing: 1.5px; }
#trainhud p { margin: 5px 0; } #trainhud kbd { margin-right: 10px; }
#trainhud b { display: block; margin-top: 10px; color: #42F0A5; letter-spacing: 1px; }

/* the unit screens (units.js): Units screen, unit page, unit panel, Summon Altar, Trait Crystal */
.unitsbtn { bottom: 290px; }
body.athub .unitsbtn { bottom: 158px; }
body.building .unitsbtn { display: none; }
#uwin { position: fixed; inset: 0; z-index: 5; display: none; place-items: center; padding-left: 340px; background: hsl(var(--h) 60% 2% / .55); }
#uwin.show { display: grid; }
#uwin.panel { background: none; pointer-events: none; place-items: end center; padding: 0 0 26px; }
#uwin .box { pointer-events: auto; width: min(980px, calc(100vw - 400px)); max-height: calc(100vh - 80px); overflow-y: auto; padding: 16px 20px 18px; scrollbar-width: thin; scrollbar-color: var(--c) transparent; }
#uwin.page .box, #uwin.traits .box { width: min(860px, calc(100vw - 400px)); }
#uwin.panel .box { width: 440px; }
#uwin .bar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
#uwin h2 { margin: 0; flex: 1; font-size: 26px; font-weight: 700; color: var(--c); text-shadow: var(--stroke); }
#uwin h2 small { margin-left: 12px; font-size: 13px; letter-spacing: 1.5px; color: var(--muted); font-weight: 500; }
#uwin h5 { margin: 12px 0 4px; font-size: 12px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }
#uwin p { margin: 0 0 6px; }
#uwin .x { width: 38px; height: 34px; font-weight: 700; }
#uwin .cur { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
#uwin .cur img, #uwin s img { width: 20px; height: 20px; image-rendering: pixelated; }
#uwin .hint { font-size: 13px; margin-top: -4px; }
#uwin .btns { display: flex; gap: 14px; justify-content: center; margin-top: 12px; }
#uwin .btns button { padding: 10px 26px; font: 700 18px Fredoka; display: flex; align-items: center; gap: 10px; }
#uwin .btns s { text-decoration: none; display: flex; align-items: center; gap: 4px; font-size: 15px; padding: 1px 8px; background: #0003; }
.medals { display: flex; justify-content: center; }
.medals img { width: 27px; height: 27px; margin: 0 -2px; image-rendering: pixelated; }
img.por { object-fit: contain; filter: drop-shadow(0 3px 0 #000); }
body.equipping #cards .unit { outline: 3px dashed var(--c); }

/* roster cards: tall, in the star tier's colour */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 14px; padding: 4px 6px 6px; }
.ucard { position: relative; height: 270px; cursor: pointer; text-align: center; padding-top: 6px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--t) 85%, #fff), color-mix(in srgb, var(--t) 70%, #000) 55%, color-mix(in srgb, var(--t) 30%, #000));
  box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #fff6, inset -3px -3px 0 #0006; transition: translate .12s; }
.ucard:hover { translate: 0 -4px; }
.ucard .por { width: 100%; height: 150px; }
.ucard .nm { display: block; font-size: 20px; font-weight: 700; line-height: 1.1; }
.ucard em { display: block; font-style: normal; font-size: 11px; letter-spacing: 1.5px; color: #fffc; margin-bottom: 4px; }
.ucard .el { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; }
.ucard .sl { position: absolute; right: 8px; top: 8px; min-width: 24px; padding: 0 5px; font-weight: 700; background: #000a; box-shadow: 0 0 0 2px #000; }
.ucard .tr { position: absolute; right: 8px; top: 40px; width: 28px; height: 28px; image-rendering: pixelated; }
.ucard.locked { --t: #3a3f4a; cursor: default; }
.ucard.locked .por { filter: brightness(0) drop-shadow(0 0 2px #fff6); }
.dupes { position: absolute; left: 10px; right: 10px; bottom: 9px; height: 20px; background: #0009; box-shadow: 0 0 0 2px #000; font-size: 13px; font-weight: 700; line-height: 20px; }
.dupes i { position: absolute; left: 0; top: 0; bottom: 0; background: #00beff; }
.dupes b { position: relative; }
.dupes.up { color: #062a12; background: repeating-linear-gradient(45deg, #42f07a 0 8px, #ffe24a 8px 16px); background-size: 45px 45px; animation: stripes .7s linear infinite, pulse .8s ease-in-out infinite alternate; }
.dupes.max { color: var(--gold); }
@keyframes stripes { to { background-position: 45px 0; } }
@keyframes pulse { to { filter: brightness(1.25); box-shadow: 0 0 0 2px #000, 0 0 14px #42f07a; } }
.ucard.slam { z-index: 2; animation: cardslam .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes cardslam { 0% { scale: 1; } 25% { scale: .9; } 55% { scale: 1.35; filter: brightness(2); box-shadow: 0 0 0 3px #000, 0 0 60px var(--t); } 100% { scale: 1; } }

/* the unit page */
.pg { display: grid; grid-template-columns: 330px 1fr; gap: 18px; }
.pg .stage { position: relative; height: 380px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--t) 60%, transparent), #0008 70%); box-shadow: 0 0 0 3px #000, inset 0 0 0 3px var(--t); }
.pg .stage .por { width: 100%; height: 320px; }
.pg .stage .el { position: absolute; left: 10px; top: 10px; width: 32px; height: 32px; image-rendering: pixelated; box-shadow: 0 0 0 2px #000; }
.pg .tier { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; }
.pg .tier b { font-size: 13px; letter-spacing: 1px; }
.pg .tier .medals img { width: 34px; height: 34px; }
.sock { position: absolute; left: 10px; bottom: 60px; width: 52px; height: 52px; font: 700 26px Fredoka; padding: 0; }
.sock img { width: 44px; height: 44px; image-rendering: pixelated; }
.stats { display: flex; gap: 10px; }
.stats div { flex: 1; padding: 4px 10px; background: color-mix(in srgb, var(--s) 30%, #000); box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--s); }
.stats small { display: block; font-size: 11px; letter-spacing: 1.5px; color: var(--s); }
.stats b { font-size: 22px; }
.trait { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 8px 12px; background: color-mix(in srgb, var(--r) 22%, #000); box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--r); }
.trait img { width: 40px; height: 40px; image-rendering: pixelated; }
.trait b { font-size: 18px; }
.trait em { font-style: normal; font-size: 11px; letter-spacing: 1.5px; color: var(--r); }
.pick { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pick[hidden] { display: none; }
.pick button { display: flex; align-items: center; gap: 10px; padding: 6px 12px; text-align: left; }
.pick button img { width: 32px; height: 32px; image-rendering: pixelated; }
.pick button span { font-size: 13px; color: var(--muted); }
.pick .lit span { color: #04231a; }

/* the unit panel */
.pn { display: flex; gap: 14px; margin-bottom: 6px; }
.pp { position: relative; width: 110px; height: 120px; flex: none; background: color-mix(in srgb, var(--t) 45%, #000); box-shadow: 0 0 0 3px #000, inset 0 0 0 3px var(--t); }
.pp .por { width: 100%; height: 100%; }
.pp .el { position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; image-rendering: pixelated; }
.pn em { font-style: normal; font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.pn .medals { justify-content: flex-start; margin: 4px 0 8px; }
.aims { display: flex; gap: 8px; flex-wrap: wrap; }
.aims button { padding: 5px 10px; font: 600 13px Fredoka; }
#uwin .all { margin-top: 14px; width: 100%; padding: 8px; font: 700 16px Fredoka; }
#uwin .all kbd { height: 22px; min-width: 22px; font-size: 12px; margin: 0 0 0 10px; }

/* the Summon Altar */
.pool { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 10px; }
.pc { position: relative; height: 190px; text-align: center; background: #0007; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px hsl(var(--h) 30% 24%); }
.pc .por { width: 100%; height: 130px; }
.pc b { display: block; font-size: 17px; }
.pc em { font-style: normal; color: var(--muted); }
.pc.feat { background: linear-gradient(#5a4310, #1d1504); box-shadow: 0 0 0 3px #000, inset 0 0 0 3px var(--gold), 0 0 22px #ffc64088; }
.pc.feat em { color: var(--gold); font-weight: 700; }
.pc span { position: absolute; left: 0; right: 0; top: 4px; font-size: 11px; letter-spacing: 1px; color: var(--gold); text-shadow: var(--stroke); }
.pc i { position: absolute; right: 6px; top: 22px; font-style: normal; font-size: 11px; font-weight: 700; color: #04231a; background: var(--c); padding: 0 5px; }
.res { position: fixed; inset: 0; z-index: 7; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 14px; padding: 60px 60px 60px 380px; background: #000c; cursor: pointer; }
.res[hidden] { display: none; }
.res p { width: 100%; text-align: center; color: var(--muted); }
.rc { width: 150px; height: 210px; text-align: center; animation: pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
  background: linear-gradient(170deg, color-mix(in srgb, var(--t) 80%, #fff), color-mix(in srgb, var(--t) 40%, #000)); box-shadow: 0 0 0 3px #000, inset 3px 3px 0 #fff6, inset -3px -3px 0 #0006; }
.rc .por { width: 100%; height: 150px; }
.rc b { display: block; font-size: 18px; }
.rc em { font-style: normal; font-weight: 700; font-size: 13px; color: #fff; text-shadow: var(--stroke); }

/* the Trait Crystal */
.tw { display: grid; grid-template-columns: 250px 1fr; gap: 16px; }
.tlist { display: flex; flex-direction: column; gap: 10px; }
.tlist button { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 10px 0 4px; font-size: 16px; font-weight: 600; text-align: left; }
.tlist .por { width: 48px; height: 52px; }
.tlist b { flex: 1; }
.tlist .ti { width: 26px; height: 26px; image-rendering: pixelated; }
.tcard { min-height: 280px; padding: 20px; text-align: center; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--r) 45%, #000), #000a); box-shadow: 0 0 0 3px #000, inset 0 0 0 4px var(--r), 0 0 30px color-mix(in srgb, var(--r) 40%, transparent); }
.tcard img { width: 110px; height: 110px; image-rendering: pixelated; }
.tcard b { display: block; font-size: 32px; color: var(--r); }
.tcard em { font-style: normal; letter-spacing: 2px; font-size: 13px; color: #fffc; }
.tcard p { font-size: 17px; margin-top: 10px; }
.tcard.pop { animation: pop .4s cubic-bezier(.2, 1.8, .4, 1); }
.todds { grid-column: 1 / -1; }
.todds[hidden] { display: none; }
.todds p { display: grid; grid-template-columns: 30px 110px 100px 1fr 60px; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 2px solid #0006; }
.todds img { width: 26px; height: 26px; image-rendering: pixelated; }
.todds em { font-style: normal; color: var(--r); font-size: 13px; }
.todds span { font-size: 13px; color: var(--muted); }
.todds s { text-decoration: none; text-align: right; font-weight: 700; }
#uwin .box.shake { animation: shake .45s; }
@keyframes shake { 20% { translate: -8px 3px; } 40% { translate: 7px -4px; } 60% { translate: -5px 2px; } 80% { translate: 3px -1px; } }
@media (max-width: 1200px) { #uwin { padding-left: 0; } #uwin .box, #uwin.page .box, #uwin.traits .box { width: calc(100vw - 40px); } .cards { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } .pg, .tw { grid-template-columns: 1fr; } .res { padding-left: 60px; } }

/* online (online.js / players.js): the sign-in box, who you are on the title screen, other players' name tags */
#menu .login { width: 440px; text-align: center; }
#menu .login #gsi { display: flex; justify-content: center; margin: 10px 0 14px; }
#menu .login .guest { display: flex; gap: 12px; margin-top: 8px; }
#menu .login input { flex: 1; font: 600 16px Fredoka; color: #fff; padding: 10px 12px; border: 0; background: hsl(var(--h) 40% 3%); box-shadow: 0 0 0 3px var(--line), inset 3px 3px 0 #000; outline: none; }
#menu .login input:focus { box-shadow: 0 0 0 3px var(--line), inset 0 0 0 3px var(--c); }
#menu .login button { padding: 0 22px; font: 700 16px Fredoka; }
#menu .login .err { color: #ff8080; min-height: 1.2em; margin: 10px 0 0; }
#menu .who { margin-top: 18px; font-size: 15px; color: var(--muted); text-shadow: var(--stroke); }
#menu .who a { color: var(--c); cursor: pointer; text-decoration: underline; }
.nametag { position: absolute; left: 0; top: 0; padding: 2px 9px; font: 600 15px Fredoka; color: #fff; white-space: nowrap; background: #0008; box-shadow: 0 0 0 2px #000; pointer-events: none; }

/* the training room's ability bar + your health (training.js), and the red flash when you're hit */
#abar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 10px; z-index: 3; pointer-events: none; }
body.intraining:not(.building) #abar { display: flex; }
#abar .php { position: relative; width: 420px; height: 22px; background: #0e1118; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px #2a3040; }
#abar .php i { position: absolute; left: 0; top: 0; bottom: 0; transition: width .12s; }
#abar .php b { position: relative; display: block; text-align: center; font: 700 14px/22px Fredoka; text-shadow: var(--stroke); }
#abar .boxes { display: flex; gap: 10px; }
.ab { position: relative; width: 84px; height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 7px; overflow: hidden;
  background: hsl(var(--h) 30% 13%); box-shadow: 0 0 0 3px #000, inset 3px 3px 0 hsl(var(--h) 30% 26%), inset -3px -3px 0 hsl(var(--h) 35% 7%); }
.ab kbd { position: absolute; top: 6px; margin: 0; height: 22px; min-width: 22px; font-size: 12px; }
.ab span { position: relative; z-index: 1; font: 700 12px Fredoka; letter-spacing: 1px; text-shadow: var(--stroke); }
.ab::after { content: ""; position: absolute; inset: 0; background: conic-gradient(#000b calc(var(--p, 0) * 360deg), transparent 0); }
.ab s { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-decoration: none; font: 700 26px Fredoka; text-shadow: var(--stroke); }
.ab.on { box-shadow: 0 0 0 3px #000, inset 0 0 0 3px var(--c), 0 0 14px var(--c); }
.ab.cool span { opacity: .55; }
.ab.no { animation: abno .3s; }
@keyframes abno { 25% { translate: -5px 0; box-shadow: 0 0 0 3px #000, inset 0 0 0 3px #ff4a4a; } 75% { translate: 4px 0; } }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 2; opacity: 0; background: radial-gradient(ellipse at center, transparent 45%, #ff1a1acc); }
#hurt.on { animation: hurt .45s ease-out; }
@keyframes hurt { from { opacity: 1; } to { opacity: 0; } }

/* visiting (main.js): the portal's island list, the banner while you're on someone else's island */
#islands { position: fixed; inset: 0; z-index: 8; display: none; place-items: center; background: hsl(var(--h) 60% 2% / .6); }
#islands.show { display: grid; }
#islands .box { width: 440px; padding: 18px 22px 20px; }
#islands h3 { margin: 0 0 12px; font-size: 22px; color: var(--c); text-shadow: var(--stroke); }
#islands .list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding: 4px; }
#islands .isl { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; text-align: left; }
#islands .isl b { font-size: 18px; } #islands .isl span { font-size: 13px; color: var(--muted); }
#islands .isl.on span { color: var(--ok); }
#islands .close { margin-top: 14px; padding: 8px 20px; font: 700 15px Fredoka; }
#visitbar { position: fixed; left: 50%; top: 22px; transform: translateX(-50%); z-index: 3; display: none; padding: 8px 20px; font: 700 20px Fredoka; letter-spacing: 1.5px;
  color: #fff; text-shadow: var(--stroke); background: hsl(var(--h) 40% 8% / .85); box-shadow: 0 0 0 3px #000, inset 0 0 0 2px var(--c); }
body.visiting #visitbar { display: block; }
body.visiting #top, body.visiting .done, body.visiting #tpls, body.visiting .inv, body.visiting #hot, body.visiting #noroute { display: none !important; }
body.visiting .hubbtn { display: flex !important; }

/* fast travel (travelmap.js): icons hanging in the sky over the hub's stations, the map top right */
.skyicon { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0; border: 0; background: none;
  pointer-events: auto; cursor: pointer; transform-origin: 50% 50%; }
.skyicon img { width: 46px; height: 46px; padding: 7px; border-radius: 50%; object-fit: contain; image-rendering: pixelated;
  background: radial-gradient(circle, hsl(0 0% 10% / .9), hsl(0 0% 4% / .85)); box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--c), 0 0 18px var(--c);
  animation: bob 3s ease-in-out infinite; transition: scale .12s; }
.skyicon b { font: 700 12px Fredoka; letter-spacing: 1.5px; color: #fff; text-shadow: var(--stroke); }
.skyicon:hover img { scale: 1.18; }
@keyframes bob { 50% { translate: 0 -5px; } }
#map { position: fixed; right: 18px; top: 18px; width: 230px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
body.cinema #map, body.building #map { display: none !important; }
#map .pic { position: relative; width: 230px; height: 230px; overflow: hidden; border-radius: 50%; background: #0c1016;
  box-shadow: 0 0 0 3px #000, 0 0 0 6px hsl(var(--h) 40% 30%), 0 0 24px hsl(var(--h) 85% 55% / .35); }
#map .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
#map .pin { position: absolute; width: 30px; height: 30px; padding: 4px; border: 0; border-radius: 50%; translate: -50% -50%; cursor: pointer;
  background: #0b0e14e6; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--c); transition: scale .1s; }
#map .pin:hover { scale: 1.25; z-index: 2; }
#map .pin img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
#map .me, #map .other { position: absolute; width: 12px; height: 12px; border-radius: 50%; translate: -50% -50%; pointer-events: none; z-index: 3; }
#map .me { background: var(--c); box-shadow: 0 0 0 2px #000, 0 0 10px var(--c); animation: pulse 1s ease-in-out infinite alternate; }
#map .other { width: 9px; height: 9px; background: #00beff; box-shadow: 0 0 0 2px #000; }
#map .go { display: flex; gap: 8px; }
#map .go button { flex: 1; padding: 7px 0; font: 700 13px Fredoka; letter-spacing: 1px; }
.skyicon.edge img { animation: none; opacity: .92; }

/* the hub's leaderboard (main.js tendBoard): shows while you stand at the LEADERBOARD station */
#board { position: fixed; right: 18px; top: 330px; width: 300px; padding: 14px 16px 12px; z-index: 4; display: none; }
#board.show { display: block; }
#board h3 { margin: 0; font-size: 20px; color: var(--gold); text-shadow: var(--stroke); }
#board > p { margin: 0 0 8px; font-size: 12px; }
#board .rows { display: flex; flex-direction: column; gap: 5px; }
#board .row { display: grid; grid-template-columns: 22px 34px 1fr auto; align-items: center; gap: 8px; padding: 3px 8px; background: #0006; box-shadow: 0 0 0 2px #000; }
#board .row.me { box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--c); }
#board .rank { font-size: 15px; color: var(--muted); text-align: center; }
#board .row:nth-child(1) .rank { color: var(--gold); } #board .row:nth-child(2) .rank { color: #c8d2e0; } #board .row:nth-child(3) .rank { color: #d08a4a; }
#board img { width: 34px; height: 34px; object-fit: contain; }
#board span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#board em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--c); }

/* the skill tree (skilltree.js): the whole screen, hexes in their branch's colour */
#tree { position: fixed; inset: 0; z-index: 7; display: none; background: radial-gradient(circle at 50% 50%, #141a24, #07090d 75%); }
#tree.show { display: block; }
#tree .map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#tree .map:active { cursor: grabbing; }
#tree .head { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 22px; padding: 10px 14px 10px 20px; z-index: 2; }
#tree h2 { margin: 0; font-size: 22px; color: #78ffc8; text-shadow: var(--stroke); }
#tree .lvl b { display: block; font-size: 16px; }
#tree .xp { width: 200px; height: 10px; background: #0e1118; box-shadow: 0 0 0 2px #000; margin: 3px 0; }
#tree .xp i { display: block; height: 100%; background: linear-gradient(90deg, #42f0a5, #78ffc8); }
#tree .lvl small { font-size: 12px; color: var(--muted); }
#tree .pts { font-size: 14px; color: var(--muted); } #tree .pts b { font-size: 26px; color: var(--gold); margin-right: 6px; }
#tree .x { width: 38px; height: 34px; font-weight: 700; }
#tree .bonus { position: absolute; right: 18px; top: 110px; width: 260px; max-height: calc(100vh - 140px); overflow-y: auto; overflow-x: hidden; padding: 12px 14px; z-index: 2; }
#tree .bonus p { margin: 0 0 5px; font-size: 14px; }
#tree .tip { position: fixed; z-index: 3; display: none; max-width: 280px; padding: 8px 12px; background: #0b0f16f2; box-shadow: 0 0 0 3px #000, inset 0 0 0 2px #2c3a48; pointer-events: none; }
#tree .tip em { display: block; font-style: normal; font-size: 11px; letter-spacing: 1.5px; }
#tree .tip b { display: block; font-size: 15px; margin: 2px 0 4px; }
#tree .tip span { font-size: 13px; color: var(--muted); }
#tree .node polygon { fill: color-mix(in srgb, var(--c) 10%, #0b0e14); stroke: color-mix(in srgb, var(--c) 35%, #000); stroke-width: .08; transition: fill .15s; }
#tree .node image { opacity: .35; image-rendering: pixelated; pointer-events: none; }
#tree .node { cursor: pointer; }
#tree .node.near polygon { fill: color-mix(in srgb, var(--c) 18%, #0b0e14); stroke: color-mix(in srgb, var(--c) 60%, #000); }
#tree .node.open polygon { fill: color-mix(in srgb, var(--c) 30%, #0b0e14); stroke: var(--c); stroke-width: .14; }
#tree .node.open image, #tree .node.near image { opacity: .85; }
#tree .node.own polygon { fill: var(--c); stroke: #fff; stroke-width: .1; }
#tree .node.own image { opacity: 1; }
#tree .node.soon polygon { fill: #111418; stroke: #2a2f38; } #tree .node.soon image { opacity: .15; }
#tree .node.fusion polygon, #tree .node.grand polygon { stroke: var(--c2); }
#tree .node.root polygon { fill: #e8f0ff; stroke: #fff; }
#tree .node:hover polygon { stroke: #fff; stroke-width: .16; }
