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

  :root {
    --dn-font-main: Courier, monospace;
  }

  @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: scroll;
    cursor: none;
    padding: 10px 14px;
  padding-top: 50px; /* room for statusbar */
    scrollbar-width: thin;
    scrollbar-color: #333 #0a0a0a;
  }

  body.use-native-cursor {
    cursor: auto;
  }

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

  #cursor {
    position: fixed;
    width: 14px;
    height: 20px;
    pointer-events: none;
    z-index: 13000;
    background: #e8e8e8;
    clip-path: polygon(
      0% 0%,
      0% 100%,
      30% 72%,
      47% 100%,
      64% 92%,
      47% 66%,
      100% 66%
    );
    filter: drop-shadow(1px 1px 0 #0a0a0a);
  }

  body.use-native-cursor #cursor {
    display: none;
  }

  #cursor::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 1px;
    height: 11px;
    background: #0a0a0a;
    transform: rotate(-22deg);
    box-shadow: 1px 1px 0 #0a0a0a;
    opacity: 0.45;
  }

  #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 {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 102;
    animation: flicker 0.15s infinite;
    opacity: 0;
  }

  @keyframes flicker {
    0%  { opacity: 0; }
    92% { opacity: 0; }
    93% { opacity: 0.02; background: #fff; }
    94% { opacity: 0; }
    97% { opacity: 0.015; background: #fff; }
    100%{ opacity: 0; }
  }

  /* 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; }
  #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; }

  /* shell output color classes */
  .output-line.error   { color: #ff4d4f; font-weight: 600; }
  .output-line.info    { color: #b8b8b8; }
    .output-line.dir     { color: #6fa29a; }
  .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: #958e87; }
    .output-line.rarity-magic     { color: #6f8fb4; }
    .output-line.rarity-rare      { color: #b8a66c; }
    .output-line.rarity-epic      { color: #8f7ea8; }
    .output-line.rarity-unique    { color: #ad8666; }
    .output-line.rarity-legendary { color: #af6f62; 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;
  gap:20px;
  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; }
#status-time{ min-width:40px; text-align:right; }
#status-right { margin-left: auto; display: flex; gap: 10px; }
#status-level { text-align: right; color: #9bd39b; }

#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 #cursor,
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 #cursor,
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 #cursor,
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 #cursor,
body.pacman-active #statusbar {
  display: none !important;
}

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

/* ── Hack Progress Bar (below statusbar) ─────────────────────────────────── */
#hack-progressbar {
  position: fixed;
  top: 30px; left: 0; right: 0;
  height: 22px;
  background: #000;
  border-bottom: 1px solid #1a4f1a;
  z-index: 2000;
  display: none;
  align-items: center;
  padding: 0;
  overflow: hidden;
}
#hack-progressbar.active {
  display: flex;
}
#hack-pb-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0d3d0d 0%, #1a7a1a 40%, #39ff14 85%, #7fff00 100%);
  box-shadow: 0 0 8px #39ff14, 0 0 20px #1a7a1a;
  transition: none;
  position: relative;
}
#hack-pb-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 3px;
  background: #fff;
  box-shadow: 0 0 6px #fff, 0 0 14px #39ff14;
  opacity: 0.9;
}
#hack-pb-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-family: monospace;
  color: #39ff14;
  text-shadow: 0 0 6px #39ff14;
  white-space: nowrap;
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 1;
}
#hack-pb-pct {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-family: monospace;
  color: #7fff00;
  text-shadow: 0 0 4px #39ff14;
  pointer-events: none;
  z-index: 1;
}

#scan-cinematic-overlay,
#hack-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,
#hack-cinematic-overlay .hack-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,
#hack-cinematic-overlay .hack-cine-phase {
  margin-top: 7px;
  font: 400 12px/1.25 monospace;
  color: #d6ffd6;
}

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

#scan-cinematic-overlay.ok,
#hack-cinematic-overlay.done {
  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);
}

body.hack-cinematic-active #hack-progressbar {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.98), rgba(6, 20, 6, 0.98));
  border-bottom-color: #2d7a2d;
}

@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;
}

/* 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: thin;
    scrollbar-color: #927568 #0a0908;
}

/* 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;
}

/* 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 {
    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: thin;
    scrollbar-color: #927568 #0a0908;
}
#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-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;
}

/* Completely distinct broker console layout */
#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;
    cursor: pointer;
}
#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-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: 6px;
    min-width: 0;
}
.lx-key {
    display: inline-block;
    color: #1a1512;
    background: #ffbf98;
    border: 1px solid #d99873;
    padding: 0 4px;
    border-radius: 0;
    font-size: 11px;
    font-weight: bold;
}
.lx-key-desc {
    color: #ffbf98;
    white-space: nowrap;
}

