@font-face { font-family: 'Barlow'; src: url('../../assets/fonts/barlow-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../../assets/fonts/barlow-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../../assets/fonts/barlow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../../assets/fonts/barlowc-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../../assets/fonts/barlowc-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('../../assets/fonts/barlowc-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --navy: #12294f;
  --navy-2: #1b3a6e;
  --navy-glass: rgba(10, 24, 48, 0.78);
  --line: rgba(160, 196, 255, 0.18);
  --blue: #2f86ff;
  --blue-hi: #5fb0ff;
  --yellow: #f2c200;
  --green: #3ddc84;
  --red: #ff5a4f;
  --text: #eef4ff;
  --muted: #9fb3d1;
  --panel-bg: linear-gradient(180deg, rgba(13,33,72,.93), rgba(6,17,40,.93));
  --card-bg: linear-gradient(180deg, rgba(16,40,86,.92), rgba(8,22,52,.92));
  --glow-line: rgba(70,150,255,.6);
  --glow: 0 0 14px rgba(50,140,255,.45);
  --buy-hi: #63f76e; --buy-lo: #22c13a; --buy-ink: #05280b;
  --eq-hi: #1f55b5; --eq-lo: #133c86;
  --lock-bg: #3a4558; --lock-ink: #d4dcea;
  --k: 1;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1830; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body { font-family: 'Barlow', system-ui, sans-serif; color: var(--text); }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui .layer { position: absolute; left: 0; top: 0; width: calc(100% / var(--k)); height: calc(100% / var(--k)); transform: scale(var(--k)); transform-origin: 0 0; }
button { font-family: inherit; }

/* ---------- boot ---------- */
#boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 8vh; gap: 12px;
  background: linear-gradient(180deg, transparent 55%, rgba(4,10,22,.75) 100%), url('../../assets/ui/loading_bg.webp') center 30% / cover no-repeat, #07142c;
  z-index: 50; transition: opacity .6s var(--ease); }
#boot.gone { opacity: 0; pointer-events: none; }
.boot-bar { width: min(420px, 70vw); height: 8px; border-radius: 6px; background: rgba(255,255,255,0.08); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.boot-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-hi)); transition: width .25s; }
.boot-note { font: 600 13px 'Barlow'; color: #d6e2f5; text-shadow: 0 1px 4px #000; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- panels ---------- */
.panel { background: var(--panel-bg); border: 1.5px solid var(--glow-line); border-radius: 12px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 0 1px rgba(8,30,80,.6), 0 0 16px rgba(40,120,255,.28), 0 10px 30px rgba(0,0,0,.4), inset 0 0 22px rgba(40,110,255,.10); }
.cap { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 5px;
  background: #fff; color: var(--navy); font: 800 13px 'Barlow Condensed'; box-shadow: 0 2px 0 #9fb3d1; }

/* brand mark (top-left) */
.hudlogo { position: absolute; top: 4px; left: 30px; width: 176px; height: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.ico { width: 1em; height: 1em; flex: none; }
.cashico { color: #4fe06a; filter: drop-shadow(0 0 6px rgba(79,224,106,.45)); }

/* top-right wallet: cash | level | reputation */
.wallet { position: absolute; top: 18px; right: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.walletbar { display: flex; align-items: center; height: 64px; padding: 0 18px; gap: 0; }
.wcash { display: flex; align-items: center; gap: 10px; padding-right: 18px; font-size: 30px; }
.wcash b { font: 800 32px/1 'Barlow Condensed'; color: #5cf07a; text-shadow: 0 0 12px rgba(92,240,122,.35); }
.wlevel { border-left: 1px solid rgba(120,170,255,.35); padding: 0 16px 0 18px; min-width: 128px; }
.wlevel b { font: 800 26px/1 'Barlow Condensed'; letter-spacing: .02em; }
.wlevel .bar { margin-top: 6px; height: 5px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; }
.wlevel .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f86ff, #5fd0ff); box-shadow: var(--glow); transition: width .4s var(--ease); }
.wrep { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.wrep small { font: 800 13px 'Barlow Condensed'; letter-spacing: .06em; }
.wrep .stars { color: var(--yellow); font-size: 19px; letter-spacing: 2px; line-height: 1; text-shadow: 0 0 8px rgba(242,194,0,.35); }
.wrow { display: flex; gap: 8px; }
.qchip { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 10px; }
.qchip small { font: 800 12px 'Barlow Condensed'; letter-spacing: .14em; color: var(--muted); }
.qchip b { font: 800 20px 'Barlow Condensed'; }
.gear { pointer-events: auto; cursor: pointer; color: var(--text); width: 40px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; padding: 0; }
.gear:hover { color: #fff; border-color: #8cc4ff; }

/* current job card (left, under the logo) */
.jobcard { position: absolute; top: 164px; left: 16px; width: 252px; padding: 12px 14px; transition: opacity .3s, transform .4s var(--ease); }
.jobcard.hidden { opacity: 0; transform: translateX(-20px); }
.jhead { display: flex; align-items: center; gap: 6px; font: 800 19px/1 'Barlow Condensed'; letter-spacing: .03em; }
.jhead .ico { color: #58a8ff; font-size: 15px; }
.jcar { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: center; margin-top: 10px; padding-bottom: 10px; border-bottom: 1px solid rgba(120,170,255,.2); }
.jthumb { width: 72px; height: 64px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(120,170,255,.3); }
.jobcard .svc { font: 800 18px/1.05 'Barlow Condensed'; }
.jobcard .meta { font: 500 13px 'Barlow'; color: #c9d7ee; margin-top: 2px; }
.status { display: inline-block; margin-top: 6px; padding: 3px 7px; border-radius: 4px; font: 800 12px/1 'Barlow Condensed'; letter-spacing: .06em; background: #1f63d8; box-shadow: var(--glow); }
.status.wait { background: #f2c200; color: #2a1f00; box-shadow: 0 0 10px rgba(242,194,0,.4); }
.status.bad { background: #b3261e; box-shadow: none; }
.jobcard .obj { margin-top: 4px; }
.obj-row { display: grid; grid-template-columns: 18px 1fr 44px; align-items: center; gap: 8px; margin-top: 8px; font: 500 14px 'Barlow'; }
.obj-row .box { width: 18px; height: 18px; border-radius: 3px; background: #2f7dff; display: grid; place-items: center; font-size: 13px; color: #fff; }
.obj-row .pct { text-align: right; font: 700 15px 'Barlow Condensed'; }
.obj-row .track { grid-column: 2 / 4; height: 5px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin-top: -3px; }
.obj-row .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2f86ff, #5fb0ff); transition: width .25s; }
.obj-row.done .box { background: #2fcf4f; }
.obj-row.done .track i { background: linear-gradient(90deg, #22c13a, #63f76e); }
.obj-row.done .pct { color: #63f76e; }
.jobcard .total { margin-top: 12px; display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; font: 500 15px 'Barlow'; }
.jobcard .total .ico { font-size: 17px; color: #c9d7ee; }
.jobcard .total b { font: 800 26px/1 'Barlow Condensed'; color: #7cc4ff; }
.jobcard .total b.ok { color: #63f76e; }
.jobcard .hint { margin-top: 6px; font: 600 12px/1.3 'Barlow'; color: var(--yellow); }
.jobcard .hint.hidden { display: none; }
.jobcard .pay { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(120,170,255,.2); display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 4px; font: 500 15px 'Barlow'; }
.jobcard .pay b { font: 800 26px/1 'Barlow Condensed'; justify-self: end; }
.jobcard .pay span:nth-of-type(2), .jobcard .pay b:nth-of-type(2) { font: 600 13px 'Barlow'; opacity: .85; }
.jobcard .pay b.ok { color: #3ddc84; }

/* objective / tutorial line */
.objective { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); padding: 8px 16px; font: 700 15px 'Barlow'; display: flex; gap: 10px; align-items: center; max-width: 520px; text-align: center; }
.objective.hidden { opacity: 0; }
.objective .tag { font: 800 11px 'Barlow Condensed'; letter-spacing: .14em; color: var(--yellow); }

/* crosshair */
.xhair { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.xhair::before { content: ''; position: absolute; left: 13px; top: 13px; width: 4px; height: 4px; border-radius: 50%; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.8); }
.xhair::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; border: 2px solid rgba(255,255,255,.0); transition: border-color .15s, transform .15s; }
.xhair.on::after { border-color: rgba(95,176,255,.85); transform: scale(1.05); }
.aimlabel { position: absolute; left: 50%; top: calc(50% + 24px); transform: translateX(-50%); font: 700 12px 'Barlow'; letter-spacing: .1em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px #000; opacity: .85; }

/* prompt */
.prompt { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); padding: 8px 14px; font: 700 16px 'Barlow'; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.prompt.hidden { opacity: 0; }
.prompt .sub { color: var(--muted); font-weight: 600; font-size: 13px; }

/* toolbelt */
.belt { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.slot { position: relative; width: 74px; height: 58px; padding: 22px 6px 6px; text-align: center; font: 700 12px/1.1 'Barlow Condensed'; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.slot .cap { position: absolute; top: 5px; left: 5px; min-width: 18px; height: 18px; font-size: 12px; }
.slot.sel { color: #fff; border-color: var(--blue-hi); background: linear-gradient(180deg, rgba(47,134,255,.35), rgba(10,24,48,.85)); }
.slot.locked { opacity: .35; }

/* tool readout (bottom-right) */
.readout { position: absolute; right: 14px; bottom: 14px; padding: 10px 14px; min-width: 190px; font: 700 13px 'Barlow'; }
.readout .ln { display: flex; justify-content: space-between; gap: 16px; margin: 2px 0; }
.readout .ln span:first-child { color: var(--muted); letter-spacing: .1em; }
.readout .ln b { font: 800 16px 'Barlow Condensed'; }
.readout.hidden { opacity: 0; }
.readout .keys { margin-top: 6px; font: 600 11px 'Barlow'; color: var(--muted); display: flex; gap: 10px; }

/* toasts */
.toasts { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.toast { padding: 8px 16px; font: 700 15px 'Barlow'; animation: toast 3.2s var(--ease) forwards; }
.toast.good { border-color: rgba(61,220,132,.5); }
.toast.bad { border-color: rgba(255,90,79,.5); }
.toast.gold { border-color: rgba(242,194,0,.6); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.floatcash { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font: 800 42px 'Barlow Condensed'; color: #7dffb5; text-shadow: 0 3px 12px rgba(0,0,0,.6); animation: floatcash 1.8s var(--ease) forwards; }
@keyframes floatcash { from { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.05); } to { opacity: 0; transform: translate(-50%, -60px); } }

/* modal */
.modal-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 10, 22, .55); pointer-events: auto; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: 440px; padding: 22px 24px; }
.modal h2 { margin: 0; font: 800 34px/1 'Barlow Condensed'; letter-spacing: .03em; }
.modal .band { font: 800 16px 'Barlow Condensed'; letter-spacing: .18em; color: var(--yellow); margin-top: 4px; }
.res-row { display: flex; justify-content: space-between; font: 600 15px 'Barlow'; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.res-row b { font: 800 18px 'Barlow Condensed'; }
.res-row.big { border: 0; margin-top: 8px; font-size: 18px; }
.res-row.big b { font-size: 30px; color: #7dffb5; }
.res-sec { margin-top: 14px; }
.btn { pointer-events: auto; cursor: pointer; border: 0; border-radius: 8px; padding: 11px 18px; font: 800 17px 'Barlow Condensed'; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, #3a93ff, #1f6fd6); box-shadow: 0 3px 0 #13468c, 0 8px 18px rgba(31,111,214,.35); transition: transform .12s, filter .12s; display: inline-flex; gap: 8px; align-items: center; }
.btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #13468c; }
.btn.ghost { background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); }
.btn.gold { background: linear-gradient(180deg, #ffd43b, #e0a800); color: #2a1f00; box-shadow: 0 3px 0 #9a7400; }
.btn[disabled] { opacity: .45; cursor: default; transform: none; filter: grayscale(.4); }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }

/* ---------- business tablet (full-screen layout around the HUD's logo, job card and wallet) ---------- */
.modal-wrap { z-index: 2; }
.layer.tablet-open .hudlogo, .layer.tablet-open .jobcard, .layer.tablet-open .wallet, .layer.tablet-open .toasts { z-index: 3; }
.layer.tablet-open .belt, .layer.tablet-open .readout, .layer.tablet-open .objective, .layer.tablet-open .prompt,
.layer.tablet-open .xhair, .layer.tablet-open .aimlabel, .layer.tablet-open .wrow { visibility: hidden; }
.tablet { position: absolute; inset: 0; pointer-events: none; }
.tablet > * { pointer-events: auto; }

.topnav { position: absolute; top: 18px; left: 240px; height: 74px; display: flex; padding: 4px; gap: 0; border-radius: 12px; }
.navbtn { cursor: pointer; border: 0; background: transparent; color: #e6eefc; width: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font: 800 14px 'Barlow Condensed'; letter-spacing: .03em; border-radius: 9px; position: relative; transition: background .15s, color .15s; }
.navbtn + .navbtn::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: rgba(120,170,255,.22); }
.navbtn .ico { font-size: 27px; }
.navbtn:hover { background: rgba(80,150,255,.12); }
.navbtn.sel { background: linear-gradient(180deg, #1f5fd0, #123e95); box-shadow: 0 0 0 1.5px #5aa8ff, var(--glow); color: #fff; }
.navbtn.sel::before, .navbtn.sel + .navbtn::before { display: none; }

.tpanel { position: absolute; top: 106px; left: 284px; right: 16px; bottom: 14px; display: flex; flex-direction: column; overflow: hidden; padding: 16px 18px 12px; }
.tpanel.split { display: grid; grid-template-columns: 200px 1fr; padding: 0; }
.tclose { position: absolute; left: 16px; bottom: 14px; height: 48px; padding: 0 22px 0 12px; display: flex; align-items: center; gap: 14px; cursor: pointer; color: #fff;
  font: 800 22px 'Barlow Condensed'; letter-spacing: .04em; }
.tclose .cap { height: 28px; min-width: 40px; font-size: 16px; }
.tclose:hover { border-color: #8cc4ff; }

/* category rail */
.subnav { display: flex; flex-direction: column; padding: 10px 8px; gap: 2px; border-right: 1px solid rgba(120,170,255,.22); background: rgba(3,12,30,.35); overflow-y: auto; }
.sublogo { width: 150px; margin: 2px auto 10px; display: block; }
.catbtn { cursor: pointer; border: 0; background: transparent; color: #e6eefc; text-align: left; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 9px;
  border-bottom: 1px solid rgba(120,170,255,.12); transition: background .15s; }
.catbtn .ico { font-size: 30px; flex: none; }
.catbtn b { display: block; font: 800 17px/1.05 'Barlow Condensed'; letter-spacing: .02em; text-transform: uppercase; }
.catbtn small { display: block; font: 500 12px 'Barlow'; color: #c3d2ea; margin-top: 2px; }
.catbtn:hover { background: rgba(80,150,255,.1); }
.catbtn.sel { background: linear-gradient(180deg, #1f5fd0, #123e95); box-shadow: 0 0 0 1.5px #5aa8ff, var(--glow); border-bottom-color: transparent; clip-path: polygon(0 0, 94% 0, 100% 50%, 94% 100%, 0 100%); }

/* page header */
.pmain { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px 10px; overflow: hidden; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 10px; }
.phead h2 { margin: 0; font: 800 44px/1 'Barlow Condensed'; letter-spacing: .02em; }
.phead p { margin: 4px 0 0; font: 500 16px 'Barlow'; color: #e0e9f8; }
.balance { flex: none; display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 16px; border-radius: 10px; background: rgba(3,12,30,.55); border: 1px solid rgba(90,160,255,.45); }
.balance .ico { font-size: 34px; }
.balance small { display: block; font: 800 13px 'Barlow Condensed'; letter-spacing: .06em; }
.balance b { font: 800 32px/1 'Barlow Condensed'; color: #5cf07a; }
.scroll { flex: 1; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: #2f86ff transparent; }
.scroll::-webkit-scrollbar { width: 5px; }
.scroll::-webkit-scrollbar-thumb { background: #2f86ff; border-radius: 3px; }

/* upgrade line: hero + three product cards */
.uprow { display: grid; grid-template-columns: 210px 1fr; gap: 8px; padding: 6px; margin-bottom: 8px; border-radius: 10px; background: rgba(8,24,56,.6); border: 1px solid rgba(90,160,255,.3); }
.hero { position: relative; border-radius: 8px; overflow: hidden; min-height: 150px; }
.hero h4 { position: absolute; z-index: 1; left: 10px; top: 6px; margin: 0; font: 800 23px 'Barlow Condensed'; letter-spacing: .02em; text-shadow: 0 0 10px rgba(40,120,255,.9), 0 2px 4px #000; }
.heroimg { position: absolute; inset: 0; }
.heroimg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pcard { display: flex; flex-direction: column; align-items: stretch; padding: 7px 8px 8px; border-radius: 9px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.4); text-align: center; min-width: 0; }
.pname { font: 800 16px/1.1 'Barlow Condensed'; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdesc { font: 500 12.5px/1.3 'Barlow'; color: #d6e2f5; margin: 6px 0 7px; flex: 1; }
.shot { position: relative; aspect-ratio: 2.8 / 1; border-radius: 6px; overflow: hidden; background: #000; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot.empty, .heroimg.empty, .thumb.empty { background: #000; display: grid; place-items: center; }
.soon { font: 800 11px 'Barlow Condensed'; letter-spacing: .22em; color: rgba(255,255,255,.28); }
.heroimg.empty .soon { margin-top: 30px; }
.lockbadge { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,16,30,.8); font-size: 18px; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.pcard.is-locked .shot img { filter: saturate(.85) brightness(.85); }

/* card action plates */
.buy, .plate { height: 34px; border-radius: 7px; display: grid; place-items: center; font: 800 20px/1 'Barlow Condensed'; letter-spacing: .02em; }
.buy { pointer-events: auto; cursor: pointer; border: 0; width: 100%; color: var(--buy-ink); background: linear-gradient(180deg, var(--buy-hi), var(--buy-lo));
  box-shadow: 0 0 12px rgba(80,240,100,.35), inset 0 1px 0 rgba(255,255,255,.45); transition: filter .12s, transform .12s; font-size: 22px; }
.buy:hover { filter: brightness(1.08); transform: translateY(-1px); }
.buy:active { transform: translateY(1px); }
.buy[disabled] { cursor: default; filter: saturate(.45) brightness(.72); box-shadow: none; transform: none; }
.plate.equipped { color: #fff; background: linear-gradient(180deg, var(--eq-hi), var(--eq-lo)); box-shadow: 0 0 0 1.5px #3f8cff; font-size: 19px; }
.plate.owned { color: #cfe0ff; background: rgba(40,80,150,.45); box-shadow: 0 0 0 1px rgba(90,160,255,.35); font-size: 16px; padding: 0 10px; }
.plate.locked { color: var(--lock-ink); background: var(--lock-bg); font-size: 15px; letter-spacing: .03em; }

/* other tabs */
.biggrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bigcard { display: flex; flex-direction: column; padding: 8px; border-radius: 10px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.4); }
.bigcard .shot.wide { aspect-ratio: 3.6 / 1; }
.bigtxt { text-align: left; padding: 8px 2px 0; flex: 1; }
.bigtxt .pname { font-size: 20px; }
.bigtxt .pdesc { margin: 0 0 8px; }
.lrow { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 7px; margin-bottom: 6px; border-radius: 9px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.3); }
.lrow .pname { text-align: left; margin: 0; }
.lrow .pdesc { text-align: left; margin: 2px 0 0; }
.lrow .plate { padding: 0 14px; }
.thumb { width: 76px; height: 50px; object-fit: cover; border-radius: 6px; }
.rowico { font-size: 30px; justify-self: center; color: #7cc4ff; }
.grp { margin: 14px 0 8px; font: 800 16px 'Barlow Condensed'; letter-spacing: .08em; color: #9fc4ff; }
.homegrid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-bottom: 10px; }
.hcard { padding: 14px 16px; border-radius: 10px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.4); }
.hcard h4 { margin: 0 0 10px; font: 800 20px 'Barlow Condensed'; letter-spacing: .04em; }
.hcard p { margin: 8px 0; font: 500 14px 'Barlow'; color: #d6e2f5; }
.hcard p.big { font: 800 24px 'Barlow Condensed'; color: #fff; }
.hcard .buy { width: auto; padding: 0 18px; display: inline-grid; }
.lvlbar { height: 10px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.lvlbar i { display: block; height: 100%; background: linear-gradient(90deg, #2f86ff, #5fd0ff); box-shadow: var(--glow); }
.unlocks { display: flex; flex-wrap: wrap; gap: 6px; }
.tagpill { font: 800 13px 'Barlow Condensed'; letter-spacing: .06em; padding: 4px 9px; border-radius: 5px; background: rgba(242,194,0,.15); color: var(--yellow); box-shadow: inset 0 0 0 1px rgba(242,194,0,.4); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { padding: 14px; border-radius: 9px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.3); }
.stat .k { font: 700 11px 'Barlow'; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.stat .v { font: 800 28px 'Barlow Condensed'; margin-top: 2px; }
.setting { display: grid; grid-template-columns: 180px 1fr 60px; gap: 12px; align-items: center; padding: 10px 0; font: 600 15px 'Barlow'; }
.setting input[type=range] { pointer-events: auto; width: 100%; accent-color: var(--blue-hi); }

/* click to play */
.clickplay { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: auto; cursor: pointer; background: rgba(4,10,22,.35); }
.clickplay .panel { padding: 18px 26px; text-align: center; }
.clickplay .t { font: 800 26px 'Barlow Condensed'; letter-spacing: .06em; }
.clickplay .keys { margin-top: 10px; display: grid; grid-template-columns: auto auto; gap: 6px 14px; text-align: left; font: 600 14px 'Barlow'; color: var(--muted); }
.clickplay .keys span:nth-child(odd) { text-align: right; }
.hidden { opacity: 0; pointer-events: none !important; }

/* ---------- mockup art (icons were painted on the panel colour: lighten melts their backdrop away) ---------- */
.art { mix-blend-mode: lighten; }
.cashimg { width: 42px; height: auto; flex: none; }
.balance .cashimg { width: 50px; }
.plate .ico, .buy .ico { font-size: .95em; margin-right: 8px; vertical-align: -2px; }
.plate.locked { display: flex; align-items: center; justify-content: center; }
.buy.short { display: flex; flex-direction: column; justify-content: center; line-height: 1; height: 38px; }
.buy.short b { font-size: 19px; }
.buy.short small { font: 800 10px 'Barlow Condensed'; letter-spacing: .08em; opacity: .85; margin-top: 1px; }
.fullbar { height: 40px; font-size: 21px; margin-top: auto; }
.buy.fullbar.short { height: 44px; }

/* header art */
.phead { position: relative; min-height: 84px; }
.phead.has-banner { margin: -14px -16px 6px; padding: 14px 16px 10px; overflow: hidden; border-bottom: 1px solid rgba(90,160,255,.3); }
.pbanner { position: absolute; right: 190px; top: 0; height: 100%; width: auto; max-width: 62%; object-fit: cover;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 30%); mask-image: linear-gradient(90deg, transparent 0, #000 30%); }
.phead > .ptitle, .phead > .balance, .phead > .picon { position: relative; z-index: 1; }
.ptitle { flex: 1; }
.phead h2 { text-shadow: 0 0 18px rgba(60,140,255,.6); }
.picon { width: 74px; height: auto; margin-right: 4px; }
.balance { z-index: 1; }

/* home */
.homegrid { grid-template-columns: 1.55fr 1fr; }
.hcard.goal { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.goalico { width: 96px; border-radius: 10px; }
.tagpill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 6px 12px; border-radius: 7px; }
.tagpill .ico { font-size: 14px; }
.hcard.next { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 10px; }
.nextimg { height: 118px; border-radius: 8px; overflow: hidden; background: #000; display: grid; place-items: center; }
.nextart { width: 100%; height: 100%; object-fit: cover; }
.nextname { font: 800 22px/1.1 'Barlow Condensed'; }
.hcard.next p { margin: 4px 0 8px; font-size: 13px; }
.viewbtn { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 21px; }
.stiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.stile { padding: 10px 10px 12px; border-radius: 10px; background: var(--card-bg); border: 1px solid rgba(90,160,255,.4); text-align: center; }
.stico { height: 64px; width: auto; max-width: 100%; display: block; margin: 0 auto 4px; }
.stile .k { font: 800 14px 'Barlow Condensed'; letter-spacing: .03em; }
.stile .v { font: 800 30px/1.1 'Barlow Condensed'; }
.sbar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; margin-top: 6px; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, #2f86ff, #5fd0ff); }
.sbar.green i { background: linear-gradient(90deg, #22c13a, #63f76e); }

/* expansions */
.bigcard .pname { font-size: 23px; letter-spacing: .02em; }
.perks { display: flex; gap: 14px; flex-wrap: wrap; padding: 2px 2px 8px; }
.perk { display: inline-flex; align-items: center; gap: 6px; font: 600 13px 'Barlow'; color: #7cf09a; }
.perk:nth-child(2) { color: #ffd23f; }
.perk:nth-child(3) { color: #7cc4ff; }
.perkico { width: 26px; height: auto; }
.bigcard .shot .lockbadge { top: 10px; right: 10px; transform: none; width: 38px; height: 38px; font-size: 22px; box-shadow: 0 0 0 2px rgba(90,160,255,.7); }

/* employees */
.empshot { position: relative; }
.bigcard.emp .shot.wide { aspect-ratio: 2.5 / 1; }
.lvbadge { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 6px 0 10px 0;
  background: rgba(6,16,36,.85); font-size: 24px; }
.lvbadge b { display: block; font: 800 17px/1 'Barlow Condensed'; }
.lvbadge small { display: block; font: 800 12px 'Barlow Condensed'; letter-spacing: .06em; color: #c9d7ee; }
.empname { position: absolute; left: 0; bottom: 0; padding: 6px 30px 4px 10px; font: 800 28px/1 'Barlow Condensed'; letter-spacing: .02em;
  background: linear-gradient(90deg, rgba(6,16,36,.95) 70%, transparent); clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%); }
.pdesc .hl { color: #6fb8ff; }
.estats { margin: 2px 0 8px; padding: 8px 10px; border-radius: 8px; background: rgba(3,12,30,.45); border: 1px solid rgba(90,160,255,.25); }
.estat { display: grid; grid-template-columns: 28px 90px 1fr; align-items: center; gap: 8px; margin: 3px 0; font: 700 13px 'Barlow Condensed'; letter-spacing: .06em; }
.esico { width: 26px; height: auto; }
.segs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.segs i { height: 10px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.segs b { display: block; height: 100%; background: linear-gradient(90deg, #1f8cff, #4fc8ff); box-shadow: 0 0 6px rgba(60,160,255,.6); }
/* soften the square backdrop the icon art was cut from */
.stico, .perkico, .esico, .picon { -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
.hcard .viewbtn { display: flex; width: 100%; padding: 0 12px; gap: 8px; }
.phead.has-banner { min-height: 112px; }
.pbanner { right: 0; max-width: 72%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); }
.scroll.home { display: flex; flex-direction: column; }
.scroll.home .homegrid { min-height: 170px; }
.scroll.home .stiles { flex: 1; min-height: 190px; }
.stile { display: flex; flex-direction: column; justify-content: center; }
.stico { height: 84px; }
.stile .k { font-size: 16px; }
.stile .v { font-size: 36px; }
.bigcard > .shot, .empshot { flex: none; }
.balance { background: rgba(3,12,30,.92); }
.phead.has-banner .pbanner { right: 170px; max-width: 64%; }
.jtags { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.jtags .status { margin-top: 0; }
.tier { font: 800 12px/1 'Barlow Condensed'; letter-spacing: .06em; color: #9fc4ff; padding: 3px 6px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(120,170,255,.4); }

/* ---------- world markers over tool stations and terminals ---------- */
.wmarks { position: absolute; inset: 0; pointer-events: none; }
.wmark { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; margin: -20px 0 0 -20px; opacity: 0;
  transition: opacity .25s; will-change: transform; }
.wpic { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: #06122a; display: grid; place-items: center; font-size: 22px; color: #9fc4ff;
  box-shadow: 0 0 0 2px rgba(90,160,255,.75), 0 4px 10px rgba(0,0,0,.5); flex: none; }
.wpic img { width: 100%; height: 100%; object-fit: cover; object-position: 20% 50%; }
.wtxt { display: flex; flex-direction: column; padding: 3px 8px; border-radius: 6px; background: rgba(6,16,36,.78); white-space: nowrap; }
.wtxt b { font: 800 13px/1.1 'Barlow Condensed'; letter-spacing: .04em; }
.wtxt small { font: 700 11px/1.1 'Barlow Condensed'; letter-spacing: .06em; color: #9fc4ff; }
.wmark.focus .wpic { box-shadow: 0 0 0 3px #f2c200, 0 0 18px rgba(242,194,0,.7); animation: wpulse 1.1s ease-in-out infinite; }
.wmark.focus .wtxt small { color: var(--yellow); }
@keyframes wpulse { 50% { transform: scale(1.12); } }
.wmark .warrow { display: none; position: absolute; left: 14px; top: 14px; width: 12px; height: 12px; border: solid var(--yellow); border-width: 3px 3px 0 0;
  transform: rotate(calc(var(--a) + 45deg)) translate(22px, 0); transform-origin: 6px 6px; }
.wmark.edge .warrow { display: block; }
.wmark.edge .wtxt { display: none; }
.layer.tablet-open .wmarks { visibility: hidden; }

/* foam tank gauge on the foam cannon's belt slot */
.slot .gauge { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.slot .gauge i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #5fb0ff, #bfe4ff); transition: width .2s; }
.slot .gauge i.low { background: var(--red); animation: gaugeblink .8s steps(2) infinite; }
@keyframes gaugeblink { 50% { opacity: .35; } }

/* ---------- touch (html.is-touch comes from core/device.js, also under ?device=phone) ---------- */
html, body { touch-action: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
/* insets as variables so tools/mobile.html can wear a notch (env() is always 0 on desktop) */
html.is-touch { --safe-l: env(safe-area-inset-left); --safe-r: env(safe-area-inset-right); --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom); }
html.is-touch #ui { left: var(--safe-l); right: var(--safe-r); top: var(--safe-t); bottom: var(--safe-b); }
html.is-touch .cap, html.is-touch .readout .keys, html.is-touch .hudlogo, html.is-touch .prompt .sub { display: none; }
html.is-touch .jobcard { top: 12px; left: 12px; }
html.is-touch .layer.tablet-open .jobcard { display: none; }
html.is-touch .layer.tablet-open .wallet { visibility: hidden; }
html.is-touch .topnav { left: 12px; }
html.is-touch .tpanel { left: 12px; right: 12px; bottom: 70px; }
html.is-touch .tclose { left: auto; right: 12px; bottom: 10px; height: 52px; }
html.is-touch .readout { display: none; }   /* belt gauge + buttons carry it; the corner belongs to TABLET */
html.is-touch .prompt { top: 58%; }
html.is-touch .belt { bottom: 10px; }
html.is-touch .slot { pointer-events: auto; cursor: pointer; width: 84px; height: 62px; }
html.is-touch .slot .cap { display: none; }
html.is-touch .slot { padding-top: 14px; }
html.is-touch .pdesc { font-size: 14px; }
html.is-touch .buy, html.is-touch .plate { height: 42px; }
html.is-touch .catbtn { padding: 14px 10px; }
html.is-touch .clickplay .keys span:nth-child(odd) { font: 800 13px 'Barlow Condensed'; color: #fff; letter-spacing: .04em; }

#touch { position: fixed; inset: 0; z-index: 5; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#touch.off { visibility: hidden; }
.tstick { display: none; position: absolute; left: 0; top: 0; width: 0; height: 0; }
.tstick::before { content: ''; position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(160,200,255,.45); background: rgba(10,30,70,.25); }
.tstick i { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; background: rgba(95,176,255,.55); box-shadow: 0 0 12px rgba(95,176,255,.6); }
.tbtn { position: absolute; pointer-events: auto; touch-action: none; border: 0; border-radius: 50%; color: #fff; display: grid; place-items: center; padding: 0;
  font: 800 min(3.6vmin, 17px)/1 'Barlow Condensed'; letter-spacing: .04em; text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(47,134,255,.75), rgba(12,36,84,.85)); box-shadow: 0 0 0 2px rgba(140,190,255,.7), 0 6px 16px rgba(0,0,0,.45); }
.tbtn span { max-width: 88%; }
.tbtn.held { filter: brightness(1.3); transform: scale(.94); }
.tbtn[hidden] { display: none; }
.tbtn.use { right: max(18px, var(--safe-r, 0px)); bottom: max(22px, var(--safe-b, 0px)); width: min(24vmin, 118px); height: min(24vmin, 118px); font-size: min(4.6vmin, 23px); }
.tbtn.use.dim { opacity: .45; }
.tbtn.act { right: calc(max(18px, var(--safe-r, 0px)) + min(25vmin, 124px)); bottom: max(22px, var(--safe-b, 0px));
  width: min(18vmin, 90px); height: min(18vmin, 90px); opacity: .6; }
.tbtn.act.ready { opacity: 1; background: radial-gradient(circle at 50% 35%, #ffd84a, #b88a00); color: #2a1f00; animation: tready 1s ease-in-out infinite; }
@keyframes tready { 50% { box-shadow: 0 0 0 3px #fff3b0, 0 0 22px rgba(242,194,0,.8); } }
.tbtn.small { width: min(13vmin, 64px); height: min(13vmin, 64px); font-size: min(2.8vmin, 13px); border-radius: 16px; }
.tbtn.alt { right: max(22px, var(--safe-r, 0px)); bottom: calc(max(22px, var(--safe-b, 0px)) + min(26vmin, 128px)); }
.tbtn.nozzle { right: max(22px, var(--safe-r, 0px)); bottom: calc(max(22px, var(--safe-b, 0px)) + min(26vmin, 128px)); }
.tbtn.inspect { right: calc(max(18px, var(--safe-r, 0px)) + min(27vmin, 132px)); bottom: calc(max(22px, var(--safe-b, 0px)) + min(20vmin, 100px)); }
.tbtn.crouch { right: calc(max(22px, var(--safe-r, 0px)) + min(15vmin, 74px)); bottom: calc(max(22px, var(--safe-b, 0px)) + min(26vmin, 128px)); }
.tbtn.crouch.on { background: radial-gradient(circle at 50% 35%, #ffd84a, #b88a00); color: #2a1f00; }
.tbtn.tabletbtn { right: max(14px, var(--safe-r, 0px)); top: calc(max(12px, var(--safe-t, 0px)) + min(20vmin, 96px)); }

/* portrait phones: the site enforces landscape, this only explains it */
#rotate { display: none; position: fixed; inset: 0; z-index: 60; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: #07142c; color: #fff; font: 800 22px 'Barlow Condensed'; letter-spacing: .08em; }
#rotate i { width: 46px; height: 80px; border: 4px solid #5fb0ff; border-radius: 9px; animation: rot 1.6s ease-in-out infinite; }
@keyframes rot { 40%, 60% { transform: rotate(90deg); } }
@media (orientation: portrait) { html.is-touch #rotate { display: flex; } }
html.is-touch .objective { top: 136px; max-width: 440px; font-size: 14px; }
html.is-touch .toasts { top: 180px; }
.scroll, .subnav { touch-action: pan-y; -webkit-overflow-scrolling: touch; }
