/* 仅适配窄屏；原有桌面布局与业务样式保持不变。 */
.mobile-menu-button,
.mobile-nav-backdrop {
  display: none;
}

@media (max-width: 720px) {
  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 18px;
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 236px;
    height: 100dvh;
    z-index: 45;
    transform: translateX(-100%);
    transition: transform 160ms ease;
    box-shadow: 8px 0 30px rgba(23, 32, 45, 0.12);
  }

  body.mobile-nav-open #sidebar {
    transform: translateX(0);
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 44;
    background: rgba(23, 32, 45, 0.35);
  }

  #topbar {
    height: auto;
    min-height: 62px;
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  #topbar .mobile-title-wrap {
    flex: 1;
    min-width: 0;
  }

  #topbar .s {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #topbar > .btn-row {
    margin-left: 42px;
  }

  #view {
    padding: 14px 12px;
  }

  .card {
    padding: 13px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .check-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .dist-name {
    width: 78px;
  }

  .dist-cnt {
    width: 110px;
    font-size: 10px;
  }

  .calendar {
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    overflow-x: auto;
  }

  .modal-mask {
    padding: 12px 8px;
  }

  .modal {
    padding: 16px;
  }

  .ppb-field-l {
    width: 100%;
  }

  .ppb-chips {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sidebar {
    transition: none;
  }
}
