/* NullSocket — game HUD theme v7 */
:root {
  --bg: #04060b; --bg2: #070b14;
  --panel: rgba(9, 15, 26, .86); --panel2: rgba(18, 30, 48, .9); --panel3: rgba(26, 42, 66, .9);
  --line: rgba(57, 255, 136, .16); --line2: rgba(41, 230, 255, .22);
  --fg: #dff7ea; --dim: #7d97a8; --mute: #4a5d6c;
  --acc: #39ff88; --acc2: #29e6ff; --mag: #ff2bd6; --acc-ink: #02140a;
  --warn: #ffb800; --bad: #ff3b5c; --info: #29e6ff; --gold: #ffd34d;
  --glow: 0 0 12px rgba(57, 255, 136, .45); --glow2: 0 0 14px rgba(41, 230, 255, .45);
  --mono: "Share Tech Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --disp: "Orbitron", "Share Tech Mono", sans-serif;
  --r: 4px; --cut: 14px; --navh: 66px; --toph: 60px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--mono); font-size: 15px; -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100vh; overflow-x: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(41, 230, 255, .12), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255, 43, 214, .08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(57, 255, 136, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%);
  mix-blend-mode: multiply;
}
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .35; }
.gridfloor {
  position: fixed; left: -50%; right: -50%; bottom: 0; height: 45vh; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(41,230,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(41,230,255,.18) 1px, transparent 1px);
  background-size: 60px 60px; transform: perspective(380px) rotateX(62deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 85%); -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 85%);
  animation: floor 4s linear infinite;
}
@keyframes floor { to { background-position: 0 60px; } }
#app { position: relative; z-index: 1; }
a { color: var(--acc); text-decoration: none; transition: color .15s, text-shadow .15s; }
a:hover { text-shadow: var(--glow); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0 0 .7rem; font-weight: 700; }
h2 { font-family: var(--disp); font-size: 1.02rem; color: var(--acc); text-transform: uppercase; letter-spacing: .12em; text-shadow: var(--glow); }
h2::before { content: "//"; color: var(--mag); margin-right: .45em; text-shadow: 0 0 10px rgba(255,43,214,.6); }
h3 { font-family: var(--disp); font-size: .72rem; font-weight: 600; color: var(--acc2); text-transform: uppercase; letter-spacing: .18em; display: flex; align-items: center; gap: 8px; }
h3::before { content: ""; width: 7px; height: 7px; background: var(--acc2); box-shadow: var(--glow2); transform: rotate(45deg); flex: 0 0 7px; }
.dim { color: var(--dim); }
.ok { color: var(--acc); } .bad { color: var(--bad); } .warn { color: var(--warn); } .info { color: var(--info); }
.big.ok, .stat.money { text-shadow: var(--glow); }
::selection { background: var(--acc); color: var(--acc-ink); }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(57,255,136,.25); border-radius: 4px; }
svg.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.15em; }
#topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: calc(var(--toph) + var(--sat)); padding: calc(8px + var(--sat)) 14px 8px;
  background: linear-gradient(180deg, rgba(4,8,16,.97), rgba(6,12,22,.9)); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line2); box-shadow: 0 1px 0 rgba(41,230,255,.08), 0 8px 30px rgba(0,0,0,.5);
}
#topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--acc2), var(--mag), transparent); opacity: .7; }
.brand { position: relative; font-family: var(--disp); font-weight: 900; font-size: 1.05rem; color: var(--fg); white-space: nowrap; letter-spacing: .06em; text-transform: uppercase; }
.brand span { color: var(--acc); text-shadow: var(--glow); }
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; opacity: .8; }
.glitch::before { color: var(--mag); animation: glitchA 3.2s infinite steps(1); clip-path: inset(0 0 60% 0); }
.glitch::after { color: var(--acc2); animation: glitchB 2.7s infinite steps(1); clip-path: inset(55% 0 0 0); }
@keyframes glitchA { 0%, 88%, 100% { transform: none; opacity: 0; } 89% { transform: translate(-3px, -1px); opacity: .85; } 91% { transform: translate(3px, 1px); } 93% { transform: translate(-1px, 0); opacity: 0; } }
@keyframes glitchB { 0%, 82%, 100% { transform: none; opacity: 0; } 83% { transform: translate(3px, 1px); opacity: .85; } 86% { transform: translate(-3px, 0); } 88% { opacity: 0; } }
.top-stats { display: flex; align-items: center; gap: 8px; font-size: .8rem; min-width: 0; }
.stat { white-space: nowrap; }
.hud-lvl { display: flex; align-items: center; gap: 8px; }
.hex {
  display: grid; place-items: center; width: 34px; height: 38px; flex: 0 0 34px; font-family: var(--disp); font-weight: 800; font-size: .8rem; color: var(--acc-ink);
  background: linear-gradient(160deg, var(--acc), #12c964); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: drop-shadow(0 0 6px rgba(57,255,136,.6));
}
.hud-xp { width: 74px; display: none; }
.hud-xp small { display: block; font-size: .6rem; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.hud-xp .bar { margin-top: 3px; height: 5px; }
.stat.money {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-weight: 700; font-size: .85rem; color: var(--acc);
  padding: 6px 12px 6px 10px; background: rgba(57,255,136,.08); border: 1px solid rgba(57,255,136,.35);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); position: relative;
}
.stat.money .coin { color: var(--gold); filter: drop-shadow(0 0 4px rgba(255,211,77,.7)); }
.stat.money.bump { animation: bump .45s ease-out; }
@keyframes bump { 30% { transform: scale(1.12); background: rgba(57,255,136,.25); } }
#top-ip { display: none; color: var(--acc2); font-size: .78rem; padding: 4px 8px; border: 1px solid var(--line2); background: rgba(41,230,255,.06); }
#top-ip::before { content: "IP "; color: var(--dim); }
#top-online { display: none; align-items: center; gap: 6px; color: var(--dim); }
#top-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.iconbtn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; color: var(--fg); background: rgba(255,255,255,.03); border: 1px solid var(--line2); cursor: pointer; padding: 0; font-size: 1.05rem; transition: .15s; }
.iconbtn:hover { color: var(--acc2); box-shadow: var(--glow2); text-shadow: none; }
.iconbtn.off { color: var(--mute); }
.bell b, #nav b, .tiles a b {
  position: absolute; top: -6px; right: -6px; min-width: 18px; text-align: center; background: var(--bad); color: #fff; font-family: var(--disp); font-size: .6rem; font-weight: 700;
  border-radius: 9px; padding: 2px 5px; box-shadow: 0 0 10px rgba(255,59,92,.8); animation: pulse 1.4s infinite;
}
#view { position: relative; padding: 18px 14px calc(var(--navh) + 28px + var(--sab)); max-width: 1020px; margin: 0 auto; }
#view > * { animation: rise .35s ease-out both; }
#view > *:nth-child(2) { animation-delay: .04s; } #view > *:nth-child(3) { animation-delay: .08s; } #view > *:nth-child(4) { animation-delay: .12s; } #view > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; height: calc(var(--navh) + var(--sab)); padding-bottom: var(--sab);
  background: linear-gradient(0deg, rgba(4,8,16,.98), rgba(7,13,24,.94)); backdrop-filter: blur(10px); border-top: 1px solid var(--line2);
}
#nav::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--acc), transparent); opacity: .6; }
#nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--dim); font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; transition: color .15s; }
#nav a i { font-style: normal; font-size: 1.35rem; line-height: 1; display: grid; place-items: center; width: 40px; height: 30px; transition: .2s; }
#nav a.on { color: var(--acc); text-shadow: var(--glow); }
#nav a.on i { filter: drop-shadow(0 0 6px rgba(57,255,136,.8)); transform: translateY(-2px); }
#nav a.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--acc); box-shadow: 0 0 12px var(--acc), 0 0 2px var(--acc); }
#nav a.desk { display: none; }
#nav b { top: 6px; right: calc(50% - 24px); }
@media (min-width: 900px) {
  #top-ip, .hud-xp { display: inline-block; }
  #top-online { display: inline-flex; }
  #nav { top: calc(var(--toph) + var(--sat)); bottom: 0; right: auto; width: 214px; height: auto; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 16px 10px; border-top: 0; border-right: 1px solid var(--line2); }
  #nav::before { top: 0; bottom: 0; left: auto; right: -1px; width: 1px; height: auto; background: linear-gradient(180deg, var(--acc2), transparent 70%); }
  #nav::after { content: "SYS.MENU"; order: -1; font-family: var(--disp); font-size: .6rem; letter-spacing: .3em; color: var(--mute); padding: 0 12px 10px; }
  #nav a.desk { display: flex; }
  #nav { overflow-y: auto; }
  #nav a, #nav a.desk { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; font-size: .78rem; letter-spacing: .14em; border: 1px solid transparent; }
  #nav a i { width: 22px; height: 22px; font-size: 1.15rem; }
  #nav a:hover { color: var(--fg); background: rgba(41,230,255,.05); }
  #nav a.on { background: linear-gradient(90deg, rgba(57,255,136,.16), transparent); border-color: rgba(57,255,136,.25); }
  #nav a.on::before { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; }
  #nav a.on i { transform: none; }
  #nav b { position: static; margin-left: auto; }
  #view { padding: 26px 28px 56px; margin-left: 214px; }
  body.no-nav #view { margin: 0 auto; }
}
.card {
  position: relative; background: linear-gradient(160deg, var(--panel2) 0%, var(--panel) 45%); border: 1px solid var(--line);
  padding: 16px; margin-bottom: 14px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 40px rgba(57,255,136,.025);
}
.card::before, .card::after { content: ""; position: absolute; width: var(--cut); height: var(--cut); pointer-events: none; }
.card::before { top: 0; right: 0; background: linear-gradient(to bottom left, transparent calc(50% - 1px), var(--acc) 50%, transparent calc(50% + 1.5px)); filter: drop-shadow(0 0 3px var(--acc)); }
.card::after { bottom: 0; left: 0; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--acc2) 50%, transparent calc(50% + 1.5px)); filter: drop-shadow(0 0 3px var(--acc2)); }
a.card { transition: border-color .2s, transform .2s, box-shadow .2s; }
a.card:hover { border-color: rgba(57,255,136,.45); transform: translateY(-2px); text-shadow: none; }
.grid { display: grid; gap: 14px; }
.grid > .card { margin-bottom: 0; }
.grid.two { margin-bottom: 14px; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row + .row { margin-top: 10px; }
.stack > * + * { margin-top: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: .88rem; margin: 0; }
.kv dt { color: var(--dim); text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; align-self: center; }
.kv dd { margin: 0; text-align: right; word-break: break-all; }
.big { font-family: var(--disp); font-size: 1.45rem; font-weight: 800; letter-spacing: .03em; }
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--acc); background: linear-gradient(180deg, #5bffa0, var(--acc) 50%, #20d872); color: var(--acc-ink);
  font-family: var(--disp); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  box-shadow: 0 0 18px rgba(57,255,136,.35); transition: transform .08s, filter .15s, box-shadow .15s;
}
.btn::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); transition: left .45s; }
.btn:hover:not(:disabled) { filter: brightness(1.1); box-shadow: 0 0 26px rgba(57,255,136,.6); text-shadow: none; }
.btn:hover:not(:disabled)::after { left: 120%; }
.btn.ghost { background: rgba(57,255,136,.07); color: var(--acc); box-shadow: inset 0 0 14px rgba(57,255,136,.12); }
.btn.ghost:hover:not(:disabled) { background: rgba(57,255,136,.16); box-shadow: inset 0 0 18px rgba(57,255,136,.25), 0 0 14px rgba(57,255,136,.25); }
.btn.danger { border-color: var(--bad); background: rgba(255,59,92,.08); color: var(--bad); box-shadow: inset 0 0 14px rgba(255,59,92,.12); }
.btn.danger:hover:not(:disabled) { background: rgba(255,59,92,.18); box-shadow: inset 0 0 18px rgba(255,59,92,.25), 0 0 16px rgba(255,59,92,.35); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .66rem; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; filter: grayscale(.6); box-shadow: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn.danger.block { margin-top: 6px; }
input.field, select.field {
  width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid rgba(41,230,255,.25); background: rgba(2,6,12,.75); color: var(--fg); outline: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: border-color .15s, box-shadow .15s;
}
input.field::placeholder { color: var(--mute); }
input.field:focus, select.field:focus { border-color: var(--acc); box-shadow: inset 0 0 14px rgba(57,255,136,.15); }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.chip {
  display: inline-block; padding: 2px 8px; font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line2); color: var(--dim); background: rgba(255,255,255,.02);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); vertical-align: middle;
}
.chip.ok { border-color: var(--acc); color: var(--acc); background: rgba(57,255,136,.08); }
.chip.warn { border-color: var(--warn); color: var(--warn); background: rgba(255,184,0,.08); }
.chip.bad { border-color: var(--bad); color: var(--bad); background: rgba(255,59,92,.08); }
.chip.info { border-color: var(--info); color: var(--info); background: rgba(41,230,255,.08); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-bottom: 1px dashed rgba(57,255,136,.12); padding: 12px 0; }
.list > li:last-child { border-bottom: 0; }
.list > li > a.row { padding: 4px 8px; margin: -4px -8px; transition: background .15s; }
.list > li > a.row:hover { background: rgba(41,230,255,.05); text-shadow: none; }
a.host { position: relative; display: flex; align-items: center; gap: 14px; color: var(--fg); padding: 12px; margin: 0 -10px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
a.host + a.host { margin-top: 4px; }
a.host:hover { background: linear-gradient(90deg, rgba(41,230,255,.08), transparent); border-color: var(--line2); text-shadow: none; }
a.host:hover .ip { color: var(--acc); }
.host .ico {
  --tc: var(--acc); width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; font-size: 1.35rem; color: var(--tc);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 22%, transparent), rgba(0,0,0,.4));
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); box-shadow: 0 0 14px color-mix(in srgb, var(--tc) 30%, transparent), inset 0 0 10px color-mix(in srgb, var(--tc) 20%, transparent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.ico.t-bank { --tc: var(--gold); } .ico.t-isp { --tc: var(--acc2); } .ico.t-corp { --tc: var(--mag); } .ico.t-university { --tc: #8b8bff; }
.ico.t-warez { --tc: var(--acc); } .ico.t-gov { --tc: var(--bad); } .ico.t-player { --tc: #ff8c42; } .ico.t-hub { --tc: var(--gold); } .ico.t-playerbank { --tc: var(--gold); } .ico.t-boss { --tc: var(--bad); } .ico.t-crew { --tc: var(--mag); }
.host .main { flex: 1; min-width: 0; }
.host .ip { font-family: var(--disp); font-weight: 700; letter-spacing: .05em; transition: color .15s; }
.host .ip.big { font-size: 1.35rem; }
.host .sub { font-size: .8rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.tier {
  font-family: var(--disp); font-size: .68rem; font-weight: 700; color: var(--warn); white-space: nowrap; letter-spacing: .06em;
  padding: 3px 7px; border: 1px solid rgba(255,184,0,.4); background: rgba(255,184,0,.07); text-shadow: 0 0 8px rgba(255,184,0,.5);
}
dd.tier { justify-self: end; }
.bar { position: relative; height: 9px; background: rgba(0,0,0,.5); border: 1px solid rgba(57,255,136,.2); overflow: hidden; margin-top: 8px; }
.bar > i {
  display: block; height: 100%; width: 0; transition: width .5s linear; box-shadow: 0 0 10px var(--acc);
  background: repeating-linear-gradient(-45deg, var(--acc) 0 8px, #22d873 8px 16px); background-size: 22.6px 100%; animation: stripes .8s linear infinite;
}
@keyframes stripes { to { background-position: 22.6px 0; } }
.bar > i.full { background: repeating-linear-gradient(-45deg, var(--warn) 0 8px, #e09a00 8px 16px); box-shadow: 0 0 10px var(--warn); }
.lvl { font-family: var(--disp); font-weight: 800; color: var(--acc); text-shadow: var(--glow); }
.log { font-size: .8rem; display: flex; gap: 10px; align-items: flex-start; }
.log time { color: var(--acc2); opacity: .7; white-space: nowrap; }
.log time::before { content: "["; } .log time::after { content: "]"; }
.log span { flex: 1; word-break: break-word; }
.log .acts { display: flex; gap: 4px; }
.log .acts button { background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--dim); cursor: pointer; padding: 2px 7px; font-size: .85rem; transition: .15s; }
.log .acts button:hover { color: var(--acc); border-color: var(--acc); }
.log a { text-decoration: none; border-bottom: 1px dotted currentColor; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.tiles a {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 2px 12px; color: var(--dim);
  background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); transition: .2s;
}
.tiles a i { font-style: normal; font-size: 1.55rem; color: var(--acc); filter: drop-shadow(0 0 6px rgba(57,255,136,.55)); transition: transform .2s; }
.tiles a:hover { color: var(--fg); border-color: rgba(57,255,136,.5); background: linear-gradient(170deg, rgba(57,255,136,.14), var(--panel)); text-shadow: none; }
.tiles a:hover i { transform: scale(1.15) translateY(-2px); }
.tiles a b { top: 5px; right: 7px; z-index: 1; }
.tiles a:nth-child(4n+2) i { color: var(--acc2); filter: drop-shadow(0 0 6px rgba(41,230,255,.55)); }
.tiles a:nth-child(4n+3) i { color: var(--mag); filter: drop-shadow(0 0 6px rgba(255,43,214,.55)); }
.tiles a:nth-child(4n) i { color: var(--warn); filter: drop-shadow(0 0 6px rgba(255,184,0,.55)); }
.empty { text-align: center; color: var(--dim); padding: 26px 8px; }
.empty::before { content: "◇"; display: block; font-size: 1.6rem; color: var(--mute); margin-bottom: 6px; }
.pw { cursor: pointer; }
.chatbox { display: flex; flex-direction: column; height: calc(100vh - var(--toph) - var(--navh) - 60px - var(--sab)); }
@media (min-width: 900px) { .chatbox { height: calc(100vh - var(--toph) - 80px); } }
.msgs { flex: 1; overflow-y: auto; padding: 8px 10px; background: rgba(0,0,0,.35); border: 1px solid rgba(41,230,255,.12); }
.msg { font-size: .86rem; padding: 5px 0; word-break: break-word; line-height: 1.45; }
.msg b { color: var(--acc); }
.msg b::after { content: " >"; color: var(--mute); font-weight: 400; }
.msg time { color: var(--mute); font-size: .7rem; margin-right: 6px; }
.msg.mine b { color: var(--acc2); }
.msg a { color: inherit; }
.chatbox form { margin-top: 10px; }
.chatbox.crewchat { height: 360px; }
.auth { max-width: 420px; margin: 6vh auto 0; }
.auth .logo { font-family: var(--disp); font-weight: 900; font-size: clamp(2.2rem, 10vw, 3.2rem); text-align: center; letter-spacing: .04em; text-transform: uppercase; margin: 0; line-height: 1.1; }
.auth .logo span { color: var(--acc); text-shadow: 0 0 20px rgba(57,255,136,.7), 0 0 40px rgba(57,255,136,.3); }
.auth .logo.glitch { display: block; }
.auth .tag { text-align: center; color: var(--acc2); margin: 10px 0 18px; letter-spacing: .3em; font-size: .78rem; text-transform: uppercase; }
.boot { font-size: .76rem; color: var(--acc); opacity: .85; min-height: 7.4em; margin: 0 0 14px; padding: 10px 12px; background: rgba(0,0,0,.45); border-left: 2px solid var(--acc); white-space: pre-wrap; line-height: 1.45; }
.boot .d { color: var(--dim); } .boot .w { color: var(--warn); }
.auth .card { padding: 20px; }
.auth .foot { text-align: center; color: var(--mute); font-size: .7rem; margin-top: 14px; letter-spacing: .15em; }
.tabs { display: flex; margin-bottom: 16px; border: 1px solid var(--line2); }
.tabs button { flex: 1; min-height: 42px; background: transparent; border: 0; color: var(--dim); cursor: pointer; font-family: var(--disp); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; transition: .15s; }
.tabs button.on { background: rgba(57,255,136,.12); color: var(--acc); box-shadow: inset 0 -2px 0 var(--acc); text-shadow: var(--glow); }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--navh) + 12px + var(--sab)); z-index: 60; width: min(440px, calc(100% - 28px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { #toasts { left: auto; right: 20px; transform: none; bottom: 20px; width: 380px; } }
.toast {
  --tc: var(--acc); position: relative; overflow: hidden; display: flex; gap: 10px; align-items: flex-start;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tc) 16%, rgba(6,12,22,.97)), rgba(6,12,22,.97) 60%);
  border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); border-left: 3px solid var(--tc);
  padding: 11px 12px 13px; font-size: .84rem; box-shadow: 0 8px 26px rgba(0,0,0,.55), 0 0 18px color-mix(in srgb, var(--tc) 25%, transparent);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); animation: slidein .28s cubic-bezier(.2,.9,.3,1.3);
}
.toast::before { content: "▶"; color: var(--tc); font-size: .7rem; margin-top: 2px; text-shadow: 0 0 8px var(--tc); }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--tc); transform-origin: left; animation: drain var(--ms, 4000ms) linear forwards; }
.toast.bad { --tc: var(--bad); } .toast.bad::before { content: "✖"; }
.toast.warn { --tc: var(--warn); } .toast.warn::before { content: "▲"; }
.toast.info { --tc: var(--info); } .toast.info::before { content: "◆"; }
@keyframes slidein { from { opacity: 0; transform: translateX(30px) scale(.96); } }
@keyframes drain { to { transform: scaleX(0); } }
dialog {
  background: linear-gradient(160deg, rgba(18,30,48,.98), rgba(6,12,22,.98)); color: var(--fg); border: 1px solid var(--line2); width: min(440px, calc(100% - 28px)); padding: 20px;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px)); box-shadow: 0 0 40px rgba(41,230,255,.2);
}
dialog[open] { animation: rise .25s ease-out; }
dialog::backdrop { background: rgba(0,4,10,.75); backdrop-filter: blur(3px); }
dialog .btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
[hidden] { display: none !important; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--acc); cursor: pointer; font: inherit; text-align: right; }
.linkbtn:focus-visible, .btn:focus-visible, a:focus-visible, .field:focus-visible, .iconbtn:focus-visible { outline: 2px solid var(--acc2); outline-offset: 2px; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--acc2); text-align: center; padding: 64px 8px; letter-spacing: .2em; text-transform: uppercase; font-size: .78rem; }
.loading::before { content: ""; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(41,230,255,.15); border-top-color: var(--acc2); border-right-color: var(--acc); animation: spin .8s linear infinite; box-shadow: 0 0 18px rgba(41,230,255,.25); }
@keyframes spin { to { transform: rotate(360deg); } }
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
select.field { padding-right: 8px; min-height: 40px; }
select.field option { background: #0a1220; color: var(--fg); }
details summary { cursor: pointer; color: var(--acc2); }
.toolbar { display: flex; gap: 8px; margin: 12px 0 6px; }
.toolbar select { flex: 1; }
.mission { padding: 12px 0; }
.mission .bar { margin-top: 7px; }
.streak { font-family: var(--disp); font-size: 1.25rem; font-weight: 800; color: var(--warn); text-shadow: 0 0 14px rgba(255,184,0,.6); }
.ach-group { margin: 18px 0 4px; font-family: var(--disp); font-size: .66rem; color: var(--mag); text-transform: uppercase; letter-spacing: .2em; }
.badge-dot { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .66rem; text-align: center; box-shadow: 0 0 8px rgba(255,59,92,.7); }
.motd { padding: 9px 12px; border-left: 3px solid var(--mag); background: rgba(255,43,214,.06); font-size: .86rem; }
.member { display: flex; align-items: center; gap: 8px; padding: 10px 0; flex-wrap: wrap; }
.member .who { flex: 1; min-width: 140px; }
.member .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.rank > a .rk { display: inline-grid; place-items: center; min-width: 30px; height: 26px; margin-right: 6px; font-family: var(--disp); font-size: .72rem; color: var(--dim); border: 1px solid var(--line); }
.rank.r1 { background: linear-gradient(90deg, rgba(255,211,77,.13), transparent); } .rank.r1 .rk { color: #1a1300; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px rgba(255,211,77,.7); }
.rank.r2 { background: linear-gradient(90deg, rgba(200,215,230,.1), transparent); } .rank.r2 .rk { color: #0b0f14; background: #c8d7e6; border-color: #c8d7e6; }
.rank.r3 { background: linear-gradient(90deg, rgba(214,130,70,.12), transparent); } .rank.r3 .rk { color: #160a02; background: #d68246; border-color: #d68246; }
.floater { position: fixed; z-index: 70; pointer-events: none; font-family: var(--disp); font-weight: 800; font-size: .95rem; color: var(--acc); text-shadow: 0 0 10px var(--acc); animation: floatup 1.4s ease-out forwards; }
.floater.neg { color: var(--bad); text-shadow: 0 0 10px var(--bad); }
@keyframes floatup { from { opacity: 0; transform: translateY(6px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } to { opacity: 0; transform: translateY(-46px) scale(1); } }
body.alert::before { content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; box-shadow: inset 0 0 120px rgba(255,59,92,.65); animation: alertflash .9s ease-out forwards; }
body.alert #app { animation: shake .4s; }
@keyframes alertflash { 0%, 30% { opacity: 1; } to { opacity: 0; } }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.levelup { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(57,255,136,.18), transparent 60%); animation: lvfade 2.6s ease-out forwards; }
.levelup div { text-align: center; font-family: var(--disp); text-transform: uppercase; }
.levelup b { display: block; font-size: clamp(2rem, 9vw, 3.6rem); font-weight: 900; color: var(--acc); letter-spacing: .12em; text-shadow: 0 0 24px var(--acc), 0 0 60px rgba(57,255,136,.5); animation: lvpop .6s cubic-bezier(.2,.9,.3,1.5); }
.levelup span { color: var(--acc2); letter-spacing: .4em; font-size: .9rem; }
@keyframes lvfade { 0%, 70% { opacity: 1; } to { opacity: 0; } }
@keyframes lvpop { from { transform: scale(.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
  .gridfloor, #fx { display: none; }
}

.black-market { border-color: var(--mag); box-shadow: 0 0 14px rgba(255,43,214,.18); }
.black-market h3 { color: var(--mag); }

.comp-block { border:1px solid var(--line); background:var(--panel); padding:12px; margin-top:12px; }
.comp-block .comp-head { display:flex; justify-content:space-between; gap:8px; }
.comp-label { font-family:var(--disp); text-transform:uppercase; letter-spacing:.14em; color:var(--acc2); font-size:.72rem; }
.comp-now { display:block; font-weight:700; color:var(--fg); font-size:.95rem; margin-top:2px; }
/* Storefront */
.shop-head h2 { margin:0 }
.shop-cat { margin-top:18px }
.shop-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px; margin-top:10px }
.shop-prod { border:1px solid var(--line); background:var(--panel); padding:12px; display:flex; flex-direction:column; gap:4px; position:relative }
.shop-prod.off { opacity:.55 }
.shop-prod .pbrand { font-size:.62rem; text-transform:uppercase; letter-spacing:.14em; color:var(--acc2) }
.shop-prod .pmodel { font-weight:700; color:var(--fg); font-size:.95rem; line-height:1.15 }
.shop-prod .pspec { font-size:.74rem; color:var(--dim); flex:1 1 auto; min-height:2.2em }
.shop-prod .powned { font-size:.68rem; color:var(--mute) }
.shop-prod .pbuy { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:8px; border-top:1px solid var(--line); padding-top:8px }
.shop-prod .pprice { font-weight:700; color:var(--acc); font-size:.9rem }

/* Product pages & imagery */
.prodshot { width:100%; height:auto; display:block; }
.prodshot g { fill:none; stroke:var(--bc); stroke-width:3; filter:drop-shadow(0 0 4px var(--bc)); }
.prodshot .pg { fill:var(--bc); stroke:none; font-size:12px; font-family:var(--disp); text-anchor:end; filter:none; }
.pshot-wrap { background:radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bc, var(--acc)) 14%, transparent), transparent 70%); border:1px solid var(--line); padding:6px; margin-bottom:8px; cursor:pointer; }
.pshot-wrap.sm { width:60px; height:48px; flex:0 0 60px; margin:0; display:grid; place-items:center; }
.shop-prod .pshot-wrap { aspect-ratio:120/96; display:grid; place-items:center; }
.brandbadge { display:inline-grid; place-items:center; border:1px solid var(--bc); color:var(--bc); font-family:var(--disp); font-weight:800; vertical-align:middle; box-shadow:0 0 8px color-mix(in srgb, var(--bc) 50%, transparent); }
.comp-head .pshot-wrap.sm { cursor:pointer; }
.comp-now { cursor:pointer; }
.product-hero { display:flex; gap:16px; flex-wrap:wrap; }
.product-hero .prodbig { flex:0 0 200px; max-width:100%; background:radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bc) 18%, transparent), transparent 70%); border:1px solid var(--line); padding:14px; display:grid; place-items:center; }
.product-hero .prodinfo { flex:1 1 260px; min-width:240px; }
.perfrow { display:flex; align-items:center; gap:10px; margin:7px 0; }
.perfrow .perflab { flex:0 0 96px; font-size:.75rem; color:var(--dim); }
.perfrow .perfbar { flex:1 1 auto; height:8px; background:rgba(255,255,255,.06); border:1px solid var(--line); overflow:hidden; }
.perfrow .perfbar i { display:block; height:100%; background:linear-gradient(90deg, var(--acc2), var(--acc)); box-shadow:var(--glow); }
.perfrow .perfval { flex:0 0 auto; font-size:.78rem; color:var(--fg); min-width:56px; text-align:right; }
@media (max-width:560px){ .product-hero .prodbig { flex-basis:100%; } }

