/* v17.5.7 — one reading list per sidebar, with workspace links in overflow. */
.megaverse-unified-sidebar{
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}
.megaverse-unified-sidebar .unified-sidebar-head,
.megaverse-unified-sidebar .unified-new-chat,
.megaverse-unified-sidebar .unified-history-search,
.megaverse-unified-sidebar .unified-history-label{
  flex:0 0 auto!important;
}
.megaverse-unified-sidebar .unified-conversation-list{
  display:grid!important;
  grid-auto-rows:max-content;
  align-content:start;
  flex:1 1 auto!important;
  min-height:0!important;
  margin:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.megaverse-unified-sidebar .unified-history-item{
  display:grid!important;
  min-width:0!important;
  min-height:0!important;
  align-content:start;
}
.megaverse-unified-sidebar .unified-history-title,
.megaverse-unified-sidebar .unified-history-preview{
  display:block!important;
  min-width:0!important;
  line-height:1.35!important;
}
.megaverse-unified-sidebar .unified-history-title{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.megaverse-unified-sidebar .unified-history-preview{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.megaverse-unified-sidebar .unified-account-menu{
  width:min(286px,calc(100vw - 28px));
  max-height:min(560px,calc(100dvh - 106px));
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.unified-account-menu-heading{
  margin:7px 9px 4px!important;
  color:var(--ds-subtle,#8c94a8)!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.12em!important;
}
.unified-account-menu-heading:not(:first-child){
  margin-top:12px!important;
  padding-top:9px;
  border-top:1px solid var(--ds-border,#303646);
}
.unified-account-menu .unified-account-workspace-link{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
.unified-account-workspace-link>span{
  display:grid;
  width:18px;
  place-items:center;
  color:var(--ds-accent-hover,#b89cff);
  font-size:14px;
}
.unified-account-workspace-link[aria-current="page"]{
  background:var(--ds-accent-soft,rgba(126,105,218,.22))!important;
  color:#fff!important;
}

/* The admin drawer contains a long navigation list. It owns the available
   space and scrolls independently; no separate shortcut block is needed. */
.admin-shell .admin-sidebar #nav,
.admin-shell .admin-sidebar .unified-context-nav{
  display:flex!important;
  flex:1 1 auto!important;
  min-height:0!important;
  max-height:none!important;
  flex-direction:column!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.admin-shell .admin-sidebar .unified-feature-panel{display:none!important}

/* Tables stay tabular on small screens. The wrapper, not each cell, scrolls. */
.post-body .markdown-table-wrap{
  width:100%;
  max-width:100%;
  margin:16px 0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  border:1px solid #3c3b56;
  border-radius:12px;
  background:#10111b;
}
.post-body .markdown-table-wrap table{
  display:table!important;
  width:max-content!important;
  min-width:max(100%,720px)!important;
  table-layout:auto!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
.post-body .markdown-table-wrap th,
.post-body .markdown-table-wrap td{
  min-width:132px;
  padding:12px 14px!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  line-height:1.48!important;
  white-space:normal!important;
}
.post-body .markdown-table-wrap th{white-space:nowrap!important}

@media (max-width:900px){
  .social-shell .megaverse-unified-sidebar,
  .network-shell .megaverse-unified-sidebar,
  .dev-shell .megaverse-unified-sidebar,
  .admin-shell .megaverse-unified-sidebar,
  .automation-shell .megaverse-unified-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
  }
  .megaverse-unified-sidebar .unified-conversation-list{padding-bottom:10px!important}
  .admin-shell .admin-sidebar #nav,
  .admin-shell .admin-sidebar .unified-context-nav{padding-bottom:12px!important}
  .post-body .markdown-table-wrap table{min-width:760px!important}
  .post-body .markdown-table-wrap th,
  .post-body .markdown-table-wrap td{min-width:140px!important;padding:11px 13px!important}
}
