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

#map-container,
#map-25d-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

#map-25d-container {
  display: none;
  background: #0f172a;
}

:fullscreen,
:-webkit-full-screen {
  background: #0f172a;
}

:fullscreen #map-container,
:fullscreen #map-25d-container,
:-webkit-full-screen #map-container,
:-webkit-full-screen #map-25d-container {
  width: 100vw;
  height: 100vh;
}

body.map-25d-active #map-container {
  background: transparent;
  pointer-events: none;
  z-index: 1002;
}

body.map-25d-active #map-25d-container {
  display: block;
}

body.map-25d-active #map-container .leaflet-pane,
body.map-25d-active #map-container .leaflet-control-container,
body.map-25d-active #map-container .zoom-level-display {
  visibility: hidden;
}

body.map-25d-active #map-container .map-controls {
  pointer-events: auto;
  visibility: visible;
}

.map-25d-badge {
  position: absolute;
  left: 12px;
  bottom: 128px;
  z-index: 1002;
  display: none;
  max-width: min(360px, calc(100vw - 24px));
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(12px);
}

body.map-25d-active .map-25d-badge {
  display: block;
}

.map-25d-angle-controls {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2200;
  display: none;
  grid-template-columns: 26px 26px 26px;
  grid-template-rows: 26px 26px 26px;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

body.map-25d-active .map-25d-angle-controls {
  display: grid;
}

.map-25d-angle-controls button {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.36);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
  pointer-events: auto;
}

.map-25d-angle-controls button:hover {
  background: rgba(15, 23, 42, 0.55);
  transform: translateY(-1px);
}

.map-25d-angle-controls button[data-25d-action="pitch-up"] {
  grid-column: 2;
  grid-row: 1;
}

.map-25d-angle-controls button[data-25d-action="bearing-left"] {
  grid-column: 1;
  grid-row: 2;
}

.map-25d-angle-controls button[data-25d-action="reset"] {
  grid-column: 2;
  grid-row: 2;
  font-size: 10px;
  opacity: 0.72;
}

.map-25d-angle-controls button[data-25d-action="bearing-right"] {
  grid-column: 3;
  grid-row: 2;
}

.map-25d-angle-controls button[data-25d-action="pitch-down"] {
  grid-column: 2;
  grid-row: 3;
}

.map-topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1003;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 96px);
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.map-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.map-topbar-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.map-topbar-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-topbar-logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.map-topbar-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.map-topbar-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.map-topbar-subtitle {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.map-topbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.map-topbar-link:hover {
  color: #0f172a;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.map-topbar-link-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: none;
}

.map-topbar-link-primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: none;
}

.map-search-box {
  position: absolute;
  top: 68px;
  left: 12px;
  z-index: 1003;
  display: flex;
  align-items: center;
}

.map-search-form {
  display: none;
  align-items: center;
  gap: 6px;
  width: min(var(--map-topbar-width, 356px), calc(100vw - 96px));
  min-height: 42px;
  padding: 5px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.map-search-box.is-open .map-search-form {
  display: flex;
}

.map-search-box.is-open .map-search-toggle {
  display: none;
}

.map-search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  font-size: 16px;
  backdrop-filter: blur(12px);
}

.map-search-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: #64748b;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.map-search-collapse:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

.map-search-input {
  min-width: 0;
  flex: 1;
  height: 32px;
  border: none;
  outline: none;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
}

.map-search-input::placeholder {
  color: #94a3b8;
}

.map-search-clear,
.map-search-submit {
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.map-search-clear {
  display: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
}

.map-search-clear.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.map-search-submit {
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.map-search-submit:hover {
  background: #1d4ed8;
}

.map-search-submit:disabled {
  cursor: wait;
  background: #94a3b8;
}

.map-search-marker {
  background: transparent;
  border: none;
}

.map-search-marker-pin {
  position: relative;
  width: 28px;
  height: 28px;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: #ef4444;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
  transform: rotate(-45deg);
}

.map-search-marker-pin::after {
  content: '';
  position: absolute;
  top: 7px;
  left: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.map-25d-float-btn {
  position: absolute;
  top: 152px;
  left: 12px;
  z-index: 1002;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.map-25d-float-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.map-25d-float-btn.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24);
}

.map-25d-float-btn.is-loading {
  cursor: wait;
  color: #475569;
  background: rgba(226, 232, 240, 0.94);
  transform: none;
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-control-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  transition: all 0.2s;
}

.map-notice-btn {
  position: relative;
  overflow: visible;
}

.map-control-btn .locate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.map-control-btn .heading-view-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.map-heading-btn.is-active {
  color: #2563eb;
  background: #eef6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14), 0 2px 6px rgba(0,0,0,0.24);
}

.map-control-btn .heading-calibration-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
}

.map-heading-calibration-btn.is-active {
  color: #b45309;
  background: #fff7e6;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.16), 0 2px 6px rgba(0,0,0,0.24);
}

.heading-calibration-panel {
  position: fixed;
  top: 112px;
  right: 62px;
  z-index: 2000;
  width: 230px;
  display: none;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  color: #1f2937;
}

.heading-calibration-panel.is-visible {
  display: block;
}

.heading-calibration-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

.heading-calibration-value {
  margin-bottom: 10px;
  color: #b45309;
  font-size: 13px;
  font-weight: 700;
}

.heading-calibration-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.heading-calibration-actions button {
  min-height: 34px;
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.heading-calibration-actions button:hover {
  background: #eef6ff;
  color: #2563eb;
}

.heading-calibration-actions button:last-child {
  grid-column: 1 / -1;
}

.heading-calibration-hint {
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.map-control-btn.locate-is-locating {
  background: #eef6ff;
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.map-control-btn.locate-is-fixed {
  background: #e8f5e9;
  color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.12);
}

.map-control-btn.locate-is-low-accuracy {
  background: #fff7e6;
  color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.12);
}

.map-control-btn:hover {
  background: #f5f5f5;
}

.map-control-btn.active {
  background: #4CAF50;
  color: #fff;
}

.map-zoom-level-btn {
  width: 44px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.24);
  font-size: 11px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  pointer-events: none;
}

.map-lock-btn.map-locked {
  background: #ff9800;
  color: #fff;
}

.layer-switcher {
  position: fixed;
  top: 10px;
  right: 62px;
  z-index: 2000;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  padding: 8px;
  display: none;
  min-width: 260px;
  max-width: min(380px, calc(100vw - 74px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
}

.layer-switcher.show {
  display: block;
}

.layer-option {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 14px;
}

.layer-item + .layer-item {
  margin-top: 6px;
}

.layer-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.layer-item .layer-option {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-section-title {
  padding: 10px 6px 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.layer-section-title-spaced {
  margin-top: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}

.layer-custom-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.layer-delete-btn {
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
}

.layer-edit-btn {
  flex: 0 0 auto;
  min-width: 44px;
}

.layer-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 18px;
  line-height: 1;
}

.custom-source-empty {
  padding: 8px 6px;
  color: #94a3b8;
  font-size: 12px;
}

.custom-source-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.custom-source-actions-top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0;
  margin-bottom: 8px;
  padding-top: 0;
  padding-bottom: 8px;
}

.system-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px;
  border-radius: 8px;
}

.system-map-row + .system-map-row {
  margin-top: 4px;
}

.system-map-row:hover {
  background: #f8fafc;
}

.system-map-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-map-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.system-map-type-btn {
  min-width: 48px;
  min-height: 28px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.system-map-type-btn:hover {
  background: #eef6ff;
  color: #2563eb;
}

.system-map-type-btn.active {
  border-color: #4CAF50;
  background: #4CAF50;
  color: #ffffff;
}

.system-map-type-btn.disabled,
.system-map-type-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  background: #f1f5f9;
  color: #94a3b8;
}

.map-25d-layer-hint {
  margin: 0 6px 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.map-25d-layer-grid,
.map-25d-overlay-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 6px;
}

.map-25d-overlay-row {
  margin-top: 8px;
}

.custom-source-action-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.custom-source-action-btn:hover {
  background: #eef6ff;
  color: #2563eb;
}

.custom-source-file-input {
  display: none;
}

.custom-tile-source-dialog,
.custom-source-scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.48);
}

