.shell {
  --sidebar-scrollbar-offset: 10px;
  --sidebar-scroll-fade-size: 14px;
  --sidebar-scroll-edge-padding: 16px;

  display: flex;
  position: relative;
  width: var(--sidebar-width);
  max-width: 100%;
  min-width: 0;
  height: 100vh;
  flex-direction: column;
  padding: 0 14px 16px;
  overflow: hidden;
}

.titlebar {
  display: flex;
  height: var(--titlebar-height);
  flex: none;
  align-items: center;
  gap: var(--space-2);
  user-select: none;
  app-region: drag;
  -webkit-app-region: drag;
}

.trafficSpace {
  width: var(--traffic-controls-width);
  height: 100%;
  flex: none;
}

.content {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear;
}

.contentCollapsed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-18px);
  transition:
    opacity 120ms ease,
    transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1),
    visibility 0s linear 120ms;
}

.header {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: none;
}

.scrollFrame {
  position: relative;
  width: calc(100% + var(--sidebar-scrollbar-offset));
  max-width: calc(100% + var(--sidebar-scrollbar-offset));
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.scroll {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden auto;
  scrollbar-color: color-mix(in srgb, var(--line-strong) 70%, transparent)
    transparent;
  scrollbar-width: thin;
  -webkit-mask-image:
    linear-gradient(
      to bottom,
      transparent 0,
      var(--text-primary) var(--sidebar-scroll-fade-size),
      var(--text-primary) calc(100% - var(--sidebar-scroll-fade-size)),
      transparent 100%
    ),
    linear-gradient(var(--text-primary), var(--text-primary));
  -webkit-mask-position:
    0 0,
    right top;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size:
    calc(100% - var(--sidebar-scrollbar-offset)) 100%,
    var(--sidebar-scrollbar-offset) 100%;
  mask-image:
    linear-gradient(
      to bottom,
      transparent 0,
      var(--text-primary) var(--sidebar-scroll-fade-size),
      var(--text-primary) calc(100% - var(--sidebar-scroll-fade-size)),
      transparent 100%
    ),
    linear-gradient(var(--text-primary), var(--text-primary));
  mask-position:
    0 0,
    right top;
  mask-repeat: no-repeat;
  mask-size:
    calc(100% - var(--sidebar-scrollbar-offset)) 100%,
    var(--sidebar-scrollbar-offset) 100%;
}

.scrollContent {
  display: flex;
  width: calc(100% - var(--sidebar-scrollbar-offset));
  max-width: calc(100% - var(--sidebar-scrollbar-offset));
  min-width: 0;
  min-height: min-content;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  padding-block: var(--sidebar-scroll-edge-padding);
}

.scroll::-webkit-scrollbar {
  width: 8px;
}

.scroll::-webkit-scrollbar-track {
  background: transparent;
}

.scroll::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--line-strong) 70%, transparent);
  background-clip: content-box;
}

.footer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: none;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.nav {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .content {
    transition: none;
  }
}
