/* PureSuite — Mobile-only overrides (desktop untouched) */
@media (max-width: 960px) {

  html, body { max-width: 100%; overflow-x: hidden; }

  /* Allow panels to shrink on narrow screens */
  .panel { min-width: 0; }

  /* Toolbar: horizontal scroll + snap; CSS-only indicator that NEVER drifts */
  nav.toolbar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    padding-top: 2px;
    position: sticky;
    top: 0;
    z-index: 10;
    scroll-snap-type: x proximity;
    background: var(--bg);
  }
  nav.toolbar::-webkit-scrollbar { display: none; }
  nav.toolbar .tab {
    flex: 0 0 auto;
    scroll-snap-align: center;
    position: relative;
  }

  /* Hide floating indicator on mobile; use per-tab underline */
  nav.toolbar .indicator { display: none !important; }
  nav.toolbar .tab.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
    pointer-events: none;
  }

  /* Avoid tap transforms that can clip borders */
  nav.toolbar .tab:hover,
  nav.toolbar .tab:active { transform: none; }

  /* Edge shadows to hint scrollability (always on for robustness) */
  nav.toolbar::before,
  nav.toolbar::after {
    content: "";
    position: sticky;
    top: 0; bottom: 0;
    width: 18px;
    pointer-events: none;
    z-index: 3;
  }
  nav.toolbar::before {
    left: 0;
    background: linear-gradient(to right, rgba(0,0,0,.45), rgba(0,0,0,0));
  }
  nav.toolbar::after {
    left: calc(100% - 18px);
    background: linear-gradient(to left, rgba(0,0,0,.45), rgba(0,0,0,0));
  }

  /* Tighter spacing + logo scale */
  body { padding: 14px; }
  h1 { font-size: 24px; }
  .brand-hero img { max-width: 100%; height: auto; }

  /* Two-column PDF viewer stacks */
  .pdf-two-col { grid-template-columns: 1fr !important; }

  /* Grids become single column */
  .ggrid { grid-template-columns: 1fr !important; }
  .pdf-docs { grid-template-columns: 1fr !important; }
  .thumb-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

  /* Wrap actions and shrink wide inputs */
  .actions { flex-wrap: wrap; }
  #selRange { width: min(180px, 60vw); }

  /* Footer stacks */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
}