.custom-source-card,
.custom-source-scan-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
}

.custom-source-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.custom-source-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
}

.custom-source-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
}

.custom-source-field {
  display: block;
  padding: 12px 16px 0;
}

.custom-source-field span {
  display: block;
  margin-bottom: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.custom-source-field input,
.custom-source-field select,
.custom-source-field textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 9px 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  outline: none;
}

.custom-source-field textarea {
  resize: vertical;
}

.custom-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}

.custom-source-hint {
  padding: 12px 16px 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.custom-source-share-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.custom-source-qr-save-hint {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.custom-source-share-qr img,
.custom-source-share-qr canvas {
  width: 220px;
  height: auto;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
}

.custom-source-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px 16px;
}

.custom-source-cancel,
.custom-source-save {
  min-height: 36px;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.custom-source-cancel {
  background: #f1f5f9;
  color: #475569;
}

.custom-source-save {
  background: #2563eb;
  color: #ffffff;
}

#custom-source-scan-video {
  width: calc(100% - 32px);
  max-height: 60vh;
  display: block;
  margin: 16px;
  border-radius: 12px;
  background: #0f172a;
  object-fit: cover;
}

.layer-option:hover {
  background: #f0f0f0;
}

.layer-option.active,
.layer-item.active .layer-option {
  background: #4CAF50;
  color: #fff;
}

.layer-overlay-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 0;
  font-size: 12px;
  color: #666;
}

.layer-overlay-checkbox {
  margin: 0;
}

/* 巡航控制按钮 */
.cruise-controls {
  position: fixed;
  top: 108px;
  left: 50%;
  right: auto;
  width: auto;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.cruise-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.2s;
}
.cruise-btn-start {
  background: #4CAF50;
  color: #fff;
}
.cruise-btn-start:hover {
  background: #45a049;
}
.cruise-btn-end {
  background: #f44336;
  color: #fff;
}

.is-hidden {
  display: none;
}
.cruise-btn-end:hover {
  background: #d32f2f;
}
.cruise-btn i {
  font-size: 12px;
}

/* 底部菜单切换按钮 */
.toolbar-toggle-btn {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: 48px;
  height: 32px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .map-topbar {
    top: 8px;
    left: 8px;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 16px);
    padding: 7px 10px;
    border-radius: 12px;
  }

  .map-topbar-brand {
    gap: 8px;
    min-width: 0;
  }

  .map-topbar-home {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .map-topbar-title {
    font-size: 13px;
  }

  .map-topbar-subtitle {
    font-size: 10px;
    max-width: 110px;
  }

  .map-topbar-actions {
    gap: 8px;
  }

  .map-topbar-link {
    font-size: 11px;
  }

  .map-search-box {
    top: 56px;
    left: 8px;
  }

  .map-search-toggle,
  .map-search-form {
    min-height: 40px;
  }

  .map-search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: 0 0 40px;
  }

  .map-25d-float-btn {
    top: 128px;
    left: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 10px;
    letter-spacing: -0.04em;
  }

  .map-search-form {
    width: min(var(--map-topbar-width, 320px), calc(100vw - 16px));
    padding: 4px 6px;
    border-radius: 12px;
    gap: 6px;
  }

  .map-search-collapse {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .map-search-input {
    font-size: 12px;
  }

  .map-search-submit {
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .cruise-controls {
    top: 108px;
    left: 50%;
    right: auto;
    width: auto;
    max-width: calc(100vw - 16px);
    transform: translateX(-50%);
    justify-content: center;
  }

  .map-controls {
    top: 8px;
    right: 8px;
  }

  .map-25d-angle-controls {
    grid-template-columns: 24px 24px 24px;
    grid-template-rows: 24px 24px 24px;
    gap: 3px;
  }

  .map-25d-angle-controls button {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .layer-switcher {
    top: 8px;
    right: 60px;
    min-width: min(280px, calc(100vw - 76px));
    max-width: calc(100vw - 76px);
  }

  .recording-indicator {
    top: 76px;
    left: 50%;
    right: auto;
    width: auto;
    transform: translateX(-50%);
    max-width: calc(100vw - 96px);
    padding: 8px 12px;
    font-size: 13px;
  }
}
.toolbar-toggle-btn i {
  font-size: 14px;
  color: #666;
  transition: transform 0.3s;
}
.toolbar-toggle-btn.collapsed i {
  transform: rotate(180deg);
}

.bottom-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  pointer-events: none;
}
.bottom-toolbar > * {
  pointer-events: auto;
}
.bottom-toolbar.hidden {
  transform: translateY(100%);
}

.toolbar-buttons {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  gap: 2px;
}

.toolbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  min-width: 0;
  flex: 1;
  color: #666;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  color: #4CAF50;
}

