/* Shared fixes for both preview editions. Keep the original visual language. */
@media (min-width: 1024px) {
  .desk-nav { box-sizing: border-box; padding: 8px 10px 22px; }
  .desk-nav-item--board { width: 100%; margin: 10px 0; transition: background .18s, box-shadow .18s, color .18s; }
  .desk-nav-item--board:hover { transform: none; box-shadow: inset 0 0 0 1px #ac80ff70, inset 0 0 22px #935aff24, 0 3px 9px #935aff20; }
}
@media (max-width: 1023px) {
  .screen-home .home-content { padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); scroll-padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }
  .screen-home .home-content > * { flex-shrink: 0; }
  /* Solid cards avoid the first-frame backdrop-filter flash on mobile GPUs. */
  .home-dashboard .home-card { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface-card, #151220); }
  .home-dashboard.is-loading .home-card { animation: none; }
  body.board-screen-active .dashboard-bottom-nav,
  body.board-screen-active #studentTopbar,
  body.board-screen-active #curatorTopbar,
  body.board-screen-active #appTopbar { display: none !important; }
  body.board-screen-active #screenBoard .screen-header { display: flex !important; flex-shrink: 0; min-height: 52px; padding-top: env(safe-area-inset-top, 0px); }
  body.board-screen-active #screenBoard .board-screen-content { padding-bottom: env(safe-area-inset-bottom, 0px) !important; overflow: hidden; }
  #screenBoard .screen-back { min-width: 44px; min-height: 44px; }
  .board-shell .bd-btn { flex-shrink: 0; }
  #msgrConvos, #msgrLog, #screenChats > .screen-content { overscroll-behavior-y: none; }
  .ux-pulling { will-change: translate; }
  .profile-modal-sheet { max-height: 94dvh; }
  .profile-modal-head::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 4px; margin: -5px auto 16px; background: var(--text-dim); opacity: .45; }
  .profile-modal-head { touch-action: pan-x; }
  .profile-modal-body { overscroll-behavior: contain; }
}
@media (prefers-reduced-motion: reduce) {
  .ux-pulling { transition: none !important; }
}

@container board (max-width:720px) {
  .bd-top { display:grid;grid-template-columns:minmax(0,1fr);gap:6px; }
  .bd-title { max-width:calc(100% - 100px);min-height:44px;box-sizing:border-box;justify-self:start; }
  .bd-actions { width:100%;max-width:100%;margin-left:0;box-sizing:border-box;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none; }
  .bd-actions .bd-btn,.bd-actions .bd-collab-button { flex-shrink:0;min-height:40px; }
  .bd-hist { top:var(--bd-gap); }
  .bd-follow,.bd-search { top:112px; }
}
