/* Same palette and 260px readable menu. Only module navigation is collapsible. */
#gjSidebarRail[hidden], .gj-sidebar-toolbar[hidden] { display: none !important; }
body.gramjet-shell-active.gj-sidebar-auto:not(.gj-sidebar-pinned) .gramjet-shell {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
}
body.gramjet-shell-active.gj-sidebar-auto:not(.gj-sidebar-pinned) .service-content { grid-column: 2; }
body.gramjet-shell-active.gj-sidebar-auto:not(.gj-sidebar-pinned) .service-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  width: 260px !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  z-index: 900;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 180ms ease, visibility 180ms;
}
body.gramjet-shell-active.gj-sidebar-auto.gj-sidebar-open:not(.gj-sidebar-pinned) .service-sidebar {
  transform: translateX(0);
  visibility: visible;
  box-shadow: 8px 0 28px #102c4930;
}
#gjSidebarRail {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  width: 36px;
  background: var(--project-sidebar, #123d60);
  border-right: 1px solid #ffffff35;
  box-sizing: border-box;
  z-index: 899;
}
#gjSidebarRail button {
  width: 36px;
  min-width: 0;
  height: 52px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
  box-shadow: none;
  cursor: pointer;
}
.gj-sidebar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; margin: 0 0 8px; padding-bottom: 10px; border-bottom: 1px solid #ffffff25; }
body.gramjet-shell-active .service-sidebar .gj-sidebar-toolbar button {
  padding: 6px 8px;
  margin: 0;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: 14px/1.3 system-ui !important;
  box-shadow: none;
  cursor: pointer;
}
body.gramjet-shell-active .service-sidebar .gj-sidebar-toolbar button:hover { background: #ffffff12; }
body.gramjet-shell-active .service-sidebar .gj-sidebar-toolbar .gj-sidebar-close { width: 34px; padding: 0; flex-shrink: 0; font-size: 20px !important; }
@media (pointer: coarse) {
  body.gramjet-shell-active .service-sidebar .gj-sidebar-toolbar button { min-height: 44px; }
  body.gramjet-shell-active .service-sidebar .gj-sidebar-toolbar .gj-sidebar-close { width: 44px; }
}
#gjSidebarRail button:focus-visible, .gj-sidebar-toolbar button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
body.gpw-in-project #gjSidebarRail {
  background: color-mix(in srgb, var(--project-color) 19%, #122b40);
  border-right-color: var(--project-color);
}
@media (prefers-reduced-motion: reduce) {
  body.gramjet-shell-active.gj-sidebar-auto .service-sidebar { transition: none; }
}