.toolbar-btn.active {
  color: #4CAF50;
}

.toolbar-btn i {
  font-size: 22px;
  margin-bottom: 4px;
}

.toolbar-btn span {
  font-size: 12px;
}

.status-bar {
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  background: #f8f9fa;
  font-size: 12px;
  color: #666;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-item i {
  color: #4CAF50;
}

.status-item.offline i {
  color: #f44336;
}

.panel-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 70vh;
  overflow-y: auto;
}

.panel-drawer.open {
  transform: translateY(0);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.panel-header h3 {
  font-size: 18px;
  color: #333;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #e0e0e0;
}

.panel-content {
  padding: 16px;
}

.import-section {
  margin-bottom: 20px;
}

.import-section h4 {
  font-size: 16px;
  color: #333;
  margin-bottom: 12px;
}

.import-coord-group {
  margin: 8px 0;
}

.import-coord-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #666;
}

.import-coord-select,
.panel-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.file-upload-icon,
.panel-empty-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 32px;
}

.file-upload-icon {
  color: #4CAF50;
}

.import-section input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
}

.import-section button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.import-section button:hover {
  background: #45a049;
}

.file-upload-area {
  position: relative;
  display: block;
  width: 100%;
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
}

.file-upload-area:hover {
  border-color: #4CAF50;
  background: #f8fff8;
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-area p {
  color: #666;
  margin-bottom: 8px;
}

.file-upload-area .hint {
  font-size: 12px;
  color: #999;
}

.route-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
}

.route-item {
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.route-item:hover {
  background: #f8f9fa;
  border-color: #4CAF50;
}

.route-item h5 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.route-item p {
  font-size: 12px;
  color: #666;
}

.route-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.route-action-btn {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  background: #4CAF50;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.route-action-btn.secondary {
  background: #2196F3;
}

.track-list {
  max-height: 300px;
  overflow-y: auto;
}

.track-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
}

.track-item-info h5 {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.track-item-info p {
  font-size: 12px;
  color: #666;
}

.track-item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.publish-batch-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.publish-batch-summary {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef6ff;
  color: #2c5282;
  font-size: 13px;
}

.publish-batch-preview {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.publish-batch-preview strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #334155;
}

.publish-batch-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publish-batch-preview-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-size: 12px;
}

.publish-batch-preview-suggestion {
  margin-top: 10px;
  font-size: 12px;
  color: #475569;
}

.track-publish-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
}

.track-publish-check input {
  margin: 0;
}

.edit-track-actions {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.edit-track-actions.is-hidden {
  display: none !important;
}

.map-action-btn,
.measure-action-btn,
.panel-submit-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}

.map-action-btn {
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
}

.panel-submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.panel-submit-btn-spaced {
  margin-top: 16px;
}

.panel-submit-btn-tight {
  margin-top: 8px;
}

.map-action-btn-success,
.measure-action-btn-success,
.panel-submit-btn {
  background: #4CAF50;
}

.panel-submit-btn-danger {
  background: #f44336;
}

.map-action-btn-primary {
  background: #2196F3;
}

.map-action-btn-muted,
.measure-action-btn-muted {
  background: #9e9e9e;
}

.map-action-btn-warning {
  background: #ff9800;
}

.map-action-btn-danger {
  background: #f44336;
}

.track-list-container {
  margin-top: 16px;
}

.panel-helper-text {
  color: #666;
  font-size: 14px;
  margin-bottom: 12px;
}

.panel-select-tight {
  margin-bottom: 8px;
}

.panel-select-spaced {
  margin-bottom: 12px;
}

.panel-empty-state {
  padding: 40px 20px;
  color: #999;
  text-align: center;
}

.panel-empty-state-compact {
  padding: 20px;
}

.sync-empty-icon {
  display: block;
  margin-bottom: 12px;
  font-size: 32px;
  color: #ddd;
}

.sync-route-info-spaced {
  padding-right: 12px;
}

.panel-empty-copy {
  color: #999;
  text-align: center;
}

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

.measure-action-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
}

.cache-status-card {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  background: #f8fbff;
}

.cache-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #d9e2ec;
  font-size: 14px;
  color: #333;
}

.cache-status-row:last-child {
  border-bottom: none;
}

.cache-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cache-zoom-card {
  margin-top: 12px;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.cache-zoom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: #333;
  font-size: 14px;
}

.cache-zoom-sliders {
  display: grid;
  gap: 8px;
}

.cache-zoom-sliders label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #4b5563;
  font-size: 12px;
}

.cache-zoom-sliders input[type="range"] {
  width: 100%;
}

