  * { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --dn-font-main: Courier, monospace;
    --dn-rarity-normal: #958e87;
    --dn-rarity-magic: #6f8fb4;
    --dn-rarity-rare: #b8a66c;
    --dn-rarity-epic: #8f7ea8;
    --dn-rarity-unique: #ad8666;
    --dn-rarity-legendary: #af6f62;
    --dn-rarity-normal-border: #4b4743;
    --dn-rarity-magic-border: #536b86;
    --dn-rarity-rare-border: #8a7d52;
    --dn-rarity-epic-border: #6d6182;
    --dn-rarity-unique-border: #85664d;
    --dn-rarity-legendary-border: #85544c;
  }

  @font-face {
    font-family: "C64ProMono";
    src: url("assets/fonts/C64_Pro_Mono-STYLE.woff2") format("woff2"),
         url("assets/fonts/C64_Pro_Mono-STYLE.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
  }

  body {
    background: #0a0a0a;
    color: #b8b8b8;
    font-family: var(--dn-font-main);
    font-size: 15px;
    min-height: 100vh;
    overflow-y: auto;
    padding: 10px 14px;
  padding-top: 50px; /* room for statusbar */
    scrollbar-width: thin;
    scrollbar-color: #333 #0a0a0a;
  }

  body::-webkit-scrollbar { width: 3px; }
  body::-webkit-scrollbar-track { background: #0a0a0a; }
  body::-webkit-scrollbar-thumb { background: #333; }

  #scanline {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.06) 2px,
      rgba(0,0,0,0.06) 4px
    );
    pointer-events: none;
    z-index: 100;
  }

  #vignette {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, transparent 65%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 101;
  }

  #flicker {
    display: none;
  }

  /* boot-screen no longer used as container, kept for legacy compat */
  #boot-screen { display: none; }

  @keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  #terminal { display: block; min-height: calc(100vh - 60px); }
  #shell-screen { display: block; }
  #output { display: block; }

  .output-line {
    line-height: 1.32;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 15px;
    font-weight: normal;
    color: #b8b8b8;
  }

  /* boot color classes */
  .output-line.boot-dim     { color: #555; }
  .output-line.boot-hw      { color: #2f6b2f; }
  .output-line.boot-ok      { color: #b8b8b8; }
  .output-line.boot-bright  { color: #e8e8e8; font-weight: bold; }
  .output-line.boot-warn    { color: #c8a84b; }
  .output-line.boot-error   { color: #c85a5a; font-weight: 600; }
  .output-line.boot-default { color: #b8b8b8; }

  /* level-up notification */
  .output-line.levelup      { color: #3ddc84; font-weight: bold; text-shadow: 0 0 6px #2a9d5c; }
  .output-line.levelup-rank { color: #c8a84b; font-weight: bold; text-shadow: 0 0 6px #8a7030; }

  /* NPC Peacy / Academy */
  .output-line.npc-peacy    { color: #64b5f6; }

  /* shell output color classes */
  .output-line.error   { color: #ff4d4f; font-weight: 600; }
  .output-line.info    { color: #b8b8b8; }
    .output-line.dir     { color: #a7b7b3; }
  .output-line.exec    { color: #aaccaa; }
  .output-line.dim     { color: #555; }
  .output-line.success { color: #3ddc84; font-weight: 700; }

    /* rarity colors */
    .output-line.rarity-normal    { color: var(--dn-rarity-normal); }
    .output-line.rarity-magic     { color: var(--dn-rarity-magic); }
    .output-line.rarity-rare      { color: var(--dn-rarity-rare); }
    .output-line.rarity-epic      { color: var(--dn-rarity-epic); }
    .output-line.rarity-unique    { color: var(--dn-rarity-unique); }
    .output-line.rarity-legendary { color: var(--dn-rarity-legendary); font-weight: 600; }

  #input-line {
    display: flex;
    align-items: baseline;
    line-height: 1.32;
    font-size: 15px;
    margin-top: 0;
    position: relative;
  }

  #block-cursor {
    display: inline-block;
    position: absolute;
    left: 0;
    top: 0;
    width: 1ch;
    color: #b8b8b8;
    animation: blink 1.1s step-start infinite;
    pointer-events: none;
    user-select: none;
    line-height: 1.32;
    z-index: 3;
  }

  #input-line.busy #block-cursor { display: none; }

  #prompt {
    color: #e8e8e8;
    white-space: nowrap;
    font-family: var(--dn-font-main);
    font-size: 15px;
    font-weight: bold;
    line-height: 1.32;
  }

  #cmd-input, #command-input {
    background: transparent;
    border: none;
    outline: none;
    color: #b8b8b8;
    font-family: var(--dn-font-main);
    font-size: 15px;
    line-height: 1.32;
    flex: 0 1 auto;
    min-width: 0;
    width: 1ch;
    max-width: 100%;
    caret-color: transparent;
    padding: 0;
    margin: 0;
    vertical-align: baseline;
  }

  @keyframes blink {
    50% { opacity: 0; }
  }

/* Rich prompt spans (used by game.js) */
.p-userhost { color: #e8e8e8; font-weight: 700; }
.p-sep      { color: #666; font-weight: 400; }
.p-path     { color: #88aacc; font-weight: 700; }
.p-dollar   { color: #e8e8e8; font-weight: 700; }

/* Echo prompt stays bold */
.prompt-echo { font-weight: 700; }
.cmd-gap { display: inline-block; width: 6px; }


/* Statusbar */
#statusbar{
  position: fixed;
  top:0; left:0; right:0;
  height:30px;
  background: rgba(0,0,0,0.85);
  border-bottom: 1px solid #2f7f2f;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap:12px;
  padding:0 14px;
  font-size:13px;
  color:#6bd36b;
  z-index:1000;
  opacity: 0;
  transition: opacity 0.6s ease;
}
#statusbar.visible { opacity: 1; }
#statusbar span{ white-space:nowrap; font-variant-numeric: tabular-nums; }
#status-session{ min-width: 30ch; }
#status-ip{ min-width: 18ch; }
#status-load{ min-width: 18ch; }
#status-server-version{ min-width: 12ch; color: #7f8ea3; text-align: right; }
#status-time{ min-width:40px; text-align:right; }
#status-flags { display: flex; gap: 4px; min-width: 5ch; }
#status-right { display: flex; align-items: center; gap: 10px; }
#status-level { text-align: right; color: #9bd39b; }
#status-ws {
  color: #555;
  font-size: 10px;
  margin-right: 4px;
  position: relative;
  top: 1px;
}
.status-activity-flag {
  visibility: hidden;
  min-width: 18px;
  text-align: center;
  padding: 1px 5px;
  border: 1px solid transparent;
  color: #9cf79c;
  background: rgba(12, 42, 12, 0.65);
  font-weight: bold;
}
.status-activity-flag.active {
  visibility: visible;
  border-color: #4a8f4a;
}

#install-lock-view {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 12000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(120, 0, 0, 0.16), transparent 36%),
    radial-gradient(circle at 80% 80%, rgba(80, 0, 0, 0.14), transparent 38%),
    rgba(5, 4, 4, 0.94);
}
#install-lock-card {
  width: min(720px, 94vw);
  border: 1px solid #8a3333;
  box-shadow: 0 0 0 1px rgba(227, 131, 131, 0.26) inset;
  background: rgba(20, 10, 10, 0.98);
  padding: 18px 20px;
}
#install-lock-title {
  color: #e38383;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
#install-lock-subtitle {
  color: #d9c2c2;
  font-size: 14px;
  margin-bottom: 10px;
}
#install-lock-countdown {
  color: #f0d0d0;
  font-size: 16px;
  font-weight: bold;
}
body.install-lock-active #install-lock-view {
  display: flex;
}
body.install-lock-active #terminal,
body.install-lock-active #statusbar {
  display: none !important;
}

/* C64 easter egg program overlay */
#c64-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #6c5eb5;
  color: #6c5eb5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#c64-screen {
  box-sizing: content-box;
  width: 40ch;
  min-height: 25em;
  max-width: calc(100vw - 140px);
  background: #352879;
  border: 20px solid #6c5eb5;
  box-shadow: none;
  padding: 0.55em 0.9em;
  overflow: hidden;
  font-family: "C64ProMono", "C64 Pro Mono", "Pet Me 64", "Cousine", "Courier New", monospace;
  color: #6c5eb5;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1;
  letter-spacing: 0;
  white-space: pre;
  text-shadow: none;
}

.c64-cursor {
  display: inline-block;
  width: 1ch;
  height: 24px;
  margin-left: 3px;
  background: #6c5eb5;
  vertical-align: -4px;
  animation: c64-blink 1s step-end infinite;
}

body.c64-active #scanline,
body.c64-active #vignette,
body.c64-active #flicker,
body.c64-active #statusbar {
  display: none !important;
}

/* Amiga easter egg program overlay */
#amiga-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: #ffffff;
  color: #e3e3e3;
  display: flex;
  align-items: center;
  justify-content: center;
}

#amiga-screen {
  width: 26vw;
  max-width: 416px;
  min-width: 180px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
}

#amiga-screen-img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

@media (max-width: 900px) {
  #amiga-screen {
    width: 45.5vw;
  }
}

body.amiga-active #scanline,
body.amiga-active #vignette,
body.amiga-active #flicker,
body.amiga-active #statusbar {
  display: none !important;
}

/* Matrix easter egg program overlay */
#matrix-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: #000;
  overflow: hidden;
}

#matrix-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

body.matrix-active #scanline,
body.matrix-active #vignette,
body.matrix-active #flicker,
body.matrix-active #statusbar {
  display: none !important;
}

/* Pacman (Atari-style) easter egg overlay */
#pacman-overlay {
  position: fixed;
  inset: 0;
  z-index: 10070;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pacman-canvas {
  width: auto;
  height: min(92vh, 768px);
  max-width: 96vw;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}

body.pacman-active #scanline,
body.pacman-active #vignette,
body.pacman-active #flicker,
body.pacman-active #statusbar {
  display: none !important;
}

@keyframes c64-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Scan Cinematic HUD ───────────────────────────────────────────────── */
#scan-cinematic-overlay {
  position: fixed;
  right: 14px;
  top: 58px;
  min-width: 270px;
  max-width: 42vw;
  padding: 10px 12px;
  border: 1px solid #1d4f1d;
  background: linear-gradient(135deg, rgba(5, 18, 5, 0.96), rgba(4, 8, 4, 0.94));
  box-shadow: 0 0 0 1px rgba(72, 150, 72, 0.25) inset, 0 0 16px rgba(57, 255, 20, 0.18);
  z-index: 2200;
  pointer-events: none;
  animation: cine-enter 180ms ease-out;
}

#scan-cinematic-overlay .scan-cine-title {
  font: 700 11px/1.2 monospace;
  letter-spacing: 1.6px;
  color: #8af58a;
  text-shadow: 0 0 8px rgba(138, 245, 138, 0.35);
}

#scan-cinematic-overlay .scan-cine-phase {
  margin-top: 7px;
  font: 400 12px/1.25 monospace;
  color: #d6ffd6;
}

#scan-cinematic-overlay .scan-cine-meta {
  margin-top: 3px;
  font: 400 11px/1.25 monospace;
  color: #7ab97a;
}

#scan-cinematic-overlay.ok {
  border-color: #2f7e2f;
  box-shadow: 0 0 0 1px rgba(104, 200, 104, 0.35) inset, 0 0 20px rgba(114, 255, 114, 0.25);
}

#scan-cinematic-overlay.fail {
  border-color: #6e2a2a;
  box-shadow: 0 0 0 1px rgba(170, 84, 84, 0.35) inset, 0 0 18px rgba(170, 84, 84, 0.25);
}

body.scan-cinematic-active #scan-radar-line {
  background: linear-gradient(90deg, rgba(2, 8, 2, 0.96), rgba(4, 16, 4, 0.96));
  border-bottom-color: #2a6c2a;
  box-shadow: 0 1px 0 rgba(94, 180, 94, 0.2), 0 0 16px rgba(57, 255, 20, 0.08);
}

