/* shell-nq.css */
/* NexQuake — Brand: font, font vars, and palette. Import before other shell CSS. */
@font-face {
  font-family: 'DpQuake';
  src: url(data:font/truetype;base64,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) format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  --nq-font-ui:    monospace;
  --nq-font-brand: 'DpQuake', 'Courier New', monospace;
  --nq-brand-color-standard:     #e07020;
  --nq-brand-color-standard-rgb: 224, 112, 32;
  --nq-brand-color-logo:         #f08030;
  --nq-brand-color-highlight:    #f0a830;
  --nq-brand-color-highlight-rgb: 240, 168, 48;
  --nq-brand-color-light:        #ff9044;
  --nq-brand-color-lighter:      #ffc088;
  --nq-brand-color-glow-rgb:     255, 148, 68;
}

/* shell-loader.css */
/* NexQuake Loading Screen */
#nq-loader {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(14px, 4vh, 34px) clamp(12px, 4vw, 40px);
  overflow: auto;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1410 50%, #0a0a0a 100%);
  z-index: 9000;
}
#nq-loader.hidden { display: none; }
#nq-loader-logo {
  max-width: 100%;
  font-family: var(--nq-font-brand);
  font-size: min(clamp(34px, 14vmin, 93px), 20vw);
  font-weight: normal;
  letter-spacing: clamp(1px, 0.35vmin, 3px);
  line-height: 1.06;
  text-align: center;
  white-space: nowrap;
  transform: translateX(0.16em);
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(var(--nq-brand-color-standard-rgb), 0.4);
}
#nq-loader-logo .nq-n { font-size: 0.84em; }
#nq-loader-logo .nq-q { font-size: 1em; }
#nq-loader-logo .nex { color: var(--nq-brand-color-logo); }
#nq-loader-logo .quake { color: #888; }
#nq-loader-sub {
  font-family: monospace;
  font-size: clamp(13px, 2.7vmin, 17px);
  color: #555 !important;
  letter-spacing: clamp(1px, 0.5vmin, 3px);
  text-transform: uppercase;
  margin-bottom: clamp(12px, 2.5vh, 18px);
  text-align: center;
}
#nq-loader.enter-mode #nq-loader-sub {
  color: #555 !important;
}
#nq-loader-action {
  min-height: clamp(88px, 17vh, 106px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#nq-loader-ring {
  width: 64px;
  height: 64px;
  position: relative;
}
#nq-loader-ring::before, #nq-loader-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
#nq-loader-ring::before {
  top: 0; left: 0; right: 0; bottom: 0;
  border: 2px solid #333;
}
#nq-loader-ring::after {
  top: 0; left: 0; right: 0; bottom: 0;
  border: 2px solid transparent;
  border-top-color: var(--nq-brand-color-standard);
  animation: nq-spin 1s ease-in-out infinite;
}
@keyframes nq-spin {
  to { transform: rotate(360deg); }
}
#nq-loader-status {
  margin-top: 6px;
  min-height: 14px;
  font-family: monospace;
  font-size: 12px;
  color: #666 !important;
  text-align: center;
  letter-spacing: 0.4px;
}
#nq-loader-progress {
  width: 200px;
  height: 2px;
  background: #222;
  overflow: hidden;
}
#nq-loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--nq-brand-color-standard), var(--nq-brand-color-highlight));
  transition: width 0.2s ease;
}
#nq-loader-reload {
  border: 1px solid #555;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(44, 26, 10, 0.95), rgba(24, 14, 6, 0.96));
  color: #c0c0c0;
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 2px;
  min-width: 164px;
  min-height: 48px;
  padding: 9px 18px;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(var(--nq-brand-color-glow-rgb), 0.2), 0 0 14px rgba(var(--nq-brand-color-standard-rgb), 0.26);
  text-shadow: none;
}
#nq-loader-reload:hover {
  background: linear-gradient(180deg, rgba(66, 36, 14, 0.96), rgba(34, 18, 8, 0.97));
  color: #fff;
}
#nq-loader-reload.hidden {
  display: none;
}
#nq-loader.enter-mode #nq-loader-ring,
#nq-loader.enter-mode #nq-loader-progress {
  display: none;
}
#nq-loader.enter-mode #nq-loader-status {
  visibility: hidden;
}
#nq-loader.enter-mode #nq-loader-reload {
  animation: nq-enter-pulse 1.35s ease-in-out infinite alternate;
}
@keyframes nq-enter-pulse {
  from {
    box-shadow: 0 0 0 1px rgba(var(--nq-brand-color-glow-rgb), 0.2), 0 0 8px rgba(var(--nq-brand-color-standard-rgb), 0.2);
  }
  to {
    box-shadow: 0 0 0 1px rgba(var(--nq-brand-color-glow-rgb), 0.32), 0 0 18px rgba(var(--nq-brand-color-highlight-rgb), 0.4);
  }
}


