/* 与 index.html 一致的侧栏与移动端抽屉（工具子页共用） */
.scrollbar-nb {
  scrollbar-width: thin;
  scrollbar-color: rgba(26,26,46,.32) rgba(26,26,46,.06);
}
.scrollbar-nb::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-nb::-webkit-scrollbar-track { background: rgba(26,26,46,.06); border-radius: 100px; }
.scrollbar-nb::-webkit-scrollbar-thumb {
  background: rgba(26,26,46,.32); border-radius: 100px; border: 2px solid transparent; background-clip: padding-box;
}
.scrollbar-nb::-webkit-scrollbar-thumb:hover { background: rgba(0,132,255,.45); background-clip: padding-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
.nb-app-shell { position: relative; width: 100%; }
.nb-sidebar {
  width: 224px;
  flex-shrink: 0;
  z-index: 200;
  -webkit-overflow-scrolling: touch;
}
.nb-mobile-topbar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  background: #1a1a2e;
  color: #fff;
  flex-shrink: 0;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  padding-top: env(safe-area-inset-top);
  min-height: calc(48px + env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nb-mobile-topbar button {
  color: #fff;
  font-size: 1.125rem;
  padding: 0.5rem;
  margin-left: -0.25rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  cursor: pointer;
}
.nb-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.45);
  touch-action: none;
}
@media (max-width: 767.98px) {
  .nb-app-shell { overflow-x: hidden; }
  .nb-sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100dvh !important;
    max-height: -webkit-fill-available;
    width: min(17.5rem, 86vw) !important;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 4px 0 32px rgba(0,0,0,0.2);
    overflow-y: auto;
  }
  .nb-sidebar.is-open { transform: translateX(0); }
  .nb-mobile-topbar { display: flex; }
  .nb-mobile-overlay.is-visible { display: block; }
}
@media (min-width: 768px) {
  .nb-sidebar {
    position: relative !important;
    transform: none !important;
    box-shadow: none !important;
    width: 224px !important;
  }
  .nb-mobile-overlay,
  .nb-mobile-overlay.is-visible {
    display: none !important;
  }
}