.cache-actions button {
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.btn-cache-refresh {
  background: #2196F3;
}

.btn-cache-download {
  background: #4CAF50;
}

.btn-cache-clear {
  background: #f44336;
}

.cache-tip {
  margin-top: 10px;
  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

.cache-tip-tight {
  margin-top: 8px;
}

.cache-package-list-wrap {
  margin-top: 14px;
}

.cache-package-list-wrap h4 {
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
}

.cache-package-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cache-package-item {
  border: 1px solid #e5eaf0;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cache-package-info h5 {
  font-size: 13px;
  color: #2f3f52;
  margin-bottom: 4px;
}

.cache-package-info p {
  font-size: 12px;
  color: #6a7c90;
}

.cache-package-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.cache-package-badge-ok {
  background: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
}

.cache-package-badge-warn {
  background: rgba(255, 152, 0, 0.14);
  color: #b26a00;
}

.cache-package-badge-danger {
  background: rgba(244, 67, 54, 0.12);
  color: #c62828;
}

.cache-package-badge-muted {
  background: rgba(158, 158, 158, 0.14);
  color: #666;
}

.cache-package-item .btn-delete {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  background: #f44336;
  color: #fff;
}

.cache-package-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.cache-package-actions .btn-view {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  background: #2196F3;
  color: #fff;
}

.cache-package-btn-disabled,
.cache-package-actions button[disabled] {
  background: #c7ced6;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

.cache-progress {
  margin-top: 10px;
  height: 8px;
  background: #e6eef7;
  border-radius: 999px;
  overflow: hidden;
}

.cache-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #2196F3);
  transition: width 0.2s ease;
}

.cache-progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #2f4f6f;
}

.track-item-actions button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-view {
  background: #2196F3;
  color: #fff;
}

.btn-edit {
  background: #FF9800;
  color: #fff;
}

.btn-delete {
  background: #f44336;
  color: #fff;
}

.btn-toggle {
  padding: 6px 10px !important;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.btn-show {
  background: #4CAF50;
  color: #fff;
}

.btn-hide {
  background: #9e9e9e;
  color: #fff;
}

.btn-sync {
  background: #4CAF50;
  color: #fff;
}

.edit-tools {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.edit-tool-btn {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.edit-tool-btn:hover {
  border-color: #4CAF50;
  background: #f8fff8;
}

.edit-tool-btn i {
  font-size: 24px;
  color: #4CAF50;
  display: block;
  margin-bottom: 4px;
}

.edit-tool-btn span {
  font-size: 12px;
  color: #666;
}

.panel-drawer.edit-panel-compact {
  width: min(520px, calc(100vw - 24px));
}

.panel-drawer.edit-panel-compact .panel-content {
  padding-top: 12px;
}

.panel-drawer.edit-panel-compact .edit-tools {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.panel-drawer.edit-panel-compact .edit-tool-btn {
  min-height: 74px;
  padding: 8px 6px;
  border-radius: 6px;
}

.panel-drawer.edit-panel-compact .edit-tool-btn i {
  font-size: 18px;
  margin-bottom: 3px;
}

.panel-drawer.edit-panel-compact .edit-tool-btn span {
  font-size: 11px;
  line-height: 1.25;
}

.marker-popup-content {
  padding: 8px;
  min-width: 200px;
}

.marker-popup-content h4 {
  font-size: 16px;
  color: #333;
  margin-bottom: 8px;
}

.marker-popup-content p {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
}

.marker-popup-content button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 6px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 13px;
}

.marker-popup-content .btn-add {
  background: #4CAF50;
  color: #fff;
}

.marker-popup-content .btn-start {
  background: #2196F3;
  color: #fff;
}

.marker-popup-content .btn-nav {
  background: #FF9800;
  color: #fff;
}

.marker-popup-content .btn-delete {
  background: #f44336;
  color: #fff;
}

/* 轨迹信息 popup */
.track-info-popup {
  padding: 8px;
  font-size: 13px;
}
.track-info-popup strong {
  font-size: 14px;
  color: #333;
  display: block;
  margin-bottom: 6px;
}
.track-info-popup span {
  color: #666;
  display: block;
  margin: 2px 0;
}

.user-direction-svg,
.user-location-svg {
  transition: transform 0.3s ease;
}

.user-location-svg {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.55)) drop-shadow(0 0 9px rgba(37,99,235,0.55));
}

.user-location-svg.is-low-confidence {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.55)) drop-shadow(0 0 8px rgba(37,99,235,0.35));
}

.waypoint-marker-dot {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.waypoint-label-chip {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.95);
  color: #333;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-shadow: 1px 1px 0 #fff;
}

.track-marker-dot {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  display: block;
}

.track-endpoint-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.track-endpoint-dot-start {
  background: #4CAF50;
}

.track-endpoint-dot-end {
  background: #f44336;
}

.nav-line {
  stroke-dasharray: 10, 10;
  animation: dash 1s linear infinite;
}

/* 更多工具面板 */
.more-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 0;
}
.more-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f5f7fa;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.more-tool-btn:hover {
  background: #e8f0fe;
}
.more-tool-btn i {
  font-size: 20px;
  color: #4CAF50;
  margin-bottom: 8px;
}
.more-tool-btn span {
  font-size: 13px;
  color: #333;
}

@media (min-width: 960px) {
  .panel-drawer {
    width: min(560px, calc(100vw - 48px));
  }

  .edit-track-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .map-action-btn {
    min-width: 0;
    width: 100%;
  }

  .edit-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .panel-drawer.edit-panel-compact {
    width: min(500px, calc(100vw - 48px));
  }

  .more-tools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .edit-tool-btn,
  .more-tool-btn {
    min-height: 96px;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -20;
  }
}

.recording-indicator {
  position: fixed;
  top: 76px;
  left: 50%;
  right: auto;
  width: auto;
  transform: translateX(-50%);
  z-index: 999;
  background: #f44336;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.recording-indicator.show {
  display: flex;
}

.recording-indicator .pulse {
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.loading-overlay.hide {
  display: none;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: #666;
  font-size: 14px;
}

.loading-overlay-error {
  color: #f44336;
  font-weight: 600;
}

.stop-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3100;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stop-confirm-dialog {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.stop-confirm-dialog h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: #333;
}

.stop-confirm-dialog p {
  margin: 0 0 20px 0;
  font-size: 14px;
  color: #666;
}

.stop-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stop-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
}

.stop-confirm-save {
  background: #4CAF50;
  color: #fff;
}

.stop-confirm-discard {
  background: #f44336;
  color: #fff;
}

.stop-confirm-cancel {
  background: #f5f5f5;
  color: #333;
}

.stop-confirm-save:hover {
  background: #388E3C;
}

.stop-confirm-discard:hover {
  background: #d32f2f;
}

.stop-confirm-cancel:hover {
  background: #e0e0e0;
}

@media (max-width: 480px) {
  .toolbar-btn {
    padding: 6px 8px;
    min-width: 50px;
  }
  
  .toolbar-btn i {
    font-size: 18px;
  }
  
  .toolbar-btn span {
    font-size: 11px;
  }
  
  .status-bar {
    font-size: 11px;
    padding: 4px 0;
  }
}