/* shell-ui.css */
body {
  --nq-safe-top: env(safe-area-inset-top, 0px);
  --nq-safe-right: env(safe-area-inset-right, 0px);
  --nq-safe-bottom: env(safe-area-inset-bottom, 0px);
  --nq-safe-left: env(safe-area-inset-left, 0px);
  --nq-overlay-toggle-size: 48px;
  --nq-overlay-toggle-edge: 13px;
  --nq-overlay-toggle-top: calc(var(--nq-overlay-toggle-edge) + var(--nq-safe-top));
  --nq-overlay-toggle-right: calc(var(--nq-overlay-toggle-edge) + var(--nq-safe-right));
  --nq-overlay-close-size: 26px;
  background-color: #000;
  color: rgb(224, 224, 224);
  font-family: Arial,Helvetica,sans-serif;
  font-size: 16px;
  margin: 0px;
}
.emscripten { padding-right: 0; margin-left: auto; margin-right: auto; display: block; }
textarea.emscripten {
  font-family: monospace;
  font-size: 14px;
  width: calc(100% - 24px);
  height: calc(100vh - 24px);
  margin-top: 8px;
  background-color: inherit;
  color: rgb(192, 192, 192);
  border: 1px solid rgb(64, 64, 64);
  resize: none;
  display: none;
  outline: none;
}
div.emscripten { text-align: center; }
/* the canvas *must not* have any border or padding, or mouse coords will be wrong */
canvas.emscripten {
  border: 0px none;
  background-color: black;
  display: none;
  outline: none;
  /* --nq-ar is set by JS in hideConsole() from the actual canvas pixel dimensions */
  width: min(var(--nq-canvas-vw, 100vw), var(--nq-canvas-vh, 100vh) * var(--nq-ar));
  height: auto;
  max-width: var(--nq-canvas-vw, 100vw);
  max-height: var(--nq-canvas-vh, 100vh);
  aspect-ratio: var(--nq-ar);
}
@supports (width: 100dvw) and (height: 100dvh) {
  canvas.emscripten {
    width: min(var(--nq-canvas-vw, 100dvw), var(--nq-canvas-vh, 100dvh) * var(--nq-ar));
    max-width: var(--nq-canvas-vw, 100dvw);
    max-height: var(--nq-canvas-vh, 100dvh);
  }
}

/* NexQuake Settings Overlay */
#nq-overlay-toggle {
  position: fixed;
  top: var(--nq-overlay-toggle-top);
  right: var(--nq-overlay-toggle-right);
  z-index: 10000;
  width: var(--nq-overlay-toggle-size);
  height: var(--nq-overlay-toggle-size);
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #ccc;
  font-size: 38px;
  cursor: pointer;
  line-height: var(--nq-overlay-toggle-size);
  text-align: center;
  padding: 0;
  transition: background 0.15s;
}
#nq-overlay-toggle.active { color: #fff; background: rgba(var(--nq-brand-color-standard-rgb), 0.3); }
#nq-overlay-toggle:hover { background: transparent; color: #fff; }
#nq-overlay-toggle:focus,
#nq-overlay-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}
@media (hover: none) and (pointer: coarse) {
  #nq-overlay-toggle {
    display: none;
  }
}
body.nq-overlay-panel-open #nq-overlay-toggle {
  display: none;
}
#nq-overlay-panel {
  --nq-tabs-open-width: 56px;
  --nq-tabs-closed-width: 6px;
  display: flex;
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: var(--nq-overlay-vh, 100vh);
  z-index: 9999;
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ddd;
  font-family: var(--nq-font-ui);
  font-size: 13px;
  box-shadow: -2px 0 12px rgba(0,0,0,0.5);
  box-sizing: border-box;
  overflow: visible;
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.16s ease, opacity 0.12s ease, visibility 0s linear 0.16s;
}
#nq-overlay-panel.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.16s ease, opacity 0.12s ease;
}

