#root .ds-app-shell:has(.app-sidebar-disclosure[data-expanded='false']) {
  --sidebar-width: var(--ds-size-sidebar-collapsed);
}
#root .ds-app-shell:has(.app-sidebar-disclosure[data-expanded='true']) {
  --sidebar-width: var(--ds-size-sidebar-desktop);
}
#root .ds-app-shell__sidebar:has(.app-sidebar-disclosure) {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 100vh;
  height: 100dvh;
  align-self: flex-start;
}
#root .app-sidebar-disclosure,
#root .app-sidebar-disclosure__panel { height: 100%; min-height: 0; }
#root .app-sidebar-disclosure__panel {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  background: var(--ds-color-sidebar);
  color: var(--ds-color-text-inverse);
}
#root .app-sidebar-disclosure__header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .75rem 0;
}
#root .app-sidebar-disclosure__brand { min-width: 0; font: 700 1rem Georgia, serif; overflow-wrap: anywhere; }
#root .app-sidebar-disclosure__toggle {
  display: grid;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: .5rem;
  background: transparent;
  color: var(--ds-color-sidebar-ink);
  cursor: pointer;
  touch-action: manipulation;
}
#root .app-sidebar-disclosure__toggle:focus-visible { outline: 2px solid var(--ds-color-focus); outline-offset: 2px; }
#root .app-sidebar-disclosure__content { display: flex; flex: 1; min-height: 0; }
#root .app-sidebar-disclosure__content > .app-sidebar {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: .5rem .75rem;
}
#root .app-sidebar-disclosure .app-sidebar__brand { display: none; }
#root .app-sidebar-disclosure .app-sidebar__store,
#root .app-sidebar-disclosure .app-sidebar__user,
#root .app-sidebar-disclosure .app-sidebar__logout { flex-shrink: 0; }
#root .app-sidebar-disclosure .app-sidebar__nav-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
}
#root .app-sidebar-disclosure .app-sidebar__nav-scroll::-webkit-scrollbar { display: none; }
#root .app-sidebar-disclosure .ds-sidebar-nav { overflow: visible; }
#root .app-sidebar-disclosure .ds-sidebar-nav a { position: relative; min-height: 2.75rem; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar-disclosure__header { justify-content: center; padding-inline: .375rem; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar-disclosure__brand,
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav__label,
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav__full-label,
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav__short-label,
#root .app-sidebar-disclosure[data-expanded='false'] .ds-store-switcher__desktop,
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar__user > div { display: none; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar { padding-inline: .375rem; }
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav a {
  flex-direction: row;
  justify-content: center;
  padding: .5rem .25rem;
  user-select: none;
  -webkit-touch-callout: none;
}
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav__icon { display: block; max-width: none; height: auto; font-size: 1.25rem; line-height: 1; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar__badge { position: absolute; top: .125rem; right: .125rem; padding-inline: .25rem; font-size: .625rem; }
#root .app-sidebar-disclosure[data-expanded='false'] .ds-sidebar-nav__tooltip {
  position: fixed;
  z-index: 60;
  top: clamp(1.5rem, var(--tooltip-top), calc(100dvh - 1.5rem));
  left: calc(var(--sidebar-width) + .5rem);
  display: block;
  width: max-content;
  max-width: calc(100vw - var(--sidebar-width) - 1.5rem);
  transform: translateY(-50%);
  padding: .5rem .625rem;
  border: 1px solid var(--ds-color-border-default);
  border-radius: .375rem;
  background: var(--ds-color-surface);
  color: var(--ds-color-text-primary);
  box-shadow: 0 .375rem 1.125rem rgba(38,30,24,.2);
  font-size: .875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: none;
}
#root .app-sidebar-disclosure[data-expanded='false'] .ds-store-switcher__compact-trigger {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  margin: auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: .5rem;
  background: rgba(255,255,255,.08);
  color: var(--ds-color-sidebar-ink);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
}
#root .app-sidebar-disclosure[data-expanded='false'] .ds-store-switcher__listbox { position: fixed; top: 7rem; left: var(--sidebar-width); max-width: calc(100vw - var(--sidebar-width) - .5rem); }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar__user { justify-content: center; padding-inline: 0; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar__logout { min-height: 2.75rem; font-size: 0; }
#root .app-sidebar-disclosure[data-expanded='false'] .app-sidebar__logout::before {
  content: '';
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: auto;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v9M7 5a9 9 0 1 0 10 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav__label { display: block; text-align: left; padding-inline: .625rem; }
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav a {
  flex-direction: row;
  justify-content: space-between;
  gap: .5rem;
  padding-inline: .625rem;
  font-size: .875rem;
  text-align: left;
}
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav__icon,
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav__short-label,
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav__tooltip,
#root .app-sidebar-disclosure[data-expanded='true'] .ds-store-switcher__compact-trigger { display: none; }
#root .app-sidebar-disclosure[data-expanded='true'] .ds-sidebar-nav__full-label { display: block; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#root .app-sidebar-disclosure[data-expanded='true'] .ds-store-switcher__desktop { display: grid; }
#root .app-sidebar-disclosure[data-expanded='true'] .ds-store-switcher__desktop > span { display: block; }
#root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar__user { justify-content: flex-start; padding-inline: .625rem; }
#root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar__user > div { display: block; min-width: 0; }
#root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar__user strong,
#root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar__user small { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
#root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar__logout { padding-inline: .625rem; font-size: .875rem; }
#root .app-sidebar-disclosure__backdrop { display: none; }
@media (max-width: 47.999rem), (orientation: portrait) {
  #root .ds-app-shell:has(.app-sidebar-disclosure[data-expanded]) { --sidebar-width: var(--ds-size-sidebar-collapsed); }
  #root .app-sidebar-disclosure[data-expanded='true'] .app-sidebar-disclosure__panel {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(22rem, calc(100vw - 3rem));
    height: 100vh;
    height: 100dvh;
    box-shadow: .5rem 0 2rem rgba(0,0,0,.2);
  }
  #root .app-sidebar-disclosure__backdrop {
    display: block;
    position: fixed;
    z-index: 1;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(0,0,0,.3);
    cursor: pointer;
  }
}