/* 通知按钮和面板 */
.notice-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #f44336;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  font-weight: 600;
}

.map-notice-badge {
  top: -4px;
  right: -4px;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-tutorial-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef6ff 0%, #f6fbff 100%);
  border: 1px solid rgba(74, 144, 217, 0.18);
  color: #1f2937;
  text-decoration: none;
}

.notice-tutorial-entry:hover {
  background: linear-gradient(135deg, #e4f0ff 0%, #eef7ff 100%);
}

.notice-tutorial-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notice-tutorial-copy strong {
  font-size: 14px;
  color: #0f172a;
}

.notice-tutorial-copy span {
  font-size: 12px;
  color: #64748b;
}

.notice-tutorial-entry i {
  flex-shrink: 0;
  color: #4a90d9;
}

.notice-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.notice-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f9f9f9;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.notice-item:hover {
  background: #f0f0f0;
}

.notice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  margin-top: 6px;
  flex-shrink: 0;
}

.notice-dot.unread {
  background: #f44336;
  box-shadow: 0 0 6px rgba(244, 67, 54, 0.4);
}

.notice-content h5 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #333;
}

.notice-content p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}

.notice-time {
  font-size: 11px;
  color: #999;
}

.notice-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
  word-break: break-all;
}

/* 通知详情弹窗 */
.notice-detail-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 7000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notice-detail-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.notice-detail-modal {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: noticeDetailIn 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes noticeDetailIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.notice-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.notice-detail-header h3 {
  margin: 0;
  font-size: 17px;
  color: #333;
  flex: 1;
  padding-right: 12px;
}

.notice-detail-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f0f0f0;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notice-detail-close:hover {
  background: #e0e0e0;
  color: #333;
}

.notice-detail-time {
  padding: 10px 20px;
  font-size: 12px;
  color: #999;
  background: #f8f9fa;
}

.notice-detail-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}

.notice-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
}

/* 地图悬浮广告 */
.map-popup-ad {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
}

.map-popup-ad.is-hidden {
  display: none;
}

.popup-ad-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  animation: popupAdIn 0.3s ease;
}

@keyframes popupAdIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.popup-ad-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  z-index: 1;
}

.popup-ad-close:hover {
  background: #f5f5f5;
  color: #333;
}

/* 分享定位面板 */
.share-location-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 6000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.share-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.share-panel-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 20px 16px 24px;
  animation: slideUp 0.3s ease;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.share-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.share-panel-header h4 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

.share-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f5f5f5;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
}

.share-close-btn:hover {
  background: #eee;
  color: #333;
}

.share-panel-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.share-panel-coords {
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
}

.share-map-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.share-map-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: background 0.15s;
}

.share-map-item:hover {
  background: #e9ecef;
}

.share-map-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.share-map-icon-amap {
  background: #3385FF;
}

.share-map-icon-baidu {
  background: #3066E6;
}

.share-map-icon-tencent {
  background: #07C160;
}

.share-map-icon-ovital {
  background: #FF6600;
}

.share-map-icon-google {
  background: #4285F4;
}

.share-map-icon-bing {
  background: #00897B;
}

.share-map-icon-apple {
  background: #555555;
}

.share-map-icon-waze {
  background: #33CCFF;
}

.share-map-item span {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.share-map-item .fa-external-link {
  color: #999;
  font-size: 14px;
}

.share-copy-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #e9ecef;
  color: #333;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}

.share-copy-btn:hover {
  background: #dee2e6;
}

/* 分享按钮 */
.btn-share {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #2196F3;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-share:hover {
  background: #1976D2;
}

.btn-share i {
  font-size: 14px;
}

/* 用户位置标记 */
.user-location-marker {
  background: transparent !important;
  border: none !important;
}

/* 用户方向箭头标记 */
.user-direction-marker {
  background: transparent !important;
  border: none !important;
  transition: transform 0.3s ease;
}

/* 轨迹起点标记 */
.track-start-marker {
  background: transparent !important;
  border: none !important;
}

/* 轨迹终点标记 */
.track-end-marker {
  background: transparent !important;
  border: none !important;
}

/* Waypoint 航点标记名称 */
.waypoint-marker {
  background: transparent !important;
  border: none !important;
}

.waypoint-marker-container {
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.waypoint-marker-pin {
  width: 10px;
  height: 10px;
  background: #FF5722;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.waypoint-marker-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  color: #333;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.2;
}

/* 标记弹出框内容 */
.marker-popup-content {
  min-width: 180px;
}

.marker-popup-content h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: #333;
}

.marker-popup-content p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #666;
}

.marker-popup-media {
  display: flex;
  gap: 8px;
  margin: 0 0 12px 0;
  overflow-x: auto;
}

.marker-popup-image {
  display: block;
  width: 96px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.marker-popup-content .btn-delete {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #f44336;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.marker-popup-content .btn-delete:hover {
  background: #d32f2f;
}

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

.track-editor-popup p {
  margin: 0;
  color: #333;
  font-size: 13px;
}

.track-editor-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}

.track-editor-dialog {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.track-editor-dialog-title {
  margin: 0;
  font-size: 18px;
  color: #222;
}

.track-editor-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.track-editor-dialog-footer {
  display: flex;
  gap: 10px;
}

.track-editor-dialog-footer button {
  flex: 1;
}

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

.track-editor-field-label {
  font-size: 13px;
  color: #555;
}

.track-editor-input,
.track-editor-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dbe0;
  border-radius: 10px;
  font-size: 14px;
  color: #222;
  background: #fff;
  box-sizing: border-box;
}

.track-editor-select option {
  color: #222;
}

.marker-popup-content .btn-add {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s;
}

.marker-popup-content .btn-add:hover {
  background: #388E3C;
}

.track-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.track-meta-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 22px;
}

.track-meta-badge.ovital {
  background: rgba(255, 152, 0, 0.14);
  color: #d97706;
}

.track-meta-badge.online {
  background: rgba(33, 150, 243, 0.14);
  color: #1565c0;
}

.track-meta-badge.cloud {
  background: rgba(76, 175, 80, 0.14);
  color: #2e7d32;
}

/* 测距工具样式 */
.measure-mode-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.measure-mode-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  color: #666;
}