body.nq-touch-input #nq-overlay-panel {
  left: 0;
  width: 100vw;
  max-width: 100vw;
  min-width: 0;
  font-size: 115%;
  flex-direction: column;
}
body.nq-touch-input,
body.nq-touch-input * {
  -webkit-tap-highlight-color: transparent;
}
body.nq-touch-input #nq-vfs-list li .nq-file-actions {
  pointer-events: auto;
}
body.nq-touch-input #nq-vfs-list li button {
  opacity: 1;
  pointer-events: auto;
  padding: 6px 8px;
  margin-left: 4px;
}
body.nq-touch-input #nq-vfs-list li .nq-file-actions button {
  margin-left: 0;
}
body.nq-touch-input #nq-vfs-list li .nq-cd-track-toggle {
  width: 24px;
  height: 24px;
  padding: 0;
}
body.nq-touch-input #nq-vfs-list li .nq-edit {
  display: none;
}
body.nq-touch-input.nq-touch-portrait #nq-vfs-list li .nq-edit {
  display: inline-flex;
}
body.nq-touch-input #nq-vfs-list li .nq-file-actions button svg {
  width: 16px;
  height: 16px;
}
body.nq-touch-input #nq-overlay-panel h3 {
  font-size: 18px;
}
body.nq-touch-input .nq-btn,
body.nq-touch-input #nq-vfs-list li button,
body.nq-touch-input #nq-cd-row .nq-cd-btn {
  padding: 7px 10px;
  font-size: 15px;
  min-width: 40px;
  min-height: 40px;
}
body.nq-touch-input #nq-cd-row .nq-cd-btn {
  font-size: 17px;
}
body.nq-touch-input #nq-panel-footer {
  font-size: 115%;
  padding-top: 6px;
  gap: 6px;
}
body.nq-touch-input #nq-config-row {
  gap: 8px;
  padding-bottom: 6px;
}
body.nq-touch-input #nq-cd-row {
  min-height: 44px;
  gap: 5px;
}
body.nq-touch-input #nq-cd-row .nq-cd-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}
body.nq-touch-input #nq-cd-row .nq-cd-btn svg {
  width: 27px;
  height: 27px;
}
body.nq-touch-input #nq-config-global,
body.nq-touch-input #nq-vfs-upload {
  width: 42px;
  height: 42px;
}
body.nq-touch-input #nq-config-global svg,
body.nq-touch-input #nq-vfs-upload svg {
  width: 34px;
  height: 34px;
}
body.nq-touch-input #nq-upload-error .nq-status-message {
  font-size: 12px;
  padding: 5px 8px;
}
body.nq-touch-input #nq-branding-row {
  padding-top: 5px;
}
body.nq-touch-input #nq-branding {
  font-size: 24px;
}
body.nq-touch-input #nq-branding .nq-n {
  font-size: 18px;
}
body.nq-touch-input #nq-branding .nq-q {
  font-size: 23px;
}
body.nq-touch-input #nq-version {
  font-size: 13px;
}
body.nq-touch-input #nq-join-code {
  min-width: 84px;
  padding: 4px 7px;
}
body.nq-touch-input #nq-join-code .nq-join-code-label {
  font-size: 9px;
}
body.nq-touch-input #nq-join-code-value {
  font-size: 14px;
}
body.nq-touch-input #nq-dir-label {
  font-size: 15px;
}
#nq-overlay-panel h3 { margin: 0 0 10px; color: #fff; font-size: 14px; border-bottom: 1px solid #444; padding-bottom: 6px; display: flex; align-items: center; gap: 8px; user-select: none; -webkit-user-select: none; }
#nq-dir-header {
  cursor: pointer;
}
#nq-overlay-close {
  margin-left: auto;
  width: var(--nq-overlay-close-size);
  height: var(--nq-overlay-close-size);
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #aaa;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#nq-overlay-close svg {
  width: 88%;
  height: 88%;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  pointer-events: none;
}
#nq-overlay-close:hover {
  color: #fff;
  background: rgba(var(--nq-brand-color-standard-rgb), 0.2);
}
#nq-overlay-close:focus,
#nq-overlay-close:focus-visible {
  outline: none;
  box-shadow: none;
}
#nq-dir-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--nq-brand-color-highlight);
  font-weight: normal;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
