/* v31 final density overrides: loaded after apple-glass-final.css */

/* 1) Reduce gap between "Новое" and "Папки" */
html body.open-collection-ui.is-main-route .latest-section {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

html body.open-collection-ui.is-main-route .latest-section .mini-route-head {
  margin-bottom: 0 !important;
  padding-bottom: 6px !important;
}

html body.open-collection-ui.is-main-route .latest-section .feed-grid.latest-feed,
html body.open-collection-ui.is-main-route .latest-section .latest-feed.feed-grid,
html body.open-collection-ui.is-main-route .latest-section .latest-feed.uniform-cards-grid {
  margin-bottom: 0 !important;
  padding-bottom: 4px !important;
}

html body.open-collection-ui.is-main-route .latest-section + .mini-route-head,
html body.open-collection-ui.is-main-route .miniapp-view > .mini-route-head {
  margin-top: 0 !important;
  padding-top: 8px !important;
}

html body.open-collection-ui.is-main-route .latest-section + .mini-route-head + .feed-grid.folder-feed-grid {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 2) "Новое" cards width: at least 172px */
html body.open-collection-ui .miniapp-shell .latest-feed .feed-card.post-card,
html body.open-collection-ui .miniapp-shell .latest-feed .feed-card,
html body.open-collection-ui .miniapp-shell .latest-feed-grid .feed-card.post-card,
html body.open-collection-ui .miniapp-shell .latest-feed-grid .feed-card {
  flex: 0 0 172px !important;
  width: 172px !important;
  min-width: 172px !important;
  max-width: 200px !important;
}

/* 3) Folder icon size: 32x32 */
html body.open-collection-ui .miniapp-shell .folder-feed-grid article .folder-card-icon,
html body.open-collection-ui .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  font-size: 16px !important;
  line-height: 32px !important;
}

html body.open-collection-ui .miniapp-shell .folder-feed-grid article .folder-card-icon svg,
html body.open-collection-ui .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon svg {
  width: 16px !important;
  height: 16px !important;
}

/* v31b specificity hardening for theme-* rules */
html body.open-collection-ui .miniapp-shell .latest-feed .feed-card.post-card,
html body.open-collection-ui .miniapp-shell .latest-feed .feed-card,
html body.open-collection-ui .miniapp-shell .latest-feed-grid .feed-card.post-card,
html body.open-collection-ui .miniapp-shell .latest-feed-grid .feed-card,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .latest-feed .feed-card.post-card,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .latest-feed .feed-card,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .latest-feed-grid .feed-card.post-card,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .latest-feed-grid .feed-card,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .latest-feed .feed-card.post-card,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .latest-feed .feed-card,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .latest-feed-grid .feed-card.post-card,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .latest-feed-grid .feed-card,
body.open-collection-ui.theme-dark .miniapp-shell .latest-feed .feed-card.post-card,
body.open-collection-ui.theme-dark .miniapp-shell .latest-feed .feed-card,
body.open-collection-ui.theme-dark .miniapp-shell .latest-feed-grid .feed-card.post-card,
body.open-collection-ui.theme-dark .miniapp-shell .latest-feed-grid .feed-card,
body.open-collection-ui.theme-light .miniapp-shell .latest-feed .feed-card.post-card,
body.open-collection-ui.theme-light .miniapp-shell .latest-feed .feed-card,
body.open-collection-ui.theme-light .miniapp-shell .latest-feed-grid .feed-card.post-card,
body.open-collection-ui.theme-light .miniapp-shell .latest-feed-grid .feed-card {
  flex: 0 0 172px !important;
  width: 172px !important;
  min-width: 172px !important;
  max-width: 200px !important;
}

html body.open-collection-ui .miniapp-shell .folder-feed-grid article .folder-card-icon,
html body.open-collection-ui .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon,
html body.open-collection-ui .miniapp-shell .folder-card .folder-card-icon,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .folder-feed-grid article .folder-card-icon,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon,
html[data-theme="dark"] body.open-collection-ui.theme-dark .miniapp-shell .folder-card .folder-card-icon,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .folder-feed-grid article .folder-card-icon,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon,
html[data-theme="light"] body.open-collection-ui.theme-light .miniapp-shell .folder-card .folder-card-icon,
body.open-collection-ui.theme-dark .miniapp-shell .folder-feed-grid article .folder-card-icon,
body.open-collection-ui.theme-dark .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon,
body.open-collection-ui.theme-dark .miniapp-shell .folder-card .folder-card-icon,
body.open-collection-ui.theme-light .miniapp-shell .folder-feed-grid article .folder-card-icon,
body.open-collection-ui.theme-light .miniapp-shell .folder-feed-grid .folder-card .folder-card-icon,
body.open-collection-ui.theme-light .miniapp-shell .folder-card .folder-card-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  font-size: 16px !important;
  line-height: 32px !important;
}
