/* ── MOBILE NAV ── */
.topbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
  z-index: 1001;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.topbar-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text, #ece8f5);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}

/* ── Mobile nav drawer ── */
#mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
}
#mobile-nav-drawer.open { display: block; }

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  cursor: pointer;
  touch-action: manipulation;
}
.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(290px, 82vw);
  height: 100%;
  background: var(--bg2, #14121d);
  border-left: 1px solid var(--border, #2c273d);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.6);
}
.mobile-nav-panel.slide-in { transform: translateX(0); }
.mobile-nav-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #2c273d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent, #ad62ff);
}
.mobile-nav-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: var(--text2, #9b94b0);
  line-height: 1;
  padding: 4px;
}
.mobile-nav-user {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, #2c273d);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 14px;
  color: var(--text, #ece8f5);
  font-family: 'IBM Plex Mono', monospace;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--border, #2c273d);
  transition: background 0.15s;
}
.mobile-nav-btn:hover, .mobile-nav-btn:active { background: var(--bg3, #1c1828); }

.mobile-nav-sub-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 36px;
  font-size: 13px;
  color: var(--text2, #b8b2cb);
  font-family: 'IBM Plex Mono', monospace;
  border: none;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--border, #2c273d);
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-sub-btn:hover, .mobile-nav-sub-btn:active {
  background: var(--bg3, #1c1828);
  color: var(--text, #ece8f5);
}

.topbar-hamburger:hover span,
.topbar-hamburger:focus span {
  background: var(--accent, #ad62ff);
}

/* ── Responsive: show hamburger, hide topbar-right, actions and topbar user info ── */
@media (max-width: 860px) {
  .topbar-right            { display: none !important; }
  .topbar-actions-section  { display: none !important; }
  .topbar .topbar-user-info { display: none !important; }
  .topbar-hamburger        { display: flex !important; margin-left: auto; }
  .mobile-hide             { display: none !important; }
}
