/* ===== 基础重置与移动适配 ===== */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
  background: #fafaf7;
  overscroll-behavior: none;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e5e5e5;
}

/* ===== 导航页 UI ===== */
.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 6px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}
.top-bar .sub {
  font-size: 11px;
  color: #666;
  line-height: 1.2;
}

.bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(180%) blur(10px);
  padding: 8px 14px 16px;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.1);
}
.bottom-sheet label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}
.bottom-sheet select {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #ccc;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}
.route-info {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.route-info .route-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.route-info .route-direction {
  display: flex;
  flex-direction: row;
  gap: 4px;
}
.route-info .nav-btn-group {
  display: flex;
  gap: 5px;
}
.route-info.hidden { display: none; }
.info-row {
  background: #f1f8ff;
  border-left: 4px solid #2196F3;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.info-row span { display: block; }
.info-row .label { font-size: 12px; color: #666; }
.info-row .value { font-weight: 700; color: #111; }

.fab {
  position: fixed;
  right: 12px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));  /* v0.6.4: 底部右侧, 避开 mobile 底栏 */
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.fab:active { transform: scale(0.96); }

/* v0.88: fab 底部中央水平排列, 小尺寸, 最大限度露出地图 */
.fab-stack {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.fab-stack .fab { position: static; right: auto; bottom: auto; }

/* 拍照 fab: 小圆 + 橙色 + 纯图标 */
.fab-shoot {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #FF6F00, #FF8F00) !important;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 3px 10px rgba(255, 111, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.35) !important;
  animation: shootPulse 2.4s ease-in-out infinite;
}
.fab-shoot .fab-label { display: none; }
.fab-shoot .fab-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15)); }
.fab-shoot:active { transform: scale(0.94); }

@keyframes shootPulse {
  0%, 100% { box-shadow: 0 3px 10px rgba(255, 111, 0, 0.35), 0 0 0 0 rgba(255, 111, 0, 0.45); }
  50%      { box-shadow: 0 3px 10px rgba(255, 111, 0, 0.35), 0 0 0 8px rgba(255, 111, 0, 0); }
}

/* AI 客服：地图右下角大入口，带标签 + 脉冲 */
.fab-ai {
  position: fixed;
  right: 12px;
  bottom: calc(220px + env(safe-area-inset-bottom, 0px));
  z-index: 101;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #2196F3, #1565C0);
  color: #fff;
  box-shadow: 0 4px 14px rgba(33, 150, 243, 0.45), 0 0 0 0 rgba(33, 150, 243, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  animation: aiPulse 2.4s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}
.fab-ai:active { transform: scale(0.94); }
.fab-ai-icon { font-size: 26px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2)); }
.fab-ai-label { font-size: 11px; font-weight: 700; line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,0.25); }

@keyframes aiPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(33, 150, 243, 0.45), 0 0 0 0 rgba(33, 150, 243, 0.55); }
  50%      { box-shadow: 0 4px 14px rgba(33, 150, 243, 0.45), 0 0 0 10px rgba(33, 150, 243, 0); }
}

.compass {
  position: fixed;
  bottom: calc(140px + env(safe-area-inset-bottom, 0px));  /* 在 fab 按钮上方 */
  right: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform 0.15s linear;
}
.compass.hidden { display: none; }
.compass .arrow {
  transition: transform 0.15s linear;
}