/* Directory tabs drawer - keeps a slim edge visible when collapsed */
.nq-tabs-wrap {
  position: absolute;
  top: 0;
  right: 100%;
  height: 100%;
  width: var(--nq-tabs-closed-width);
  overflow: hidden;
  background: rgba(6, 6, 6, 0.98);
  border-right: 1px solid #1a1a1a;
  transition: width 0.18s ease;
}
.nq-tabs-wrap.open {
  width: var(--nq-tabs-open-width);
}
#nq-tabs-title {
  position: absolute;
  top: 18px;
  left: 10px;
  right: 10px;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid #444;
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--nq-brand-color-standard);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#nq-tabs-title > span {
  display: inline-block;
  transform: translateY(2px);
}
.nq-tabs {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: var(--nq-tabs-open-width);
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  border-right: 1px solid #333;
  padding: 46px 0 8px;
  overflow-y: auto;
}
.nq-tabs .nq-tab {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  font-size: 11px;
  font-family: monospace;
  color: #999;
  background: none;
  border: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nq-tabs .nq-tab:hover { color: #ddd; background: rgba(60, 60, 60, 0.4); }
.nq-tabs .nq-tab.active {
  color: var(--nq-brand-color-highlight);
  border-left-color: var(--nq-brand-color-highlight);
  background: rgba(var(--nq-brand-color-standard-rgb), 0.1);
}
.nq-tabs-wrap:not(.open) .nq-tab.active {
  color: #999;
  border-left-color: transparent;
  background: none;
}
.nq-tabs .nq-tab.nq-drop-target {
  color: #fff;
  border-left-color: var(--nq-brand-color-highlight);
  background: rgba(var(--nq-brand-color-standard-rgb), 0.22);
}
body.nq-touch-input #nq-overlay-panel .nq-tabs-wrap {
  display: none;
}
#nq-overlay-panel.cd-mode #nq-tabs-wrap {
  pointer-events: none;
}
@media (hover: none) and (pointer: coarse) {
  body.nq-touch-input #nq-overlay-close:hover {
    color: #aaa;
    background: transparent;
  }
  body.nq-touch-input .nq-btn:hover {
    background: rgba(70,70,70,0.7);
    color: #ccc;
  }
  body.nq-touch-input #nq-vfs-list li button:hover,
  body.nq-touch-input #nq-vfs-list li button.nq-del:hover {
    color: #999;
    background: none;
  }
  body.nq-touch-input #nq-vfs-list li .nq-cd-track-toggle:hover {
    color: #999;
    background: rgba(60, 60, 60, 0.24);
  }
  body.nq-touch-input #nq-vfs-list li .nq-cd-track-toggle.active:hover {
    color: var(--nq-brand-color-highlight);
    background: rgba(var(--nq-brand-color-standard-rgb), 0.1);
  }
  body.nq-touch-input .nq-cd-btn:hover {
    color: var(--nq-brand-color-standard);
  }
  body.nq-touch-input .nq-cd-btn.active:hover {
    color: var(--nq-brand-color-highlight);
  }
  body.nq-touch-input #nq-cd-row.cd-off .nq-cd-btn:hover {
    color: #777;
  }
  body.nq-touch-input #nq-config-global:hover {
    color: #777;
  }
  body.nq-touch-input #nq-config-global.active:hover {
    color: var(--nq-brand-color-standard);
  }
  body.nq-touch-input #nq-vfs-upload:hover {
    color: var(--nq-brand-color-standard);
  }
}
/* Main content area */
#nq-panel-content {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 15px;
}
#nq-overlay-panel.cd-mode #nq-panel-content::before {
  content: '\266B';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 136px;
  line-height: 1;
  color: rgba(var(--nq-brand-color-standard-rgb), 0.09);
  text-shadow: 0 0 22px rgba(var(--nq-brand-color-standard-rgb), 0.28);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
#nq-panel-content > * {
  position: relative;
  z-index: 1;
}
#nq-confirm {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.52);
}
#nq-confirm.open {
  display: flex;
}
#nq-confirm-card {
  width: 100%;
  max-width: 252px;
  border: 1px solid #444;
  border-radius: 6px;
  background: rgba(16, 16, 16, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  padding: 10px;
}
#nq-confirm-text {
  color: #ddd;
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}
#nq-confirm-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
#nq-vfs-list {
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
#nq-vfs-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 3px 4px;
}
#nq-vfs-list li.nq-dragging {
  opacity: 0.55;
}
#nq-vfs-list li .nq-fname {
  flex: 1;
  min-width: 0;
  margin-right: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