@keyframes cine-enter {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   LYNX BOARD OVERLAY — dn://board.dn
   ═══════════════════════════════════════════════════════════════════ */

#lynx-overlay,
#shop-overlay,
#hw-overlay,
#pine-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    z-index: 9000;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    background: #0a0908;
    font-family: var(--dn-font-main);
    font-size: inherit;
    color: #d0c8bf;
    text-shadow: none;
}
.dn-center-loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 9150;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    width: min(260px, 60vw);
    min-height: 120px;
    border: 1px solid #6f6a63;
    background: rgba(12, 10, 9, 0.92);
    box-shadow: 0 0 0 1px rgba(210, 185, 170, 0.18) inset;
    pointer-events: none;
}
.dn-center-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 191, 152, 0.24);
    border-top-color: #ffbf98;
    border-radius: 50%;
    animation: dn-spin 0.9s linear infinite;
}
.dn-center-text {
    color: #ffbf98;
    font-size: 12px;
    letter-spacing: 1.1px;
}
@keyframes dn-spin {
    to { transform: rotate(360deg); }
}
#shop-overlay.dn-loading #shop-center-loader,
#hw-overlay.dn-loading #hw-center-loader,
#pine-overlay.dn-loading #pine-center-loader {
    display: flex;
}

/* Channel bar (board tabs) */
#lynx-overlay {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    font-family: var(--dn-font-main);
    font-size: 16px;
}
#lynx-channel-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 12px 5px;
    background: #141210;
    border-bottom: 1px solid #3a302a;
    font-size: 15px;
    flex-shrink: 0;
}
#lynx-channel-bar:empty { display: none; }
.lx-channel-tab {
    color: #7a7268;
    cursor: default;
    padding: 3px 8px;
    letter-spacing: 0.2px;
    line-height: 1.2;
    transition: color 0.12s ease, background 0.12s ease;
    position: relative;
}
.lx-channel-tab:hover {
    color: #bfb3a8;
}
.lx-channel-tab.lx-channel-active {
    color: #ffbf98;
    background: #3a1f14;
    border-bottom: 2px solid #ffbf98;
}
.lx-channel-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffbf98;
    margin-left: 4px;
    vertical-align: 2px;
    animation: lx-dot-pulse 2s ease-in-out infinite;
}
@keyframes lx-dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
.lx-news-masthead {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
    width: 100%;
}
.lx-news-name {
    color: #e6edf7;
    font-size: 30px;
    letter-spacing: 1.8px;
    font-weight: bold;
    line-height: 1.05;
    text-transform: uppercase;
}
.lx-news-tagline {
    color: #9fb1c9;
    font-size: 15px;
    letter-spacing: 0.35px;
}

/* Titlebar */
#lynx-titlebar,
#shop-titlebar,
#hw-titlebar,
#pine-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    border-bottom: 1px solid #6e6a66;
    background: #8d8a86;
    color: #141414;
    font-size: 12px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}
#lynx-url-label,
#shop-url-label,
#hw-url-label,
#pine-url-label {
    color: #141414;
    font-weight: bold;
}
#lynx-url-wrap,
#shop-url-wrap,
#hw-url-wrap,
#pine-url-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
#lynx-brand,
#shop-brand,
#hw-brand,
#pine-brand {
    display: inline-block;
    background: #6f6c68;
    color: #111;
    border: 1px solid #5d5a57;
    padding: 0 6px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.3px;
}
#lynx-spinner,
#shop-spinner,
#hw-spinner,
#pine-spinner {
    color: #141414;
    animation: lx-blink 1s step-start infinite;
}
@keyframes lx-blink { 50% { opacity: 0; } }

/* Scrollable body */
#lynx-body,
#shop-body,
#hw-body,
#pine-body {
    grid-row: 2;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px 12px;
    scrollbar-width: auto;
    scrollbar-color: #927568 #0a0908;
}
#lynx-body::-webkit-scrollbar,
#shop-body::-webkit-scrollbar,
#hw-body::-webkit-scrollbar,
#pine-body::-webkit-scrollbar { width: 10px; }
#lynx-body::-webkit-scrollbar-track,
#shop-body::-webkit-scrollbar-track,
#hw-body::-webkit-scrollbar-track,
#pine-body::-webkit-scrollbar-track { background: #0a0908; }
#lynx-body::-webkit-scrollbar-thumb,
#shop-body::-webkit-scrollbar-thumb,
#hw-body::-webkit-scrollbar-thumb,
#pine-body::-webkit-scrollbar-thumb { background: #927568; border-radius: 4px; }

/* Statusbar */
#lynx-statusbar,
#shop-statusbar,
#hw-statusbar,
#pine-statusbar {
    grid-row: 3;
    padding: 6px 10px;
    border-top: 1px solid #8a6a5b;
    background: #3a1f14;
    color: #ffbf98;
    font-size: 12px;
    line-height: 1.35;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 6px 10px;
    overflow: visible;
}

/* Board layout must stay: titlebar -> channel bar -> body -> statusbar */
#lynx-titlebar {
    grid-row: 1;
    padding: 5px 12px;
    font-size: 15px;
}
#lynx-url-wrap {
    gap: 10px;
}
#lynx-url-label {
    font-size: 15px;
}
#lynx-brand {
    padding: 0 7px;
    font-size: 12px;
}
#lynx-channel-bar { grid-row: 2; }
#lynx-body {
    grid-row: 3;
    padding: 10px 12px 12px;
    font-size: 16px;
}
#lynx-statusbar {
    grid-row: 4;
    padding: 4px 12px 5px;
    font-size: 14px;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 14px;
    align-items: center;
    overflow-x: auto;
}

/* News surface profile (same global font, calmer neutral presentation) */
#lynx-overlay.lx-surface-news {
    background:
      radial-gradient(1000px 520px at -10% -20%, rgba(57, 82, 116, 0.16), transparent 62%),
      radial-gradient(900px 540px at 110% 120%, rgba(45, 72, 104, 0.14), transparent 60%),
      #080b10;
    color: #d7e0ec;
}
#lynx-overlay.lx-surface-news #lynx-titlebar {
    background: linear-gradient(90deg, #4c5564 0%, #5a6576 46%, #4b5565 100%);
    border-bottom-color: #7c899b;
    color: #f1f5fb;
}
#lynx-overlay.lx-surface-news #lynx-url-label,
#lynx-overlay.lx-surface-news #lynx-spinner {
    color: #f1f5fb;
}
#lynx-overlay.lx-surface-news #lynx-brand {
    background: #d8dee7;
    border-color: #b5c0cf;
    color: #1f2b3a;
}
#lynx-overlay.lx-surface-news #lynx-channel-bar {
    background: rgba(19, 26, 37, 0.86);
    border-bottom-color: #3e526a;
}
#lynx-overlay.lx-surface-news #lynx-body {
    scrollbar-color: #607a97 #080b10;
}
#lynx-overlay.lx-surface-news #lynx-statusbar {
    background: linear-gradient(180deg, #1e2b3a, #182432);
    border-top-color: #4f657f;
    color: #dce6f3;
}
#lynx-overlay.lx-surface-news #lynx-statusbar .lx-key {
    background: #d8e4f5;
    border-color: #a9bddb;
    color: #1c2a3d;
}
#lynx-overlay.lx-surface-news #lynx-statusbar .lx-key-desc {
    color: #dce6f3;
}
#lynx-overlay.lx-surface-news .lx-list-meta {
    color: #a7b9d0;
    font-size: 15px;
    padding-bottom: 10px;
}
#lynx-overlay.lx-surface-news .lx-thread-row {
    color: #d7e0ec;
}
#lynx-overlay.lx-surface-news .lx-thread-row .lx-handle {
    color: #9dc0ea;
}
#lynx-overlay.lx-surface-news .lx-thread-row .lx-sep {
    color: #7590ad;
}
#lynx-overlay.lx-surface-news .lx-thread-row .lx-meta {
    color: #9fb2c9;
}
#lynx-overlay.lx-surface-news .lx-thread-row.lx-cursor {
    background: #cdd8e8;
    border-left-color: #ffffff;
}
#lynx-overlay.lx-surface-news .lx-post {
    background: #0b121b;
    border-left-color: #4f657f;
}
#lynx-overlay.lx-surface-news .lx-post-op {
    background: #111a26;
    border-left-color: #6f8daf;
}
#lynx-overlay.lx-surface-news .lx-post-header .lx-handle {
    color: #9dc0ea;
}
#lynx-overlay.lx-surface-news .lx-post-header .lx-ts {
    color: #9eb1c9;
}
#lynx-overlay.lx-surface-news .lx-post-body {
    color: #d7e0ec;
}
#lynx-overlay.lx-surface-news .lx-divider {
    color: #4f657f;
}
#lynx-overlay.lx-surface-news .lx-news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 2px 4px 10px;
}
#lynx-overlay.lx-surface-news .lx-news-card {
    display: flex;
    flex-direction: column;
    min-height: 196px;
    border: 1px solid #48617f;
    background: rgba(16, 24, 35, 0.9);
    padding: 10px 11px;
    transition: border-color 0.12s ease, background 0.12s ease;
}
#lynx-overlay.lx-surface-news .lx-news-card:hover {
    border-color: #6f8daf;
    background: rgba(22, 32, 48, 0.95);
}
.lx-news-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
#lynx-overlay.lx-surface-news .lx-news-card-title {
    margin: 0;
    color: #e6edf7;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.24;
}
#lynx-overlay.lx-surface-news .lx-news-card-date {
    color: #9fb1c9;
    font-size: 13px;
}
#lynx-overlay.lx-surface-news .lx-news-card-excerpt {
    margin: 10px 0 0;
    color: #d7e0ec;
    font-size: 15px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}
#lynx-overlay.lx-surface-news .lx-news-card.lx-cursor {
    background: #d6e0ee;
    border-color: #ffffff;
}
#lynx-overlay.lx-surface-news .lx-news-card.lx-cursor .lx-news-card-title,
#lynx-overlay.lx-surface-news .lx-news-card.lx-cursor .lx-news-card-date,
#lynx-overlay.lx-surface-news .lx-news-card.lx-cursor .lx-news-card-excerpt {
    color: #1b2533;
}
/* NPC styles on news surface */
#lynx-overlay.lx-surface-news .lx-handle-npc { color: #6dc287; }
#lynx-overlay.lx-surface-news .lx-post-npc {
    border-left-color: #4ca068;
}
#lynx-overlay.lx-surface-news .lx-news-article {
    width: min(980px, 100%);
    margin: 4px auto 16px;
    padding: 2px 10px 16px;
}
#lynx-overlay.lx-surface-news .lx-news-article-head {
    border-bottom: 1px solid #4f657f;
    margin-bottom: 14px;
    padding-bottom: 10px;
}
#lynx-overlay.lx-surface-news .lx-news-article-title {
    margin: 0;
    color: #eef3fb;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}
#lynx-overlay.lx-surface-news .lx-news-article-meta {
    margin-top: 8px;
    color: #9fb1c9;
    font-size: 15px;
}
#lynx-overlay.lx-surface-news .lx-news-article-body p {
    margin: 0 0 14px;
    color: #d7e0ec;
    font-size: 20px;
    line-height: 1.65;
    max-width: 72ch;
}
#lynx-overlay.lx-surface-news .lx-news-article-author {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #445a73;
    color: #9fb1c9;
    font-size: 15px;
    letter-spacing: 0.2px;
}
@media (max-width: 1400px) {
    #lynx-overlay.lx-surface-news .lx-news-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 980px) {
    #lynx-overlay.lx-surface-news .lx-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #lynx-overlay.lx-surface-news .lx-news-article-title {
        font-size: 28px;
    }
    #lynx-overlay.lx-surface-news .lx-news-article-body p {
        font-size: 18px;
    }
}
@media (max-width: 640px) {
    #lynx-overlay.lx-surface-news .lx-news-grid {
        grid-template-columns: 1fr;
    }
    #lynx-overlay.lx-surface-news .lx-news-card {
        min-height: 170px;
    }
    #lynx-overlay.lx-surface-news .lx-news-article-title {
        font-size: 24px;
    }
    #lynx-overlay.lx-surface-news .lx-news-article-body p {
        font-size: 17px;
    }
}

