/* Mobile + standalone polish for iPhone — v3.
 *
 * 1. html gets the theme background so no white ever peeks out at the bottom
 *    (rubber-band scroll, home-indicator area, dvh rounding).
 * 2. The mobile drawer sidebar is near-opaque — the translucent glass was
 *    unreadable over file lists on iOS.
 * 3. In standalone (home-screen app) the top toolbar glass extends up under
 *    the status bar and the bottom status bar glass extends down behind the
 *    home indicator — native safe-area handling; sides padded for the
 *    rounded corners.
 * 4. File rows suppress the iOS text-selection callout so long-press opens
 *    the app's own context menu. */
html {
  background: #0b0c10;
}
html.light-theme {
  background: #f4f4f7;
}

@media (max-width: 768px) {
  .sidebar {
    background: rgba(14, 15, 20, 0.97);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
  }
  html.light-theme .sidebar {
    background: rgba(244, 244, 247, 0.97);
  }
  .file-row, .file-item, .grid-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

@media all and (display-mode: standalone) {
  .toolbar {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--toolbar-height) + env(safe-area-inset-top));
    min-height: calc(var(--toolbar-height) + env(safe-area-inset-top));
  }
  .status-bar {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--status-height) + env(safe-area-inset-bottom));
    min-height: calc(var(--status-height) + env(safe-area-inset-bottom));
  }
  .app {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