#nq-vfs-list li[data-path] .nq-fname.nq-editable { cursor: pointer; }
#nq-vfs-list li .nq-file-actions {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  pointer-events: none;
  z-index: 2;
}
#nq-vfs-list li button {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
#nq-vfs-list li .nq-file-actions button {
  margin-left: 0;
}
#nq-vfs-list li:hover .nq-file-actions,
#nq-vfs-list li .nq-file-actions:focus-within {
  pointer-events: auto;
}
#nq-vfs-list li:hover button {
  opacity: 1;
  pointer-events: auto;
}
#nq-vfs-list li button:hover { color: #fff; background: rgba(120,120,120,0.3); }
#nq-vfs-list li button.nq-del:hover { color: #f66; background: rgba(180,60,60,0.2); }
#nq-vfs-list li button svg { width: 14px; height: 14px; }
#nq-vfs-list li .nq-edit svg {
  width: 14px;
  height: 14px;
}
#nq-vfs-list li.nq-cd-track-active {
  background: rgba(var(--nq-brand-color-standard-rgb), 0.1);
}
#nq-vfs-list li.nq-cd-track-clickable {
  cursor: pointer;
}
#nq-vfs-list li.nq-cd-server-heading {
  border-bottom: 0;
  border-top: 1px solid #333;
  color: #888;
  font-size: 10px;
  padding-top: 6px;
  padding-bottom: 4px;
  pointer-events: none;
}
#nq-vfs-list li .nq-cd-track-toggle {
  opacity: 1;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-left: 0;
  margin-right: 6px;
  padding: 0;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  background: rgba(60, 60, 60, 0.24);
  color: #999;
}
#nq-vfs-list li .nq-cd-track-toggle:hover {
  color: #ddd;
  background: rgba(80, 80, 80, 0.4);
}
#nq-vfs-list li .nq-cd-track-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
}
#nq-vfs-list li .nq-cd-track-toggle.active {
  color: var(--nq-brand-color-highlight);
  border-color: rgba(var(--nq-brand-color-standard-rgb), 0.35);
  border-left-color: var(--nq-brand-color-highlight);
  background: rgba(var(--nq-brand-color-standard-rgb), 0.1);
}
#nq-vfs-list li .nq-cd-track-toggle.active:hover {
  color: var(--nq-brand-color-highlight);
  background: rgba(var(--nq-brand-color-standard-rgb), 0.16);
}
#nq-vfs-list li .nq-cd-track-toggle:disabled {
  opacity: 0.5;
  cursor: default;
}
#nq-vfs-list li .nq-cd-track-toggle:disabled:hover {
  color: #999;
  background: rgba(60, 60, 60, 0.24);
}
#nq-vfs-list li.nq-cd-track-server .nq-fname {
  color: #999;
}
#nq-vfs-list li.nq-cd-track-server .nq-cd-track-toggle {
  color: #999;
}
#nq-vfs-list li.nq-cd-track-server .nq-cd-track-toggle.active {
  color: var(--nq-brand-color-highlight);
}
#nq-vfs-list li.nq-cd-track-server.nq-cd-track-overridden .nq-fname {
  color: #5f5f5f;
}
#nq-vfs-list li.nq-cd-track-server.nq-cd-track-overridden .nq-cd-track-toggle {
  color: #5f5f5f;
}
#nq-vfs-list li.nq-cd-track-overridden {
  opacity: 1;
}
.nq-btn {
  background: rgba(70,70,70,0.7);
  border: 1px solid #555;
  color: #ccc;
  padding: 5px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nq-btn:hover { background: rgba(100,100,100,0.8); color: #fff; }
.nq-btn:active, #nq-overlay-toggle:active, #nq-overlay-close:active, #nq-vfs-list li button:active {
  transform: scale(0.95);
}
.nq-btn svg { width: 14px; height: 14px; }
/* Config mode toggle */
.nq-toggle {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
.nq-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.nq-toggle-track {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(80, 80, 80, 0.6);
  border-radius: 9px;
  transition: background 0.2s;
  cursor: pointer;
}
.nq-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #999;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.nq-toggle input:checked + .nq-toggle-track {
  background: rgba(var(--nq-brand-color-standard-rgb), 0.5);
}
.nq-toggle input:checked + .nq-toggle-track::after {
  transform: translateX(16px);
  background: var(--nq-brand-color-highlight);
}
/* Panel footer */
#nq-panel-footer {
  margin-top: auto;
  border-top: 1px solid #333;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#nq-cd-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-height: 42px;
}
#nq-cd-row.hidden {
  display: none;
}
.nq-cd-btn {
  width: 33px;
  height: 33px;
  border: none;
  padding: 0;
  position: relative;
  background: transparent;
  color: var(--nq-brand-color-standard);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s;
}
.nq-cd-btn.active {
  color: var(--nq-brand-color-highlight);
}
.nq-cd-btn.active::after {
  content: '';
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(var(--nq-brand-color-highlight-rgb), 0.42);
  border-radius: 7px;
  box-shadow: 0 0 8px rgba(var(--nq-brand-color-highlight-rgb), 0.34);
  pointer-events: none;
}
.nq-cd-btn:hover {
  color: var(--nq-brand-color-highlight);
}
#nq-cd-row.cd-off .nq-cd-btn {
  color: #777;
}
#nq-cd-row.cd-off .nq-cd-btn:hover {
  color: #aaa;
}
.nq-cd-btn svg {
  width: 19px;
  height: 19px;
}
.nq-cd-btn:disabled {
  opacity: 1;
  cursor: default;
}
.nq-cd-btn:disabled:hover {
  color: inherit;
}
#nq-config-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}
#nq-config-global-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#nq-config-global {
  border: none;
  background: transparent;
  color: #777;
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s;
}
#nq-config-global:hover {
  color: #aaa;
}
#nq-config-global.active {
  color: var(--nq-brand-color-standard);
}
#nq-config-global.active:hover {
  color: var(--nq-brand-color-highlight);
}
#nq-config-global svg {
  width: 28px;
  height: 28px;
}
#nq-config-global:disabled {
  opacity: 0.55;
  cursor: default;
}
#nq-config-global:disabled:hover {
  color: #777;
}
#nq-upload-wrap {
  position: static;
  display: flex;
  align-items: center;
  gap: 6px;
}
#nq-vfs-upload {
  border: none;
  background: transparent;
  color: var(--nq-brand-color-standard);
  width: 30px;
  height: 30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.12s;
}
#nq-vfs-upload:hover {
  color: var(--nq-brand-color-highlight);
}
#nq-vfs-upload svg {
  width: 28px;
  height: 28px;
}
#nq-vfs-upload:disabled {
  opacity: 0.55;
  cursor: default;
}
#nq-vfs-upload:disabled:hover {
  color: var(--nq-brand-color-standard);
}
#nq-upload-error {
  position: absolute;
  right: 0;
  left: 0;
  bottom: calc(100% + 8px);
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 2;
}
#nq-upload-error:empty { display: none; }
#nq-upload-error .nq-status-message {
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid rgba(100, 100, 100, 0.7);
  background: rgba(16, 16, 16, 0.92);
  color: #ccc;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  pointer-events: none;
}
#nq-upload-error .nq-status-message.info {
  border-color: rgba(120, 120, 120, 0.7);
  background: rgba(16, 16, 16, 0.92);
  color: #d0d0d0;
}
#nq-upload-error .nq-status-message.warning {
  border-color: rgba(var(--nq-brand-color-highlight-rgb), 0.65);
  background: rgba(32, 24, 8, 0.92);
  color: var(--nq-brand-color-standard);
}
#nq-upload-error .nq-status-message.error {
  border-color: rgba(214, 84, 84, 0.7);
  background: rgba(32, 8, 8, 0.92);
  color: #ff9a9a;
}
#nq-branding-row {
  display: grid;
  grid-template-columns: 1fr auto minmax(0, 1fr);
  align-items: center;
  padding-top: 8px;
  gap: 8px;
}
#nq-branding-row.nq-no-join-code {
  grid-template-columns: 1fr auto;
}
#nq-branding-row.nq-branding-compact {
  grid-template-columns: 1fr auto;
}
#nq-branding-row.nq-branding-compact #nq-version {
  display: none;
}
#nq-branding-row.nq-branding-compact #nq-join-code {
  justify-self: end;
}
#nq-branding {
  display: inline-block;
  font-family: var(--nq-font-brand);
  font-size: 20px;
  color: #8c8c8c;
  letter-spacing: 1px;
  justify-self: start;
  text-decoration: none;
}
#nq-branding .nq-n { font-size: 15px; }
#nq-branding .nq-q { font-size: 19px; }
#nq-branding .nq-nex { color: var(--nq-brand-color-logo); }
#nq-branding:hover,
#nq-branding:focus-visible {
  color: #b0b0b0;
  text-decoration: none;
}
#nq-version {
  overflow: hidden;
  white-space: nowrap;
  text-align: right;
  font-size: 11px;
  color: #666;
}
#nq-join-code {
  border: 1px solid #3d3d3d;
  border-radius: 4px;
  min-width: 76px;
  padding: 3px 6px;
  background: rgba(12, 12, 12, 0.75);
  color: #aaa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