/* Hardware broker app: intentionally distinct visual profile */
#hw-overlay {
    background:
      radial-gradient(1200px 600px at -20% -10%, rgba(34, 88, 84, 0.28), transparent 62%),
      radial-gradient(900px 500px at 120% 120%, rgba(24, 61, 74, 0.26), transparent 58%),
      #060c10;
    color: #c7e2df;
}
#hw-titlebar {
    position: relative;
    background: linear-gradient(90deg, #18444a 0%, #1f5c63 45%, #1a5057 100%);
    border-bottom: 1px solid #5ca5ad;
    color: #d9f5f1;
}
#hw-url-label { color: #d9f5f1; }
#hw-brand {
    background: #7ee7d8;
    color: #052027;
    border-color: #61c8ba;
}
#hw-spinner { color: #d9f5f1; }
#hw-body {
    scrollbar-color: #2b8f97 #060c10;
    overflow: hidden;
}
#shop-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.lx-shop-listpane {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: auto;
    scrollbar-color: #927568 #0a0908;
}
.lx-shop-listpane::-webkit-scrollbar { width: 10px; }
.lx-shop-listpane::-webkit-scrollbar-track { background: #0a0908; }
.lx-shop-listpane::-webkit-scrollbar-thumb { background: #927568; border-radius: 4px; }
#hw-statusbar {
    background: linear-gradient(180deg, #113238, #0d272c);
    border-top: 1px solid #2e7780;
    color: #8be5d7;
}
#pine-overlay {
    background:
      radial-gradient(1000px 520px at -10% -20%, rgba(60, 74, 96, 0.24), transparent 60%),
      radial-gradient(900px 520px at 120% 120%, rgba(35, 55, 80, 0.20), transparent 58%),
      #0a0d12;
    color: #d2dae4;
}
#pine-titlebar {
    background: linear-gradient(90deg, #3a4658 0%, #485872 45%, #3b4a60 100%);
    border-bottom: 1px solid #8095b5;
    color: #edf2fa;
}
#pine-url-label { color: #edf2fa; }
#pine-brand {
    background: #d8e4ff;
    color: #1d2a41;
    border-color: #adbfdd;
}
#pine-spinner { color: #edf2fa; }
#pine-statusbar {
    background: linear-gradient(180deg, #2d3748, #222a36);
    border-top: 1px solid #5d6f89;
    color: #d7e2f4;
}
#pine-statusbar .lx-key {
    background: #d8e4ff;
    border-color: #adbfdd;
    color: #1d2a41;
}
#pine-statusbar .lx-key-desc { color: #d7e2f4; }
#pine-body .pine-read-body {
    white-space: pre-wrap;
    color: #dde4ef;
    border: 1px solid #495b75;
    background: rgba(20, 29, 41, 0.8);
    margin: 10px 6px;
    padding: 10px;
    line-height: 1.35;
}
.pine-attachment {
    margin: 12px 6px 6px;
    padding: 8px 10px;
    border: 1px solid #5a8f5a;
    background: rgba(20, 50, 30, 0.6);
    border-radius: 4px;
}
.pine-attach-icon {
    color: #7fd97f;
    font-weight: 700;
}
.pine-attach-name {
    color: #b8e8b8;
    font-weight: 600;
}
.pine-attach-hint {
    color: #6a9a6a;
    font-size: 11px;
    margin-top: 4px;
}
.pine-attach-pending {
    border-color: #8f8f5a;
    background: rgba(50, 50, 20, 0.6);
}
.pine-attach-pending .pine-attach-icon {
    color: #c9c97a;
}
.pine-attach-pending .pine-attach-hint {
    color: #9a9a6a;
}
.pine-attach-badge {
    color: #7fd97f;
    font-weight: 700;
    font-size: 11px;
}
#pine-body .pine-mail-row.pine-mail-read:not(.lx-cursor) {
    color: #9aabba;
    opacity: 0.78;
}
#pine-body .pine-mail-row.pine-mail-unread:not(.lx-cursor) .lx-content {
    font-weight: 700;
}
#pine-body .pine-compose {
    padding: 6px;
}
#pine-body .pine-compose-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}
#pine-body .pine-compose-row label {
    color: #afbdd2;
    font-size: 12px;
}
#pine-body .pine-compose-row input,
#pine-body .pine-compose-row textarea {
    border: 1px solid #546886;
    background: rgba(18, 25, 35, 0.9);
    color: #e2eaf7;
    font: inherit;
    padding: 6px 8px;
    outline: none;
}
#pine-body .pine-compose-row textarea {
    min-height: 240px;
    resize: vertical;
}
#pine-body .pine-compose-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px;
}
#pine-body .pine-compose-actions button {
    border: 1px solid #7a8fab;
    background: #223046;
    color: #e2eaf7;
    padding: 4px 10px;
    font: inherit;
    cursor: pointer;
}
#pine-body .pine-compose-actions button:hover,
#pine-body .pine-compose-actions button:focus {
    outline: none;
    border-color: #a8b9d4;
    background: #2b3a52;
}
#pine-body .pine-compose-hint {
    color: #a8b5c8;
    font-size: 12px;
    margin-left: 6px;
}
#pine-body .pine-compose-notice {
    min-height: 18px;
    color: #ffbf98;
    font-size: 12px;
}
#hw-statusbar .lx-key {
    background: #89e7d9;
    border-color: #60c5b7;
    color: #052027;
}
#hw-statusbar .lx-key-desc {
    color: #8be5d7;
}
#hw-body .hw-meta {
    color: #92d7d0;
    border: 1px dashed #2f747b;
    background: rgba(18, 47, 56, 0.45);
    padding: 6px 8px;
    margin: 0 0 8px 0;
    font-size: 12px;
}
#hw-body .hw-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
#hw-body .hw-tab {
    border: 1px solid #2f6d74;
    color: #8ecdc5;
    background: rgba(14, 40, 46, 0.7);
    padding: 2px 8px;
    font-size: 11px;
    letter-spacing: 0.4px;
}
#hw-body .hw-tab.hw-tab-active {
    border-color: #76d8ca;
    color: #042026;
    background: #84e7d8;
}
#hw-body .hw-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 8px;
    border-left: 2px solid transparent;
    color: #c7e2df;
}
#hw-body .hw-row.hw-cursor {
    background: rgba(121, 220, 208, 0.22);
    border-left-color: #8ef0e0;
}
#hw-body .hw-id {
    width: 4.8ch;
    flex-shrink: 0;
    color: #7ed9ce;
}
#hw-body .hw-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#hw-body .hw-sep {
    color: #6ea9a3;
}
#hw-body .hw-chip {
    flex-shrink: 0;
    font-size: 11px;
    padding: 1px 6px;
    border: 1px solid #3f7f85;
}
#hw-body .hw-chip-owned {
    color: #b3ebe2;
    border-color: #4e8f96;
}
#hw-body .hw-chip-sale {
    color: #07242c;
    background: #7fe9da;
    border-color: #5fc7b9;
}
#hw-body .hw-chip-active {
    color: #0f1317;
    background: #e6bf72;
    border-color: #bf9548;
}