/* Auth: register-only / login-only fields */
.auth .reg-only { display:none; }
.auth .card.mode-register .reg-only { display:block; }
.auth .card.mode-register .login-only { display:none; }
.authlink a { cursor:pointer; }

/* Editable raw log box */
.logbox { width:100%; min-height:200px; resize:vertical; background:var(--bg2); color:var(--fg); border:1px solid var(--line2);
  font-family:var(--mono); font-size:.8rem; line-height:1.45; padding:10px; white-space:pre; overflow:auto; }
.logbox:focus { outline:none; border-color:var(--acc); box-shadow:var(--glow); }

/* Network-area sub-tabs */
.nettabs { display:flex; gap:6px; margin-bottom:12px; }
.nettabs a { flex:1; text-align:center; padding:8px 4px; border:1px solid var(--line); background:var(--panel); color:var(--dim); font-family:var(--disp); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; }
.nettabs a.on { color:var(--acc-ink); background:var(--acc); border-color:var(--acc); box-shadow:var(--glow); }

/* Storage usage bar (software sizes vs hard-drive capacity) */
.disk { margin: 2px 0 10px; }
.diskbar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.diskfill { display: block; height: 100%; border-radius: 6px; transition: width .3s ease; }
.diskfill.ok { background: var(--acc); }
.diskfill.warn { background: var(--warn); }
.diskfill.bad { background: var(--bad); }
.disk .dim.ok { color: var(--acc); } .disk .dim.warn { color: var(--warn); } .disk .dim.bad { color: var(--bad); }