.measure-mode-btn:hover {
  border-color: #4CAF50;
  color: #4CAF50;
}

.measure-mode-btn.active {
  border-color: #4CAF50;
  background: #4CAF50;
  color: #fff;
}

.measure-mode-btn i {
  margin-right: 6px;
}

.measure-help {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.measure-help p {
  font-size: 13px;
  color: #666;
  margin: 6px 0;
}

.measure-help i {
  color: #4CAF50;
  margin-right: 6px;
  width: 16px;
}

.measure-result-display {
  background: #e8f5e9;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.measure-value {
  font-size: 24px;
  font-weight: 600;
  color: #4CAF50;
  margin: 8px 0;
}

.measure-result {
  text-align: center;
  min-width: 120px;
  padding: 6px 8px;
}

.measure-label {
  font-size: 12px;
  margin: 4px 0;
}

.measure-label strong {
  font-size: 16px;
  color: #4CAF50;
}

.btn-clear-measure {
  margin-top: 6px;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: #f44336;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.btn-clear-measure:hover {
  background: #d32f2f;
}

/* 海拔剖面样式 */
.height-measure-tool {
  padding: 12px;
  margin-bottom: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.height-measure-title {
  margin-bottom: 10px;
  color: #1e40af;
  font-size: 14px;
  font-weight: 600;
}

.height-measure-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.height-measure-result {
  padding: 10px;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.panel-submit-btn.is-active {
  background: #ef4444;
}

.height-measure-cursor {
  cursor: crosshair !important;
}

.elevation-info {
  display: flex;
  justify-content: space-around;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.elevation-stat {
  text-align: center;
}

.elevation-label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.elevation-value {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #4CAF50;
}

#elevation-chart {
  width: 100%;
  height: 200px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 12px;
}

.elevation-track-selector {
  margin-top: 12px;
}

.elevation-track-selector select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

/* 轨迹对比样式 */
.compare-track-list {
  margin-bottom: 16px;
}

.compare-track-item {
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 8px;
}

.compare-track-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.compare-track-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.compare-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.compare-table th,
.compare-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.compare-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.compare-table td {
  color: #666;
}

.compare-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.btn-compare:hover {
  background: #388E3C !important;
}

.btn-clear-compare:hover {
  background: #d32f2f !important;
}

/* 状态栏网络状态增强 */
#network-status {
  display: flex;
  align-items: center;
  gap: 4px;
}

#network-status.offline i {
  color: #f44336;
}

#network-status.offline #network-text {
  color: #f44336;
}

#network-status i {
  color: #4CAF50;
}

/* 离线定位指示器 */
.gps-satellite-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 12px;
  font-size: 11px;
  color: #4CAF50;
}

.gps-satellite-indicator.weak {
  background: rgba(255, 152, 0, 0.1);
  color: #FF9800;
}

.gps-satellite-indicator.no-signal {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* 标记添加备注样式 */
.marker-add-notes input,
.marker-add-notes textarea {
  font-family: inherit;
}

.marker-note-input {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.marker-note-textarea {
  min-height: 60px;
  margin-top: 4px;
  resize: vertical;
}

.marker-media-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.btn-photo,
.btn-voice {
  flex: 1;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
}

.btn-photo:hover {
  border-color: #2196F3;
  color: #2196F3;
}

.btn-voice:hover {
  border-color: #f44336;
  color: #f44336;
}

.btn-photo i,
.btn-voice i {
  margin-right: 6px;
}

.camera-popup video,
.voice-popup {
  border-radius: 8px;
}

.camera-popup-video {
  width: 100%;
  max-height: 300px;
}

.camera-popup-capture-btn {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #4CAF50;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.btn-capture:hover {
  background: #388E3C !important;
}

.voice-popup-panel {
  padding: 20px;
  text-align: center;
}

.voice-popup-icon {
  font-size: 48px;
  color: #f44336;
  animation: pulse 1s infinite;
}

.voice-popup-text {
  margin: 16px 0;
}

.voice-popup-stop-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: #f44336;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.btn-stop-voice:hover {
  background: #d32f2f !important;
}

.nav-info-popup {
  padding: 8px;
  text-align: center;
}

.nav-point-dot {
  border-radius: 50%;
  border: 2px solid #fff;
}

.nav-point-dot-start {
  width: 20px;
  height: 20px;
  border-width: 3px;
  background: #4CAF50;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.nav-point-dot-user {
  width: 16px;
  height: 16px;
  background: #4285F4;
}

.nav-point-dot-target {
  width: 16px;
  height: 16px;
  background: #f44336;
}

.marker-popup-note {
  color: #666;
  font-size: 12px;
  margin: 4px 0;
}

.marker-popup-meta {
  font-size: 11px;
}

.marker-popup-meta-danger {
  color: #f44336;
}

.marker-popup-meta-imported {
  color: #FF9800;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 同步面板样式 */
.sync-status-card {
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  background: #f8fbff;
  margin-bottom: 16px;
}

.sync-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #d9e2ec;
  font-size: 14px;
  color: #333;
}

.sync-status-row:last-child {
  border-bottom: none;
}

.sync-status-row strong {
  color: #4CAF50;
}

.sync-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.sync-actions button {
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sync-actions button i {
  margin-right: 6px;
}

.btn-sync-check {
  background: #2196F3;
}

.btn-sync-check:hover {
  background: #1976D2;
}

.btn-sync-all {
  background: #4CAF50;
}

.btn-sync-all:hover {
  background: #388E3C;
}

.btn-sync-selected {
  background: #FF9800;
}

.btn-sync-selected:hover {
  background: #F57C00;
}

.sync-progress {
  margin: 16px 0;
}

.sync-progress-bar {
  height: 8px;
  background: #e6eef7;
  border-radius: 999px;
  overflow: hidden;
  transition: width 0.2s ease;
}

.sync-progress-bar > div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #2196F3);
  transition: width 0.2s ease;
}

.sync-progress-text {
  margin-top: 6px;
  font-size: 12px;
  color: #2f4f6f;
  text-align: center;
}

.sync-route-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
}

.sync-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.sync-route-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}

.sync-route-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}

.sync-route-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.sync-route-info {
  flex: 1;
}