/* Broker relay - dense 2000s product desk */
.brx-overlay-lock { overflow: hidden; }
.brx-overlay {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: none;
    place-items: stretch;
    background:
        linear-gradient(180deg, rgba(3, 6, 10, 0.985), rgba(5, 8, 11, 0.995)),
        repeating-linear-gradient(180deg, rgba(133, 154, 176, 0.028) 0, rgba(133, 154, 176, 0.028) 1px, transparent 1px, transparent 3px);
}
.brx-window {
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background:
        radial-gradient(circle at top left, rgba(255, 184, 84, 0.08), transparent 24%),
        radial-gradient(circle at bottom right, rgba(94, 164, 219, 0.07), transparent 20%),
        linear-gradient(180deg, #0b1015, #070d12);
    color: #d8e1ea;
    font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
    box-shadow: inset 0 0 0 1px rgba(88, 109, 128, 0.36);
}
.brx-kicker,
.brx-rail-title,
.brx-route-code,
.brx-route-label,
.brx-grid-col,
.brx-section-tag,
.brx-value-label,
.brx-metric-label,
.brx-pulse-label,
.brx-statusline,
.brx-tape-index,
.brx-tech-head {
    text-transform: uppercase;
    letter-spacing: 0.11em;
}
.brx-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, auto) auto;
    gap: 12px;
    align-items: stretch;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(88, 109, 128, 0.4);
    background: linear-gradient(180deg, rgba(18, 24, 31, 0.98), rgba(12, 17, 22, 0.985));
}
.brx-kicker {
    color: #6fa7d2;
    font-size: 10px;
}
.brx-brandrow {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 4px;
}
.brx-brand {
    color: #f5e8c2;
    font: 700 27px/1 Tahoma, Verdana, sans-serif;
    letter-spacing: 0.16em;
}
.brx-stamp {
    padding: 4px 8px 3px;
    border: 1px solid rgba(255, 184, 84, 0.46);
    background: linear-gradient(180deg, rgba(255, 184, 84, 0.16), rgba(255, 184, 84, 0.05));
    color: #f1c068;
    font: 700 10px/1 Tahoma, Verdana, sans-serif;
    letter-spacing: 0.13em;
}
.brx-subline,
.brx-board-strap,
.brx-empty-copy,
.brx-focus-state,
.brx-deal-copy,
.brx-tape-copy,
.brx-popup-line,
.brx-popup-hint,
.brx-popup-label {
    font: 12px/1.45 Tahoma, Verdana, sans-serif;
    color: #9dadba;
}
.brx-subline { margin-top: 7px; }
.brx-mast {
    display: grid;
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    gap: 1px;
    border: 1px solid rgba(80, 99, 117, 0.34);
    background: rgba(80, 99, 117, 0.2);
    align-self: start;
}
.brx-metric,
.brx-pulse-cell {
    background: linear-gradient(180deg, rgba(12, 18, 24, 0.96), rgba(8, 13, 18, 0.98));
}
.brx-metric {
    padding: 8px 10px;
}
.brx-metric-label,
.brx-pulse-label {
    display: block;
    color: #7d91a4;
    font-size: 9px;
}
.brx-metric-value,
.brx-pulse-value,
.brx-value-data,
.brx-focus-meta,
.brx-cell-1,
.brx-cell-3,
.brx-cell-4,
.brx-cell-5,
.brx-tape-index {
    font-family: Consolas, "Lucida Console", "Courier New", monospace;
}
.brx-metric-value,
.brx-pulse-value {
    display: block;
    margin-top: 5px;
    color: #eef5fb;
    font-size: 13px;
    font-weight: 700;
}
.brx-close,
.brx-btn {
    border: 1px solid rgba(90, 108, 126, 0.48);
    background: linear-gradient(180deg, rgba(23, 31, 40, 0.98), rgba(12, 17, 23, 0.98));
    color: #d8e0e8;
    font: 700 11px/1 Tahoma, Verdana, sans-serif;
    letter-spacing: 0.1em;
    cursor: pointer;
}
.brx-close {
    padding: 11px 14px;
}
.brx-btn-primary {
    border-color: rgba(255, 184, 84, 0.5);
    background: linear-gradient(180deg, rgba(255, 184, 84, 0.16), rgba(255, 184, 84, 0.06));
    color: #fff0c7;
}
.brx-btn-disabled {
    opacity: 0.45;
    cursor: default;
}
.brx-shell {
    min-height: 0;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    gap: 0;
}
.brx-rail,
.brx-board,
.brx-desk {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(10, 15, 20, 0.98), rgba(7, 11, 16, 0.99));
}
.brx-rail,
.brx-board {
    border-right: 1px solid rgba(80, 99, 117, 0.34);
}
.brx-rail-title,
.brx-board-head,
.brx-focus-head,
.brx-deal-desk,
.brx-guide-strip,
.brx-tape-head {
    border-bottom: 1px solid rgba(78, 96, 114, 0.28);
}
.brx-rail-title {
    padding: 11px 12px 9px;
    color: #7cc8fb;
    font-size: 10px;
}
.brx-route-stack,
.brx-pulse-grid {
    display: grid;
    gap: 1px;
    background: rgba(80, 99, 117, 0.22);
}
.brx-route {
    display: grid;
    gap: 4px;
    padding: 11px 12px 10px;
    border: 0;
    text-align: left;
    background: linear-gradient(180deg, rgba(13, 18, 24, 0.98), rgba(9, 13, 18, 0.99));
    color: #d3dde6;
    cursor: pointer;
}
.brx-route-label { font-size: 12px; color: #edf4f9; }
.brx-route-code { font-size: 10px; color: #7f93a5; }
.brx-route-active {
    background: linear-gradient(180deg, rgba(255, 184, 84, 0.14), rgba(92, 145, 191, 0.1));
    box-shadow: inset 3px 0 0 #ffc46a;
}
.brx-route-active .brx-route-label { color: #ffe8b9; }
.brx-route-active .brx-route-code { color: #f0bd61; }
.brx-pulse-grid {
    grid-template-columns: 1fr 1fr;
    margin-top: auto;
}
.brx-pulse-cell { padding: 10px 12px; }
.brx-board-head,
.brx-focus-head,
.brx-deal-desk {
    padding: 12px 14px;
}
.brx-board-title {
    color: #f1f5f8;
    font: 700 17px/1.15 Tahoma, Verdana, sans-serif;
}
.brx-section-tag {
    color: #79c6f9;
    font-size: 10px;
    margin-right: 8px;
}
.brx-board-strap { margin-top: 7px; }
.brx-grid-head,
.brx-row {
    display: grid;
    grid-template-columns: 2.05fr 1.05fr 0.88fr 0.88fr 0.92fr;
    gap: 10px;
    align-items: center;
}
.brx-grid-head {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(78, 96, 114, 0.28);
    background: linear-gradient(180deg, rgba(18, 24, 30, 0.98), rgba(14, 19, 25, 0.985));
}
.brx-grid-col {
    font-size: 9px;
    color: #7f93a5;
}
.brx-grid-body,
.brx-rows,
.brx-tape-body {
    min-height: 0;
    overflow: auto;
}
.brx-grid-body {
    position: relative;
    flex: 1 1 auto;
}
.brx-row {
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-bottom: 1px solid rgba(78, 96, 114, 0.18);
    background: linear-gradient(180deg, rgba(10, 15, 20, 0.96), rgba(7, 11, 16, 0.99));
    text-align: left;
    color: #d5dde5;
    cursor: pointer;
    font: 12px/1.35 Tahoma, Verdana, sans-serif;
}
.brx-row-active {
    background: linear-gradient(180deg, rgba(255, 184, 84, 0.14), rgba(78, 135, 182, 0.1));
    box-shadow: inset 3px 0 0 #ffc46a;
}
.brx-cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brx-empty-state {
    padding: 28px 20px;
}
.brx-empty-title {
    color: #eff5fa;
    font: 700 15px/1.2 Tahoma, Verdana, sans-serif;
}
.brx-empty-copy { margin-top: 8px; max-width: 44ch; }
.brx-focus-title {
    color: #f4ebcf;
    font: 700 18px/1.15 Tahoma, Verdana, sans-serif;
    letter-spacing: 0.05em;
}
.brx-focus-meta {
    margin-top: 6px;
    color: #81c8fa;
    font-size: 11px;
}
.brx-focus-state { margin-top: 8px; color: #efc06c; }
.brx-focus-body {
    min-height: 0;
    overflow: auto;
    padding: 0 14px 14px;
}
.brx-value-table {
    display: grid;
    gap: 1px;
    margin-top: 1px;
    background: rgba(80, 99, 117, 0.22);
}
.brx-value-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 12px;
    background: rgba(10, 16, 22, 0.98);
}
.brx-value-label {
    color: #7f94a7;
    font-size: 9px;
}
.brx-value-data {
    color: #eef5fb;
    font-size: 12px;
}
.brx-tech-head {
    margin-top: 12px;
    color: #7cc8fb;
    font-size: 10px;
}
.brx-tech-list {
    margin-top: 8px;
    display: grid;
    gap: 5px;
}
.brx-tech-line {
    font: 12px/1.4 Tahoma, Verdana, sans-serif;
    color: #a4b4c1;
}
.brx-deal-copy {
    padding: 0 14px 12px;
}
.brx-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px 14px;
}
.brx-btn { padding: 11px 12px; }
.brx-guide-strip,
.brx-tape-head,
.brx-statusline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 10px 14px;
    background: rgba(14, 20, 26, 0.92);
    color: #90a3b5;
    font-size: 10px;
}
.brx-tape {
    border-top: 1px solid rgba(78, 96, 114, 0.28);
    background: rgba(8, 13, 18, 0.98);
}
.brx-tape-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(78, 96, 114, 0.16);
}
.brx-tape-index {
    color: #6fa7d2;
    font-size: 10px;
}
.brx-tape-empty {
    padding: 14px;
    font: 12px/1.4 Tahoma, Verdana, sans-serif;
    color: #95a6b5;
}
.brx-statusline {
    justify-content: space-between;
    border-top: 1px solid rgba(88, 109, 128, 0.36);
}
.brx-popup {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 10, 0.74);
}
.brx-popup-card {
    width: min(470px, calc(100% - 34px));
    padding: 16px 18px;
    border: 1px solid rgba(255, 184, 84, 0.5);
    background: linear-gradient(180deg, rgba(18, 24, 31, 0.995), rgba(10, 14, 20, 0.995));
    box-shadow: 0 18px 64px rgba(0, 0, 0, 0.55);
}
.brx-popup-title {
    color: #f7ecd1;
    font: 700 17px/1.2 Tahoma, Verdana, sans-serif;
}
.brx-popup-input {
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(83, 100, 118, 0.48);
    background: #071018;
    color: #eef6fc;
    font: 700 13px/1 Consolas, "Lucida Console", "Courier New", monospace;
}
@media (max-width: 1220px) {
    .brx-topbar {
        grid-template-columns: minmax(0, 1fr);
    }
    .brx-mast {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .brx-shell {
        grid-template-columns: 220px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) 280px;
    }
    .brx-desk {
        grid-column: 1 / -1;
        border-top: 1px solid rgba(80, 99, 117, 0.34);
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        grid-template-rows: minmax(0, 1fr);
    }
    .brx-focus-head,
    .brx-focus-body {
        grid-column: 1;
    }
    .brx-deal-desk,
    .brx-guide-strip {
        grid-column: 2;
    }
}
@media (max-width: 840px) {
    .brx-shell,
    .brx-desk {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
    }
    .brx-rail,
    .brx-board {
        border-right: 0;
        border-bottom: 1px solid rgba(80, 99, 117, 0.34);
    }
    .brx-grid-head {
        display: none;
    }
    .brx-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }
    .brx-cell {
        white-space: normal;
    }
    .brx-statusline {
        justify-content: flex-start;
    }
}
#hw-ticker {
    border-top: 1px solid #22535b;
    border-bottom: 1px solid #22535b;
    background: rgba(9, 29, 36, 0.9);
    color: #7dd8cb;
    font-size: 12px;
    padding: 4px 10px;
    letter-spacing: 0.8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#hw-body .hw-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
    gap: 14px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
#hw-body .hw-col {
    border: 1px solid #22535b;
    background: rgba(6, 19, 25, 0.74);
    min-height: 0;
    overflow: auto;
}
#hw-body .hw-col.hw-col-rack {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
}
#hw-body .hw-col.hw-col-focus {
    border-color: #79e0d2;
    box-shadow: 0 0 0 1px rgba(121, 224, 210, 0.35) inset;
}
#hw-body .hw-col-title {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(20, 63, 71, 0.95), rgba(24, 74, 83, 0.95));
    border-bottom: 1px solid #2f7078;
    color: #b6efe7;
    padding: 6px 8px;
    font-size: 12px;
    letter-spacing: 0.7px;
}
#hw-body .hw-empty {
    margin: 12px;
    border: 1px dashed #356d74;
    color: #8abeb8;
    background: rgba(12, 33, 39, 0.55);
    padding: 10px;
    text-transform: lowercase;
}
#hw-body .hw-rack-tools {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px;
    border-bottom: 1px dashed #2c636b;
    background: rgba(10, 31, 38, 0.85);
}
#hw-body .hw-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
#hw-body .hw-filter-chip,
#hw-body .hw-type-chip {
    border: 1px solid #2f6d74;
    color: #8ecdc5;
    background: rgba(14, 40, 46, 0.7);
    padding: 2px 7px;
    font-size: 11px;
    letter-spacing: 0.4px;
}
#hw-body .hw-filter-chip:hover,
#hw-body .hw-type-chip:hover {
    border-color: #76d8ca;
}
#hw-body .hw-filter-chip-active,
#hw-body .hw-type-chip-active {
    border-color: #d8be73;
    color: #1a1405;
    background: #e7cf88;
    box-shadow: 0 0 0 1px rgba(231, 207, 136, 0.35) inset;
    font-weight: bold;
}
#hw-body .hw-rack-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #2b8f97 #071219;
}
#hw-body .hw-card {
    position: relative;
    margin: 8px;
    border: 1px solid #2c646d;
    background: linear-gradient(180deg, rgba(16, 42, 50, 0.8), rgba(10, 28, 35, 0.8));
    padding: 8px 10px;
}
#hw-body .hw-card-sel {
    border-color: #9df5e8;
    outline: 2px solid #9df5e8;
    outline-offset: -2px;
    box-shadow:
        0 0 0 1px rgba(157, 245, 232, 0.55) inset,
        0 0 14px rgba(74, 196, 181, 0.35);
    background: linear-gradient(180deg, rgba(24, 58, 66, 0.84), rgba(15, 37, 44, 0.84));
}
#hw-body .hw-card-sel::after {
    content: '▶';
    position: absolute;
    left: 8px;
    top: 7px;
    color: #c9fff7;
    font-size: 11px;
    opacity: 0.95;
}
#hw-body .hw-card-sel .hw-card-id {
    padding-left: 13px;
    color: #c9fff7;
    font-weight: bold;
}
#hw-body .hw-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
#hw-body .hw-card-id {
    color: #78d6c8;
    font-size: 11px;
}
#hw-body .hw-card-state {
    color: #08313a;
    background: #84eadb;
    border: 1px solid #66cbbe;
    padding: 0 5px;
    font-size: 10px;
}
#hw-body .hw-card-active .hw-card-state {
    color: #1f1200;
    background: #e9c27b;
    border-color: #cda35b;
}
#hw-body .hw-card-active {
    border-color: #bf9548;
    background: linear-gradient(180deg, rgba(63, 47, 17, 0.86), rgba(43, 31, 10, 0.86));
}
#hw-body .hw-card-active .hw-card-name {
    color: #f1ddab;
}
#hw-body .hw-card-active .hw-card-sub {
    color: #cfb57d;
}
#hw-body .hw-card-active.hw-card-sel {
    border-color: #f2d08d;
    outline-color: #f2d08d;
    box-shadow:
        0 0 0 1px rgba(242, 208, 141, 0.65) inset,
        0 0 16px rgba(242, 208, 141, 0.28);
    background: linear-gradient(180deg, rgba(78, 57, 18, 0.9), rgba(52, 36, 10, 0.9));
}
#hw-body .hw-card-active.hw-card-sel .hw-card-id,
#hw-body .hw-card-active.hw-card-sel .hw-card-name {
    color: #fff1c8;
}
#hw-body .hw-card-name {
    color: #d5f4ef;
    font-size: 14px;
    margin-bottom: 2px;
}
#hw-body .hw-card-compat {
    display: inline-block;
    margin-left: 6px;
    padding: 0 4px;
    border: 1px solid #447d78;
    font-size: 10px;
    letter-spacing: 0.3px;
    vertical-align: 1px;
}
#hw-body .hw-card-compat-ok {
    color: #092016;
    background: #86d19c;
    border-color: #63ad79;
}
#hw-body .hw-card-compat-warn {
    color: #2a1b04;
    background: #e6c55a;
    border-color: #b89639;
}
#hw-body .hw-card-compat-error {
    color: #2b0909;
    background: #e38383;
    border-color: #b86464;
}
#hw-body .hw-card-sub {
    color: #88bbb4;
    font-size: 11px;
    letter-spacing: 0.4px;
}
#hw-body .hw-card-active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e9c27b;
    opacity: 0.72;
    animation: hwActivePulse 1.8s ease-in-out infinite;
}
@keyframes hwActivePulse {
    0%, 100% { opacity: 0.42; }
    50% { opacity: 0.9; }
}
#hw-body .hw-detail {
    margin: 10px;
    border: 1px solid #2e666f;
    background: rgba(9, 27, 34, 0.8);
    padding: 10px;
}
#hw-body .hw-detail-title {
    color: #d2f2ec;
    font-size: 14px;
    margin-bottom: 6px;
}
#hw-body .hw-detail-line {
    color: #92c8c1;
    font-size: 12px;
    margin: 2px 0;
}
#hw-body .hw-compat-ok {
    color: #86d19c;
    font-weight: bold;
}
#hw-body .hw-compat-warn {
    color: #e6c55a;
    font-weight: bold;
}
#hw-body .hw-compat-error {
    color: #e38383;
    font-weight: bold;
}
#hw-body .hw-actions {
    margin: 10px;
    border: 1px solid #2f6b73;
    background: rgba(8, 23, 29, 0.8);
}
#hw-body .hw-log {
    margin: 10px;
    border: 1px solid #2e636b;
    background: rgba(7, 21, 27, 0.82);
}
#hw-body .hw-log-title {
    color: #9fe4db;
    border-bottom: 1px dashed #2c5d64;
    padding: 6px 8px;
    font-size: 11px;
    letter-spacing: 0.6px;
}
#hw-body .hw-log-item {
    color: #86bab3;
    padding: 4px 8px;
    font-size: 11px;
    border-bottom: 1px dotted rgba(44, 93, 100, 0.45);
}
#hw-body .hw-log-item:last-child {
    border-bottom: 0;
}
#hw-body .hw-action {
    padding: 7px 9px;
    border-bottom: 1px dashed #2a5960;
    color: #9dd5ce;
    font-size: 12px;
}
#hw-body .hw-action:last-child {
    border-bottom: 0;
}
#hw-body .hw-action.hw-action-sel {
    background: rgba(123, 227, 214, 0.22);
    color: #defaf6;
}
#hw-body .hw-btn-bar {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
}
.hw-action-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--dn-font-main);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid rgba(99, 245, 226, 0.3);
    border-radius: 3px;
    background: rgba(99, 245, 226, 0.08);
    color: #9dd5ce;
}
.hw-action-btn:hover {
    background: rgba(99, 245, 226, 0.18);
    color: #defaf6;
}
.hw-action-btn-primary {
    background: rgba(99, 245, 226, 0.22);
    color: #63f5e2;
    border-color: rgba(99, 245, 226, 0.5);
}
.hw-action-btn-primary:hover {
    background: rgba(99, 245, 226, 0.35);
    color: #e8fffa;
    box-shadow: 0 0 8px rgba(99, 245, 226, 0.3);
}
.lx-popup-btn {
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--dn-font-main);
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid rgba(99, 245, 226, 0.3);
    border-radius: 3px;
    background: rgba(99, 245, 226, 0.08);
    color: #9dd5ce;
    margin: 0 4px;
}
.lx-popup-btn:hover {
    background: rgba(99, 245, 226, 0.2);
    color: #defaf6;
}
.lx-popup-btn-yes {
    background: rgba(99, 245, 226, 0.22);
    color: #63f5e2;
    border-color: rgba(99, 245, 226, 0.5);
}
.lx-popup-btn-yes:hover {
    background: rgba(99, 245, 226, 0.35);
    box-shadow: 0 0 8px rgba(99, 245, 226, 0.3);
}
.lx-shop-popup-btns {
    padding: 10px 0 4px;
    text-align: center;
}
#hw-body .hw-hint {
    margin: 10px;
    color: #7fb2ab;
    font-size: 11px;
    line-height: 1.4;
}
#hw-body .hw-col-action {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
body.hw-overlay-lock {
    overflow: hidden !important;
}
#hw-statusbar .hw-k {
    color: #8be5d7;
}

