@media (min-width: 1050px) {
  html:has(.app-shell>.topbar.topbar-fits) {
    overflow-x: clip;
    overscroll-behavior-x: none;
  }

  .app-shell:has(>#home-live):has(>.topbar.topbar-fits) {
    --wide-content-gutter: clamp(18px, 2vw, 32px);
    --wide-header-inset: 14px;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-columns: clamp(186px, 16vw, 224px) minmax(0, 1fr);

    &>.topbar {
      grid-area: 1 / 2;
      margin: var(--wide-header-inset) var(--wide-content-gutter) 0;
    }
    &>#stream-banner { grid-area: 2 / 2; }
    &>#account-badge { grid-area: 3 / 2; }
    &>main { grid-area: 4 / 2; }
    &>#home-live {
      grid-area: 1 / 1 / 5 / 2;
      top: var(--brainlab-header-offset, 0px);
      max-height: calc(var(--brainlab-viewport-height, 100dvh) - var(--brainlab-header-offset, 0px));
      min-height: min(100%, var(--brainlab-viewport-height, 100dvh));
    }
  }

  :where(.app-shell)>.topbar.topbar-fits {
    --wide-header-top: calc(var(--brainlab-header-offset, 0px) + var(--wide-header-inset, 0px));
    position: relative;
    z-index: 35;
    touch-action: pan-y pinch-zoom;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: minmax(64px, auto) minmax(48px, auto);
    gap: 0 20px;
    height: auto;
    padding-inline: 16px;
    background: radial-gradient(ellipse at 5% 0, #29173d 0, transparent 48%), #15101d;
    border: 1px solid #3b294c;
    border-radius: 11px;
    box-shadow: 0 6px 20px #0a051034;

    &>.sidebar { display: contents !important; }
    &>.mobile-menu-open, &>.mobile-brand, &>.header-tools { display: none !important; }
    & .sidebar>.brand {
      grid-area: 1 / 1;
      justify-self: start;
      min-width: 0;
      gap: 10px;
      color: #f7edff;
    }
    & .sidebar .brand .brand-name {
      font-size: 25px;
      font-weight: 900;
      letter-spacing: -.045em;
    }
    & .sidebar .brand .brand-mark {
      width: 48px;
      height: 48px;
      filter: drop-shadow(0 3px 9px #a352ff55);
    }
    & .sidebar>.nav-caption,
    & .sidebar>.sidebar-bottom { display: none; }

    &>.header-actions {
      display: flex !important;
      grid-area: 1 / 2;
      justify-content: flex-end;
      gap: 9px;
      width: auto;
    }
    &>.header-actions>.profile-header-controls { order: 1; }
    & .header-settings {
      border: 1px solid #4b335f;
      border-radius: 10px;
      background: #281935;
      color: #dfc6ee;
    }
    & .header-settings:hover { background: #382349; }
    & .profile-balance-card {
      flex-direction: row;
      gap: 9px;
      min-width: 0;
      min-height: 42px;
      max-width: none;
      padding: 3px 4px 3px 12px;
      border: 1px solid #4b335f;
      background: #1e1429;
    }
    & .wallet-caption {
      position: absolute;
      clip-path: inset(50%);
      width: 1px;
      height: 1px;
      overflow: hidden;
      white-space: nowrap;
    }
    & .wallet-amount { gap: 5px; }
    & .wallet-coin { order: -1; color: #c893ff; }
    & .wallet-topup {
      display: inline-flex;
      flex: 0 0 auto;
      width: 33px;
      height: 33px;
      padding: 0;
      border-color: #a96ae8;
      border-radius: 7px;
      background: linear-gradient(135deg,#9452dc,#7034b1);
      color: #fff;
    }
    & .wallet-topup:hover { background: #9b57e5; }

    &>.sidebar nav {
      display: flex !important;
      grid-area: 2 / 1 / 2 / -1;
      justify-content: safe center;
      align-items: center;
      gap: 6px;
      width: 100%;
      align-self: stretch;
      padding-block: 6px 8px;
      overflow: clip;
      border-top: 1px solid #49355999;
    }
    &>.sidebar nav .nav-button {
      justify-content: center;
      gap: 7px;
      min-height: 40px;
      padding: 7px 13px;
      border: 1px solid transparent;
      border-radius: 9px;
      background: transparent;
      color: #c8b2dc;
      font-size: 13px;
      text-transform: none;
    }
    &>.sidebar nav .nav-button .nav-arrow,
    &>.sidebar nav .nav-button .new-dot,
    &>.sidebar nav .nav-button .garden-new { display: none; }
    &>.sidebar nav .nav-button:hover { background: #2b1a3a; color: #fff; }
    &>.sidebar nav .nav-button.active{
      border-color: #a365e3;
      background: linear-gradient(160deg,#9b51de,#7130b7);
      color: #fff;
      box-shadow: inset 0 1px #dfb4ff99,0 3px 0 #4c2279,0 6px 12px #5e278b40;
    }
    &>.sidebar nav .nav-button.active:hover{
      background: linear-gradient(160deg,#aa62e9,#7d3ac6);
      color: #fff;
    }
    &>.sidebar nav .nav-button.active .mode-pixel-icon{
      filter: brightness(0) invert(1);
    }
    &>.sidebar nav .nav-button:focus-visible { outline-offset: -2px; }
  }
}