#nq-join-code .nq-join-code-label {
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #777;
}
#nq-join-code-value {
  font-size: 12px;
  line-height: 1.05;
  color: #b8b8b8;
}
#nq-join-code:hover {
  border-color: rgba(var(--nq-brand-color-highlight-rgb), 0.55);
  color: var(--nq-brand-color-standard);
  background: rgba(18, 18, 18, 0.88);
}
#nq-join-code:hover #nq-join-code-value {
  color: var(--nq-brand-color-standard);
}
#nq-join-code[hidden] {
  display: none;
}
/* Editor overlay - ~10% narrower than prior width, right-aligned */
#nq-editor {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 36%;
  min-width: 420px;
  max-width: 800px;
  z-index: 10001;
  background: rgba(16, 16, 16, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  min-height: 0;
}
#nq-editor.open { display: flex; }
#nq-editor-path {
  font-size: 13px;
  color: var(--nq-brand-color-standard);
  font-family: monospace;
  margin-bottom: 8px;
  flex-shrink: 0;
}
#nq-editor-text {
  flex: 1;
  width: 100%;
  resize: none;
  background: rgba(0,0,0,0.5);
  border: 1px solid #444;
  color: #ddd;
  font-family: monospace;
  font-size: 13px;
  padding: 10px;
  box-sizing: border-box;
  line-height: 1.4;
  tab-size: 4;
}
#nq-editor-text:focus { outline: 1px solid var(--nq-brand-color-standard); border-color: var(--nq-brand-color-standard); }
#nq-editor-btns {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
body.nq-touch-input #nq-editor {
  left: 0;
  width: 100vw;
  max-width: 100vw;
  bottom: auto;
  height: var(--nq-overlay-vh, 100vh);
  padding-bottom: calc(12px + var(--nq-safe-bottom));
}
body.nq-touch-input #nq-editor-btns {
  position: sticky;
  bottom: 0;
  padding-bottom: var(--nq-safe-bottom);
  background: rgba(16, 16, 16, 0.96);
}