@media (max-width: 900px) {
    #hw-body .hw-shell {
        grid-template-columns: 1fr;
    }
}
.lx-hotkey {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex-shrink: 0;
}
.lx-key {
    display: inline-block;
    color: #1a1512;
    background: #ffbf98;
    border: 1px solid #d99873;
    padding: 0 4px;
    border-radius: 0;
    font-size: 12px;
    font-weight: bold;
}
.lx-key-desc {
    color: #ffbf98;
    white-space: nowrap;
    font-size: 13px;
}

/* Thread list */
.lx-thread-row {
    display: flex;
    align-items: baseline;
    padding: 5px 8px 5px 10px;
    cursor: default;
    border-left: 2px solid transparent;
    transition: background 0.12s ease, border-color 0.12s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d0c8bf;
    font-size: 16px;
    margin-bottom: 1px;
}
.lx-thread-row:hover {
    background: rgba(255, 191, 152, 0.06);
}
.lx-thread-row.lx-cursor {
    background: #c9b8ac;
    border-left: 2px solid #ffbf98;
    color: #15110e;
}
.lx-pin-icon { color: #ffb38c; margin-right: 4px; }
.lx-thread-row .lx-handle { color: #ff9b6b; min-width: 10ch; flex-shrink: 0; }
.lx-thread-row .lx-handle-npc { color: #86d19c; }
.lx-thread-row .lx-sep   { color: #8a6f60; flex-shrink: 0; }
.lx-thread-row .lx-content { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-thread-row .lx-meta  { color: #b8aaa0; flex-shrink: 0; margin-left: 8px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.lx-thread-row .lx-shop-item-compat {
    font-weight: bold;
    margin-left: 4px;
}
.lx-thread-row .lx-shop-item-compat-reason {
    color: #b59f92;
    font-size: 11px;
}
.lx-thread-row.lx-shop-item-blocked,
.lx-thread-row.lx-shop-item-incompat {
    border-left-color: #8f5050;
    background: rgba(110, 50, 50, 0.12);
}
.lx-thread-row .lx-unread {
    color: #1a1512;
    background: #ffbf98;
    border: 1px solid #d99873;
    padding: 0 4px;
    margin-right: 6px;
    font-size: 10px;
    font-weight: bold;
    vertical-align: 1px;
}
.lx-reply-count {
    display: inline-block;
    background: rgba(255, 155, 107, 0.18);
    color: #ff9b6b;
    border: 1px solid rgba(255, 155, 107, 0.3);
    padding: 0 4px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}
.lx-thread-row.lx-cursor .lx-reply-count {
    background: rgba(21, 17, 14, 0.15);
    color: #15110e;
    border-color: rgba(21, 17, 14, 0.25);
}
.lx-thread-row.lx-cursor .lx-pin-icon,
.lx-thread-row.lx-cursor .lx-handle,
.lx-thread-row.lx-cursor .lx-sep,
.lx-thread-row.lx-cursor .lx-content,
.lx-thread-row.lx-cursor .lx-meta { color: #15110e; }
.lx-thread-row.lx-cursor .lx-handle-npc { color: #15110e; }

/* Thread detail / posts */
.lx-post {
    padding: 10px 12px;
    margin: 4px 0;
    border-left: 2px solid #5a4a40;
    background: #0d0b0a;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.lx-post:hover {
    background: rgba(255, 191, 152, 0.04);
}
.lx-post-op {
    border-left: 2px solid #a17863;
    background: #141110;
    padding: 12px 14px;
    margin-bottom: 6px;
}
.lx-post-npc {
    border-left-color: #5caa72;
}
.lx-post-npc.lx-post-op {
    border-left-color: #6dc287;
}
.lx-post.lx-cursor {
    border-left: 2px solid #ffbf98;
    background: #c9b8ac;
}
.lx-post-op.lx-cursor {
    border-left: 2px solid #ffbf98;
}
.lx-post-header {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.lx-reply-num {
    color: #6f6a63;
    font-size: 11px;
    margin-right: 4px;
}
.lx-badge-op {
    color: #1a1512;
    font-weight: bold;
    font-size: 10px;
    background: #ffbf98;
    border: 1px solid #d99873;
    padding: 0 3px;
    margin-right: 4px;
}
.lx-badge-lock {
    color: #1a1512;
    font-weight: bold;
    font-size: 10px;
    background: #ff9b6b;
    border: 1px solid #c87852;
    padding: 0 3px;
    margin-right: 4px;
}
.lx-handle { color: #ff9b6b; }
.lx-handle-npc { color: #86d19c; }
.lx-crew-tag { color: #5a7a8a; font-size: 13px; }
.lx-post.lx-cursor .lx-crew-tag,
.lx-thread-row.lx-cursor .lx-crew-tag { color: #15110e; }
.lx-ts { color: #b8aaa0; font-size: 13px; }
.lx-post-body {
    color: #d0c8bf;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    font-size: 16px;
}
.lx-post.lx-cursor .lx-handle,
.lx-post.lx-cursor .lx-handle-npc,
.lx-post.lx-cursor .lx-ts,
.lx-post.lx-cursor .lx-reply-num,
.lx-post.lx-cursor .lx-post-body { color: #15110e; }
.lx-divider {
    color: #5a4a40;
    padding: 4px 0;
    letter-spacing: -1px;
    border: none;
    border-top: 1px solid #3a302a;
    text-indent: -9999px;
    height: 0;
    margin: 8px 0;
}

/* Compose box */
#lx-compose {
    margin-top: 16px;
    border: 1px solid #7f6557;
    border-left: 2px solid #ffbf98;
    padding: 14px 14px 12px;
    background: #141210;
}
#lx-search {
    margin-top: 10px;
    border: 1px solid #7f6557;
    border-left: 2px solid #ffbf98;
    padding: 14px 14px 12px;
    background: #141210;
}
#lx-search-input {
    display: block;
    width: 100%;
    background: #0a0908;
    border: 1px solid #927568;
    color: #e0d7cf;
    font-family: inherit;
    font-size: 15px;
    padding: 7px 8px;
    box-sizing: border-box;
    outline: none;
}
#lx-search-input:focus { border-color: #ffbf98; }
.lx-compose-title {
    color: #ffbf98;
    font-size: 14px;
    margin-bottom: 8px;
    text-transform: none;
}
#lx-compose-thread-title {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    background: #0a0908;
    border: 1px solid #927568;
    color: #e0d7cf;
    font-family: inherit;
    font-size: 15px;
    padding: 7px 8px;
    box-sizing: border-box;
    outline: none;
}
#lx-compose-thread-title:focus {
    border-color: #ffbf98;
}
#lx-compose-input {
    display: block;
    width: 100%;
    min-height: 92px;
    background: #0a0908;
    border: 1px solid #927568;
    color: #e0d7cf;
    font-family: inherit;
    font-size: 16px;
    padding: 9px 10px;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    caret-color: #ffbf98;
}
#lx-compose-input:focus {
    border-color: #ffbf98;
}
.lx-compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-size: 14px;
    gap: 10px;
}
#lx-compose-counter {
    color: #d0c1b6;
    font-size: 14px;
}
.lx-compose-hint {
    color: #bea79a;
    font-size: 14px;
}
#lx-compose-anon {
    accent-color: #ffbf98;
}
.lx-list-meta {
    color: #bea79a;
    padding: 4px 8px 10px;
    font-size: 13px;
    border-bottom: 1px solid #2a221d;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}
.lx-setup-meta {
    border-left: 2px solid #6d584d;
    padding-left: 8px;
}
.lx-severity-ok {
    color: #86d19c;
    font-weight: bold;
}
.lx-severity-warn {
    color: #e6c55a;
    font-weight: bold;
}
.lx-severity-error {
    color: #e38383;
    font-weight: bold;
}
.lx-compat-warning {
    color: #e6c55a;
    border-left: 2px solid #8f6a3d;
    padding-left: 8px;
    margin: 2px 8px 8px;
}
.lx-shop-section {
    margin-top: 10px;
    padding: 2px 6px;
    border-top: 1px solid #745f54;
    border-bottom: 1px solid #3d2f28;
    color: #ffbf98;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.4px;
    background: #130f0d;
}
.lx-shop-section:first-of-type {
    margin-top: 2px;
}
.lx-shop-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 4px 0 8px;
    padding: 0 6px;
}
.lx-shop-tab {
    display: inline-block;
    border: 1px solid #7a6255;
    color: #d0c1b6;
    background: #171412;
    padding: 1px 6px;
    font-size: 11px;
}
.lx-shop-tab.lx-shop-tab-active {
    color: #171412;
    background: #ffbf98;
    border-color: #d99873;
    font-weight: bold;
}
.lx-shop-popup {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 6, 5, 0.64);
}
.lx-shop-popup-inner {
    display: block;
    width: min(560px, 92vw);
    border: 1px solid #7f6557;
    background: rgba(20, 15, 13, 0.98);
    box-shadow: 0 0 0 1px rgba(255, 191, 152, 0.18) inset;
    padding: 12px 14px;
}
.lx-shop-popup-title {
    color: #ffbf98;
    font-weight: bold;
    margin-bottom: 4px;
}
.lx-shop-popup-text {
    color: #e2d7ce;
    margin-bottom: 4px;
}
.lx-shop-popup-hint {
    color: #bea79a;
}
.lx-shop-popup-confirm .lx-shop-popup-inner {
    border-color: #8f6a3d;
    box-shadow: 0 0 0 1px rgba(230, 197, 90, 0.24) inset;
}
.lx-shop-popup-confirm .lx-shop-popup-title {
    color: #e6c55a;
}
.lx-shop-popup-warn .lx-shop-popup-inner {
    border-color: #a87643;
    box-shadow: 0 0 0 1px rgba(255, 164, 92, 0.25) inset;
}
.lx-shop-popup-warn .lx-shop-popup-title {
    color: #ffa45c;
}
.lx-shop-popup-error .lx-shop-popup-inner {
    border-color: #9d5656;
    box-shadow: 0 0 0 1px rgba(227, 131, 131, 0.26) inset;
}
.lx-shop-popup-error .lx-shop-popup-title {
    color: #e38383;
}
.lx-shop-popup-success .lx-shop-popup-inner {
    border-color: #4e7f5f;
    box-shadow: 0 0 0 1px rgba(134, 209, 156, 0.26) inset;
}
.lx-shop-popup-success .lx-shop-popup-title {
    color: #86d19c;
}
.lx-shop-popup-info .lx-shop-popup-inner {
    border-color: #6a6a6a;
    box-shadow: 0 0 0 1px rgba(200, 200, 200, 0.16) inset;
}
.lx-shop-popup-info .lx-shop-popup-title {
    color: #d8d8d8;
}
#lx-thread-preview {
    margin-top: 10px;
    border: 1px solid #7f6557;
    background: #140f0d;
    padding: 10px 12px;
}
.lx-preview-title {
    color: #ffbf98;
    font-size: 14px;
    margin-bottom: 4px;
}
.lx-preview-line {
    color: #d0c8bf;
    font-size: 14px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Misc */
.lx-empty {
    color: #b8aaa0;
    padding: 24px 8px;
    font-style: normal;
    font-size: 15px;
}
.lx-notice {
    color: #ffbf98;
    padding: 24px 8px;
    font-size: 16px;
}

/* DeepShop visual refresh: modern hacker board */
#shop-overlay {
    --shop-bg-0: #03070c;
    --shop-bg-1: #07121a;
    --shop-bg-2: #0b1f2c;
    --shop-panel: rgba(7, 18, 26, 0.82);
    --shop-panel-soft: rgba(11, 27, 38, 0.62);
    --shop-border: rgba(100, 245, 224, 0.32);
    --shop-border-strong: rgba(100, 245, 224, 0.62);
    --shop-text: #dbfff7;
    --shop-muted: #8fb8b4;
    --shop-accent: #63f5e2;
    --shop-accent-alt: #44b9ff;
    --shop-ok: #79f7a8;
    --shop-warn: #ffd77d;
    --shop-danger: #ff7f97;
    color: var(--shop-text);
    font-family: "Rajdhani", "Share Tech Mono", "Consolas", monospace;
    background:
      radial-gradient(1200px 700px at 0% -20%, rgba(37, 148, 173, 0.28), transparent 58%),
      radial-gradient(1200px 700px at 100% 120%, rgba(48, 224, 189, 0.2), transparent 60%),
      linear-gradient(150deg, var(--shop-bg-0) 0%, var(--shop-bg-1) 52%, var(--shop-bg-2) 100%);
    background-size: auto, auto, 190% 190%;
    animation: deepshop-bg-pan 18s ease-in-out infinite alternate;
    isolation: isolate;
}
#shop-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.16;
    background-image:
      linear-gradient(rgba(99, 245, 226, 0.14) 1px, transparent 1px),
      linear-gradient(90deg, rgba(99, 245, 226, 0.1) 1px, transparent 1px);
    background-size: 34px 34px;
}
#shop-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.32;
    background: linear-gradient(180deg, transparent 0%, rgba(3, 8, 12, 0.5) 62%, rgba(3, 8, 12, 0.85) 100%);
}
#shop-titlebar,
#shop-body,
#shop-statusbar {
    position: relative;
    z-index: 1;
}
#shop-titlebar {
    min-height: 60px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--shop-border);
    background: linear-gradient(90deg, rgba(9, 28, 39, 0.95), rgba(11, 33, 45, 0.85));
    box-shadow: 0 1px 0 rgba(99, 245, 226, 0.24), 0 10px 30px rgba(0, 0, 0, 0.35);
    color: var(--shop-text);
    font-size: 16px;
    letter-spacing: 0.5px;
}
#shop-url-wrap {
    gap: 12px;
}
#shop-brand {
    border-radius: 999px;
    border: 1px solid var(--shop-border-strong);
    background: linear-gradient(120deg, rgba(99, 245, 226, 0.2), rgba(68, 185, 255, 0.18));
    color: #e8fffa;
    padding: 7px 14px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1.2px;
    line-height: 1;
    text-transform: none;
    box-shadow: 0 0 18px rgba(68, 185, 255, 0.2);
}
#shop-url-label {
    color: var(--shop-muted);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.42px;
}
#shop-spinner,
#hw-spinner {
    color: var(--shop-accent);
    font-size: 13px;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}
