/* Small-screen overrides for the restored Silverfire layout. */
@media (max-width: 920px) {
  .bodyContainer { width: calc(100% - 24px); min-height: 100vh; }
  .content_wrapper { width: 100%; }
  #main_content { width: calc(100% - 175px); min-width: 0; margin: 10px 0 0; }
  .file-grid, .file-grid tbody { display: block; width: 100%; }
  .file-grid tbody { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
  .file-grid tr { display: contents; }
  .file-grid td { display: block; min-width: 0; padding: 0; }
  .file-grid td:empty { display: none; }
  .file-grid .tile { box-sizing: border-box; width: 100%; margin: 0; padding: 12px 4px; }
  .file-grid .tile > a { display: block; min-height: 100px; }
  .file-grid .filename { overflow-wrap: anywhere; line-height: 1.5; margin-top: 6px; }
  .breadcrumb { overflow-wrap: anywhere; }
}
@media (max-width: 700px) {
  body { -webkit-text-size-adjust: 100%; }
  .bodyContainer { width: calc(100% - 24px); }
  .banner { height: 76px; background-size: auto 64px; background-position: left center; margin-bottom: 4px; }
  .banner .quote { display: none; }
  .menuBar { height: auto; min-height: 44px; display: flex; align-items: stretch; background-size: auto 100%; margin-bottom: 8px; }
  .menuBar a { float: none; height: auto; box-sizing: border-box; min-height: 44px; display: flex; align-items: center; padding: 0 18px; font-size: 14px; }
  .colorShow { height: 90px; background-size: cover; }
  .breadcrumb { font-size: 12px; padding: 8px 4px; }
  .nav_col { float: none; width: 100%; margin: 8px 0; }
  .nav_module { display: flex; width: 100%; overflow-x: auto; align-items: center; border-bottom: 1px solid #ccc; }
  .nav_module .sub_nav { display: flex; padding-left: 0; flex: 0 0 auto; }
  .nav_module a:link, .nav_module a:visited { flex: 0 0 auto; box-sizing: border-box; min-height: 44px; display: flex; align-items: center; gap: 5px; padding: 8px 12px; border-top: 0; white-space: nowrap; font-size: 13px; }
  #main_content { float: none; width: 100%; margin: 10px 0; }
  .file-grid tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .file-grid .filename { font-size: 13px; }
}

/* Larger previews without changing the two-column phone layout. */
@media (max-width: 700px) {
  .file-grid .tile > a > img { width: 104px; height: auto; max-width: 100%; }
  .file-grid .fake_tile { width: 104px; height: 104px; background-size: 100% 100%; display: flex; align-items: center; justify-content: center; font-size: 22px; }
  .file-grid .fake_tile > br, .file-grid .fake_tile strong > br { display: none; }
  .file-grid .fake_shadow { width: 104px; height: 14px; background-size: 100% 100%; }
}