/* shell-touch.css */
/* ─── Mobile Touch Controls ─── */
#nq-touch-overlay {
  --nq-touch-btn-size: 74px;
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9990;
  box-sizing: border-box;
  padding: var(--nq-safe-top) var(--nq-safe-right) var(--nq-safe-bottom) var(--nq-safe-left);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
#nq-touch-overlay.nq-touch-idle {
  pointer-events: none;
}
#nq-touch-overlay.nq-touch-idle #nq-touch-buttons,
#nq-touch-overlay.nq-touch-idle #nq-touch-tap-zones,
#nq-touch-overlay.nq-touch-idle #nq-joy-ring,
#nq-touch-overlay.nq-touch-idle #nq-joy-knob {
  opacity: 0;
}
#nq-touch-overlay.nq-touch-modal-open #nq-joy-ring,
#nq-touch-overlay.nq-touch-modal-open #nq-joy-knob,
#nq-touch-overlay.nq-touch-modal-open .nq-touch-btn {
  display: none;
}
#nq-touch-overlay.nq-touch-text-entry-open .nq-touch-btn[data-touch-slot],
#nq-touch-overlay.nq-touch-text-entry-open .nq-touch-menu-btn,
#nq-touch-overlay.nq-touch-text-entry-open #nq-touch-tap-zones {
  display: none;
}
#nq-touch-overlay.nq-touch-menu-mode:not(.nq-touch-menu-layout-mode) .nq-touch-btn[data-touch-slot],
#nq-touch-overlay.nq-touch-menu-mode:not(.nq-touch-menu-layout-mode) .nq-touch-btn[data-touch-slot].nq-touch-btn-hidden {
  display: none;
}
#nq-touch-overlay.nq-touch-menu-layout-mode:not(.nq-touch-modal-open):not(.nq-touch-text-entry-open) .nq-touch-btn[data-touch-slot] {
  display: flex;
  border-style: dotted;
  border-color: rgba(255, 204, 128, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 204, 128, 0.32);
}
#nq-touch-overlay.nq-touch-menu-layout-mode:not(.nq-touch-modal-open):not(.nq-touch-text-entry-open) .nq-touch-btn[data-touch-slot].nq-touch-btn-hidden {
  display: flex;
}
#nq-touch-tap-zones {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nq-touch-tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}
#nq-touch-tap-left {
  left: 0;
  width: 50%;
  justify-content: flex-start;
  padding-left: clamp(16px, 6vw, 120px);
}
#nq-touch-tap-right {
  right: 0;
  width: 50%;
  justify-content: flex-end;
  padding-right: clamp(16px, 6vw, 120px);
}
.nq-touch-tap-zone::after {
  content: '';
  width: clamp(93px, 15vw, 180px);
  height: clamp(129px, 21vw, 252px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 280' fill='none'%3E%3Cpath d='M152 26L140 39L128 51L118 63L108 74L100 84L93 94L87 103L82 111L78 118L75 124L74 130L73 134L74 136L74 137L74 144L73 146L74 150L75 156L78 162L82 169L87 177L93 186L100 196L108 206L118 217L128 229L140 241L152 254A8 8 0 0 1 142 266L128 254L115 243L103 232L92 221L82 212L74 202L66 194L59 185L53 177L48 169L43 162L40 154L38 146L38 137L38 134L40 126L43 118L48 111L53 103L59 95L66 86L74 78L82 68L92 59L103 48L115 37L128 26L142 14A8 8 0 0 1 152 26Z' fill='%23ffffff'/%3E%3C/svg%3E");
}
#nq-touch-tap-left::after {
  transform: none;
}
#nq-touch-tap-right::after {
  transform: scaleX(-1);
}
#nq-touch-overlay.nq-touch-menu-mode:not(.nq-touch-modal-open):not(.nq-touch-text-entry-open) #nq-touch-tap-zones {
  display: block;
}
#nq-touch-overlay.nq-touch-flip #nq-touch-tap-left::after {
  transform: scaleX(-1);
}
#nq-touch-overlay.nq-touch-flip #nq-touch-tap-right::after {
  transform: none;
}
/* Virtual joystick — positioned from C via EM_JS */
#nq-joy-ring {
  display: none;
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  opacity: 0.8;
}
#nq-joy-knob {
  display: none;
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.35);
  opacity: 0.8;
}
/* Action buttons */
#nq-touch-buttons {
  position: absolute;
  inset: 0;
}
.nq-touch-btn {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.0);
  font-family: monospace;
  font-weight: bold;
  font-size: 0;
  padding: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  width: var(--nq-touch-btn-size);
  height: var(--nq-touch-btn-size);
  opacity: 0.3;
}
.nq-touch-menu-btn {
  cursor: default;
}
#nq-touch-menu-m1 {
  left: 4%;
  top: 5%;
}
#nq-touch-menu-m2 {
  left: 96%;
  top: 5%;
}
.nq-touch-btn::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.nq-touch-btn.nq-touch-btn-glyph {
  font-family: 'DpQuake', 'Courier New', monospace;
  color: rgba(255, 255, 255, 0.9);
  font-size: 30px;
}
#nq-touch-menu-m2.nq-touch-btn-glyph {
  font-size: 40px;
}
.nq-touch-btn.nq-touch-btn-glyph::after {
  display: none;
}
.nq-touch-btn svg {
  width: 60%;
  height: 60%;
  pointer-events: none;
}
.nq-touch-btn.active,
.nq-touch-btn:active {
  background: rgba(var(--nq-brand-color-standard-rgb), 0.5);
  border-color: rgba(var(--nq-brand-color-highlight-rgb), 0.7);
}
.nq-touch-btn.active::after,
.nq-touch-btn:active::after {
  background: rgba(255, 235, 200, 0.9);
}
.nq-touch-btn.dragging {
  cursor: grabbing;
  border-style: dashed;
  border-color: rgba(255, 204, 128, 0.95);
  background: rgba(var(--nq-brand-color-standard-rgb), 0.35);
}
.nq-touch-btn-hidden {
  display: none;
}
#nq-touch-overlay.nq-touch-layout-edit .nq-touch-btn[data-touch-slot] {
  border-style: dotted;
  border-color: rgba(255, 204, 128, 0.95);
  box-shadow: 0 0 0 1px rgba(255, 204, 128, 0.32);
}

