:root {
  --bg: #0f1419;
  --surface: #1a222d;
  --surface-2: #243040;
  --border: #2e3d4f;
  --text: #e8eef5;
  --muted: #8b9cb3;
  --primary: #2b7fd4;
  --primary-hover: #3a8fe8;
  --accent: #f5c518;
  --danger: #e85d5d;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* —— 登录门禁 —— */
.auth-gate {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(43, 127, 212, 0.18), transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(245, 197, 24, 0.08), transparent 45%),
    var(--bg);
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-brand {
  text-align: center;
}

.auth-brand .brand-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.auth-brand h1 {
  font-size: 20px;
  font-weight: 600;
}

.auth-brand p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.auth-mode-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.auth-mode-btn.active {
  background: rgba(43, 127, 212, 0.2);
  color: var(--primary);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form .field input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
  outline: none;
}

.auth-form .field input:focus {
  border-color: var(--primary);
}

.auth-msg {
  font-size: 13px;
  min-height: 1.2em;
  color: var(--muted);
}

.auth-msg.error {
  color: var(--danger);
}

.auth-msg.ok {
  color: #5dbe8a;
}

.auth-user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-user-name {
  font-size: 12px;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#appRoot[hidden] {
  display: none !important;
}

.modal-card-admin {
  max-width: 560px;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.admin-section {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.admin-gen-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-gen-row label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-gen-row input[type="number"] {
  width: 64px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 8px;
}

.admin-gen-row input[type="text"] {
  flex: 1;
  min-width: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.admin-row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden; /* 整页不滚动；侧栏内部可滚 */
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
}

/* 主应用锁在视口内，避免画布把页面撑高 */
.app {
  height: 100%;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 28px;
  line-height: 1;
}

.brand h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand p {
  font-size: 12px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 8px;
}

/* Layout */
.layout {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  min-height: 0;
  overflow: hidden;
}

/* Preview */
.preview-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0a0e13;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* 预览区：固定高度槽，画布绝对定位，绝不撑开页面 */
.canvas-wrap {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(45deg, #121820 25%, transparent 25%),
    linear-gradient(-45deg, #121820 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #121820 75%),
    linear-gradient(-45deg, transparent 75%, #121820 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: #0a0e13;
}

#mainCanvas {
  /* 位图 = 原图像素；屏幕显示尺寸由 JS 写入 style */
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow);
  cursor: grab;
  /* 不参与文档流，避免 intrinsic 尺寸撑高父级 */
  margin: 0;
}

#mainCanvas.visible {
  display: block;
}

#mainCanvas.dragging {
  cursor: grabbing;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  pointer-events: none;
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.empty-state p:first-of-type {
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}

/* Controls */
.controls-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tab {
  flex: 1;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  gap: 14px;
  flex-direction: column;
}

.tab-panel.active {
  display: flex;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.field .val {
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  float: right;
}

.field input[type="text"],
.field input[type="number"],
.field select,
.fields-editor input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field input:focus,
.field select:focus,
.fields-editor input:focus {
  border-color: var(--primary);
}

.field input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.field input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  cursor: pointer;
  padding: 2px 4px;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.field-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

.fields-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-row {
  display: grid;
  grid-template-columns: 72px 1fr auto 28px;
  gap: 6px;
  align-items: center;
}

.field-row.single-label {
  grid-template-columns: 1fr 28px;
}

.field-row .btn-pick {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.field-row .btn-pick:hover {
  border-color: var(--primary);
  background: rgba(43, 127, 212, 0.15);
}

.field-row .btn-pick:disabled {
  opacity: 0.45;
  cursor: wait;
}

.field-hint {
  margin-top: -4px;
}

.auto-status {
  min-height: 1.2em;
  font-size: 12px;
}

.auto-status.error {
  color: var(--danger);
}

.auto-status.ok {
  color: #5dbe8a;
}

.field-row input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  min-width: 0;
}

.field-row input:focus {
  border-color: var(--primary);
}

.btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.btn-icon:hover {
  background: rgba(232, 93, 93, 0.15);
  color: var(--danger);
}

.field-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
}

.btn-text:hover {
  text-decoration: underline;
}

.file-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

/* Position grid */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.pos-grid button {
  aspect-ratio: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.pos-grid button:hover {
  border-color: var(--primary);
  color: var(--text);
}

.pos-grid button.active {
  background: rgba(43, 127, 212, 0.2);
  border-color: var(--primary);
  color: var(--primary);
}

/* Types list */
.types-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.type-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.type-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.type-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.type-card-name {
  font-weight: 600;
  font-size: 14px;
}

.type-card-meta {
  font-size: 11px;
  color: var(--muted);
}

.type-card-actions {
  display: flex;
  gap: 4px;
}

.type-card-actions button {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.type-card-actions button:hover {
  color: var(--text);
  border-color: var(--muted);
}

.type-card-actions button.danger:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  font-size: 18px;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.modal-card-sm {
  max-width: 400px;
}

.modal-card-time {
  max-width: 460px;
  width: min(460px, 100%);
}

.time-pick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.time-pick-grid input[type="date"],
.time-pick-grid input[type="time"],
.modal-card-time input[type="date"],
.modal-card-time input[type="time"] {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  width: 100%;
  color-scheme: dark;
  min-height: 44px;
}

.time-pick-grid input:focus {
  border-color: var(--primary);
}

.time-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.time-preview {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--primary);
}

/* 地图选点：大窗口；高度优先 --vvh（visualViewport），避开手机浏览器底栏 */
:root {
  --vvh: 100dvh;
}

body.loc-modal-open {
  overflow: hidden;
  /* 防止 iOS 背后页面跟着滚 */
  position: fixed;
  inset: 0;
  width: 100%;
}

.modal-map-root {
  padding: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  align-items: stretch;
  height: var(--vvh, 100dvh);
  max-height: var(--vvh, 100dvh);
  box-sizing: border-box;
}

.modal-card-map {
  max-width: min(1100px, 100%);
  width: 100%;
  max-height: calc(var(--vvh, 100dvh) - 24px);
  height: calc(var(--vvh, 100dvh) - 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  padding-bottom: 0;
  overflow: hidden;
}

.map-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.map-modal-head h2 {
  margin-bottom: 4px;
}

.modal-card-map .loc-search-row,
.modal-card-map .loc-results,
.modal-card-map .loc-preview,
.modal-card-map .hint {
  flex-shrink: 0;
}

.modal-card-map .map-view {
  flex: 1 1 auto;
  min-height: 0; /* 允许地图被压缩，把空间留给底部按钮 */
  height: auto;
}

/* 底部操作条固定在弹窗内底部，始终可见 */
.modal-card-map .modal-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 6;
  margin: 0 -18px 0;
  padding: 12px 18px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 8px);
  background: linear-gradient(
    to top,
    var(--surface) 70%,
    rgba(26, 34, 45, 0.92) 100%
  );
  border-top: 1px solid var(--border);
  gap: 10px;
}

.modal-card-map .modal-actions .btn {
  min-height: 44px;
  flex: 1;
  justify-content: center;
}

.modal-card-map .modal-actions .btn-primary {
  flex: 1.4;
}

.loc-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.basemap-switch {
  display: inline-flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-left: auto;
}

.basemap-switch .btn {
  border: none;
  border-radius: 0;
  margin: 0;
  background: var(--surface-2);
  color: var(--muted);
}

.basemap-switch .btn + .btn {
  border-left: 1px solid var(--border);
}

.basemap-switch .btn.active {
  background: rgba(43, 127, 212, 0.25);
  color: var(--primary);
  font-weight: 600;
}

.basemap-switch .btn:hover {
  color: var(--text);
}

.loc-search-row input {
  flex: 1;
  min-width: 140px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}

.loc-search-row input:focus {
  border-color: var(--primary);
}

.loc-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.loc-results button {
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.4;
}

.loc-results button:last-child {
  border-bottom: none;
}

.loc-results button:hover {
  background: rgba(43, 127, 212, 0.12);
}

.map-view {
  height: 100%;
  min-height: 360px;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #0b1a12;
  z-index: 1;
  /* 避免触控板手势被浏览器当成页面缩放/回退 */
  touch-action: none;
  overscroll-behavior: contain;
}

.map-view .leaflet-container {
  width: 100%;
  height: 100%;
  /* 捏合时禁止浏览器页面级缩放抢手势 */
  touch-action: none;
}

/* 瓦片更锐利（避免部分浏览器缩放发糊） */
.map-view .leaflet-tile {
  image-rendering: -webkit-optimize-contrast;
}

.loc-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 13px;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

.loc-preview .loc-addr {
  grid-column: 1 / -1;
  word-break: break-all;
}

.loc-preview .muted {
  margin-right: 6px;
}

/* Leaflet dark-ish popup tweak */
.leaflet-container {
  font-family: var(--font);
  background: #1a222d;
}

/* Responsive：上下分栏仍锁在视口内，预览区不撑出滚动条 */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(180px, 42%);
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .controls-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }

  .preview-panel {
    min-height: 0;
    overflow: hidden;
  }

  .canvas-wrap {
    min-height: 0;
  }

  .topbar {
    padding: 10px 14px;
  }

  .brand p {
    display: none;
  }
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 64px 1fr auto 28px;
  }

  .color-row {
    grid-template-columns: 1fr 1fr;
  }

  .time-pick-grid {
    grid-template-columns: 1fr;
  }

  .modal-map-root {
    padding: 0;
    padding-bottom: 0;
    max-height: var(--vvh, 100dvh);
    height: var(--vvh, 100dvh);
  }

  .modal-card-map {
    max-height: var(--vvh, 100dvh);
    height: var(--vvh, 100dvh);
    border-radius: 0;
    padding: 10px 12px 0;
    gap: 8px;
  }

  .modal-card-map .map-modal-head .hint {
    display: none; /* 省高度给地图和按钮 */
  }

  .modal-card-map .map-view {
    min-height: 0;
    flex: 1 1 40%;
  }

  .modal-card-map .loc-preview {
    font-size: 12px;
    padding: 8px 10px;
  }

  .modal-card-map .modal-actions {
    margin: 0 -12px 0;
    padding: 10px 12px;
    /* 额外抬高，躲开 Safari/Chrome 底部工具栏 */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px) + 20px);
  }

  .modal-card-map .basemap-switch {
    margin-left: 0;
    width: 100%;
  }

  .modal-card-map .loc-search-row {
    gap: 6px;
  }
}
