/* v1.3.16 — the badge browser was a huge page on phones. Now it fits the
   screen: the badge strip stays pinned at the top, only the detail scrolls,
   and everything inside is smaller. */
@media (max-width:760px){
  .modal.badge-browser-dialog{
    width:calc(100vw - 20px);
    max-height:min(82dvh,640px);
    overflow:hidden;
    display:flex; flex-direction:column;
  }
  .modal.badge-browser-dialog .badge-showcase-modal{
    margin:-14px; min-height:0; flex:1 1 auto;
    display:flex; flex-direction:column; height:calc(min(82dvh,640px) - 4px);
  }
  .badge-showcase-nav{ padding:14px 14px 10px; flex:0 0 auto; }
  .badge-showcase-nav h2{ font-size:17px; margin:0 0 2px; }
  .badge-showcase-nav p{ display:none; }
  .badge-showcase-grid{
    display:flex; gap:8px; overflow-x:auto; overflow-y:hidden;
    grid-template-columns:none; padding-bottom:2px; scrollbar-width:none;
  }
  .badge-showcase-grid::-webkit-scrollbar{ display:none; }
  .badge-showcase-tile{ flex:0 0 52px; width:52px; height:52px; aspect-ratio:auto; padding:3px; }
  .badge-showcase-tile .family-badge-art{ width:40px !important; height:40px !important; }
  .badge-showcase-detail{
    flex:1 1 auto; min-height:0; max-height:none !important;
    overflow-y:auto; -webkit-overflow-scrolling:touch; padding:14px 14px 18px;
  }
  .badge-detail-hero{ padding:0 0 10px; gap:2px; }
  .badge-detail-hero .family-badge-art{ width:76px !important; height:76px !important; margin-bottom:2px; }
  .badge-detail-hero h2{ font-size:19px; }
  .badge-detail-facts{ gap:7px; margin:0 0 8px; }
  .badge-detail-facts>div{ min-height:54px; border-radius:11px; gap:3px; }
  .badge-progress-card{ padding:12px !important; }
  .badge-all-levels{ grid-template-columns:repeat(5,1fr) !important; gap:8px 4px !important; }
  .badge-all-levels.open{ max-height:none; }
  .badge-level-node .family-badge-art{ width:32px !important; height:32px !important; }
}