.sync-route-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.sync-route-meta {
  font-size: 12px;
  color: #999;
}

.sync-route-meta i {
  margin-right: 4px;
}

.btn-download-single {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #2196F3;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-download-single:hover {
  background: #1976D2;
}

/* 微信引导遮罩 */
.guide-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.guide-mask.is-hidden {
  display: none;
}

.guide-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.guide-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #ff9800, #f57c00);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
}

.guide-content h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 12px;
}

.guide-content p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.guide-text-preline {
  white-space: pre-line;
  text-align: left;
}

.guide-steps {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.step {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #333;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #2196F3;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  margin-right: 12px;
  font-weight: bold;
}

.step i {
  margin-left: 8px;
  color: #2196F3;
}

.guide-btn {
  width: 100%;
  padding: 14px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.guide-btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

/* 浏览器收藏提示 */
.browser-tip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  z-index: 9998;
  max-width: 400px;
  width: calc(100% - 40px);
  overflow: hidden;
}

.browser-tip-content {
  padding: 20px;
}

@media (max-width: 768px) {
  .guide-content {
    padding: 28px 18px;
    border-radius: 18px;
  }

  .guide-content h3 {
    font-size: 18px;
  }

  .guide-content p,
  .guide-text-preline,
  .step {
    font-size: 13px;
  }

  .guide-btn {
    font-size: 15px;
    padding: 13px;
  }
}

.browser-tip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.browser-tip-header i {
  font-size: 24px;
  color: #FFC107;
  margin-right: 8px;
}

.browser-tip-header h3 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  color: #333;
}

.browser-tip-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.browser-tip-close:hover {
  color: #333;
}

.browser-tip-shortcut {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0;
}