#nq-text-entry {
  align-items: flex-start;
  box-sizing: border-box;
  justify-content: center;
  left: 0;
  padding: calc(var(--nq-safe-top) + 4px) calc(var(--nq-safe-right) + 8px) 0 calc(var(--nq-safe-left) + 8px);
  position: fixed;
  pointer-events: auto;
  right: 0;
  top: 0;
  z-index: 9995;
}

#nq-text-entry-form {
  align-items: center;
  background: rgba(14, 20, 26, 0.88);
  border: 1px solid rgba(255, 206, 138, 0.38);
  border-radius: 8px;
  display: flex;
  min-height: 30px;
  padding: 2px 6px;
  width: min(100%, 280px);
}

#nq-text-entry-input {
  background: transparent;
  border: none;
  caret-color: rgba(255, 206, 138, 0.7);
  color: #f7f2e8;
  flex: 1 1 auto;
  font: 13px/1.1 'Courier New', monospace;
  height: 22px;
  min-width: 0;
  padding: 0 4px;
}

#nq-text-entry-input:focus {
  outline: none;
}

#nq-text-entry:not([hidden]) {
  display: flex;
}
/* Landscape orientation: optimize layout */
@media (orientation: landscape) and (max-height: 500px) {
  #nq-touch-overlay {
    --nq-touch-btn-size: 65px;
  }
  .nq-touch-btn {
    width: 65px;
    height: 65px;
  }
}

