body{scroll-behavior:smooth}.card{border-radius:1rem}.btn{border-radius:.8rem}img.rounded{border-radius:.8rem!important}
.preview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:.5rem;margin-top:.5rem}
.preview-grid img{width:120px;height:120px;object-fit:cover;border-radius:.8rem;border:1px solid #eee}
/* Sidebar sticky + scrolling robusto su iOS Safari */
/* Sidebar sticky + scorrimento */
.sidebar-sticky {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
}

.sidebar-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* iOS */
  /* Fallback: JS calcolerà l'altezza precisa */
  max-height: 60vh;
}
@supports (height: 100vh) {
  .sidebar-scroll { max-height: calc(100dvh - 12rem); }
}
/* fallback per browser senza 100dvh */
@supports not (height: 100dvh) {
  .sidebar-scroll { max-height: calc(100vh - 12rem); }
}

/* evita “rimbalzi” su iOS */
.sidebar-scroll { -webkit-overflow-scrolling: touch; }