/* Interactive getting-started quest + recovery */
.questnow { display: flex; align-items: flex-start; gap: 12px; padding: 12px; margin: 10px 0; border: 1px solid var(--acc); border-radius: 10px; background: rgba(57,255,136,.06); box-shadow: inset 0 0 18px rgba(57,255,136,.08); }
.questnow .qbody { flex: 1; min-width: 0; }
.questnow .qcta { margin-top: 10px; }
.qcta { display: block; width: 100%; text-align: center; }
.recsteps { margin-top: 4px; }
.recstep { padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.recstep:last-child { border-bottom: none; }
.qstep { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--disp); font-weight: 700; color: #04120a; background: var(--acc); box-shadow: var(--glow); }
.qtrack { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.qtrack li { display: flex; align-items: center; gap: 8px; padding: 5px 2px; font-size: .82rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.qtrack .qmark { flex: 0 0 auto; width: 18px; text-align: center; font-size: .78rem; color: var(--dim, #8aa); }
.qtrack li.done { color: var(--dim, #8aa); opacity: .7; }
.qtrack li.done .qmark, .qtrack li.done .qtext { color: var(--acc); }
.qtrack li.done .qtext { text-decoration: line-through; text-decoration-color: rgba(57,255,136,.4); }
.qtrack li.cur .qmark { color: var(--acc); font-weight: 700; }
.qtrack li.cur .qtext { color: #fff; font-weight: 600; }
.qtrack .qtext { flex: 1; }
.qtrack .btn.tiny { margin-left: auto; }
.btn.tiny { padding: 2px 8px; font-size: .68rem; }
.card.recovery { border-color: var(--warn); background: rgba(255,184,0,.05); box-shadow: inset 0 0 18px rgba(255,184,0,.07); }
.card.recovery h3 { color: var(--warn); }

/* Job Board */
.job { padding: 12px; margin: 8px 0; border: 1px solid rgba(255,255,255,.09); border-radius: 10px; background: rgba(255,255,255,.02); }
.job.ready { border-color: var(--acc); background: rgba(57,255,136,.06); box-shadow: inset 0 0 16px rgba(57,255,136,.08); }

/* Server homepage (front page before hacking) */
.card.homepage { border-color: rgba(41,230,255,.35); background: rgba(41,230,255,.04); }
.card.homepage h3 { color: var(--info); }

/* ---------- feedback & admin ---------- */
#nav a[hidden] { display: none !important; }
textarea.field {
  width: 100%; padding: 10px 14px; border: 1px solid rgba(41,230,255,.25); background: rgba(2,6,12,.75); color: var(--fg); outline: none;
  font: inherit; resize: vertical; line-height: 1.45;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: border-color .15s, box-shadow .15s;
}
textarea.field::placeholder { color: var(--mute); }
textarea.field:focus { border-color: var(--acc); box-shadow: inset 0 0 14px rgba(57,255,136,.15); }
.fb-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fb-kind { position: relative; cursor: pointer; }
.fb-kind input { position: absolute; opacity: 0; pointer-events: none; }
.fb-kind span { display: block; text-align: center; padding: 10px 4px; border: 1px solid var(--line); background: var(--panel); color: var(--dim);
  font-family: var(--disp); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; transition: .15s; }
.fb-kind input:checked + span { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); box-shadow: var(--glow); }
.fb-kind input:focus-visible + span { outline: 2px solid var(--acc2); outline-offset: 2px; }
.fb-check { display: flex; gap: 8px; align-items: baseline; font-size: .82rem; cursor: pointer; }
.fb-check input { accent-color: var(--acc); }
.fb-body { white-space: pre-wrap; word-break: break-word; font-size: .88rem; margin: 8px 0; }
.fb-reply { margin-top: 8px; padding: 8px 10px; border-left: 2px solid var(--acc2); background: rgba(41,230,255,.06); font-size: .85rem; white-space: pre-wrap; }
.fb-reply small { display: block; color: var(--acc2); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.fb-det { margin: 4px 0; font-size: .78rem; }
.fb-det summary { cursor: pointer; color: var(--dim); }
.fb-det pre { white-space: pre-wrap; word-break: break-all; margin: 6px 0 0; padding: 8px; background: rgba(0,0,0,.35); border: 1px solid var(--line); color: var(--warn); }
.fb-item .stack { margin-top: 10px; }
.adm-tabs { flex-wrap: wrap; }
.adm-tabs a { position: relative; min-width: 90px; }
.adm-tabs .badge-dot { margin-left: 4px; }
.adm-filters { display: flex; gap: 8px; margin-bottom: 12px; }
.adm-filters select { flex: 1; min-width: 0; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-bottom: 14px; }
.adm-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); background: var(--panel); color: inherit; }
a.adm-stat[href]:hover { border-color: var(--acc2); text-shadow: none; }
.adm-stat b { font-family: var(--disp); font-size: 1.35rem; color: var(--acc); }
.adm-stat span { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.adm-stat.hot { border-color: var(--warn); }
.adm-stat.hot b { color: var(--warn); }
.adm-role { width: auto; min-height: 34px; }
.msg .msgdel { opacity: .5; padding: 0 4px; }
.msg:hover .msgdel { opacity: 1; }

/* ---------- light theme (html[data-theme="light"]) ---------- */
:root { color-scheme: dark; }
.iconbtn.themebtn .ic { stroke-width: 1.9; }
.themefloat { position: fixed; top: calc(12px + var(--sat)); right: 12px; z-index: 40; display: none; }
body.no-nav .themefloat { display: grid; }
html.theme-anim, html.theme-anim body, html.theme-anim #topbar, html.theme-anim #nav, html.theme-anim .card { transition: background-color .25s, color .25s, border-color .25s; }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1f4; --bg2: #e2e8ed;
  --panel: rgba(255, 255, 255, .9); --panel2: rgba(250, 252, 253, .96); --panel3: rgba(236, 242, 246, .96);
  --line: rgba(8, 128, 66, .22); --line2: rgba(2, 110, 140, .24);
  --fg: #12202b; --dim: #4f6271; --mute: #6c7c88;
  --acc: #07843f; --acc2: #037a9c; --mag: #b8158f; --acc-ink: #ffffff;
  --warn: #a86200; --bad: #cf2038; --info: #037a9c; --gold: #9c6f00;
  --glow: 0 0 0 transparent; --glow2: 0 0 0 transparent;
}
html[data-theme="light"] body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(3, 122, 156, .10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(184, 21, 143, .06), transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(7, 132, 63, .07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
html[data-theme="light"] body::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 3px); }
html[data-theme="light"] #fx { opacity: .22; }
html[data-theme="light"] .gridfloor { background-image: linear-gradient(rgba(3,122,156,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(3,122,156,.16) 1px, transparent 1px); }
html[data-theme="light"] *, html[data-theme="light"] *::before, html[data-theme="light"] *::after { text-shadow: none !important; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(7,132,63,.3); }

/* chrome */
html[data-theme="light"] #topbar { background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,249,251,.92)); box-shadow: 0 1px 0 rgba(3,122,156,.08), 0 6px 20px rgba(20,40,60,.08); }
html[data-theme="light"] #nav { background: linear-gradient(0deg, rgba(255,255,255,.98), rgba(247,250,252,.95)); }
html[data-theme="light"] #nav a.on i { filter: none; }
html[data-theme="light"] #nav a.on::before { box-shadow: none; }
html[data-theme="light"] #nav a:hover { background: rgba(3,122,156,.06); }
html[data-theme="light"] #nav a.on { background: linear-gradient(90deg, rgba(7,132,63,.12), transparent); border-color: rgba(7,132,63,.25); }
html[data-theme="light"] .iconbtn { background: rgba(255,255,255,.7); }
html[data-theme="light"] .hex { background: linear-gradient(160deg, #19a95a, var(--acc)); filter: drop-shadow(0 1px 2px rgba(7,132,63,.35)); }
html[data-theme="light"] .stat.money { background: rgba(7,132,63,.07); border-color: rgba(7,132,63,.3); }
html[data-theme="light"] .stat.money .coin { filter: none; }
html[data-theme="light"] .bell b, html[data-theme="light"] #nav b, html[data-theme="light"] .tiles a b, html[data-theme="light"] .badge-dot { box-shadow: none; }

/* surfaces */
html[data-theme="light"] .card { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 3px rgba(20,40,60,.06); }
html[data-theme="light"] .card::before, html[data-theme="light"] .card::after { filter: none; }
html[data-theme="light"] input.field, html[data-theme="light"] textarea.field, html[data-theme="light"] select.field { background: #fff; border-color: rgba(3,122,156,.3); }
html[data-theme="light"] select.field option { background: #fff; }
html[data-theme="light"] .bar { background: rgba(20,40,60,.08); border-color: rgba(7,132,63,.25); }
html[data-theme="light"] .bar > i { background: repeating-linear-gradient(-45deg, var(--acc) 0 8px, #0f9a4d 8px 16px); background-size: 22.6px 100%; box-shadow: none; }
html[data-theme="light"] .bar > i.full { background: repeating-linear-gradient(-45deg, #d08a00 0 8px, var(--warn) 8px 16px); box-shadow: none; }
html[data-theme="light"] .msgs, html[data-theme="light"] .boot, html[data-theme="light"] .fb-det pre { background: rgba(255,255,255,.75); }
html[data-theme="light"] .host .ico { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--tc) 18%, transparent), rgba(255,255,255,.7)); box-shadow: inset 0 0 10px color-mix(in srgb, var(--tc) 15%, transparent); }
html[data-theme="light"] .tiles a i, html[data-theme="light"] .tiles a:nth-child(n) i { filter: none; }
html[data-theme="light"] .tiles a:hover { background: linear-gradient(170deg, rgba(7,132,63,.1), var(--panel)); }
html[data-theme="light"] .recstep, html[data-theme="light"] .qtrack li { border-bottom-color: rgba(20,40,60,.08); }
html[data-theme="light"] .job { border-color: rgba(20,40,60,.12); background: rgba(255,255,255,.6); }
html[data-theme="light"] .diskbar, html[data-theme="light"] .perfrow .perfbar { background: rgba(20,40,60,.08); border-color: rgba(20,40,60,.1); }
html[data-theme="light"] .perfrow .perfbar i { box-shadow: none; }
html[data-theme="light"] .qtrack li.cur .qtext { color: var(--fg); }
html[data-theme="light"] .qstep { color: var(--acc-ink); box-shadow: none; }
html[data-theme="light"] .prodshot g { filter: none; }
html[data-theme="light"] .brandbadge { box-shadow: none; }
html[data-theme="light"] .black-market { box-shadow: 0 0 0 1px rgba(184,21,143,.15); }

/* buttons */
html[data-theme="light"] .btn { background: linear-gradient(180deg, #13a256, var(--acc) 55%, #066f35); box-shadow: 0 1px 3px rgba(7,132,63,.35); }
html[data-theme="light"] .btn:hover:not(:disabled) { box-shadow: 0 2px 8px rgba(7,132,63,.4); }
html[data-theme="light"] .btn.ghost { background: rgba(7,132,63,.06); color: var(--acc); box-shadow: none; }
html[data-theme="light"] .btn.ghost:hover:not(:disabled) { background: rgba(7,132,63,.13); box-shadow: none; }
html[data-theme="light"] .btn.danger { background: rgba(207,32,56,.06); color: var(--bad); box-shadow: none; }
html[data-theme="light"] .btn.danger:hover:not(:disabled) { background: rgba(207,32,56,.13); box-shadow: none; }

/* overlays */
html[data-theme="light"] .toast { background: linear-gradient(100deg, color-mix(in srgb, var(--tc) 10%, #fff), #fff 60%); box-shadow: 0 8px 24px rgba(20,40,60,.16); }
html[data-theme="light"] dialog { background: linear-gradient(160deg, #fff, #f3f7f9); box-shadow: 0 20px 50px rgba(20,40,60,.22); }
html[data-theme="light"] dialog::backdrop { background: rgba(20,32,44,.35); }
html[data-theme="light"] .levelup { background: radial-gradient(circle, rgba(7,132,63,.14), transparent 60%); }
html[data-theme="light"] .levelup b { text-shadow: 0 2px 0 rgba(7,132,63,.2) !important; }
html[data-theme="light"] body.alert::before { box-shadow: inset 0 0 120px rgba(207,32,56,.45); }
html[data-theme="light"] .loading::before { box-shadow: none; }

/* ---------- PC hub tab strip ---------- */
.pctabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.pctabs::-webkit-scrollbar { display: none; }
.pctabs a { position: relative; flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; min-height: 40px; scroll-snap-align: start;
  border: 1px solid var(--line); background: var(--panel); color: var(--dim); font-family: var(--disp); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; transition: .15s;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.pctabs a .ic { font-size: 1rem; }
.pctabs a:hover { color: var(--fg); border-color: var(--line2); text-shadow: none; }
.pctabs a.on { color: var(--acc-ink); background: var(--acc); border-color: var(--acc); box-shadow: var(--glow); }
.pctabs a b { position: static; min-width: 16px; padding: 1px 5px; border-radius: 8px; background: var(--bad); color: #fff; font-size: .58rem; line-height: 1.3; }
.pctabs a.on b { background: var(--acc-ink); color: var(--acc); }
#nav a em { position: absolute; top: 9px; left: calc(50% + 6px); width: 8px; height: 8px; border-radius: 50%; background: var(--mag); box-shadow: 0 0 8px var(--mag); }
@media (min-width: 900px) { #nav a em { position: static; margin-left: 4px; } #nav a b + em { margin-left: 6px; } }
.pctabs + .chatbox { height: calc(100vh - var(--toph) - var(--navh) - 114px - var(--sab)); }
@media (min-width: 900px) { .pctabs + .chatbox { height: calc(100vh - var(--toph) - 134px); } }

/* ---------- PC Overview: interactive rig ---------- */
:root { --pcb: #0d2a20; --pcb-line: rgba(57,255,136,.07); --pcb-edge: rgba(57,255,136,.28); --silk: rgba(160,220,190,.6); --part: #161f2c; --part2: #1f2a3a; --metal: #b7c2cf; --cable: #3a4656; --sel: #ffb800; }
html[data-theme="light"] { --pcb: #cfe6d8; --pcb-line: rgba(7,100,50,.08); --pcb-edge: rgba(7,100,50,.35); --silk: rgba(20,70,45,.7); --part: #f7fafc; --part2: #e6edf3; --metal: #c9d2dc; --cable: #9aa8b6; --sel: #c27300; }
.rigtop { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 760px) { .rigtop { grid-template-columns: minmax(0, 1.55fr) minmax(220px, 1fr); align-items: start; } }
.rigtop > .card { margin: 0; }
.rigsvg { display: block; width: 100%; height: auto; margin-top: 10px; user-select: none; -webkit-user-select: none; }
.rigsvg text { font-family: var(--mono); fill: var(--fg); }
.rigsvg .pcb { fill: var(--pcb); stroke: var(--pcb-edge); stroke-width: 1.5; }
.rigsvg .pcbline { fill: none; stroke: var(--pcb-line); stroke-width: 1; }
.rigsvg .hole { fill: none; stroke: var(--metal); stroke-width: 2; opacity: .6; }
.rigsvg .silk { fill: var(--silk); font-size: 13px; letter-spacing: .12em; }
.rigsvg .silk.dim { opacity: .5; }
.rigsvg .io, .rigsvg .conn, .rigsvg .socket, .rigsvg .card, .rigsvg .chipset, .rigsvg .psu, .rigsvg .drive { fill: var(--part); stroke: var(--line2); stroke-width: 1.5; }
.rigsvg .chip { fill: var(--metal); }
.rigsvg .chip ~ text.chipname, .rigsvg .chip ~ text.chipsub { fill: #10161f; }
.rigsvg .chipname { font-family: var(--disp); font-size: 18px; font-weight: 700; }
.rigsvg .cardname { font-family: var(--disp); font-size: 17px; font-weight: 700; }
.rigsvg .chipsub { font-size: 12.5px; fill: var(--dim); }
.rigsvg .pin { fill: var(--dim); opacity: .7; }
.rigsvg .dimm { fill: var(--part); stroke: var(--line2); }
.rigsvg .stick { fill: var(--acc2); opacity: .85; }
.rigsvg .stickcap { fill: var(--acc2); }
.rigsvg .pcieslot { fill: var(--part2); stroke: var(--line2); }
.rigsvg .pcieslot.dim { opacity: .5; }
.rigsvg .port { fill: none; stroke: var(--dim); stroke-width: 1.5; }
.rigsvg .shroud { fill: var(--bg2); stroke: var(--line); stroke-width: 1.5; }
.rigsvg .fan { fill: none; stroke: var(--dim); stroke-width: 2; }
.rigsvg .fan.in { stroke-dasharray: 4 5; opacity: .6; }
.rigsvg .hub { fill: var(--metal); }
.rigsvg .platter { fill: var(--part2); stroke: var(--metal); stroke-width: 2; }
.rigsvg .arm { stroke: var(--metal); stroke-width: 5; stroke-linecap: round; }
.rigsvg .ssdlabel { fill: var(--acc2); opacity: .25; }
.rigsvg .cable { fill: none; stroke: var(--cable); stroke-width: 5; stroke-linecap: round; opacity: .55; transition: stroke .2s, opacity .2s; }
.rigsvg .cable.hot { stroke: var(--sel); opacity: .9; }
.rigsvg .slot { cursor: pointer; outline: none; }
.rigsvg .slot .hit { fill: transparent; }
.rigsvg .slot.up:hover > .socket, .rigsvg .slot.up:hover > .card, .rigsvg .slot.up:hover > .chipset, .rigsvg .slot.up:hover > .psu, .rigsvg .slot.up:hover > .drive, .rigsvg .slot.up:hover > .conn, .rigsvg .slot:hover .dimm { stroke: var(--acc2); }
.rigsvg .slot.lock > .socket, .rigsvg .slot.lock > .card, .rigsvg .slot.lock > .chipset, .rigsvg .slot.lock > .psu, .rigsvg .slot.lock > .drive, .rigsvg .slot.lock .dimm { stroke: var(--bad); stroke-dasharray: 6 4; }
.rigsvg .slot.max > .socket, .rigsvg .slot.max > .card, .rigsvg .slot.max > .chipset, .rigsvg .slot.max > .psu, .rigsvg .slot.max > .drive { stroke: var(--gold); }
.rigsvg .slot.sel > .socket, .rigsvg .slot.sel > .card, .rigsvg .slot.sel > .chipset, .rigsvg .slot.sel > .psu, .rigsvg .slot.sel > .drive, .rigsvg .slot.sel > .conn, .rigsvg .slot.sel .dimm { stroke: var(--sel); stroke-width: 3; stroke-dasharray: none; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--sel) 60%, transparent)); }
.rigsvg .slot.sel > .pcb { stroke: var(--sel); stroke-width: 2.5; }
.rigsvg .slot:focus-visible > *:first-child { stroke: var(--acc2); stroke-width: 3; }
.rigsvg .rtag rect { fill: var(--sel); }
.rigsvg .rtag text { fill: #1a1200; font-family: var(--disp); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.rigsvg .rtag.lock rect { fill: var(--bad); } .rigsvg .rtag.lock text { fill: #fff; }
.rigsvg .rtag.max rect { fill: var(--gold); }
html[data-theme="light"] .rigsvg .slot.sel > * { filter: none; }

.rigsys { display: grid; gap: 10px; }
.sysbox { border: 1px solid var(--line); background: var(--panel); padding: 12px 14px; }
.sysbox > small { display: block; font-family: var(--disp); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.sysbox b.big { font-size: 2rem; line-height: 1; }
.sysbox p { margin: 6px 0 0; font-size: .72rem; }
.sysbox .kv { font-size: .8rem; }
.sbar { height: 7px; margin-top: 8px; background: rgba(127,127,127,.15); border-radius: 4px; overflow: hidden; }
.sbar i { display: block; height: 100%; border-radius: 4px; background: var(--acc); transition: width .4s; }
.sbar.hot i, .sbar.warn i { background: var(--warn); } .sbar.bad i { background: var(--bad); }
.sysbox.legend { border-style: dashed; font-size: .74rem; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sysbox.legend p { flex: 1 0 100%; margin: 0 0 4px; }
.lg { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.lg.sel { background: var(--sel); } .lg.up { background: var(--acc2); } .lg.lock { background: var(--bad); } .lg.max { background: var(--gold); }
.mtabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 520px) { .mtabs { grid-template-columns: repeat(2, 1fr); } }
.mtab { text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); cursor: pointer; transition: .15s; }
.mtab b { display: block; font-family: var(--disp); font-size: .78rem; letter-spacing: .04em; }
.mtab small { display: block; color: var(--dim); font-size: .68rem; margin-top: 2px; }
.mtab:hover { border-color: var(--line2); }
.mtab.lock small { color: var(--bad); } .mtab.max small { color: var(--gold); }
.mtab.sel { border-color: var(--sel); background: color-mix(in srgb, var(--sel) 12%, var(--panel)); }
.mtab.sel b { color: var(--sel); }
.mwhere { margin: 12px 0; padding: 10px 14px; border: 1px solid var(--line); background: var(--panel); }
.mwhere small { font-family: var(--disp); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sel); }
.mwhere p { margin: 4px 0 0; font-size: .82rem; line-height: 1.5; }
.mcols { display: grid; gap: 12px; }
@media (min-width: 760px) { .mcols { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.mlist { display: flex; flex-direction: column; gap: 8px; }
.mpart { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); text-align: left; font: inherit; }
.mpart.opt { cursor: pointer; transition: .15s; }
.mpart.opt:hover { border-color: var(--line2); }
.mpart.opt.on { border-color: var(--sel); background: color-mix(in srgb, var(--sel) 10%, var(--panel)); }
.mpart.inst { border-color: color-mix(in srgb, var(--acc2) 55%, transparent); }
.mpart.blocked { border-color: color-mix(in srgb, var(--bad) 55%, transparent); opacity: .85; }
.mp-main { flex: 1; min-width: 0; display: block; }
.mp-main b { display: block; font-family: var(--disp); font-size: .86rem; }
.mp-main small { display: block; color: var(--dim); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-end { font-family: var(--disp); font-weight: 700; font-size: .78rem; white-space: nowrap; }
.tbars { display: inline-flex; gap: 3px; flex: 0 0 auto; }
.tbars i { width: 5px; height: 20px; border-radius: 1px; background: rgba(127,127,127,.25); }
.tbars i.on { background: var(--acc2); }
.mpart.opt .tbars i.on { background: var(--sel); }
.mpart.blocked .tbars i.on { background: var(--bad); }
.mblock { padding: 10px 12px; border: 1px dashed color-mix(in srgb, var(--bad) 55%, transparent); font-size: .8rem; }
.mblock p { margin: 0 0 8px; }
.mdetail { border: 1px solid var(--line); background: var(--panel); padding: 14px; }
.cmp { display: grid; grid-template-columns: 1fr auto 18px auto; gap: 8px; align-items: baseline; padding: 4px 0; font-size: .84rem; }
.cmp > *:nth-child(2), .cmp > b { text-align: right; }
.cmp > b { min-width: 64px; }
.cmpnote { font-size: .74rem; margin: 8px 0 12px; }
.mdetail .btn.block { margin-top: 10px; }
.rigmarket .stat.money { clip-path: none; }
/* rig polish: maxed = green (distinct from amber selected), blocked preview, phone sizing */
.lg.max { background: var(--acc); }
.rigsvg .slot.max > .socket, .rigsvg .slot.max > .card, .rigsvg .slot.max > .chipset, .rigsvg .slot.max > .psu, .rigsvg .slot.max > .drive { stroke: var(--acc); }
.rigsvg .rtag.max rect { fill: var(--acc); } .rigsvg .rtag.max text { fill: var(--acc-ink); }
.mtab.max small { color: var(--acc); }
.mdetail.locked { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.mdetail.locked .cmp b { opacity: .75; }
.mdetail .mblock { margin-top: 10px; }
@media (max-width: 759px) {
  .rigsvg .silk { font-size: 16px; letter-spacing: .06em; }
  .rigsys { grid-template-columns: 1fr 1fr; }
  .rigsys .sysbox:nth-child(n+3) { grid-column: 1 / -1; }
  .sysbox b.big { font-size: 1.6rem; }
}
.rigsvg .slot.sel.max > .socket, .rigsvg .slot.sel.max > .card, .rigsvg .slot.sel.max > .chipset, .rigsvg .slot.sel.max > .psu, .rigsvg .slot.sel.max > .drive { stroke: var(--sel); }

/* ---------- Store upgrade bay: preview the picked part inside the case ---------- */
@keyframes pvdash { to { stroke-dashoffset: -20; } }
@keyframes pvpulse { 50% { opacity: .55; } }
.rigsvg .slot.pv > .socket, .rigsvg .slot.pv > .card, .rigsvg .slot.pv > .chipset, .rigsvg .slot.pv > .psu, .rigsvg .slot.pv > .drive, .rigsvg .slot.pv .dimm, .rigsvg .slot.pv > .pcb {
  stroke: var(--sel); stroke-width: 3; stroke-dasharray: 10 6 !important; animation: pvdash .8s linear infinite; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--sel) 55%, transparent)); }
.rigsvg .slot.pv > .chip { fill: color-mix(in srgb, var(--sel) 30%, var(--metal)); }
.rigsvg .slot.pv .stick, .rigsvg .slot.pv .stickcap { fill: var(--sel); animation: pvpulse 1.6s ease-in-out infinite; }
.rigsvg .dimm.newslot { fill: color-mix(in srgb, var(--sel) 18%, var(--part)); stroke: var(--sel); stroke-dasharray: 4 3; }
.rigsvg .rtag.pv rect { fill: var(--sel); animation: pvpulse 1.6s ease-in-out infinite; }
@keyframes freshflash { 0% { filter: drop-shadow(0 0 0 transparent); } 25% { filter: drop-shadow(0 0 16px var(--acc)) brightness(1.4); } 100% { filter: drop-shadow(0 0 0 transparent); } }
.rigsvg .slot.fresh { animation: freshflash 1.6s ease-out 2; }
.rigcase.previewing { border-color: color-mix(in srgb, var(--sel) 45%, var(--line)); }
.rigcase .pvname { color: var(--sel); }
.lg.pv { background: repeating-linear-gradient(90deg, var(--sel) 0 3px, transparent 3px 5px); outline: 1px solid var(--sel); }
.sysbox.pvbanner { border-color: var(--sel); background: color-mix(in srgb, var(--sel) 10%, var(--panel)); display: flex; flex-direction: column; gap: 2px; }
.sysbox.pvbanner small { color: var(--sel); }
.sysbox.pvbanner b { font-family: var(--disp); font-size: 1rem; }
.sysbox.pvbanner span { font-size: .74rem; }
.delta { font-style: normal; font-size: .66rem; font-weight: 700; padding: 1px 6px; margin-left: 4px; border-radius: 3px; white-space: nowrap; vertical-align: 2px; }
.delta.up { color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.mthumb.pshot-wrap.sm { width: 52px; height: 42px; flex: 0 0 52px; padding: 3px; margin: 0; cursor: inherit; }
.mp-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mspec { font-family: var(--mono); font-weight: 400; font-size: .66rem; color: var(--acc2); cursor: pointer; text-decoration: underline dotted; }
.mdshot.pshot-wrap { max-width: 220px; margin: 0 auto 10px; aspect-ratio: 120/96; display: grid; place-items: center; }
@media (max-width: 759px) { .sysbox.pvbanner { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .rigsvg .slot.pv > *, .rigsvg .slot.pv .stick { animation: none !important; } }
@media (max-width: 759px) { .rigsys.previewing .sysbox:nth-child(3) { grid-column: auto; } .rigsys.previewing .sysbox:nth-child(n+4) { grid-column: 1 / -1; } }
.mdetail .btn.seepc { display: none; }
@media (max-width: 759px) { .mdetail .btn.seepc { display: inline-flex; } }
.row.wraprow { flex-wrap: wrap; }
.fwbtns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Drive window (PC page: tap the hard drive) ---------- */
dialog:has(.drivewin) { width: min(520px, calc(100% - 28px)); }
.diskmap { display: flex; height: 18px; margin: 8px 0 12px; border: 1px solid var(--line2); background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(127,127,127,.08) 6px 12px); overflow: hidden; border-radius: 3px; }
.diskmap .seg { display: block; height: 100%; min-width: 2px; border-right: 1px solid var(--bg); }
.c0 { background: var(--acc2); } .c1 { background: var(--acc); } .c2 { background: var(--mag); } .c3 { background: var(--warn); } .c4 { background: #8b8bff; } .c5 { background: #ff8c42; }
.dlist { max-height: min(46vh, 360px); overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.dlist .drow { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.drow .sw { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 2px; }
.drow .dn { flex: 1; min-width: 0; font-size: .86rem; }
.drow .ds { text-align: right; font-size: .78rem; white-space: nowrap; }
.drow .ds small { display: block; color: var(--dim); font-size: .66rem; }
.drivewin .btns { flex-wrap: wrap; }
#softcard.flash { animation: softflash 1.5s ease-out; }
@keyframes softflash { 20% { background: color-mix(in srgb, var(--acc2) 20%, var(--panel)); border-color: var(--acc2); } }
#softcard { scroll-margin-top: calc(var(--toph) + var(--sat) + 14px); }

/* ===================== browser / website host view ===================== */
.browser { --tc: var(--acc); border: 1px solid var(--line); border-radius: var(--cut); overflow: hidden;
  background: var(--bg2); box-shadow: 0 10px 34px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.03); }
.bchrome { display: flex; align-items: center; gap: 10px; padding: 9px 12px; min-width: 0;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border-bottom: 1px solid var(--line); }
.bdots { display: flex; gap: 6px; flex: 0 0 auto; }
.bdots i { width: 10px; height: 10px; border-radius: 50%; background: var(--mute); opacity: .6; }
.bdots i:first-child { background: var(--bad); } .bdots i:nth-child(2) { background: var(--warn); } .bdots i:last-child { background: var(--acc); }
.bctl { flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r);
  color: var(--dim); font-size: 1.05rem; text-decoration: none; border: 1px solid transparent; }
.bctl:hover { color: var(--fg); background: color-mix(in srgb, var(--tc) 12%, transparent); border-color: var(--line); }
.addr { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font-family: var(--mono); font-size: .86rem; }
.addr .lock { font-size: .72rem; opacity: .7; }
.addr .scheme { color: var(--mute); }
.addr b { color: var(--fg); font-weight: 400; }
.addr .ahost { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr .ahost::before { content: "\00a0\00b7\00a0"; color: var(--mute); }
.bstat { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--dim); }
.bstat i { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 8px var(--tc); animation: bpulse 2.4s infinite; }
@keyframes bpulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.bbody { padding: 0; background:
  radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--tc) 9%, transparent), transparent 60%),
  linear-gradient(180deg, color-mix(in srgb, var(--tc) 5%, var(--bg)), var(--bg)); }

.sitehead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid color-mix(in srgb, var(--tc) 14%, var(--line)); }
.sitehead .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sitehead .logo { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 10px;
  font-family: var(--disp); font-weight: 700; font-size: 1.05rem; color: var(--tc);
  background: color-mix(in srgb, var(--tc) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--tc) 34%, transparent); }
.sitehead .bname { font-weight: 700; font-size: 1.08rem; color: var(--fg); line-height: 1.15; }
.sitehead .btag { font-size: .76rem; color: var(--dim); margin-top: 2px; }
.sitenav { display: flex; gap: 20px; flex: 0 0 auto; }
.sitenav a { font-size: .9rem; color: var(--dim); cursor: default; }
.sitenav a.on { color: var(--fg); font-weight: 600; }

.hero { padding: 40px 22px 34px; }
.hero .eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--tc); margin-bottom: 14px; }
.hero .hhead { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem); line-height: 1.04; letter-spacing: -.01em; color: var(--fg); margin: 0; max-width: 16ch; }
.hero .hbody { color: color-mix(in srgb, var(--fg) 78%, var(--dim)); font-size: 1rem; line-height: 1.5; margin: 16px 0 0; max-width: 56ch; }
.hero--min { padding: 22px 22px 6px; border-bottom: 1px solid var(--line); }
.hero--min .hhead { font-size: clamp(1.4rem, 3.2vw, 1.9rem); }
.hero--min .hbody { font-size: .9rem; margin-top: 10px; }

.landing { display: grid; grid-template-columns: minmax(0,1fr) minmax(290px, 360px); gap: 22px; align-items: start; padding: 0 22px 26px; }

.srvcard { border: 1px solid var(--line); border-radius: var(--cut); background: var(--panel); overflow: hidden; }
.srvhead { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px;
  background: color-mix(in srgb, var(--tc) 7%, var(--panel2)); border-bottom: 1px solid var(--line); }
.srvhead b { font-size: .92rem; color: var(--fg); }
.online { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--dim); }
.online i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.srvkv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); }
.srvkv > div { background: var(--panel); padding: 14px 18px; }
.srvkv dt { font-size: .74rem; color: var(--dim); margin: 0 0 4px; }
.srvkv dd { margin: 0; font-family: var(--mono); font-size: .95rem; color: var(--fg); word-break: break-all; }

.loginpanel { border: 1px solid var(--line); border-radius: var(--cut); background: var(--panel); padding: 20px 18px; }
.loginpanel .lphead { margin-bottom: 14px; }
.loginpanel .lphead b { display: block; font-size: 1.05rem; color: var(--fg); }
.loginpanel .lphead small { color: var(--dim); font-size: .78rem; }
.lpfield { margin-bottom: 12px; }
.lpfield label { display: block; font-size: .78rem; font-weight: 600; color: var(--fg); margin-bottom: 6px; }
.fakefield { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); padding: 10px 12px;
  font-family: var(--mono); font-size: .88rem; color: var(--mute); user-select: none; }
.loginpanel > .btn.block { margin-top: 2px; }
.lptools { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 10px; }
.lptoolsh { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); font-weight: 700; }
.ipwarn { margin: 12px 0 0; font-size: .78rem; color: var(--warn); line-height: 1.4; }
.ipwarn b { color: var(--warn); font-family: var(--mono); }

.ntoggle { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; font-size: .8rem; }
.ntoggle input { margin-top: 3px; flex: 0 0 auto; }
.ntoggle b { display: block; color: var(--fg); font-weight: 600; }
.ntoggle small { display: block; color: var(--dim); font-size: .72rem; line-height: 1.35; margin-top: 1px; }

.sessionbar { margin: 14px 22px 0; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--tc) 26%, var(--line));
  border-radius: var(--cut); background: color-mix(in srgb, var(--tc) 8%, var(--panel)); display: flex; flex-direction: column; gap: 10px; }
.sessionbar .ipwarn { margin: 0; }

.sitemain { padding: 14px 22px 22px; }
.sitemain > * { margin-top: 14px; }
.sitemain > *:first-child { margin-top: 0; }
.sitesec { border: 1px solid var(--line); border-radius: var(--cut); background: var(--panel); padding: 16px 18px; margin: 14px 22px 0; }
.sitesec + .sitesec { margin-top: 12px; }

.bfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel2);
  font-family: var(--mono); font-size: .76rem; color: var(--dim); }
.bfoot b { color: color-mix(in srgb, var(--fg) 70%, var(--dim)); font-weight: 400; }
.bfoot a { color: var(--dim); text-decoration: none; }
.bfoot a:hover { color: var(--bad); }

/* net view: make the connect box feel like an address bar */
#addip .field { font-family: var(--mono); }

@media (max-width: 780px) {
  .landing { grid-template-columns: 1fr; gap: 16px; padding: 0 14px 20px; }
  .hero { padding: 30px 14px 24px; } .hero--min { padding: 18px 14px 4px; }
  .sitehead { padding: 14px; } .sitemain, .sitesec, .sessionbar { margin-left: 14px; margin-right: 14px; }
  .sitemain { padding: 14px; }
}
@media (max-width: 540px) {
  .sitenav { display: none; }
  .srvkv { grid-template-columns: 1fr; }
  .addr .ahost { display: none; }
  .bchrome { gap: 7px; padding: 8px 10px; }
}

/* ---------- light theme overrides for the browser view ---------- */
html[data-theme="light"] .browser { box-shadow: 0 8px 24px rgba(20,40,60,.1); }
html[data-theme="light"] .bbody { background:
  radial-gradient(120% 60% at 0% 0%, color-mix(in srgb, var(--tc) 10%, transparent), transparent 60%),
  linear-gradient(180deg, color-mix(in srgb, var(--tc) 6%, #fff), var(--bg)); }
html[data-theme="light"] .bstat i, html[data-theme="light"] .online i, html[data-theme="light"] .srvhead { box-shadow: none; }
html[data-theme="light"] .fakefield { background: #f4f7f9; }

/* ===================== crew homepage templates ===================== */
.crewhp { --tc: var(--acc); color: var(--fg); }
.crewhp h1 { margin: 0; }
.recbadge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  border: 1px solid currentColor; white-space: nowrap; }
.recbadge.ok { color: var(--acc); } .recbadge.warn { color: var(--warn); } .recbadge.bad { color: var(--bad); }
.hp-empty { color: var(--dim); font-style: italic; margin: 6px 0 0; }
.hp-rules { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.hp-rules li { line-height: 1.4; }
.hp-rules.mono { font-family: var(--mono); font-size: .86rem; }

/* corp */
.tpl-corp .hp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid color-mix(in srgb, var(--tc) 18%, var(--line)); }
.tpl-corp .hp-brand { display: flex; align-items: center; gap: 12px; }
.tpl-corp .hp-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; font-family: var(--disp); font-weight: 700;
  color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--tc) 34%, transparent); }
.tpl-corp .hp-name { font-weight: 700; font-size: 1.05rem; } .tpl-corp .hp-tag { font-size: .76rem; color: var(--dim); }
.tpl-corp .hp-hero { padding: 34px 22px 20px; }
.tpl-corp .hp-eyebrow { color: var(--tc); text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; margin-bottom: 12px; }
.tpl-corp .hp-hero h1 { font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.05; letter-spacing: -.01em; }
.tpl-corp .hp-lead { color: color-mix(in srgb, var(--fg) 80%, var(--dim)); font-size: 1rem; line-height: 1.5; margin: 14px 0 0; max-width: 60ch; }
.tpl-corp .hp-sec { padding: 0 22px 18px; } .tpl-corp .hp-sec h3 { margin: 0 0 6px; font-size: .95rem; }

/* warez */
.tpl-warez { background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--tc) 5%, var(--bg)) 0 2px, var(--bg) 2px 4px); font-family: var(--mono); padding: 22px; }
.tpl-warez .hp-wz-head { color: var(--tc); font-size: .8rem; letter-spacing: .04em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-bottom: 1px dashed color-mix(in srgb, var(--tc) 40%, transparent); padding-bottom: 10px; }
.tpl-warez .hp-wz-head span { color: var(--dim); }
.tpl-warez .hp-wz-title { font-family: var(--disp); font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--tc); text-shadow: 0 0 14px color-mix(in srgb, var(--tc) 55%, transparent); margin: 14px 0; }
.tpl-warez .hp-wz-body { white-space: pre-wrap; font-family: var(--mono); font-size: .9rem; line-height: 1.5; margin: 0; color: var(--fg); }
.tpl-warez .hp-wz-note { color: var(--acc2); margin-top: 12px; }
.tpl-warez .hp-wz-rules { margin-top: 16px; border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent); border-radius: var(--r); padding: 12px 14px; }
.tpl-warez .hp-wz-rh { color: var(--tc); font-size: .78rem; margin-bottom: 6px; }

/* terminal */
.tpl-terminal { padding: 0; }
.tpl-terminal .hp-term { margin: 16px; border: 1px solid color-mix(in srgb, var(--tc) 30%, var(--line)); border-radius: 8px; overflow: hidden; background: #020805; box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.tpl-terminal .hp-term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #0a120c; border-bottom: 1px solid color-mix(in srgb, var(--tc) 22%, transparent); }
.tpl-terminal .hp-term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3a2f; }
.tpl-terminal .hp-term-bar span { margin-left: 8px; font-family: var(--mono); font-size: .72rem; color: #5f7a68; }
.tpl-terminal .hp-term-scr { padding: 16px 18px 20px; font-family: var(--mono); color: #39ff88; }
.tpl-terminal .hp-term-line { font-size: .88rem; line-height: 1.6; }
.tpl-terminal .hp-term-line.dim { color: #3f6b50; }
.tpl-terminal .hp-term-h { font-family: var(--mono); font-size: clamp(1.3rem, 3.4vw, 1.9rem); color: var(--tc); text-shadow: 0 0 12px color-mix(in srgb, var(--tc) 60%, transparent); margin: 10px 0; }
.tpl-terminal .hp-term-body { white-space: pre-wrap; font-size: .9rem; line-height: 1.55; color: #bdf7d4; margin: 6px 0; }
.tpl-terminal .hp-term-rules { margin: 4px 0 0; padding-left: 20px; } .tpl-terminal .hp-term-rules li { line-height: 1.5; }
.tpl-terminal .hp-term-cursor { display: inline-block; color: var(--tc); animation: bpulse 1.1s steps(1) infinite; margin-top: 8px; }
.tpl-terminal .ok { color: var(--acc); } .tpl-terminal .warn { color: var(--warn); } .tpl-terminal .bad { color: var(--bad); }

/* flyer */
.tpl-flyer { text-align: center; padding: 40px 22px; background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--tc) 14%, transparent), transparent 65%), var(--bg); }
.tpl-flyer .hp-flyer-badge { margin-bottom: 18px; }
.tpl-flyer .hp-flyer-kicker { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--tc); font-weight: 700; }
.tpl-flyer .hp-flyer-h { font-family: var(--disp); font-weight: 800; font-size: clamp(1.9rem, 6vw, 3.2rem); line-height: 1.02; margin: 12px auto; max-width: 16ch; }
.tpl-flyer .hp-flyer-note { font-size: 1.05rem; color: var(--tc); font-weight: 600; margin-bottom: 12px; }
.tpl-flyer .hp-flyer-body { color: color-mix(in srgb, var(--fg) 80%, var(--dim)); line-height: 1.55; max-width: 52ch; margin: 0 auto; }
.tpl-flyer .hp-flyer-rules { margin: 22px auto 0; max-width: 44ch; text-align: left; border-top: 1px solid var(--line); padding-top: 16px; }
.tpl-flyer .hp-flyer-rules h3 { text-align: center; margin: 0 0 8px; }

/* notice */
.tpl-notice { padding: 24px 22px; background: var(--panel); }
.tpl-notice .hp-notice-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 3px double color-mix(in srgb, var(--tc) 50%, var(--line)); padding-bottom: 14px; }
.tpl-notice .hp-notice-seal { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; font-family: var(--disp); font-weight: 700;
  color: var(--tc); border: 2px solid color-mix(in srgb, var(--tc) 55%, transparent); background: color-mix(in srgb, var(--tc) 10%, transparent); }
.tpl-notice .hp-notice-kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; font-weight: 700; color: var(--tc); }
.tpl-notice .hp-notice-org { font-weight: 700; font-size: 1rem; }
.tpl-notice .hp-notice-h { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 18px 0 10px; }
.tpl-notice .hp-notice-body { font-family: Georgia, serif; font-size: 1rem; line-height: 1.6; color: color-mix(in srgb, var(--fg) 85%, var(--dim)); }
.tpl-notice .hp-notice-note { margin: 12px 0; font-family: Georgia, serif; }
.tpl-notice .hp-notice-sec { margin-top: 16px; }
.tpl-notice .hp-notice-rules { margin: 8px 0 0; padding-left: 22px; font-family: Georgia, serif; display: grid; gap: 6px; }
.tpl-notice .hp-notice-foot { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; font-size: .78rem; color: var(--dim); font-style: italic; }

/* homepage editor on the crew page */
.hp-editor .hp-lbl { font-size: .74rem; font-weight: 700; color: var(--fg); margin: 10px 0 4px; display: block; }
.hp-editor .hp-lbl .dim { font-weight: 400; }
.hp-tpls { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-tpl-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .82rem; }
.hp-tpl-opt:has(input:checked) { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent); color: var(--acc); }
.hp-tpl-opt input { accent-color: var(--acc); }
.hp-prev-wrap { margin-top: 6px; }
.hp-prev-wrap .bbody { max-height: 460px; overflow: auto; }

/* bank: collapsible break-in box under the customer panel */
.attackbox summary { cursor: pointer; font-weight: 600; color: var(--dim); list-style: none; }
.attackbox summary::-webkit-details-marker { display: none; }
.attackbox summary::before { content: "\25B8 "; color: var(--tc); }
.attackbox[open] summary::before { content: "\25BE "; }
.attackbox[open] summary { color: var(--fg); }
.attackbody { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
