/* Classic desktop scrollbars consume layout width; phone overlay scrollbars
   do not. Keep both catalogue states on one 10px gutter, matching the old
   opened-detail measure. Mobile artwork and geometry remain untouched. */
@media (min-width: 768px) {
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid,
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content {
    scrollbar-width: auto !important;
    scrollbar-color: auto !important;
    scrollbar-gutter: stable !important;
  }
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid {
    /* Hidden overflow makes Chromium reserve its default 15px gutter even
       with a custom scrollbar. Auto instantiates the same 10px lane in both
       states; fitted full lists still have no visible scrolling thumb. */
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid::-webkit-scrollbar,
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content::-webkit-scrollbar {
    width: 10px !important;
  }
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid::-webkit-scrollbar-button,
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid::-webkit-scrollbar-track,
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content::-webkit-scrollbar-track {
    background: transparent !important;
    border: 0 !important;
  }
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content::-webkit-scrollbar-track {
    /* The close ends at sheet y=54; content starts at y=16. Track starts at
       y=64, leaving 10px of logical clearance without shifting the content. */
    margin-top: 48px !important;
    margin-bottom: 8px !important;
  }
  #home-screen ~ .library-approved-v11:is(#general-library-panel, #weapon-library-panel, #item-library-panel) .library-atlas-card > .library-atlas-grid::-webkit-scrollbar-thumb,
  #home-screen ~ #general-library-panel.library-approved-v11 .general-detail__scroll-content::-webkit-scrollbar-thumb {
    min-height: 44px;
    background: linear-gradient(90deg, #7e5834, #b58a53 48%, #7e5834) !important;
    border: 2px solid transparent !important;
    background-clip: padding-box !important;
    border-radius: 999px !important;
    box-shadow: none !important;
  }
}