.perm-banner {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 11;
  background: #fff3cd;
  color: #856404;
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.perm-banner.hidden { display: none; }
.perm-banner button {
  background: #856404;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

/* ===== 地图标记样式 ===== */
.camp-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  background: #fff;
  border: 2px solid currentColor;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.user-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px !important;
  height: 24px !important;
}
.user-dot {
  width: 16px;
  height: 16px;
  background: #2196F3;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.user-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 18px solid #2196F3;
  transform-origin: 50% 70%;
}

/* ===== 后台管理页 ===== */
.admin-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 70px 16px 16px;  /* 顶部留出 topnav 高度 */
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.admin-header h1 {
  margin: 0;
  font-size: 20px;
}

/* ===== 后台顶部固定导航条 (admin-shell.js 注入) ===== */
.admin-topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #5d4037 0%, #3e2723 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 14px;
  color: #fff;
  gap: 12px;
}
.admin-topnav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-topnav-brand-icon { font-size: 18px; }
.admin-topnav-brand-text { color: #ffe0b2; }

.admin-topnav-burger {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.admin-topnav-tabs {
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.admin-topnav-tabs::-webkit-scrollbar { height: 3px; }
.admin-topnav-tabs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.admin-topnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.admin-topnav-tab:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.admin-topnav-tab.active {
  background: rgba(255,224,178,0.18);
  color: #ffe0b2;
  font-weight: 600;
}
.admin-topnav-tab-icon { font-size: 14px; }

/* 移动端汉堡菜单 */
@media (max-width: 720px) {
  .admin-topnav-burger { display: block; }
  .admin-topnav-tabs {
    position: absolute;
    top: 54px;
    left: 0; right: 0;
    flex-direction: column;
    background: #3e2723;
    padding: 8px;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  }
  .admin-topnav-tabs.open {
    max-height: 70vh;
    overflow-y: auto;
  }
  .admin-topnav-tab {
    padding: 10px 12px;
    font-size: 14px;
  }
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.form-row input,
.form-row select,
.form-row textarea {
  flex: 1 1 220px;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.form-row textarea {
  flex: 1 1 100%;
  min-height: 72px;
  resize: vertical;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #2196F3;
  color: #fff;
}
.btn.secondary { background: #9E9E9E; }
.btn.danger { background: #f44336; }
.btn.success { background: #4CAF50; }
.btn.small { padding: 6px 10px; font-size: 13px; }

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.btn-icon:hover:not(:disabled) { background: #2196F3; color: #fff; border-color: #2196F3; }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }
tbody tr[draggable="true"] { cursor: grab; }
tbody tr[draggable="true"]:active { cursor: grabbing; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
}
th {
  color: #555;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #fafafa;
}
tbody tr:nth-child(even) { background: #fafafa; }
tbody tr:hover { background: #f1f8e9; }
tbody tr:active { background: #f8f8f8; }

/* ===== 后台表格：移动端卡片化 ===== */
@media (max-width: 720px) {
  .table-wrap {
    overflow-x: visible;
    padding: 2px;
  }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td { display: block; }

  .table-wrap thead { display: none; }

  .table-wrap tbody tr {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #eceff1;
    padding: 10px 12px;
  }

  .table-wrap tbody tr:nth-child(even) { background: #fff; }
  .table-wrap tbody tr:hover { background: #f1f8e9; }

  .table-wrap td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
  }

  .table-wrap td:last-child { border-bottom: none; }

  .table-wrap td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #666;
    font-size: 11px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .table-wrap td > * { text-align: right; }
  .table-wrap td .btn,
  .table-wrap td .btn-icon { margin-left: 4px; }
}

.admin-map-wrap {
  height: 260px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ddd;
  margin-bottom: 10px;
}
.hint {
  color: #666;
  font-size: 13px;
  margin: 6px 0 12px;
}

/* ===== 定位失败 Banner ===== */
.locate-error-banner {
  position: absolute;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 50;
  background: #fff3e0;
  border: 1px solid #ffb74d;
  border-left: 4px solid #ff9800;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideDown 0.3s ease-out;
}

.locate-error-banner.hidden {
  display: none !important;
}

.locate-error-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.locate-error-body {
  flex: 1;
  min-width: 0;
}

.locate-error-title {
  font-size: 14px;
  font-weight: 600;
  color: #e65100;
  margin-bottom: 4px;
}

.locate-error-msg {
  font-size: 12px;
  color: #5d4037;
  line-height: 1.5;
  word-break: break-word;
}

.locate-error-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.locate-error-retry,
.locate-error-dismiss {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.locate-error-retry {
  background: #ff9800;
  color: #fff;
  font-weight: 500;
}

.locate-error-retry:hover {
  background: #f57c00;
}

.locate-error-retry:active {
  background: #ef6c00;
}

.locate-error-dismiss {
  background: transparent;
  color: #8d6e63;
  border: 1px solid #d7ccc8;
}

.locate-error-dismiss:hover {
  background: rgba(0,0,0,0.04);
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 失败时, 用户位置标记也变灰 + 加 ❌ */
.user-marker-icon.failed {
  opacity: 0.5;
  position: relative;
}

.user-marker-icon.failed::after {
  content: '❌';
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 14px;
  background: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* ===== admin: 使用我的位置 ===== */
#useMyLocationBtn {
  background: #ff9800;
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  padding: 8px 14px;
}
#useMyLocationBtn:hover { background: #f57c00; }
#useMyLocationBtn:active { background: #ef6c00; }
#useMyLocationBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.locate-status-row {
  min-height: 0;
  margin-top: -8px;
}

.locate-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 13px;
  background: #fafaf7;
  color: #666;
  width: 100%;
  transition: all 0.2s;
}

.locate-status.hidden { display: none !important; }

.locate-status.loading {
  background: #fff3e0;
  color: #e65100;
}

.locate-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.locate-status.error {
  background: #ffebee;
  color: #c62828;
}

.locate-status-icon { font-size: 16px; line-height: 1; }

.locate-status-msg {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}

.locate-status-accuracy {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 8px;
}

/* ===== 登录遮罩 ===== */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2e7d32 0%, #43a047 50%, #2e7d32 100%);
  padding: 20px;
}

.login-gate.hidden { display: none !important; }

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 40px 32px 28px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.login-icon {
  font-size: 48px;
  margin-bottom: 8px;
  line-height: 1;
}

.login-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
}

.login-sub {
  margin: 0 0 24px;
  font-size: 14px;
  color: #64748b;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-form input {
  padding: 12px 14px;
  font-size: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
  letter-spacing: 4px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: #2e7d32;
  background: #fff;
}

.login-btn {
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2e7d32, #1e3a5f);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s, box-shadow 0.2s;
}

.login-btn:hover { box-shadow: 0 4px 12px rgba(45, 90, 135, 0.4); }
.login-btn:active { transform: translateY(1px); }

.login-error {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 13px;
  border-radius: 6px;
  animation: shake 0.4s;
}

.login-error.hidden { display: none !important; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-back {
  display: inline-block;
  margin-top: 20px;
  color: #64748b;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.login-back:hover { color: #1e3a5f; }

/* ===== 搜索栏 + 类型过滤 (P1 优化版) ===== */

.search-bar {
  position: absolute;
  top: 58px;
  left: 12px;
  right: 12px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none; /* 让点击穿透到空白处，子元素单独开启 */
}
.search-bar > * { pointer-events: auto; }

/* 目的地选择器：胶囊卡片 */
.dest-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 24px;
  padding: 10px 14px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(46,125,50,0.12);
}

.dest-top-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 50%;
  font-size: 16px;
  flex-shrink: 0;
}

.dest-top-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dest-top-main label {
  font-size: 11px;
  font-weight: 600;
  color: #2e7d32;
  letter-spacing: 0.5px;
  margin-bottom: 0;
}

.dest-top-select {
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #1e293b;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.dest-top-select:focus { outline: none; }

/* v0.7.4: 目标右边"结束导航"按钮 (导航中显示) */
.end-nav-inline-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #ffebee;
  color: #c62828;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.12s, background 0.15s;
}
.end-nav-inline-btn:hover { background: #ffcdd2; }
.end-nav-inline-btn:active { transform: scale(0.92); background: #ef9a9a; }
.end-nav-inline-btn.hidden { display: none !important; }

/* 过滤行：chips + 清除按钮 */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-chips {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 4px;
  margin: -2px -4px;
  -webkit-overflow-scrolling: touch;
}

.type-chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  background: rgba(255,255,255,0.96);
  border: 1.5px solid #e8eaf6;
  border-radius: 18px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #4a5568;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  border-color: #c8e6c9;
  background: #f1f8e9;
}

.chip.active {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
  box-shadow: 0 2px 8px rgba(46,125,50,0.28);
}

.chip-clear {
  background: #fff3e0 !important;
  border-color: #ffcc80 !important;
  color: #e65100 !important;
  font-weight: 600;
}
.chip-clear:hover {
  background: #ffe0b2 !important;
  border-color: #ffb74d !important;
}
.chip-clear.hidden { display: none !important; }

/* ===== 加载进度 ===== */
.loading-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.95);
  padding: 14px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  font-size: 14px;
  color: #555;
}

.loading-indicator.hidden { display: none !important; }

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #eceff1;
  border-top-color: #2e7d32;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 底部面板重做 ===== */
.bottom-sheet {
  padding: 8px 12px 12px;
}

/* 主信息: 距离 + 时间 */
.route-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin: 6px 0;
}

.route-stat {
  flex: 1;
  text-align: center;
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: #2e7d32;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-unit {
  font-size: 10px;
  color: #888;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.route-divider {
  width: 1px;
  height: 28px;
  background: #eceff1;
}

/* 方向卡片 */
.route-direction {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.dir-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 2px solid #cbd5e1;
  transition: all 0.2s;
}

.dir-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 2px solid #cbd5e1;
  transition: all 0.2s;
}

.dir-card.dir-target {
  background: #e3f2fd;
  border-left-color: #2e7d32;
}

.dir-card.dir-target .dir-icon {
  color: #2e7d32;
  font-size: 16px;
}

.dir-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  color: #64748b;
  flex-shrink: 0;
}

.dir-info {
  flex: 1;
  min-width: 0;
}

.dir-label {
  font-size: 10px;
  color: #888;
  margin-bottom: 1px;
  line-height: 1.1;
}

.dir-value {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

/* ===== 百度地图步行导航按钮 ===== */
.nav-btn {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, #ff7043, #e64a19);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45, 90, 135, 0.25);
  transition: transform 0.1s, box-shadow 0.2s;
  text-align: center;
}

.nav-btn:hover { box-shadow: 0 4px 14px rgba(45, 90, 135, 0.4); }
.nav-btn:active { transform: translateY(1px); }

/* ===== 标记名称标签 ===== */
 .camp-marker {
   position: relative;
   display: flex;
   flex-direction: column;
   align-items: center;
   pointer-events: auto;
   /* 移动端 fix: 不让浏览器把 marker 上的触摸当作地图拖动 */
   touch-action: manipulation;
 }

.camp-marker-label {
  display: none;  /* 默认隐藏, 选中目标才显示 */
  margin-top: 4px;
  padding: 2px 6px;
  background: #fff;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  line-height: 1.3;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;  /* 不阻挡地图拖动 */
}

.camp-marker-label.active {
  display: block;
}

.camp-marker-target .camp-marker-label {
  font-size: 12px;
  padding: 3px 8px;
  box-shadow: 0 2px 6px rgba(233, 30, 99, 0.3);
}

/* ===== 微信内步行按钮下方提示 ===== */
.nav-weixin-hint {
  margin: 0;
  padding: 3px 8px;
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 6px;
  color: #e65100;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.nav-weixin-hint.hidden { display: none !important; }

.nav-weixin-hint strong { color: #bf360c; font-weight: 700; }

/* (v0.6.4 移除 my-status-card 整组样式) */

/* ===== 增强版用户位置 marker ===== */
.user-marker-icon {
  position: relative;
  width: 48px !important;
  height: 48px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 22px solid #2196F3;
  top: 0;
  left: 50%;
  margin-left: -11px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
  transform-origin: 50% 75%;
  transition: transform 0.3s ease;
}

/* ===== 导航按钮组 ===== */
.nav-btn-group {
  display: flex;
  gap: 5px;
  margin: 6px 0;
}

.nav-btn-group .nav-btn {
  flex: 1;
  margin: 0;
}

.nav-btn-secondary {
  background: linear-gradient(135deg, #ff7043, #e64a19);
  box-shadow: 0 2px 8px rgba(230, 74, 25, 0.25);
}
.nav-btn-secondary:hover {
  box-shadow: 0 4px 14px rgba(230, 74, 25, 0.4);
}
.nav-btn-ar {
  background: linear-gradient(135deg, #8E24AA, #6A1B9A);
  color: #fff;
  box-shadow: 0 2px 8px rgba(142, 36, 170, 0.25);
}
.nav-btn-ar:hover {
  box-shadow: 0 4px 14px rgba(142, 36, 170, 0.4);
}
.nav-btn-ar[data-point-id=""] {
  opacity: 0.55;
}

/* ===== 底部面板折叠 ===== */
.bottom-sheet {
  transition: max-height 0.3s ease, padding 0.3s ease, transform 0.3s ease;
  max-height: 80vh;
  overflow: hidden auto;
}

.bottom-sheet.collapsed {
  max-height: 48px;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.bottom-sheet.collapsed > *:not(.sheet-handle) {
  display: none;
}

.sheet-handle {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 6px 0 8px;
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.sheet-handle-icon {
  display: inline-block;
  font-size: 14px;
  color: #999;
  transition: transform 0.3s ease;
  user-select: none;
}

.bottom-sheet.collapsed .sheet-handle-icon {
  transform: rotate(180deg);
}

/* 全屏模式: 隐藏顶部搜索/类型过滤, 给地图更多空间 */
body.fullscreen .top-bar,
body.fullscreen .search-bar {
  display: none;
}

/* ===== 全局美化增强 (v0.3) ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 顶部栏玻璃效果 */
.top-bar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06) !important;
}

.top-bar h1 {
  background: linear-gradient(135deg, #1b5e20, #43a047);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 搜索栏/类型 chip 玻璃化 */
.search-bar {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  padding: 6px 10px !important;
  border-radius: 14px !important;
  margin: 6px 10px 0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}

.search-input-wrap, .dest-top {
  background: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.chip {
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
  transition: all 0.2s;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12) !important;
}

.chip.active {
  background: linear-gradient(135deg, #2e7d32, #43a047) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(46,125,50,0.3) !important;
}

/* 底部面板卡片化 */
.bottom-sheet {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(46, 125, 50, 0.15) !important;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08) !important;
  border-radius: 20px 20px 0 0 !important;
  /* v0.6.4: 留出 mobile 底栏 (home indicator) + 系统悬浮工具栏空间, 避免遮挡 */
  bottom: env(safe-area-inset-bottom, 0px);
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
}

.sheet-handle-icon {
  font-size: 16px !important;
  color: #2e7d32 !important;
  font-weight: 700;
}

/* 我的状态卡美化 */
.my-status-card {
  background: linear-gradient(135deg, #f1f8e9, #c8e6c9) !important;
  border: 1px solid #a5d6a7 !important;
  box-shadow: 0 2px 8px rgba(46,125,50,0.08) !important;
}

/* 距离/时间大数字 */
.stat-num {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800 !important;
}

/* 方向卡片美化 */
.dir-card {
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
  border-radius: 6px !important;
  padding: 5px 10px !important;
  gap: 8px !important;
  transition: all 0.2s;
}

.dir-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
}

.dir-card.dir-target {
  background: linear-gradient(135deg, #fff3e0, #ffe0b2) !important;
  border-left: 2px solid #ff7043 !important;
  box-shadow: 0 2px 8px rgba(255, 112, 67, 0.15) !important;
}

.dir-card.dir-target .dir-icon {
  color: #e64a19 !important;
  font-size: 18px !important;
}

.dir-card .dir-icon {
  font-size: 16px !important;
  width: 22px !important;
}

.dir-card .dir-label {
  font-size: 10px !important;
  margin-bottom: 0 !important;
}

.dir-card .dir-value {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.dir-card.dir-target .dir-value {
  color: #bf360c !important;
}

/* 步行/驾车按钮美化 */
.nav-btn {
  background: linear-gradient(135deg, #ff7043, #e64a19) !important;
  box-shadow: 0 3px 10px rgba(230, 74, 25, 0.3) !important;
  border-radius: 12px !important;
  transition: all 0.2s;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(230, 74, 25, 0.4) !important;
}

.nav-btn-secondary {
  background: linear-gradient(135deg, #ffa726, #fb8c00) !important;
}

/* 活动点 marker 加大 + 阴影 */
.camp-marker-icon {
  width: 38px !important;
  height: 38px !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
  border: 2.5px solid !important;
  font-size: 18px !important;
  transition: all 0.2s;
}

.camp-marker:hover .camp-marker-icon {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
}

.camp-marker-label {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15) !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  font-weight: 600;
}

/* 用户位置 marker 优化 */
.user-marker-icon {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  width: 48px !important;
  height: 48px !important;
}

.user-arrow {
  filter: drop-shadow(0 2px 4px rgba(33, 150, 243, 0.4)) !important;
}

.user-dot {
  background: linear-gradient(135deg, #2196f3, #1976d2) !important;
  box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2), 0 2px 8px rgba(0,0,0,0.3) !important;
  animation: userPulse 2s ease-in-out infinite;
}

@keyframes userPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2), 0 2px 8px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.1), 0 2px 8px rgba(0,0,0,0.3); }
}

/* 定位 FAB */
#locateBtn {
  background: linear-gradient(135deg, #ffffff, #f1f8e9) !important;
  color: #2e7d32 !important;
  border: 1px solid rgba(46, 125, 50, 0.18) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.8) !important;
  transition: all 0.2s;
}

#locateBtn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

/* 加载 spinner */
.loading-spinner {
  border-top-color: #2e7d32 !important;
}

/* 微信提示条 */
.weixin-notice {
  background: linear-gradient(135deg, #43a047, #2e7d32) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3) !important;
}

.nav-weixin-hint {
  background: #fff8e1 !important;
  border-color: #ffcc80 !important;
  border-radius: 8px !important;
  color: #e65100 !important;
}

/* 选中目标 marker 高亮 */
.camp-marker-target .camp-marker-icon {
  width: 44px !important;
  height: 44px !important;
  font-size: 24px !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(233, 30, 99, 0.4) !important;
  animation: targetPulse 1.5s ease-in-out infinite;
}

@keyframes targetPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* 滚轮滑入底部面板 */
.bottom-sheet {
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ===== P1 工具栏：search-bar 内快捷入口 ===== */
.quick-toolbar {
  display: flex;
  gap: 8px;
  padding: 2px 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.quick-toolbar::-webkit-scrollbar { display: none; }

.quick-toolbar .tool-btn {
  flex: 0 0 auto;
  min-width: 64px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.quick-toolbar .tool-btn:active { transform: scale(0.96); }
.quick-toolbar .tool-btn .tool-icon { font-size: 15px; line-height: 1; }
.quick-toolbar .tool-btn .tool-label { font-size: 12px; line-height: 1; }
.tool-btn {
  flex: 0 0 auto;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  background: #f5f5f5;
  color: #333;
}
.tool-btn:active {
  transform: scale(0.95);
}
.tool-btn .tool-icon {
  font-size: 18px;
  line-height: 1;
}
.tool-btn .tool-label {
  font-size: 10px;
  white-space: nowrap;
  line-height: 1.1;
}
.tool-btn.tool-call {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: #fff;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
}
.tool-btn.tool-ai {
  background: linear-gradient(135deg, #2196F3, #1565C0);
  color: #fff;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.35);
}
/* 宠物徽章 */
.pet-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  font-size: 12px;
  background: #fff;
  border-radius: 50%;
  padding: 1px 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  line-height: 1;
}
/* (旧: 宠物过滤 chip #petOnlyChip 已删, v0.6) */
.camp-marker-icon {
  position: relative;
}

/* ===== Modal 通用 (P0-3/4/5) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  max-width: 92vw;
  width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: scaleIn 0.22s cubic-bezier(.4, 1.4, .6, 1);
}
@keyframes scaleIn { from { transform: scale(0.85); } to { transform: scale(1); } }
.modal-card h3 { margin: 0 0 10px; font-size: 18px; }
.modal-card p { margin: 6px 0; font-size: 14px; color: #555; }
.modal-phone {
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2px;
  color: #2E7D32;
  margin: 14px 0;
  font-family: ui-monospace, monospace;
}
.modal-hint { font-size: 12px !important; color: #888 !important; }
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.modal-actions button {
  flex: 1;
  padding: 10px 0;
  border: 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn-copy, .btn-call-emerg {
  background: #2E7D32;
  color: #fff;
}
.btn-call-emerg { background: #C62828; }
.btn-close {
  background: #eee;
  color: #333;
}

/* AI 客服 */
.ai-card {
  width: 380px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 600;
  color: #1565C0;
}
.ai-close {
  background: transparent;
  border: 0;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}
.ai-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  min-height: 180px;
  max-height: 360px;
  background: #f8f9fa;
}
.ai-msg {
  margin: 6px 0;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  max-width: 80%;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg.user {
  background: #1565C0;
  color: #fff;
  margin-left: auto;
  text-align: right;
}
.ai-msg.bot {
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
}
.ai-msg-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e0e0e0;
}
.ai-feedback-btn {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #888;
  cursor: pointer;
}
.ai-feedback-btn:hover { color: #1565C0; }
.ai-feedback-note {
  font-size: 12px;
  color: #2e7d32;
}
.ai-feedback-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}
.ai-feedback-status.pending { background: #FFF3E0; color: #E65100; }
.ai-feedback-status.resolved { background: #E8F5E9; color: #2E7D32; }
.ai-feedback-status.ignored { background: #ECEFF1; color: #607D8B; }
.ai-faq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-top: 1px solid #eee;
  background: #fafafa;
}
.ai-faq-btn {
  background: #fff;
  border: 1px solid #BBDEFB;
  color: #1565C0;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
}
.ai-faq-btn:active { background: #BBDEFB; }
.ai-faq-btn.ai-faq-more {
  background: #f5f5f5;
  border-color: #ddd;
  color: #666;
}
.ai-faq-more-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
.ai-faq-more-row.hidden { display: none; }

/* 导航地图选择弹窗 */
.nav-picker-card {
  width: 320px;
  padding: 20px;
  text-align: center;
}
.nav-picker-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}
.nav-picker-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.nav-picker-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  text-align: left;
}
.nav-picker-btn:active {
  background: #f5f5f5;
}
.nav-picker-icon {
  font-size: 20px;
}
.nav-picker-cancel {
  width: 100%;
  padding: 10px;
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
}

.ai-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #eee;
}
.ai-input-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 18px;
  font-size: 14px;
  outline: none;
}
.ai-input-row input:focus { border-color: #1565C0; }
.ai-input-row button {
  background: #1565C0;
  color: #fff;
  border: 0;
  border-radius: 18px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== 预约 (P1) ===== */
.tool-btn.tool-booking {
  background: linear-gradient(135deg, #FF7043, #E64A19);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 112, 67, 0.35);
}
.booking-card {
  width: 380px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.booking-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}
.book-tab {
  flex: 1;
  padding: 10px 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  border-bottom: 2px solid transparent;
}
.book-tab.active {
  color: #E64A19;
  border-bottom-color: #E64A19;
  font-weight: 600;
}
.booking-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 200px;
  max-height: 460px;
  background: #f8f9fa;
}
.empty-tip {
  text-align: center;
  padding: 30px 10px;
  color: #888;
  font-size: 14px;
}
.muted { color: #aaa; font-size: 12px; }
.book-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.book-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.book-name { font-weight: 700; font-size: 15px; color: #333; }
.book-cap {
  background: #FFF3E0;
  color: #E64A19;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.book-desc { color: #666; font-size: 12px; line-height: 1.4; margin: 4px 0; }
.book-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #888;
  margin: 6px 0;
}
.book-go {
  width: 100%;
  background: linear-gradient(135deg, #FF7043, #E64A19);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.book-go:active { opacity: 0.85; }

.book-mine {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.book-mine-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.book-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.book-status-pending { background: #FFF3E0; color: #E65100; }
.book-status-confirmed { background: #E8F5E9; color: #2E7D32; }
.book-status-cancelled { background: #FFEBEE; color: #C62828; }
.book-mine-meta { font-size: 12px; color: #555; margin: 4px 0; }
.book-mine-note { font-size: 12px; color: #888; font-style: italic; margin: 2px 0; }
.book-mine-time { font-size: 11px; color: #aaa; margin-top: 4px; }

/* 表单 */
.bookform-card { width: 380px; padding: 0 0 14px; }
.bookform-card .ai-header { padding: 14px 18px; }
.bookform-card form { padding: 0 18px; }
.form-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin: 10px 0 4px;
}
.bookform-card input[type=text],
.bookform-card input[type=tel],
.bookform-card input[type=number],
.bookform-card textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}
.bookform-card input:focus,
.bookform-card textarea:focus { border-color: #FF7043; }
.bookform-card textarea { min-height: 60px; resize: vertical; }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.slot-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF3E0;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 0;
  font-size: 12px;
  cursor: pointer;
}
.slot-item input { display: none; }
.slot-item input:checked + span {
  font-weight: 700;
  color: #E64A19;
}
.slot-item:has(input:checked) {
  background: #FFE0B2;
  border-color: #FF7043;
}
.slot-item span { color: #555; }

/* 成功页 */
.success-card { text-align: center; }
.success-icon { font-size: 56px; margin: 6px 0 10px; }
.success-card h3 { color: #2E7D32; }
.success-detail {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  font-size: 13px;
  color: #555;
  margin: 12px 0;
  line-height: 1.8;
}

/* ===== 后台预约管理 (P1) ===== */
.btn-mini {
  padding: 4px 8px;
  font-size: 12px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 4px;
}
.btn-edit { background: #E3F2FD; color: #1565C0; }
.btn-del { background: #FFEBEE; color: #C62828; }
.btn-confirm { background: #E8F5E9; color: #2E7D32; }
.btn-cancel { background: #FFF3E0; color: #E65100; }
.bk-st { font-size: 11px; padding: 2px 6px; border-radius: 8px; }
.bk-pending { background: #FFF3E0; color: #E65100; }
.bk-ok { background: #E8F5E9; color: #2E7D32; }
.bk-cancel { background: #FFEBEE; color: #C62828; }

/* ===== 打卡集章 (P0) ===== */
.tool-btn.tool-checkin {
  background: linear-gradient(135deg, #FFC107, #FF8F00);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
}
.ck-card { width: 400px; max-height: 88vh; display: flex; flex-direction: column; padding: 0; }
.ck-card .ai-header { padding: 14px 18px; }
.ck-progress {
  padding: 14px 18px;
  text-align: center;
  background: linear-gradient(135deg, #FFF8E1, #FFECB3);
}
.ck-prog-num {
  font-size: 32px;
  font-weight: 800;
  color: #E65100;
  line-height: 1;
}
.ck-prog-bar {
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.ck-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFB300, #FF6F00);
  transition: width 0.4s;
}
.ck-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  padding: 8px 18px 4px;
  background: #fafafa;
}
.ck-rewards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 14px;
  background: #fafafa;
}
.ck-reward {
  background: #fff;
  border: 1px solid #FFE0B2;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  position: relative;
}
.ck-reward.reached {
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  border-color: #FF8F00;
}
.ck-rw-icon { font-size: 22px; }
.ck-rw-name { font-size: 13px; font-weight: 700; color: #E65100; margin: 2px 0; }
.ck-rw-desc { font-size: 11px; color: #888; }
.ck-rw-tag {
  font-size: 10px;
  margin-top: 4px;
  padding: 2px 4px;
  border-radius: 6px;
  display: inline-block;
}
.ck-reward.reached .ck-rw-tag { background: #2E7D32; color: #fff; }
.ck-reward:not(.reached) .ck-rw-tag { background: #eee; color: #888; }

.ck-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 14px;
  max-height: 220px;
  overflow-y: auto;
  background: #f8f9fa;
}
.ck-pt {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
}
.ck-pt.done {
  background: #FFF3E0;
  border-color: #FFB300;
}
.ck-pt-stamp {
  font-size: 18px;
  font-weight: 800;
  color: #ddd;
  line-height: 1;
  margin-bottom: 2px;
}
.ck-pt.done .ck-pt-stamp {
  color: #2E7D32;
}
.ck-pt-name {
  color: #555;
  font-size: 11px;
  line-height: 1.2;
  word-break: break-all;
}
.ck-logs {
  padding: 8px 18px 12px;
  background: #f8f9fa;
  max-height: 120px;
  overflow-y: auto;
  font-size: 12px;
  color: #555;
}
.ck-log-item { padding: 4px 0; border-bottom: 1px dashed #eee; }
.ck-succ-reward {
  background: linear-gradient(135deg, #FFF8E1, #FFE082);
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  text-align: center;
  font-weight: 700;
  color: #E65100;
}

/* 打卡气泡 (自动检测) */
.checkin-toast {
  position: fixed;
  bottom: 100px;
  left: 16px;
  right: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9998;
  animation: slideUpToast 0.3s ease;
}
@keyframes slideUpToast { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ck-t-icon { font-size: 28px; line-height: 1; }
.ck-t-body { flex: 1; }
.ck-t-title { font-weight: 700; font-size: 14px; color: #333; }
.ck-t-hint { font-size: 11px; color: #888; margin-top: 2px; }
.ck-t-go {
  background: #FF8F00;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ck-t-close {
  background: transparent;
  border: 0;
  font-size: 16px;
  color: #aaa;
  cursor: pointer;
  padding: 0 4px;
}

/* 轻提示 (自动打卡成功) */
.ck-light-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FFC107, #FF8F00);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9998;
  min-width: 260px;
  max-width: 90vw;
  animation: slideDownToast 0.3s ease;
}
@keyframes slideDownToast { from { transform: translate(-50%, -100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.ck-lt-icon { font-size: 26px; line-height: 1; }
.ck-lt-body { flex: 1; }
.ck-lt-title { font-weight: 700; font-size: 14px; }
.ck-lt-sub { font-size: 11px; opacity: 0.9; margin-top: 2px; }
.ck-lt-close {
  background: rgba(255,255,255,0.2);
  border: 0;
  color: #fff;
  font-size: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

/* ===== 登录 (P1) ===== */
.tool-btn.tool-login {
  background: linear-gradient(135deg, #9C27B0, #6A1B9A);
  color: #fff;
  box-shadow: 0 2px 6px rgba(156, 39, 176, 0.35);
}
.tool-btn.tool-login.logged-in {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.35);
}
.login-card { width: 360px; padding: 0 0 14px; }
.login-card .ai-header { padding: 14px 18px; }
.login-body { padding: 16px 18px 0; }
.login-body input[type=tel], .login-body input[type=text] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}
.login-body input:focus { border-color: #9C27B0; }
.login-body .form-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin: 10px 0 4px;
}
.login-code-row {
  display: flex;
  gap: 8px;
}
.login-code-row input { flex: 1; }
.btn-send-code {
  background: #9C27B0;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-send-code:disabled { background: #ccc; cursor: not-allowed; }
.login-error {
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
  color: #C62828;
}
.profile-info {
  text-align: center;
  padding: 20px 0;
}
.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9C27B0, #6A1B9A);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  margin: 0 auto 10px;
}
.profile-name { font-size: 18px; font-weight: 700; color: #333; }
.profile-phone { font-size: 13px; color: #888; margin-top: 2px; }
.profile-stat {
  text-align: center;
  background: #F3E5F5;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  color: #6A1B9A;
  font-size: 14px;
}

/* ===== v0.7 优惠券 / AR 合影 ===== */
.tool-btn.tool-coupons {
  background: linear-gradient(135deg, #FFB74D, #FF8A65);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 138, 101, 0.35);
}
.tool-btn.tool-ar {
  background: linear-gradient(135deg, #BA68C8, #8E24AA);
  color: #fff;
  box-shadow: 0 2px 6px rgba(142, 36, 170, 0.35);
}
.coupons-card {
  width: 400px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.coupons-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
}
.coupon-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.coupon-tab.active {
  color: #FF7043;
  border-bottom-color: #FF7043;
  font-weight: 600;
}
.coupons-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}
.coupon-card {
  display: flex;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(255, 138, 101, 0.15);
}
.coupon-card.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.coupon-left {
  flex: 0 0 100px;
  background: linear-gradient(135deg, #FF7043, #E64A19);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
}
.coupon-value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}
.coupon-kind {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
}
.coupon-right {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
}
.coupon-name {
  font-weight: 600;
  font-size: 15px;
  color: #333;
}
.coupon-scope {
  font-size: 12px;
  color: #666;
}
.coupon-meta {
  font-size: 11px;
  color: #999;
}
.coupon-desc {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}
.coupon-issue-btn, .coupon-copy-btn {
  margin-top: 6px;
  padding: 7px 14px;
  background: #FF7043;
  color: #fff;
  border: none;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  align-self: flex-start;
}
.coupon-issue-btn:disabled {
  background: #999;
  cursor: default;
}
.coupon-copy-btn {
  background: #2196F3;
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
}
.coupon-code-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.coupon-code-label {
  font-size: 11px;
  color: #999;
}
.coupon-code {
  font-family: monospace;
  font-size: 16px;
  font-weight: 700;
  color: #1565C0;
  background: #E3F2FD;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}
.coupon-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}
.coupon-status.active { background: #E8F5E9; color: #2E7D32; }
.coupon-status.used { background: #ECEFF1; color: #607D8B; }
.coupon-status.expired { background: #FFEBEE; color: #C62828; }
.coupon-status.soon { background: #FFF3E0; color: #E65100; }

.ar-card {
  width: 400px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.ar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.ar-instructions {
  background: #F3E5F5;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: #6A1B9A;
  line-height: 1.7;
  margin-bottom: 14px;
}
.ar-frames {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ar-frame {
  background: #fff;
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.ar-frame:hover { border-color: #BA68C8; }
.ar-frame.active {
  border-color: #8E24AA;
  background: #F3E5F5;
  transform: scale(1.05);
}
.ar-frame img {
  width: 100%;
  height: 80px;
  object-fit: contain;
}
.ar-frame-name {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}
.ar-stage {
  text-align: center;
}
.ar-frame-preview {
  background: #F3E5F5;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.ar-frame-preview img {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
}
.ar-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}
.ar-input-btn {
  flex: 1;
  padding: 14px;
  background: #8E24AA;
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.ar-input-btn.secondary {
  background: #BDBDBD;
}
.ar-result img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ar-result-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.ar-result-actions .btn { flex: 1; }
.ar-result-tip {
  color: #666;
  font-size: 12px;
  margin-top: 6px;
}
.ar-progress {
  padding: 30px;
  text-align: center;
  color: #666;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #E1BEE7;
  border-top-color: #8E24AA;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== v0.8 AR 按位置选 logo ===== */
.ar-point-list {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 12px;
}
.ar-point {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background .12s;
}
.ar-point:last-child { border-bottom: none; }
.ar-point:hover { background: #F3E5F5; }
.ar-point.active { background: #F3E5F5; border-left: 3px solid #8E24AA; }
.ar-point-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 2px solid;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #fff;
}
.ar-point-info { flex: 1; min-width: 0; }
.ar-point-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ar-point-meta {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ar-point-dist { color: #1565C0; font-weight: 600; }
.ar-point-logo { color: #6A1B9A; }
.ar-point-footer {
  display: flex;
  gap: 8px;
}
.ar-choosen-point {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #F3E5F5;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}
.ar-change-point-btn, .ar-change-logo-btn {
  margin-left: auto;
  background: #fff;
  border: 1px solid #BA68C8;
  color: #6A1B9A;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ar-change-logo-btn {
  margin: 0 0 12px 0;
  width: 100%;
  padding: 10px;
  background: #F3E5F5;
  font-weight: 600;
}
.ar-logo-tag {
  text-align: center;
  padding: 8px 12px;
  background: #E8F5E9;
  color: #2E7D32;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 600;
}
