/* Коллекция: неподвижная шапка, общая прокрутка списка и комплектов. */
html:has(.page-collection),
body:has(.page-collection) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.page-signed-in.page-collection {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.page-collection .site-header { flex-shrink: 0; }
.page-collection .workspace { min-height: 0; overflow: hidden; }
.page-collection .collection-page { height: 100%; min-height: 0; }
.collection-page .cabinet-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.collection-page .showcase-controls { flex-shrink: 0; }
.collection-scroll {
  flex: 1;
  min-height: 0;
  /* Keep the native scrollbar lane in both views; no thumb without overflow. */
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #395061 transparent;
  padding-right: 6px;
}
.collection-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@supports not (scrollbar-gutter: stable) {
  .collection-scroll { overflow-y: scroll; }
}

/* Leave room for the fixed collection viewport on short phones. */
@media (max-width: 700px) {
  .page-collection .site-header { min-height: 0; padding: 10px 14px; gap: 6px; }
  .page-collection .site-nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; min-width: 0; max-width: 100%; gap: 14px; }
  .page-collection .site-nav a { flex-shrink: 0; font-size: 12px; padding: 4px 0; }
  .collection-page .showcase-controls { grid-template-columns: minmax(0, 1fr) 32px 64px; grid-template-rows: 29px 29px auto auto; gap: 6px 12px; margin-bottom: 12px; }
  .collection-page .profile-identity .profile-avatar { width: 64px; height: 64px; font-size: 28px; }
  .collection-page .profile-overview .showcase-header-actions { width: 32px; height: 64px; grid-template-rows: 29px 29px; gap: 6px; }
  .collection-page .profile-overview .showcase-icon { width: 32px; height: 29px; }
  .collection-page .showcase-settings .showcase-menu-content { right: -76px; }
  .collection-page .showcase-tabs { height: 44px; flex-wrap: nowrap; overflow-x: auto; }
  .collection-page .showcase-tabs > a { flex-shrink: 0; }
}
