/* v1.65 mobile create flow and compact list overrides */
@media (max-width: 760px) {
  /* Drawers/modals should own the screen: hide mobile chrome above them. */
  body:has(.drawer-backdrop) .mobile-floating-create,
  body:has(.modal-backdrop) .mobile-floating-create,
  body:has(.file-viewer-backdrop) .mobile-floating-create,
  body:has(.drawer-backdrop) .mobile-bottom-nav,
  body:has(.modal-backdrop) .mobile-bottom-nav,
  body:has(.file-viewer-backdrop) .mobile-bottom-nav {
    display: none !important;
  }

  /* Keep the Create Punch submit/cancel actions visible and thumb friendly. */
  .create-drawer .drawer-body {
    padding-bottom: 14px;
  }

  .create-drawer .drawer-footer {
    position: sticky;
    bottom: 0;
    z-index: 8;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 28px rgba(16, 42, 82, .08);
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 10px;
  }

  .create-drawer .drawer-footer .ghost,
  .create-drawer .drawer-footer .primary {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  /* Give more vertical space to the punch list. */
  .content {
    padding: 10px 10px 76px;
  }

  .mobile-focus-strip {
    margin-bottom: 6px !important;
    padding: 8px 10px !important;
  }

  .mobile-chip-rail {
    margin-bottom: 6px !important;
    gap: 6px !important;
  }

  .mobile-chip-rail button {
    padding: 7px 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  .mobile-actions {
    margin-bottom: 8px;
    gap: 7px;
  }

  .mobile-actions .ghost,
  .mobile-actions .bulk-mobile {
    padding: 9px 10px;
    min-height: 38px;
    font-size: 12px;
  }

  /* Compact summary cards: keep information, reduce height. */
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 8px;
  }

  .summary {
    min-height: 54px;
    padding: 7px 5px;
    border-radius: 12px;
    justify-content: center;
    text-align: center;
  }

  .summary-label {
    font-size: 10.5px;
    line-height: 1.1;
  }

  .summary-value {
    font-size: 19px;
    line-height: 1;
  }

  .mobile-filter-toggle {
    margin-bottom: 8px;
  }

  .mobile-filter-toggle .ghost {
    min-height: 38px;
    padding: 9px 10px;
  }

  .list-region {
    padding-bottom: 86px;
  }

  /* More compact punch cards without losing key info. */
  .mobile-card-list {
    gap: 8px;
  }

  .punch-card {
    border-radius: 14px;
    padding: 10px 11px;
  }

  .punch-card-top,
  .punch-card-bottom {
    gap: 7px;
  }

  .punch-card-top b {
    font-size: 14px;
  }

  .punch-card p {
    margin: 7px 0;
    font-size: 13px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .punch-card-meta {
    gap: 5px;
    margin-bottom: 7px;
  }

  .punch-card-meta span {
    padding: 3px 7px;
    font-size: 11px;
    line-height: 1.15;
  }

  .punch-card-bottom {
    font-size: 11.5px;
    flex-wrap: wrap;
  }

  .badge,
  .category {
    padding: 4px 7px;
    font-size: 11.5px;
    min-height: 24px;
  }

  .category {
    min-width: 24px;
    height: 24px;
  }

  .scan-pdf,
  .scan-no,
  .status-open,
  .status-closed,
  .status-cancelled {
    padding: 4px 7px;
    font-size: 11.5px;
  }
}