/* Thread list */
.lx-thread-row {
    display: flex;
    align-items: baseline;
    padding: 2px 6px;
    cursor: default;
    border-left: 1px solid transparent;
    transition: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #d0c8bf;
}
.lx-thread-row.lx-cursor {
    background: #c9b8ac;
    border-left: 1px solid #fff;
    color: #15110e;
}
.lx-thread-row .lx-pin   { color: #ffb38c; width: 1.4em; flex-shrink: 0; }
.lx-thread-row .lx-lock  { color: #ffbf98; width: 2.4em; flex-shrink: 0; }
.lx-thread-row .lx-handle { color: #ff9b6b; min-width: 10ch; flex-shrink: 0; }
.lx-thread-row .lx-sep   { color: #8a6f60; flex-shrink: 0; }
.lx-thread-row .lx-content { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.lx-thread-row .lx-meta  { color: #b8aaa0; flex-shrink: 0; margin-left: 8px; font-size: 12px; }
.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 {
    border-left-color: #8f5050;
    background: rgba(110, 50, 50, 0.12);
}
.lx-thread-row .lx-unread {
    color: #ffbf98;
    border: 1px solid #d99873;
    padding: 0 3px;
    margin-right: 6px;
    font-size: 10px;
    vertical-align: 1px;
}
.lx-thread-row.lx-cursor .lx-pin,
.lx-thread-row.lx-cursor .lx-lock,
.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; }

/* Thread detail / posts */
.lx-post {
    padding: 7px 8px;
    margin: 5px 0;
    border-left: 1px solid #745f54;
    background: #0a0908;
}
.lx-post-op {
    border-left: 1px solid #a17863;
    background: #12100f;
}
.lx-post.lx-cursor {
    border-left: 1px solid #fff;
    background: #c9b8ac;
}
.lx-post-op.lx-cursor {
    border-left: 1px solid #fff;
}
.lx-post-header {
    font-size: 12px;
    margin-bottom: 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-ts { color: #b8aaa0; font-size: 11px; }
.lx-post-body {
    color: #d0c8bf;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.45;
}
.lx-post.lx-cursor .lx-handle,
.lx-post.lx-cursor .lx-ts,
.lx-post.lx-cursor .lx-post-body { color: #15110e; }
.lx-divider {
    color: #745f54;
    padding: 4px 0;
    letter-spacing: -1px;
}

/* Compose box */
#lx-compose {
    margin-top: 16px;
    border: 1px solid #7f6557;
    padding: 10px;
    background: #171412;
}
#lx-search {
    margin-top: 10px;
    border: 1px solid #7f6557;
    padding: 10px;
    background: #171412;
}
#lx-search-input {
    display: block;
    width: 100%;
    background: #0a0908;
    border: 1px solid #927568;
    color: #e0d7cf;
    font-family: inherit;
    font-size: 13px;
    padding: 6px 7px;
    box-sizing: border-box;
    outline: none;
}
#lx-search-input:focus { border-color: #ffbf98; }
.lx-compose-title {
    color: #ffbf98;
    font-size: 12px;
    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: 13px;
    padding: 6px 7px;
    box-sizing: border-box;
    outline: none;
}
#lx-compose-thread-title:focus {
    border-color: #ffbf98;
}
#lx-compose-input {
    display: block;
    width: 100%;
    min-height: 80px;
    background: #0a0908;
    border: 1px solid #927568;
    color: #e0d7cf;
    font-family: inherit;
    font-size: 14px;
    padding: 8px;
    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: 12px;
    gap: 10px;
}
#lx-compose-counter { color: #d0c1b6; }
.lx-compose-hint    { color: #bea79a; }
#lx-compose-anon {
    accent-color: #ffbf98;
}
.lx-list-meta {
    color: #bea79a;
    padding: 3px 6px 8px;
    font-size: 12px;
}
.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: 8px 10px;
}
.lx-preview-title {
    color: #ffbf98;
    font-size: 12px;
    margin-bottom: 4px;
}
.lx-preview-line {
    color: #d0c8bf;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* 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 {
    color: var(--shop-accent);
    font-size: 13px;
}
#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-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 {
    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;
    }
}