#shop-tab-indicator,
#hw-tab-indicator {
    display: inline-flex;
    gap: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid rgba(99, 245, 226, 0.4);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: auto;
}
#shop-tab-indicator .tab-active,
#hw-tab-indicator .tab-active {
    background: rgba(99, 245, 226, 0.3);
    color: #63f5e2;
    padding: 6px 16px;
    text-shadow: 0 0 10px rgba(99, 245, 226, 0.7);
    border-bottom: 2px solid #63f5e2;
}
#shop-tab-indicator .tab-dim,
#hw-tab-indicator .tab-dim {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-bottom: 2px solid transparent;
}
#shop-body {
    padding: 14px 18px 16px;
    scrollbar-color: rgba(99, 245, 226, 0.5) rgba(4, 14, 22, 0.85);
}
#shop-body .lx-list-meta {
    color: var(--shop-muted);
    padding: 2px 6px 8px;
    font-size: 13px;
    letter-spacing: 0.35px;
}
#shop-overlay .lx-setup-meta {
    background: var(--shop-panel-soft);
    border-left: 2px solid var(--shop-accent-alt);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 4px 6px 10px;
}
#shop-overlay .lx-compat-warning {
    color: var(--shop-warn);
    border-left-color: #b7903d;
    background: rgba(183, 144, 61, 0.14);
    border-radius: 6px;
    padding: 6px 10px;
}
#shop-overlay .lx-severity-ok { color: var(--shop-ok); }
#shop-overlay .lx-severity-warn { color: var(--shop-warn); }
#shop-overlay .lx-severity-error { color: var(--shop-danger); }
#shop-overlay .lx-shop-tabs {
    gap: 10px;
    margin: 6px 0 10px;
    padding: 0 4px;
}
#shop-overlay .lx-shop-tab {
    border-radius: 999px;
    border: 1px solid var(--shop-border);
    background: rgba(8, 24, 35, 0.66);
    color: #b8dad6;
    padding: 4px 11px;
    font-size: 12px;
    letter-spacing: 0.55px;
}
#shop-overlay .lx-shop-tab.lx-shop-tab-active {
    border-color: var(--shop-border-strong);
    background: linear-gradient(125deg, rgba(99, 245, 226, 0.24), rgba(68, 185, 255, 0.3));
    color: #f0fffc;
    text-shadow: 0 0 10px rgba(99, 245, 226, 0.35);
}
#shop-overlay .lx-shop-listpane {
    border: 1px solid var(--shop-border);
    border-radius: 14px;
    padding: 8px;
    background: var(--shop-panel);
    box-shadow: inset 0 0 0 1px rgba(99, 245, 226, 0.1), 0 14px 26px rgba(0, 0, 0, 0.26);
    scrollbar-color: rgba(99, 245, 226, 0.56) rgba(5, 14, 21, 0.9);
}
#shop-overlay .lx-shop-section {
    margin-top: 12px;
    border-top: 0;
    border-bottom: 0;
    border-left: 2px solid var(--shop-accent-alt);
    border-radius: 8px;
    padding: 6px 10px;
    background: rgba(20, 43, 58, 0.72);
    color: var(--shop-accent);
    font-size: 12px;
    letter-spacing: 0.9px;
}
#shop-overlay .lx-shop-section:first-of-type {
    margin-top: 4px;
}
/* Shop grid table */
.shop-grid {
    display: grid;
    width: 100%;
    gap: 0;
}
.shop-grid-th {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--shop-muted, #77a9a4);
    border-bottom: 1px solid var(--shop-border, rgba(99, 245, 226, 0.15));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shop-grid-row {
    display: contents;
}
.shop-grid-row > .shop-grid-td {
    padding: 5px 8px;
    border-left: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s;
}
.shop-grid-row > .shop-grid-td:first-child {
    border-left: 2px solid transparent;
}
.shop-grid-row:hover > .shop-grid-td {
    background: rgba(99, 245, 226, 0.06);
}
.shop-grid-row.lx-cursor > .shop-grid-td {
    background: linear-gradient(90deg, rgba(99, 245, 226, 0.2), rgba(20, 60, 84, 0.65));
    color: #f4fffd;
}
.shop-grid-row.lx-cursor > .shop-grid-td:first-child {
    border-left-color: var(--shop-accent, #63f5e2);
}
.shop-grid-row.lx-shop-item-incompat > .shop-grid-td:first-child {
    border-left-color: rgba(255, 127, 151, 0.8);
}
.shop-grid-row.lx-shop-item-incompat > .shop-grid-td {
    background: rgba(120, 24, 52, 0.12);
}
.shop-grid-price {
    text-align: left;
    color: #9fc4c0;
    font-size: 12px;
}
.shop-grid-status {
    text-align: left;
    font-weight: 700;
    font-size: 12px;
}
/* Grid templates per category — all % based */
/* First column (MODEL) has fixed max-width so spec columns stay stable across categories */
.shop-grid-cpu       { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr 1fr; }
.shop-grid-gpu       { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr; }
.shop-grid-mainboard { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr 1fr; }
.shop-grid-ram       { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr 1fr; }
.shop-grid-hdd       { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr; }
.shop-grid-cooling   { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr; }
.shop-grid-psu       { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr; }
.shop-grid-appliance { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr 1fr 1fr; }
.shop-grid-generic   { grid-template-columns: minmax(0, 30%) 1fr 1fr 1fr; }

#shop-overlay .lx-thread-row {
    align-items: center;
    border-left: 2px solid transparent;
    border-radius: 8px;
    margin: 2px 0;
    padding: 6px 8px;
    color: #d7f3ef;
    background: rgba(7, 20, 30, 0);
    transition: background-color 140ms ease, border-color 140ms ease;
}
#shop-overlay .lx-thread-row .lx-pin {
    color: var(--shop-accent);
}
#shop-overlay .lx-thread-row .lx-sep {
    color: #77a9a4;
}
#shop-overlay .lx-thread-row .lx-meta {
    color: #9fc4c0;
    font-size: 12px;
}
#shop-overlay .lx-thread-row .lx-shop-item-compat-reason {
    color: #91b6b1;
    font-size: 11px;
}
#shop-overlay .lx-thread-row.lx-shop-item-blocked,
#shop-overlay .lx-thread-row.lx-shop-item-incompat {
    border-left-color: rgba(255, 127, 151, 0.8);
    background: rgba(120, 24, 52, 0.18);
}
#shop-overlay .lx-thread-row.lx-cursor {
    border-left-color: var(--shop-accent);
    background: linear-gradient(90deg, rgba(99, 245, 226, 0.2), rgba(20, 60, 84, 0.65));
    color: #f4fffd;
    box-shadow: 0 0 0 1px rgba(99, 245, 226, 0.3) inset, 0 0 18px rgba(99, 245, 226, 0.12);
}
#shop-overlay .lx-thread-row.lx-cursor .lx-pin,
#shop-overlay .lx-thread-row.lx-cursor .lx-sep,
#shop-overlay .lx-thread-row.lx-cursor .lx-content,
#shop-overlay .lx-thread-row.lx-cursor .lx-meta {
    color: #f4fffd;
}
#shop-overlay .lx-shop-popup {
    background: rgba(1, 7, 12, 0.68);
}
#shop-overlay .lx-shop-popup-inner {
    border: 1px solid var(--shop-border-strong);
    border-radius: 12px;
    background: rgba(7, 21, 31, 0.94);
    box-shadow: 0 0 0 1px rgba(99, 245, 226, 0.14) inset, 0 16px 44px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
}
#shop-overlay .lx-shop-popup-title {
    font-size: 16px;
    letter-spacing: 0.5px;
}
#shop-overlay .lx-shop-popup-text {
    color: #d4ebe7;
}
#shop-overlay .lx-shop-popup-hint {
    color: #9db9b5;
}
#shop-overlay .lx-shop-popup-confirm .lx-shop-popup-title { color: var(--shop-warn); }
#shop-overlay .lx-shop-popup-warn .lx-shop-popup-title { color: #ffba68; }
#shop-overlay .lx-shop-popup-error .lx-shop-popup-title { color: var(--shop-danger); }
#shop-overlay .lx-shop-popup-success .lx-shop-popup-title { color: var(--shop-ok); }
#shop-overlay .lx-shop-popup-info .lx-shop-popup-title { color: #cfe8e4; }
#shop-statusbar {
    min-height: 56px;
    padding: 8px 16px;
    border-top: 1px solid var(--shop-border);
    background: linear-gradient(180deg, rgba(8, 24, 35, 0.92), rgba(5, 15, 22, 0.95));
    color: #c8efea;
    font-size: 13px;
}
#shop-statusbar .lx-key {
    border-radius: 6px;
    border: 1px solid rgba(99, 245, 226, 0.44);
    background: rgba(99, 245, 226, 0.18);
    color: #dffff8;
    padding: 1px 6px;
}
#shop-statusbar .lx-key-desc {
    color: #abd4cf;
}
#shop-overlay .lx-empty,
#shop-overlay .lx-notice {
    color: #b8dad5;
    font-size: 14px;
}

