/* Fix-Pin: responsive layout. Load after all other CSS files. */
@media (max-width: 900px) {
  html, body { width: 100%; overflow-x: hidden; }
  .app-container { display: flex; flex-direction: column; width: 100%; max-width: 700px; min-height: 100dvh; margin: 0 auto; padding: 10px; }
  .app-header { order: 1; margin-bottom: 10px; }
  #map { order: 2; width: 100%; height: 43dvh; min-height: 260px; max-height: 440px; margin: 0 0 10px; }
  .actions { order: 3; width: 100%; margin-bottom: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .actions button { min-width: 0; min-height: 44px; height: 44px; padding: 0 5px; }
  #myInput { order: 4; margin-bottom: 10px; }
  #searchInput { order: 5; margin-bottom: 10px; }
  #bulkToolbar { order: 6; width: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
  #bulkToolbar .bulk-all-label { flex: 1 0 100%; min-height: 40px; margin: 0; }
  #bulkToolbar button { flex: 1 1 95px; min-width: 0; min-height: 44px; padding: 7px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  #bulkToolbar #addManualPoint { grid-column: auto; }
  #data-list { order: 7; width: 100%; min-width: 0; max-height: none; overflow: visible; margin-bottom: 10px; }
  #data-list li, #data-list .row { min-width: 0; gap: 5px; }
  #data-list .note { min-width: 0; flex: 1 1 0; }
  #data-list .icon-btn { flex: 0 0 34px; width: 34px; height: 36px; }
  #fileInput { order: 8; }
  .point-editor-dialog { max-width: calc(100vw - 20px); }
  .point-editor-form { padding: 16px; }
  #map.map-expanded { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100dvh !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; border-radius: 0 !important; z-index: 2000 !important; }
}
@media (max-width: 380px) {
  .app-container { padding: 7px; }
  #map:not(.map-expanded) { height: 38dvh; min-height: 230px; }
}
@media (max-width: 900px) and (orientation: landscape) {
  #map:not(.map-expanded) { height: 62dvh; min-height: 220px; max-height: none; }
}