.shortcut-key {
  display: inline-block;
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.shortcut-plus {
  font-size: 20px;
  color: #666;
  font-weight: bold;
}

.tip-header {
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-header i {
  font-size: 16px;
}

.tip-body {
  padding: 16px;
}

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 8px;
}

.tip-item:last-child {
  margin-bottom: 0;
}

.tip-item i {
  font-size: 24px;
  color: #2196F3;
  flex-shrink: 0;
}

.tip-text {
  flex: 1;
}

.tip-text strong {
  display: block;
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.tip-text p {
  font-size: 12px;
  color: #666;
  margin: 0;
}

.tip-text kbd {
  display: inline-block;
  padding: 2px 6px;
  background: #e0e0e0;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  margin: 0 2px;
}

.tip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tip-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: #333;
}

/* 清除缓存按钮 */
.clear-cache-btn {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1001;
}

.clear-cache-btn:hover {
  background: #f44336;
  color: #fff;
}

/* 清除缓存确认对话框 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: #fff;
  border-radius: 12px;
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  font-size: 18px;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header h3 i {
  color: #f44336;
}

.modal-close {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-body p {
  font-size: 14px;
  color: #333;
  margin: 0 0 16px;
}

.cache-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.cache-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: #666;
  border-bottom: 1px solid #f5f5f5;
}

.cache-list li:last-child {
  border-bottom: none;
}

.cache-list li i {
  color: #4CAF50;
}

.warning-text {
  background: #fff3e0;
  padding: 12px;
  border-radius: 8px;
  color: #e65100;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.warning-text i {
  color: #ff9800;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.modal-footer .btn-cancel {
  background: #f5f5f5;
  color: #666;
}

.modal-footer .btn-cancel:hover {
  background: #e0e0e0;
}

.modal-footer .btn-confirm {
  background: #f44336;
  color: #fff;
}

.modal-footer .btn-confirm:hover {
  background: #d32f2f;
}

/* 航点标记样式 */
.waypoint-marker {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.waypoint-marker-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.waypoint-marker-pin {
  width: 12px;
  height: 12px;
  background: #f44336;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.waypoint-marker-label {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* 手机版地图精修 */
@media (max-width: 768px) {
  .map-topbar {
    top: 6px;
    left: 6px;
    max-width: calc(100vw - 72px);
    gap: 6px;
    padding: 5px 7px;
    border-radius: 11px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  }

  .map-topbar-brand {
    gap: 6px;
  }

  .map-topbar-home {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .map-topbar-title {
    font-size: 12px;
    line-height: 1.15;
  }

  .map-topbar-subtitle {
    max-width: 86px;
    font-size: 9px;
    line-height: 1.15;
  }

  .map-topbar-actions {
    display: flex;
    gap: 4px;
  }

  .map-topbar-link {
    min-height: 26px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
  }

  .map-zoom-level-btn {
    width: 36px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
  }

  .map-controls {
    top: 6px;
    right: 6px;
    gap: 5px;
  }

  .map-control-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  }

  .map-control-btn .locate-icon {
    width: 16px;
    height: 16px;
    font-size: 15px;
  }

  .heading-calibration-panel {
    top: 46px;
    right: 48px;
    width: min(230px, calc(100vw - 64px));
    padding: 10px;
  }

  .heading-calibration-actions button {
    min-height: 32px;
    font-size: 11px;
  }

  .layer-switcher {
    top: 46px;
    right: 48px;
    max-width: min(300px, calc(100vw - 58px));
    max-height: 68vh;
  }

  .custom-source-actions {
    grid-template-columns: 1fr;
  }

  .custom-source-actions-top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .layer-item {
    flex-wrap: nowrap;
  }

  .layer-custom-actions {
    width: auto;
    justify-content: flex-end;
  }

  .custom-source-card,
  .custom-source-scan-card {
    max-height: 86vh;
    border-radius: 14px;
  }

  .custom-source-grid {
    grid-template-columns: 1fr;
  }

  .notice-badge {
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    line-height: 14px;
  }

  .layer-switcher {
    top: 6px;
    right: 47px;
    min-width: min(280px, calc(100vw - 64px));
    max-width: calc(100vw - 64px);
    min-height: 36px;
    border-radius: 11px;
  }

  .recording-indicator {
    top: 50px;
    max-width: calc(100vw - 84px);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
  }

  .cruise-controls {
    top: 84px;
    max-width: calc(100vw - 84px);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
  }

  .cruise-btn {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
  }

  .toolbar-toggle-btn {
    width: 42px;
    height: 24px;
    border-radius: 13px 13px 0 0;
  }

  .toolbar-toggle-btn i {
    font-size: 12px;
  }

  .bottom-toolbar {
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.12);
  }

  .toolbar-buttons {
    padding: 5px 4px 4px;
    gap: 1px;
  }

  .toolbar-btn {
    min-width: 0;
    padding: 5px 4px;
    border-radius: 10px;
  }

  .toolbar-btn i {
    margin-bottom: 2px;
    font-size: 16px;
  }

  .toolbar-btn span {
    font-size: 10px;
    line-height: 1.15;
  }

  .status-bar {
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 8px 5px;
    font-size: 10px;
    scrollbar-width: none;
  }

  .status-bar::-webkit-scrollbar {
    display: none;
  }

  .status-item {
    flex: 0 0 auto;
    gap: 3px;
    white-space: nowrap;
  }

  .panel-drawer {
    max-height: 68vh;
    border-radius: 14px 14px 0 0;
  }

  .panel-header {
    padding: 10px 12px;
  }

  .panel-header h3 {
    font-size: 15px;
  }

  .close-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .panel-content {
    padding: 10px 12px 14px;
  }

  .import-section {
    margin-bottom: 12px;
  }

  .import-section h4 {
    margin-bottom: 8px;
    font-size: 14px;
  }

  .import-section input[type="text"],
  .import-coord-select,
  .panel-select {
    min-height: 36px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 12px;
  }

  .file-upload-area {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .file-upload-icon,
  .panel-empty-icon {
    margin-bottom: 6px;
    font-size: 24px;
  }

  .edit-track-actions {
    gap: 6px;
  }

  .map-action-btn,
  .panel-submit-btn,
  .cache-actions button,
  .track-item-actions button,
  .btn-view {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
  }

  .edit-tools,
  .more-tools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .edit-tool-btn,
  .more-tool-btn {
    min-height: 62px;
    padding: 7px 4px;
    border-radius: 9px;
  }

  .edit-tool-btn i,
  .more-tool-btn i {
    margin-bottom: 3px;
    font-size: 17px;
  }

  .edit-tool-btn span,
  .more-tool-btn span {
    font-size: 10px;
    line-height: 1.2;
  }

  .track-item,
  .cache-package-item,
  .notice-item {
    gap: 8px;
    padding: 9px;
    border-radius: 9px;
  }

  .notice-tutorial-entry {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .notice-tutorial-copy strong,
  .notice-content h5 {
    font-size: 13px;
  }

  .notice-tutorial-copy span,
  .notice-content p {
    font-size: 11px;
  }

  .share-panel-content {
    max-height: 72vh;
    padding: 14px 12px 16px;
    border-radius: 14px 14px 0 0;
  }

  .share-panel-header h4 {
    font-size: 15px;
  }

  .share-close-btn {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .share-panel-title {
    font-size: 14px;
  }

  .share-panel-coords {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .share-map-list {
    gap: 6px;
    margin-bottom: 10px;
  }

  .share-map-item {
    gap: 9px;
    padding: 9px;
    border-radius: 9px;
  }

  .share-map-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 14px;
  }

  .share-map-item span {
    font-size: 13px;
  }

  .share-copy-btn {
    padding: 9px;
    border-radius: 9px;
    font-size: 13px;
  }

  .toast {
    bottom: 78px;
    max-width: calc(100vw - 28px);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 12px;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .panel-drawer {
    max-height: 64vh;
  }

  .bottom-toolbar.hidden + .toolbar-toggle-btn,
  .toolbar-toggle-btn.collapsed {
    bottom: 0;
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  .map-topbar {
    top: 5px;
    left: 5px;
    max-width: calc(100vw - 210px);
    padding: 4px 6px;
    border-radius: 10px;
  }

  .map-topbar-home {
    width: 26px;
    height: 26px;
  }

  .map-topbar-title {
    font-size: 11px;
  }

  .map-topbar-subtitle {
    display: none;
  }

  .map-topbar-actions {
    gap: 3px;
  }

  .map-topbar-link {
    min-height: 24px;
    padding: 0 6px;
    font-size: 9px;
  }

  .map-controls {
    top: 5px;
    right: 5px;
    gap: 4px;
  }

  .map-control-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    font-size: 15px;
  }

  .map-search-toggle,
  .map-25d-float-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
  }

  .map-search-toggle {
    flex-basis: 36px;
  }

  .map-25d-float-btn {
    top: 98px;
    font-size: 9px;
    letter-spacing: -0.05em;
  }

  .layer-switcher {
    top: 5px;
    right: 45px;
    max-width: 150px;
  }

  .layer-switcher {
    max-width: min(280px, calc(100vw - 54px));
    max-height: calc(100vh - 12px);
  }

  .heading-calibration-panel {
    top: 42px;
    right: 44px;
    width: 210px;
  }

  .recording-indicator {
    top: 44px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .cruise-controls {
    top: 76px;
    padding: 5px 9px;
    font-size: 11px;
  }

  .toolbar-toggle-btn {
    width: 38px;
    height: 21px;
  }

  .toolbar-buttons {
    padding: 3px 4px 2px;
  }

  .toolbar-btn {
    padding: 3px 4px;
  }

  .toolbar-btn i {
    font-size: 14px;
  }

  .toolbar-btn span {
    font-size: 9px;
  }

  .status-bar {
    padding: 2px 8px 3px;
    font-size: 9px;
  }

  .panel-drawer {
    left: auto;
    right: 8px;
    bottom: 8px;
    width: min(360px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    border-radius: 14px;
    transform: translateX(calc(100% + 16px));
  }

  .panel-drawer.open {
    transform: translateX(0);
  }

  .panel-header {
    padding: 8px 10px;
  }

  .panel-content {
    padding: 8px 10px 10px;
  }

  .edit-tool-btn,
  .more-tool-btn {
    min-height: 54px;
  }

  .share-location-panel {
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
  }

  .share-panel-content {
    width: min(360px, calc(100vw - 16px));
    max-height: calc(100vh - 16px);
    border-radius: 14px;
    padding: 12px;
  }

  .toast {
    bottom: 58px;
  }
}