@keyframes deepshop-bg-pan {
    from { background-position: center center, center center, 0% 0%; }
    to { background-position: center center, center center, 100% 100%; }
}

@media (max-width: 900px) {
    #shop-titlebar {
        min-height: 54px;
        padding: 10px 14px;
        font-size: 15px;
    }
    #shop-brand {
        font-size: 20px;
        padding: 6px 12px;
    }
    #shop-url-label {
        font-size: 13px;
    }
    #shop-body {
        padding: 10px 12px 12px;
    }
    #shop-statusbar {
        grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
        gap: 6px 8px;
    }
}

@media (max-width: 640px) {
    #shop-titlebar {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 6px;
    }
    #shop-url-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    #shop-brand {
        font-size: 18px;
    }
    #shop-statusbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        font-size: 12px;
        padding: 8px 10px;
    }
    #shop-overlay .lx-shop-tabs {
        gap: 7px;
        margin: 6px 0;
    }
    #shop-overlay .lx-shop-tab {
        font-size: 11px;
        padding: 3px 8px;
    }
    #shop-overlay .lx-shop-listpane {
        border-radius: 10px;
        padding: 6px;
    }
    #shop-overlay .lx-thread-row {
        display: grid;
        grid-template-columns: 1.3em minmax(0, 1fr);
        align-items: start;
        gap: 0 6px;
        white-space: normal;
    }
    #shop-overlay .lx-thread-row .lx-meta {
        grid-column: 2;
        margin: 2px 0 0;
        font-size: 11px;
    }
}

/* ── Board Profiles ── */
.lx-profile {
    border-left: 2px solid #ffbf98;
    background: #1a1410;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #d0c1b6;
}
.lx-profile-header {
    color: #ffbf98;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-size: 13px;
}
.lx-profile-loading {
    color: #8a7a6f;
    font-style: italic;
}
.lx-profile-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.lx-profile-fields {
    flex: 1;
    min-width: 0;
}
.lx-profile-avatar {
    color: #ffbf98;
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
    flex-shrink: 0;
    border: 1px solid #3a302a;
    padding: 8px 10px;
    background: #0d0a08;
}
.lx-profile-field {
    padding: 2px 0;
    line-height: 1.5;
}
.lx-profile-label {
    color: #8a7a6f;
    min-width: 100px;
    display: inline-block;
}
.lx-profile-value {
    color: #d0c1b6;
}
.lx-profile-divider {
    border-top: 1px solid #3a302a;
    margin: 10px 0;
}
.lx-profile-edit-section {
    margin-top: 6px;
}
.lx-profile-edit {
    margin-bottom: 6px;
}
.lx-profile-edit label {
    display: block;
    color: #8a7a6f;
    font-size: 12px;
    margin-bottom: 2px;
}
.lx-profile-input {
    width: 100%;
    max-width: 400px;
    background: #0d0a08;
    border: 1px solid #3a302a;
    color: #d0c1b6;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 4px 6px;
    box-sizing: border-box;
}
.lx-profile-input:focus {
    border-color: #ffbf98;
    outline: none;
}
textarea.lx-profile-input {
    resize: vertical;
    min-height: 50px;
}
.lx-profile-actions {
    margin-top: 8px;
}
.lx-profile-avatar-picker {
    margin-bottom: 8px;
}
.lx-profile-avatar-picker label {
    display: block;
    color: #8a7a6f;
    font-size: 12px;
    margin-bottom: 4px;
}
.lx-avatar-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.lx-avatar-option {
    font-size: 11px;
    line-height: 1.2;
    margin: 0;
    padding: 5px 6px;
    background: #0d0a08;
    border: 1px solid #3a302a;
    color: #8a7a6f;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.lx-avatar-option:hover,
.lx-avatar-option:focus {
    border-color: #6d584d;
    color: #d0c1b6;
    outline: none;
}
.lx-avatar-option.lx-avatar-selected {
    border-color: #ffbf98;
    color: #ffbf98;
}
.lx-profile .lx-btn {
    background: #2a221d;
    border: 1px solid #ffbf98;
    color: #ffbf98;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 4px 14px;
    cursor: pointer;
}
.lx-profile .lx-btn:hover {
    background: #3a302a;
}

/* ── HACK SELECT OVERLAY (Phase 1) ──────────────────────────────────── */
#hack-select-overlay,
#scan-select-overlay {
    position: fixed;
    top: 30px; left: 0; right: 0; bottom: 0;
    z-index: 8900;
    display: flex;
    background: #0a0a0f;
}
#scan-select-overlay * {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #00ccff;
    animation: hs-fadein 10ms ease-out;
}
@keyframes hs-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.hs-fadeout {
    animation: hs-fadeout 10ms ease-in forwards !important;
}
@keyframes hs-fadeout {
    from { opacity: 1; }
    to { opacity: 0; }
}
.hs-terminal {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1a2a3a;
    min-width: 0;
    padding: 12px;
}
.hs-output {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #1a2a3a #0a0a0f;
}
.hs-line {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    padding: 1px 0;
}
.hs-input-line {
    display: flex;
    align-items: center;
    border-top: 1px solid #1a2a3a;
    padding-top: 8px;
    margin-top: 4px;
    position: relative;
}
.hs-prompt {
    color: #00ccff;
    font-weight: bold;
    margin-right: 4px;
    white-space: nowrap;
}
.hs-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #00eeff;
    font-family: inherit;
    font-size: inherit;
    caret-color: transparent;
}
.hs-block-cursor {
    position: absolute;
    display: inline-block;
    width: 1ch;
    color: #00eeff;
    animation: blink 1.1s step-start infinite;
    pointer-events: none;
    user-select: none;
}
.hs-panel {
    flex: 0 0 35%;
    max-width: 380px;
    overflow-y: auto;
    padding: 12px;
    border-left: 1px solid #1a2a3a;
    background: #08080e;
    scrollbar-width: thin;
    scrollbar-color: #1a2a3a #08080e;
}
.hs-panel-section {
    margin-bottom: 16px;
    border: 1px solid #1a2a3a;
    padding: 8px;
}
.hs-panel-header {
    color: #00ccff;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;
    border-bottom: 1px solid #1a2a3a;
    padding-bottom: 4px;
    margin-bottom: 6px;
}
.hs-panel-row {
    padding: 3px 4px;
    font-size: 14px;
    line-height: 1.4;
}
.hs-panel-row:hover {
    background: #112233;
}
.hs-panel-row.hs-selected {
    background: #0a2a4a;
    color: #00eeff;
    font-weight: bold;
}
.hs-panel-hint {
    color: #555;
    font-size: 12px;
    margin-top: 6px;
    font-style: italic;
}
.hs-panel-label {
    font-size: 14px;
    line-height: 1.5;
    padding: 1px 0;
}
.hs-tool-row {
    padding: 6px 4px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.3;
    border-bottom: 1px solid #111;
}
.hs-tool-row:hover {
    background: #112233;
}
.hs-tool-row.hs-selected {
    background: #0a2a4a;
    border-left: 3px solid #00ccff;
}
.hs-tool-row.hs-broken {
    opacity: 0.4;
    text-decoration: line-through;
}
.hs-compromised {
    color: #666 !important;
    text-decoration: line-through;
}
.hs-line.hs-compromised {
    color: #555;
}
/* ── Target selector: hide terminal/panel, no animation ── */
#hack-select-overlay.hs-target-mode {
    animation: none !important;
}
#hack-select-overlay.hs-target-mode > .hs-terminal,
#hack-select-overlay.hs-target-mode > .hs-panel {
    visibility: hidden;
    height: 0;
    overflow: hidden;
    padding: 0;
    margin: 0;
    border: none;
}
/* ── Target selector popup (centered modal) ─────────────── */
.hs-target-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9000;
    width: min(850px, 85vw);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: #0c0c14;
    border: 1px solid #00ccff;
    font-family: var(--dn-font-main);
    animation: hs-tp-fadein 10ms ease-out;
}
@keyframes hs-tp-fadein {
    from { opacity: 0; }
    to { opacity: 1; }
}
.hs-tp-header {
    padding: 10px 16px;
    font-size: clamp(13px, 1.5vw, 16px);
    font-weight: bold;
    letter-spacing: 2px;
    color: #00ccff;
    border-bottom: 1px solid #1a2a3a;
    background: #0a0a12;
}
.hs-tp-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: #1a2a3a #0c0c14;
    width: 100%;
    min-width: 0;
}
.hs-tp-row {
    display: grid;
    grid-template-columns: 23% 13% 30% 8% 27%;
    box-sizing: border-box;
    width: 100%;
    padding: 5px 16px;
    font-size: clamp(13px, 1.5vw, 16px);
    color: #aac;
    cursor: default;
    border-left: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.6;
    font-family: inherit;
    gap: 0 8px;
    text-align: left;
}
.hs-tp-c-ip      { grid-column: 1; overflow: hidden; text-overflow: ellipsis; }
.hs-tp-c-status  { grid-column: 2; overflow: hidden; text-overflow: ellipsis; }
.hs-tp-c-port    { grid-column: 3; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.hs-tp-c-open    { grid-column: 4; color: #0a8; text-align: left; }
.hs-tp-c-svc     { grid-column: 5; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.hs-tp-row.hs-tp-active {
    background: #0a2a4a;
    color: #00eeff;
    border-left-color: #00ccff;
}
.hs-tp-row.hs-tp-hacked {
    color: #555;
}
.hs-tp-row.hs-tp-hacked .hs-tp-c-open {
    color: #555;
}
.hs-tp-row.hs-tp-hacked.hs-tp-active {
    background: #1a1a22;
    border-left-color: #555;
}
.hs-tp-row.hs-tp-backdoor {
    color: #ff8800;
}
.hs-tp-row.hs-tp-backdoor .hs-tp-c-open {
    color: #ff8800;
}
.hs-tp-row.hs-tp-backdoor.hs-tp-active {
    background: #1a1800;
    border-left-color: #ff8800;
}
.hs-tp-footer {
    padding: 8px 16px;
    font-size: clamp(13px, 1.5vw, 15px);
    color: #556;
    border-top: 1px solid #1a2a3a;
    text-align: center;
    letter-spacing: 1px;
}
@media (max-width: 900px) {
    #hack-select-overlay,
    #scan-select-overlay {
        flex-direction: column;
    }
    .hs-panel {
        max-width: 100%;
        flex: 0 0 auto;
        border-left: none;
        border-top: 1px solid #1a2a3a;
    }
}

/* ── SELECT POPUP (inline terminal dropdown) ────────────────────── */
.dn-select-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 9500;
    background: #0c0c14;
    border: 1px solid #00ccff;
    box-shadow: 0 0 20px rgba(0, 204, 255, 0.15), 0 0 60px rgba(0, 0, 0, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 15px;
    color: #00ccff;
    min-width: 420px;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: hs-fadein 10ms ease-out;
}
.dn-sp-title {
    padding: 8px 14px;
    border-bottom: 1px solid #1a2a3a;
    color: #00eeff;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.dn-sp-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1a2a3a #08080e;
    padding: 4px 0;
}
.dn-sp-row {
    padding: 5px 14px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0099cc;
    transition: background 0.05s;
}
.dn-sp-row:hover {
    background: #112233;
}
.dn-sp-row.dn-sp-selected {
    background: #0a2a4a;
    color: #00eeff;
    font-weight: bold;
}
.dn-sp-row.dn-sp-disabled {
    color: #444;
    cursor: not-allowed;
    text-decoration: line-through;
    opacity: 0.5;
}
.dn-sp-more {
    padding: 2px 14px;
    color: #555;
    font-size: 12px;
}
.dn-sp-hint {
    padding: 6px 14px;
    border-top: 1px solid #1a2a3a;
    color: #555;
    font-size: 11px;
    text-align: center;
}

/* ── DEEPINSPECT GUI ─────────────────────────────────────────────── */
#deepinspect-overlay {
    position: fixed;
    inset: 0;
    z-index: 8800;
    background: #0a0a0f;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #c0c0c0;
    display: flex;
    flex-direction: column;
    outline: none;
}
.di-header {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #1a2a3a;
    padding: 16px 24px 10px 24px;
    background: #0a0a0f;
    flex-shrink: 0;
}
.di-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: flex-start;
    align-content: flex-start;
}
.di-title { color: #ff8800; font-size: 18px; font-weight: bold; letter-spacing: 2px; }
.di-subtitle { color: #666; font-size: 13px; }
.di-close { color: #555; cursor: pointer; margin-left: auto; }
.di-close:hover { color: #f44; }
.di-filterbar {
    display: flex;
    gap: 20px;
    padding: 8px 24px;
    background: #0c0c14;
    border-bottom: 1px solid #1a2a3a;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.di-filter-group { display: flex; align-items: center; gap: 6px; }
.di-filter-label { color: #555; font-size: 14px; text-transform: uppercase; }
.di-filter-btn {
    color: #666;
    font-size: 14px;
    padding: 2px 8px;
    border: 1px solid #222;
    border-radius: 2px;
    cursor: pointer;
    transition: border-color 0.1s, color 0.1s;
}
.di-filter-btn:hover { color: #aaa; border-color: #444; }
.di-filter-active { color: #00ccff; border-color: #00ccff; }
.di-filter-focus { outline: 1px solid #ff8800; outline-offset: 1px; }
.di-loading, .di-empty { color: #666; padding: 24px 0; }
.di-card {
    border: 1px solid #1a2a3a;
    padding: 16px;
    width: calc(33.333% - 12px);
    min-width: 380px;
    max-width: 100%;
    background: #0e0e14;
    font-size: 18px;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.di-card-selected {
    border-color: #00ccff;
    box-shadow: 0 0 12px rgba(0, 204, 255, 0.3);
}
.di-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.di-slot { color: #555; font-size: 18px; }
.di-name { color: #00ccff; font-weight: bold; word-break: break-all; flex: 1; font-size: 18px; }
.di-rarity { font-size: 14px; padding: 3px 8px; border-radius: 2px; text-transform: uppercase; }
.di-rarity-normal .di-rarity { color: var(--dn-rarity-normal); border: 1px solid var(--dn-rarity-normal-border); }
.di-rarity-magic .di-rarity { color: var(--dn-rarity-magic); border: 1px solid var(--dn-rarity-magic-border); }
.di-rarity-rare .di-rarity { color: var(--dn-rarity-rare); border: 1px solid var(--dn-rarity-rare-border); }
.di-rarity-unique .di-rarity { color: var(--dn-rarity-unique); border: 1px solid var(--dn-rarity-unique-border); }
.di-rarity-legendary .di-rarity { color: var(--dn-rarity-legendary); border: 1px solid var(--dn-rarity-legendary-border); }
.di-rarity-epic .di-rarity { color: var(--dn-rarity-epic); border: 1px solid var(--dn-rarity-epic-border); }
.di-exploit {
    background: #12121a;
    border-left: 3px solid #ff8800;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 18px;
}
.di-exploit-name { color: #ff8800; font-weight: bold; font-size: 18px; }
.di-exploit-ref { color: #ffcc00; font-size: 16px; }
.di-exploit-type { color: #888; font-size: 16px; }
.di-meta { color: #888; font-size: 16px; margin-bottom: 10px; }
.di-label { color: #555; }
.di-value { color: #aaa; }
.di-stats { margin-bottom: 10px; }
.di-stat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.di-stat-label { width: 90px; color: #666; font-size: 16px; text-transform: uppercase; }
.di-bar-track { flex: 1; height: 14px; min-height: 14px; background: #1a1a2a; border-radius: 3px; overflow: hidden; display: block; }
.di-bar-fill { height: 100%; min-height: 14px; border-radius: 3px; display: block; }
.di-stat-val { width: 80px; text-align: right; font-size: 16px; color: #aaa; }
.di-durability { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.di-durability .di-bar-track { width: 100px; height: 14px; flex: none; }
.di-affixes { font-size: 16px; margin-bottom: 10px; }
.di-affix { color: #0f0; padding: 2px 0; }
.di-affix-fx { color: #888; }
.di-source { font-size: 14px; color: #444; border-top: 1px solid #1a1a2a; padding-top: 8px; }
#breach-overlay {
    position: fixed;
    top: 30px; left: 0; right: 0; bottom: 0;
    z-index: 9000;
    display: flex;
    background: #000000;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    color: #00ff88;
    animation: breach-fadein 10ms ease-out;
}
#breach-overlay.breach-closing {
    animation: breach-fadeout 10ms ease-in forwards;
}
@keyframes breach-fadein {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes breach-fadeout {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Terminal (left) */
.breach-terminal {
    flex: 1 1 65%;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1a1a1a;
    min-width: 0;
}
.breach-output {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    scrollbar-width: thin;
    scrollbar-color: #3a4a5a #000000;
}
.breach-output::-webkit-scrollbar { width: 6px; }
.breach-output::-webkit-scrollbar-track { background: #000000; }
.breach-output::-webkit-scrollbar-thumb { background: #3a4a5a; }

.breach-line {
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}
.breach-echo {
    color: #888;
}
.breach-info {
    color: #00cc66;
}
.breach-exfil {
    color: #66ccff;
}
.breach-harvest {
    color: #ffcc00;
}
.breach-backdoor {
    color: #ff6699;
}
.breach-wipe {
    color: #cc99ff;
}
.breach-netscan {
    color: #66ffcc;
}
.breach-ssh {
    color: #88ddaa;
}
.breach-analysis {
    color: #ffaa33;
}
.breach-critical {
    color: #ff3333;
    font-weight: bold;
}

.breach-input-line {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-top: 1px solid #333333;
    background: #000000;
    flex-shrink: 0;
}
.breach-prompt {
    color: #ff3333;
    font-weight: bold;
    white-space: nowrap;
    margin-right: 4px;
}
.breach-input-wrap {
    flex: 1;
    position: relative;
}
.breach-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff88;
    font-family: inherit;
    font-size: inherit;
    caret-color: transparent;
}
.breach-block-cursor {
    position: absolute;
    left: 0;
    top: 0;
    width: 1ch;
    height: 1.2em;
    background: #00ff88;
    pointer-events: none;
    animation: breach-blink 1s step-end infinite;
}
@keyframes breach-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.breach-input:disabled + .breach-block-cursor,
.breach-input[disabled] ~ .breach-block-cursor {
    opacity: 0 !important;
    animation: none;
}

/* Panel (right) */
.breach-panel {
    flex: 0 0 35%;
    max-width: 340px;
    padding: 12px 14px;
    overflow-y: auto;
    background: #000000;
    border-left: 1px solid #1a1a1a;
}
.breach-panel-header {
    font-size: 20px;
    font-weight: bold;
    color: #ff3333;
    text-align: center;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid #331111;
    letter-spacing: 2px;
}
.breach-panel-section {
    margin-bottom: 12px;
}
.breach-panel-label {
    color: #888;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}
.breach-panel-value {
    color: #00ff88;
    font-size: 18px;
}
.breach-panel-sub {
    color: #555;
    font-size: 14px;
}

/* Trace/noise bars */
.breach-bar {
    height: 10px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}
.breach-bar-fill {
    height: 100%;
    background: #00ff88;
    transition: width 0.5s ease;
    border-radius: 3px;
}
.breach-bar-fill.breach-warning {
    background: #ffaa00;
}
.breach-bar-fill.breach-danger {
    background: #ff3333;
    animation: breach-pulse 1s infinite;
}
.breach-exfil-bar {
    background: #66ccff;
}
@keyframes breach-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.breach-panel-label.breach-warning { color: #ffaa00; }
.breach-panel-label.breach-danger { color: #ff3333; }

.breach-host {
    color: #66ffcc;
    font-size: 15px;
    padding: 1px 0;
}
.breach-panel-footer {
    margin-top: 16px;
    text-align: center;
    color: #555;
    font-size: 14px;
}

/* Responsive: stack on small screens */
@media (max-width: 900px) {
    #breach-overlay {
        flex-direction: column;
    }
    .breach-terminal {
        flex: 1 1 0;
        min-height: 0;
        overflow: hidden;
        border-right: none;
        border-bottom: 1px solid #1a3a1a;
    }
    .breach-output {
        -webkit-overflow-scrolling: touch;
    }
    .breach-panel {
        flex: 0 0 auto;
        max-width: none;
        max-height: 30vh;
        overflow-y: auto;
        border-left: none;
    }
}
