:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-50: #f0f5ff;
  --success: #16a34a;
  --success-light: #f0fdf4;
  --warning: #ea580c;
  --warning-light: #fff7ed;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #4b5563;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --bg: #f8fafc;

  --surface: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.03);
  --shadow: 0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);

  --sticky-top: 90px;
  --z-sticky: 100;
  --z-dropdown: 120;
  --z-overlay: 150;
  --z-map-overlay: 200;
  --z-poster: 300;
  --z-modal: 500;
  --z-toast: 9999;
}
* {
  margin:0; padding:0; box-sizing:border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  background: #f0f2f5;
  display: flex; justify-content: center; align-items: flex-start;
  min-height: 100vh; padding: 16px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
.phone-frame {
  width: 390px; max-width: 100%; background: var(--surface);
  border-radius: 36px;
  box-shadow: 0 20px 60px -12px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.04);
  overflow: hidden; height: 100vh; max-height: 860px;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
@media (max-height: 900px) { .phone-frame { height: calc(100vh - 24px); border-radius: 28px; } }
@media (max-height: 750px) { .phone-frame { height: calc(100vh - 12px); border-radius: 20px; } }
/* .status-bar 已移除 */
.content {
  padding: 12px 14px; display: flex; flex-direction: column; gap: 2px;
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: clip;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  position: relative;
}
.content::-webkit-scrollbar { width: 3px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

/* ── 详情页头部（白底） ── */
.detail-header { padding: 4px 0 6px; }
.detail-header-row { display: flex; align-items: center; gap: 10px; }
.detail-header-info { flex: 1; min-width: 0; }
.detail-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  cursor: pointer; letter-spacing: 0.3px;
  padding: 2px 4px; margin: -2px -4px; border-radius: 6px;
  transition: background var(--transition);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.detail-title:hover { background: rgba(0,0,0,0.04); }
.detail-dates {
  font-size: 12px; color: var(--text-muted);
  cursor: pointer; padding: 2px 4px; margin: -2px -4px;
  border-radius: 6px; transition: background var(--transition);
}
.detail-dates:hover { background: rgba(0,0,0,0.04); }
.detail-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 编辑滑动开关 */
.edit-toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  user-select: none; flex-shrink: 0; -webkit-tap-highlight-color: transparent;
}
.edit-toggle-label {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  transition: color var(--transition);
}
.edit-toggle.active .edit-toggle-label { color: var(--primary); }
.edit-toggle-switch {
  width: 44px; height: 26px; border-radius: 13px;
  background: #d1d5db; position: relative;
  transition: background 0.25s;
}
.edit-toggle-knob {
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.edit-toggle.active .edit-toggle-switch { background: var(--primary); }
.edit-toggle.active .edit-toggle-knob { transform: translateX(18px); }

/* 详情页 header 白底 */
#detailTopBar { background: var(--surface); }

/* 三点按钮 */
.more-btn {
  width: 32px; height: 32px; border: none;
  background: transparent; font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); line-height: 1;
  transition: background 0.15s; padding: 0;
}
.more-btn:active { background: var(--bg); }

/* 三点菜单 */
.more-dropdown { position: relative; }
.more-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 16px; border: none;
  background: transparent; font-size: 13px; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.1s;
}
.more-menu-item:active { background: var(--bg); }
/* ── Tab 栏（独立一行） ── */
.tab-bar { padding: 8px 0 0; }
.pill-tabs-full {
  width: 100%; flex: 1;
}
.pill-group.pill-tabs-full {
  border-radius: 0; padding: 0; gap: 0;
  box-shadow: none; background: transparent;
  border-bottom: 2px solid var(--border-light);
}
.pill-tabs-full .pill-tab { flex: 1; text-align: center; }

/* ── 胶囊导航栏 ── */
.top-bar { position: sticky; top: -12px; z-index: var(--z-sticky); background: var(--bg); padding: 12px 0 6px; }
.top-bar .trip-header { border-radius: var(--radius) var(--radius) 12px 12px; margin-top: 0; }
.pill-group {
  display: flex; align-items: center; gap: 2px;
  background: var(--bg); border-radius: 22px; padding: 3px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
  flex: 1;
}
.pill-tab {
  flex:1; text-align:center; padding:10px 4px;
  font-size:13px; font-weight:500; color:var(--text-secondary);
  cursor:pointer; border:none; background:transparent;
  transition: all var(--transition); white-space: nowrap;
  position: relative;
}
.pill-tab:hover { color: var(--text); }
.pill-tab.active {
  color: var(--primary); font-weight: 600;
}
.pill-tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%; height: 2.5px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.pill-tab.active::after {
  transform: scaleX(1);
}
/* ── 总览统计 ── */
.overview-stats {
  display:flex; background: var(--surface);
  border-radius: var(--radius); padding: 14px 12px;
  justify-content:space-around; flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.stat-block { text-align:center; }
.stat-value { font-size:18px; font-weight:700; color: var(--primary); }
.stat-label { font-size:10px; color: var(--text-muted); margin-top: 1px; }

/* ── 总览日卡片 ── */
.overview-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.overview-section:hover { box-shadow: var(--shadow-md); }
.section-title {
  font-weight: 600; font-size: 15px; color: var(--text);
  padding-bottom: 10px; border-bottom: 1px solid var(--border-light);
  margin-bottom: 10px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.day-collapse { overflow: hidden; }
.day-collapse.collapsed { display: none; }
.editing .day-collapse { overflow: visible; }

/* ── 路线概览卡片 ── */
.route-flow-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 14px; margin-top: 8px;
  box-shadow: var(--shadow);
  display: none;
}
.route-flow-text {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.8; overflow-wrap: break-word;
}
.title-text { transition: color var(--transition); }
.title-text:hover { color: var(--primary); }
.day-dec-btns { display: none; gap: 4px; }
.editing .day-dec-btns { display: flex; }
.day-dec-btns button {
  width: 44px; height: 44px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 12px;
  cursor: pointer; font-size: 16px; color: var(--text-secondary);
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.day-dec-btns button:hover:not(:disabled) { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.day-dec-btns button:active:not(:disabled) { transform: scale(0.9); }
.day-dec-btns button:disabled { opacity: 0.3; cursor: default; }
.day-delete-btn { display: none; background: none; border: none; color: var(--danger); font-size: 16px; cursor: pointer; padding: 2px 4px; border-radius: 6px; transition: all var(--transition); }
.editing .day-delete-btn { display: inline-block; }
.day-delete-btn:hover { background: var(--danger-light); }
.day-delete-btn:active { transform: scale(0.85); }

/* ── 停靠点行（总览用） ── */
.stop-row { display: flex; flex-direction: column; padding: 7px 0; }
.stop-main { display: flex; align-items: center; gap: 10px; width: 100%; }
.stop-dot {
  width: 10px; height: 10px; background: var(--primary);
  border-radius: 50%; flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--primary-light);
}
.stop-dot.start {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}
.stop-dot.end {
  background: var(--warning);
  box-shadow: 0 0 0 3px var(--warning-light);
}
.stop-name-sm { font-size: 14px; color: var(--text); font-weight: 500; cursor: pointer; transition: color var(--transition); }
.stop-name-sm:hover { color: var(--primary); }
.stop-detail-sm { flex: 1; min-width: 0; }
.stop-address-sm { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.overview-segment { font-size: 12px; color: var(--warning); margin-left: 18px; padding: 3px 0; font-weight: 500; }
.day-summary-sm {
  font-size: 12px; color: var(--success); margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--border); font-weight: 500;
}

/* ── 添加按钮 ── */
.add-stop-inline, .add-day-inline {
  display: none; margin-top: 10px;
  background: #dbeafe; color: var(--primary);
  border: 1.5px solid var(--primary); border-radius: var(--radius-xs);
  padding: 10px; text-align: center; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.add-stop-inline:hover, .add-day-inline:hover { background: #bfdbfe; }
.add-stop-inline:active, .add-day-inline:active { transform: scale(0.97); }
.editing .add-stop-inline, .editing .add-day-inline { display: block; }

/* ── 编辑按钮组 ── */
.edit-btn-group { display: none; justify-content: flex-end; gap: 4px; margin-top: 8px; }
.editing .edit-btn-group { display: flex; flex-wrap: nowrap; align-items: center; }
.edit-btn-group button {
  width: 32px; height: 32px; min-width: 32px; border: 1px solid var(--border);
  background: var(--surface); border-radius: 8px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition);
  padding: 0; line-height: 1;
}
.edit-btn-group button:hover:not(:disabled) {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary);
}
.edit-btn-group button:active:not(:disabled) { transform: scale(0.9); }
.edit-btn-group button:disabled { opacity: 0.3; cursor: default; }

/* ── 更多菜单 ── */
.more-wrap { position: relative; }
.more-menu {
  display: none; position: absolute; right: 0; top: 100%; z-index: var(--z-sticky);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 140px; padding: 4px; margin-top: 4px;
}
.more-menu.show { display: block; }
.more-menu.up { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; }
.more-menu .more-item {
  display: flex; align-items: center; gap: 6px;
  width: 100%; height: auto; min-width: auto;
  padding: 10px 12px; border: none; background: none;
  font-size: 13px; color: var(--text); cursor: pointer;
  border-radius: 6px; transition: background var(--transition);
  white-space: nowrap; text-align: left; justify-content: flex-start;
}
.more-menu .more-item:hover { background: var(--primary-light); color: var(--primary); }
.more-menu .more-item:active { transform: scale(0.97); }
.more-menu .more-item:disabled { opacity: 0.3; cursor: default; }
.more-menu .more-item:disabled:hover { background: none; color: var(--text); }

/* ── 日程视图 ── */
.stops-title { font-weight: 600; font-size: 14px; color: var(--text); padding: 4px 0 0; margin-bottom: 4px; }
.day-stats {
  display: flex; justify-content: space-around;
  background: var(--surface); border-radius: var(--radius);
  padding: 8px 6px; margin-bottom: 6px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}
.day-stat-item {
  text-align: center; display: flex; flex-direction: column; gap: 1px;
  flex: 1;
}
.day-stat-value { font-size: 15px; font-weight: 700; color: var(--text); }
.day-stat-label { font-size: 10px; color: var(--text-muted); }
.day-nav {
  display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: var(--sticky-top, 90px); z-index: calc(var(--z-sticky) - 1);
  background: var(--bg); padding: 4px 0 2px;
  margin: 0 -14px; padding-left: 14px; padding-right: 14px;
}
.day-grid {
  display: flex; gap: 8px; padding: 2px 0 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.day-grid::-webkit-scrollbar { display: none; }
.day-btn {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 8px 14px; min-width: 60px;
  border: 1.5px solid var(--border); background: var(--surface);
  border-radius: 20px; cursor: pointer;
  transition: all var(--transition); scroll-snap-align: start;
}
.day-btn:active { transform: scale(0.95); }
.day-btn.active {
  background: var(--primary); border-color: var(--primary);
  box-shadow: 0 3px 12px rgba(37,99,235,0.25);
}
.day-btn .d-num { font-size: 13px; font-weight: 700; color: var(--text); }
.day-btn.active .d-num { color: #fff; }
.day-btn .d-date { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.day-btn.active .d-date { color: rgba(255,255,255,0.75); }
.day-grid-add {
  flex-shrink: 0; width: 48px; aspect-ratio: 1;
  border: 2px dashed var(--border); background: transparent; border-radius: 16px;
  cursor: pointer; font-size: 22px; color: var(--text-muted);
  display: none; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.editing .day-grid-add { display: flex; }
.day-grid-add:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

.day-edit-bar { display: flex; gap: 6px; padding: 6px 0; }
.day-edit-bar button {
  flex: 1; padding: 6px 0; border: 1px solid var(--border);
  background: var(--surface); border-radius: var(--radius-sm);
  font-size: 14px; cursor: pointer; color: var(--text);
  transition: all var(--transition);
}
.day-edit-bar button:active { background: var(--bg); }
.day-edit-bar button:disabled { opacity: 0.35; }

.day-progress { height: 3px; background: var(--border-light); border-radius: 2px; margin: 0; overflow: hidden; }
.day-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1); width: 0%; }

/* ── 停靠点列表 ── */
.stop-list { display:flex; flex-direction:column; gap:6px; }
.stop-item {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 14px 16px;
  display:flex; flex-direction:column; gap:8px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.stop-item:hover { box-shadow: var(--shadow); border-color: var(--border); }
.stop-item:active { transform: scale(0.98); background: var(--bg); }
.stop-row-main { display:flex; align-items:center; gap:12px; }
.stop-index {
  width:32px; height:32px; min-width: 32px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 10px; display:flex; align-items:center;
  justify-content:center; font-weight:700; font-size:14px; flex-shrink:0;
}
.stop-index.start {
  background: var(--success-light); color: var(--success);
}
.stop-index.end {
  background: var(--warning-light); color: var(--warning);
}
.stop-detail { flex:1; min-width:0; }
.stop-name { font-weight:600; font-size:15px; color:var(--text); cursor: pointer; transition: color var(--transition); user-select: none; }
.stop-name:hover { color: var(--primary); }
.stop-name:active { color: var(--primary); opacity: 0.7; }
.stop-address { font-size:12px; color:var(--text-secondary); margin-top:3px; }
.stop-elev { margin-top: 3px; }
.nav-stop-btn {
  width: 34px; height: 34px; min-width: 34px; flex-shrink: 0;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--primary);
}
.nav-stop-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.nav-stop-btn:active { transform: scale(0.92); background: var(--primary); color: #fff; }
.editing .nav-stop-btn { display: none; }
.editing .stop-row-main { align-items: flex-start; }
.editing .stop-item .edit-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 0;
  flex-shrink: 0;
}

.editing .overview-section .stop-main { align-items: flex-start; }
.editing .overview-section .edit-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 0;
  flex-shrink: 0;
}

.elev-badge {
  display: inline-block; vertical-align: middle;
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--primary-light); border-radius: 6px;
  padding: 2px 8px; white-space: nowrap;
}
/* ── 可折叠区块标题 ── */
.section-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; cursor: pointer; user-select: none;
  border-radius: 10px; transition: background 0.15s ease;
}
.section-toggle:hover { background: #f1f5f9; }
.section-toggle:active { background: #e2e8f0; }
.section-toggle .toggle-arrow {
  font-size: 14px; transition: transform 0.25s ease;
  color: var(--text-muted);
}
.section-toggle.collapsed .toggle-arrow { transform: rotate(0deg); }
.section-toggle:not(.collapsed) .toggle-arrow { transform: rotate(180deg); }

.elevation-chart,
.overview-days-wrapper {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.elevation-chart.collapsed,
.overview-days-wrapper.collapsed {
  box-shadow: var(--shadow-sm);
}

/* ── 路段 ── */
.segment { display:flex; align-items:center; gap:10px; padding:2px 4px; margin-left:24px; }
.segment-line { width:2px; height:22px; background: var(--border); border-radius: 1px; margin-left:14px; }
.segment-info { font-size:12px; color: var(--warning); display:flex; gap:20px; font-weight:500; }

/* ── 按钮 ── */
.btn {
  flex:1; padding:12px; border-radius: var(--radius-xs);
  border:none; font-size:14px; font-weight:600; cursor:pointer;
  text-align:center; transition: all var(--transition);
  letter-spacing: 0.3px;
}
.btn-primary {
  background: var(--primary); color:white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.btn-primary:active { transform: scale(0.97); background: var(--primary-dark); }
.btn-outline {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline:active { transform: scale(0.97); background: var(--bg); }

/* ── 空状态 ── */
.empty-state {
  text-align: center; padding: 48px 28px; color: var(--text-muted);
  font-size: 13px; line-height: 1.8;
}
.empty-icon {
  font-size: 44px; margin-bottom: 14px; opacity: 0.55;
  display: block;
}
.empty-title {
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.empty-desc {
  font-size: 12px; color: var(--text-muted); margin-bottom: 18px;
}
.empty-cta {
  display: inline-block; padding: 10px 24px;
  background: var(--primary); color: white;
  border-radius: 20px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: none;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.empty-cta:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.empty-cta:active { transform: scale(0.97); }

/* ── 待定清单 ── */
.pending-header { display:flex; justify-content:space-between; align-items:center; padding: 0; }
.pending-title { font-weight: 600; font-size: 15px; color: var(--text); }
.pending-count { font-size: 12px; color: var(--text-muted); }
.pending-list { display:flex; flex-direction:column; gap:6px; margin-top: 10px; }
.pending-item {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius-sm); padding: 14px;
  display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.pending-item:hover { box-shadow: var(--shadow); }
.pending-item:active { transform: scale(0.98); background: var(--bg); }
.pending-detail { flex:1; min-width:0; }
.editing .pending-item .edit-btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 0;
}

/* ── 地图 ── */
.map-wrapper { position: relative; margin-top: 6px; flex-shrink: 0; }
.map-box {
  height: 140px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  position: relative; z-index: 0;
}
/* ── 地图标签 ── */
.map-label {
  position: absolute; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 5px; pointer-events: none;
  background: rgba(255,255,255,0.9); color: #1e293b;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.map-expand-btn {
  position: absolute; top: 8px; right: 8px; z-index: 10;
  width: 44px; height: 44px; border-radius: 12px;
  border: none; background: rgba(255,255,255,0.95);
  font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.map-expand-btn:hover { background: white; color: var(--primary); transform: scale(1.1); }
.map-expand-btn:active { transform: scale(0.92); background: var(--primary-light); }
.elevation-expand-btn {
  position: absolute; top: 38px; right: 8px; z-index: 10;
  width: 44px; height: 44px; border-radius: 12px;
  border: none; background: rgba(255,255,255,0.95);
  font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.elevation-expand-btn:hover { background: white; color: var(--primary); transform: scale(1.1); }
.elevation-expand-btn:active { transform: scale(0.92); background: var(--primary-light); }
.map-label-toggle-btn {
  position: absolute; top: 8px; right: 58px; z-index: 10;
  width: 44px; height: 44px; border-radius: 12px;
  border: none; background: rgba(255,255,255,0.95);
  font-size: 16px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.map-label-toggle-btn:hover { background: white; color: var(--primary); }
.map-label-toggle-btn:active { transform: scale(0.92); }
.map-label-toggle-btn.off { opacity: 0.5; }
.hide-labels .map-label { display: none !important; }
.map-layers-btn {
  position: absolute; top: 8px; right: 110px; z-index: 10;
  width: 44px; height: 44px; border-radius: 12px;
  border: none; background: rgba(255,255,255,0.95);
  font-size: 18px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.map-layers-btn:hover { background: white; color: var(--primary); transform: scale(1.1); }
.map-layers-btn:active { transform: scale(0.92); background: var(--primary-light); }

/* ── 图层面板 ── */
.layers-panel-body {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 60vh; overflow-y: auto; padding-bottom: 8px;
}
.layers-section { padding: 8px 0; }
.layers-section + .layers-section { border-top: 1px solid var(--border-light); }
.layers-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.layer-radio-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  cursor: pointer; transition: background 0.15s;
  font-size: 14px; color: var(--text);
}
.layer-radio-row:hover { background: var(--bg); }
.layer-radio-row .radio-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.layer-radio-row .radio-dot::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); transform: scale(0);
  transition: transform 0.2s;
}
.layer-radio-row.active .radio-dot { border-color: var(--primary); }
.layer-radio-row.active .radio-dot::after { transform: scale(1); }
.layer-radio-row .radio-label { flex: 1; }
.layer-radio-row .radio-hint { font-size: 12px; color: var(--text-muted); }

.layer-toggle-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 10px;
}
.layer-toggle-row:hover { background: var(--bg); }
.layer-toggle-name {
  flex: 1; font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.layer-toggle-switch {
  width: 44px; height: 26px; border-radius: 13px;
  background: #d1d5db; cursor: pointer; position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.layer-toggle-switch.on { background: var(--primary); }
.layer-toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: white;
  transition: left 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.layer-toggle-switch.on::after { left: 21px; }

.layer-slider-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 12px 8px;
}
.layer-slider {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, var(--primary-light), var(--primary));
  border-radius: 2px; outline: none;
}
.layer-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; border: 2px solid var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15); cursor: pointer;
}
.layer-opacity-val { width: 36px; text-align: right; font-size: 12px; color: var(--text-secondary); flex-shrink: 0; }

.layer-action-row {
  display: flex; gap: 8px; padding: 4px 12px;
}
.layer-action-row button {
  flex: 1; padding: 8px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 13px; cursor: pointer;
  color: var(--text); transition: all var(--transition);
}
.layer-action-row button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.layer-action-row button.scan { font-weight: 600; }

.layers-close-btn {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: var(--bg); font-size: 15px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer;
  transition: all var(--transition);
}
.layers-close-btn:hover { background: var(--border-light); color: var(--text); }

.layers-empty {
  text-align: center; padding: 16px; font-size: 13px; color: var(--text-muted);
}
.layers-coord-note {
  font-size: 12px; color: var(--text-muted); padding: 4px 12px;
  line-height: 1.4;
}

/* ── 全屏地图 ── */
.fs-map-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--surface); z-index: var(--z-map-overlay);
  display: none; flex-direction: column;
}
.fs-map-overlay.show { display: flex; }
.fs-map-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  background: var(--surface); border-bottom: 1px solid var(--border-light);
  flex-shrink: 0; font-size: 16px; font-weight: 600; color: var(--text);
}
.fs-map-tool-btn {
  position: static !important; box-shadow: none !important;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--bg); font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.fs-map-tool-btn:hover { background: #e2e8f0; color: var(--text); }
.fs-map-tool-btn:active { transform: scale(0.92); }
.fs-map-close {
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: var(--bg); font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-secondary);
}
.fs-map-close:hover { background: var(--danger-light); color: var(--danger); }
.fs-map-close:active { transform: scale(0.9); }
.fs-map-container { flex: 1; position: relative; }
.fs-elevation-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: var(--surface); z-index: calc(var(--z-map-overlay) + 10);
  display: none; flex-direction: column;
}
.fs-elevation-overlay.show { display: flex; }
.fs-elevation-container { flex: 1; position: relative; padding: 0; overflow: hidden; display: flex; align-items: stretch; justify-content: center; }
.fs-elevation-overlay .elevation-chart { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
.fs-elevation-close {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.35); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.fs-elevation-close:active { transform: scale(0.9); background: rgba(0,0,0,0.55); }

/* ── 添加地点覆盖层 ── */
.add-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: var(--surface); z-index: var(--z-overlay); display: none; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); }
.add-overlay.show { display: flex; }
.search-input {
  flex: 1; height: 40px; border: 1.5px solid var(--border);
  border-radius: 20px; padding: 0 16px; font-size: 14px; outline: none;
  transition: all var(--transition); background: var(--bg);
}
.search-input:focus { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-light); }
.search-btn {
  background: var(--primary); color: white; border: none;
  border-radius: 20px; padding: 0 22px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.search-btn:hover { background: var(--primary-dark); }
.search-btn:active { transform: scale(0.95); background: var(--primary-dark); }
.add-map-container { flex: 1; position: relative; }

/* ── 底部搜索抽屉 ── */
.bottom-panel {
  position: relative; background: var(--surface);
  border-top: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden;
  max-height: 80%;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.bottom-panel.dragging { transition: none; }
.panel-handle {
  width: 32px; height: 5px; background: #d1d5db; border-radius: 3px;
  margin: 6px auto; flex-shrink: 0;
  cursor: grab; touch-action: none;
}
.panel-handle:active { cursor: grabbing; }
.panel-search-header {
  padding: 6px 16px 10px; display: flex; gap: 8px; flex-shrink: 0;
}
.panel-results {
  flex: 1; overflow-y: auto; padding: 0 16px 12px; min-height: 0;
  overscroll-behavior: contain;
}
.result-item {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 10px 14px; background: var(--bg);
  border-radius: var(--radius-xs); cursor: pointer;
  border: 1.5px solid transparent; transition: all var(--transition);
}
.result-item + .result-item { margin-top: 6px; }
.result-item:hover { border-color: #cbd5e1; }
.result-item:active { background: var(--primary-light); transform: scale(0.98); }
.result-item.selected {
  border-color: var(--primary); background: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
.result-name { font-weight: 600; font-size: 14px; }
.result-address { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.confirm-bar { padding: 12px 16px; border-top: 1px solid var(--border-light); display: flex; gap: 8px; flex-shrink: 0; background: var(--bg); }
.confirm-bar .btn { flex: 1; }
.confirm-bar .btn-outline { border-color: var(--border); }
.tip-text { text-align: center; color: var(--text-muted); font-size: 13px; padding: 16px; }
.hidden { display: none !important; }
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.view-enter { animation: viewFadeIn 0.25s ease-out; }

/* ── 页面过渡动画 ── */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}
.page-slide-in { animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.page-slide-out { animation: slideOutRight 0.25s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── 加载遮罩 ── */
.loading-overlay {
  position: absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  background:rgba(0,0,0,0.75); color:white; padding:10px 20px;
  border-radius:24px; font-size:14px; z-index:20;
}

/* ── 弹窗 ── */
.modal-overlay {
  position:fixed; top:0; left:0; width:100%; height:100%;
  background:rgba(15,23,42,0.45);
  display:none; align-items:center; justify-content:center; z-index:var(--z-sticky);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: 20px; padding: 24px;
  width: 320px; max-width: 90%; display:flex; flex-direction:column; gap: 14px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  animation: slideUp 0.25s cubic-bezier(0.4,0,0.2,1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.modal input, .modal select {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; outline: none;
  transition: all var(--transition); color: var(--text);
}
.modal input:focus, .modal select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.btn-group { display:flex; gap:8px; justify-content:flex-end; margin-top: 4px; }
.btn-group .btn { flex: none; padding: 10px 20px; font-size: 14px; }
/* ── 支持作者 ── */
.donate-pay-btns { display:flex; gap:12px; justify-content:center; }
.donate-pay-btn {
  flex:1; padding:14px; border-radius:12px; border:none;
  font-size:16px; font-weight:600; cursor:pointer;
  transition: all var(--transition);
}
.donate-pay-btn.alipay { background: #e6f0ff; color: var(--primary); }
.donate-pay-btn.alipay:active { background: #b3d4ff; transform: scale(0.97); }
.donate-pay-btn.wechat { background: #e8fce8; color: #07c160; }
.donate-pay-btn.wechat:active { background: #b3f0b3; transform: scale(0.97); }

.donate-amount-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:8px; }
.donate-amount-btn {
  padding:12px 8px; border-radius:10px; border:2px solid var(--border);
  background: var(--bg); color: var(--text); font-size:18px; font-weight:700;
  cursor:pointer; transition: all var(--transition);
}
.donate-amount-btn:active { transform: scale(0.96); }
.donate-amount-btn.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.donate-custom-row { display:flex; align-items:center; gap:4px; }
.donate-yen { font-size:18px; font-weight:600; color: var(--text); }
.donate-amount-custom {
  flex:1; padding:10px 12px; border-radius:10px; border:2px solid var(--border);
  font-size:16px; text-align:center; outline:none; background: var(--bg); color: var(--text);
  transition: border-color var(--transition);
}
.donate-amount-custom:focus { border-color: var(--primary); }
.donate-confirm-btn {
  width:100%; margin-top:12px; padding:14px; border-radius:12px; border:none;
  background: var(--primary); color:#fff; font-size:16px; font-weight:600;
  cursor:pointer; transition: all var(--transition);
}
.donate-confirm-btn:active { background: var(--primary-dark); transform: scale(0.97); }
.donate-back-link {
  font-size:12px; color: var(--primary); cursor:pointer; margin-top:10px;
  display:inline-block; transition: opacity var(--transition);
}
.donate-back-link:active { opacity:0.7; }
/* ── 海报生成 ── */
.poster-overlay {
  position: fixed; top:0; left:0; width:100vw; height:100vh;
  background: rgba(0,0,0,0.85); z-index:var(--z-poster);
  display: none; flex-direction: column; align-items: center;
}
.poster-overlay.show { display: flex; }
.poster-topbar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 800px; padding: 10px 16px;
  color: white; font-size: 15px; font-weight: 600; flex-shrink: 0;
}
.poster-topbar button {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.12); color: white;
  font-size: 18px; cursor: pointer;
}
.poster-scroll {
  flex: 1; overflow: auto; display: flex; align-items: flex-start;
  justify-content: center; padding: 6px 12px 14px; width: 100%;
}
.poster-scroll::-webkit-scrollbar { display: none; }
.poster-canvas {
  width: 780px; background: #fff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 3px white;
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  flex-shrink: 0; transform-origin: top center;
}
.poster-topbar-actions { display: flex; gap: 8px; }
.poster-actions {
  padding: 10px 16px; flex-shrink: 0;
  display: flex; gap: 10px; justify-content: center;
}
.poster-actions .btn {
  padding: 10px 26px; font-size: 14px; border-radius: 22px;
}

/* ── 底部导航 ── */
.bottom-nav {
  display: flex; border-top: 1px solid var(--border-light); background: var(--surface);
  padding: 6px 0 env(safe-area-inset-bottom, 12px); flex-shrink: 0;
}
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 6px 0; color: var(--text-muted); transition: color var(--transition); }
.nav-item.active { color: var(--primary); }
.nav-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { transition: stroke 0.2s; }
.nav-label { font-size: 10px; font-weight: 500; }

/* ── 路书列表页 ── */
.list-header { padding: 16px 0 6px; background: var(--surface); }
.list-header-content { display: flex; justify-content: space-between; align-items: center; }
.list-title { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; display: flex; align-items: center; gap: 8px; }
.list-logo { flex-shrink: 0; }
.list-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.list-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 15px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text-secondary);
  transition: background 0.15s;
}
.icon-btn:active { background: var(--bg); }
.fab-add {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff;
  border: none; font-size: 26px; font-weight: 300; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
  transition: transform 0.15s, box-shadow 0.15s; flex-shrink: 0;
}
.fab-add:active { transform: scale(0.9); box-shadow: 0 2px 6px rgba(37,99,235,0.2); }

#roadbookListPage { display: none; padding: 0 0 12px; }
#roadbookListPage.show { display: block; }
#roadbookList { display: flex; flex-direction: column; gap: 14px; }
.roadbook-card {
  background: var(--surface); border-radius: 16px; border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
  display: flex; position: relative;
}
.roadbook-card:active { transform: scale(0.98); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.card-accent {
  width: 4px; flex-shrink: 0; align-self: stretch;
  border-radius: 4px 0 0 4px;
}
.card-body { padding: 12px 14px; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: 0.2px; display: flex; align-items: center; gap: 8px; }
.card-title .card-status { font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 9px; }
.card-info-row {
  display: flex; align-items: center; gap: 0;
  font-size: 12px; color: var(--text-secondary);
}
.card-info-row .info-sep {
  margin: 0 6px; color: var(--text-muted); flex-shrink: 0;
}
.card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-updated {
  font-size: 10px; color: var(--text-muted); flex-shrink: 0;
}
.card-menu-btn {
  width: 36px; height: 36px;
  background: transparent; border: none; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); flex-shrink: 0;
  transition: background 0.15s;
}
.card-menu-btn:active { background: var(--bg); }

/* ── 卡片编辑开关 ── */
.card-title-row { display: flex; align-items: center; gap: 8px; }
.card-title-row .card-title { flex: 1; min-width: 0; }
.card-toggle {
  display: flex; align-items: center; cursor: pointer;
  user-select: none; flex-shrink: 0; -webkit-tap-highlight-color: transparent;
}
.card-toggle-switch {
  width: 38px; height: 22px; border-radius: 11px;
  background: #d1d5db; position: relative;
  transition: background 0.25s;
}
.card-toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-toggle.active .card-toggle-switch { background: var(--primary); }
.card-toggle.active .card-toggle-knob { transform: translateX(16px); }

/* 编辑模式下卡片样式 */
.card-title-input {
  flex: 1; min-width: 0; font-size: 17px; font-weight: 700; color: var(--text);
  border: 1.5px solid var(--primary); border-radius: 8px; padding: 4px 8px;
  outline: none; background: var(--surface); letter-spacing: 0.2px;
}
.card-title-input:focus { box-shadow: 0 0 0 3px var(--primary-light); }
.card-date-edit {
  display: inline-flex; align-items: center; gap: 6px;
}
.card-date-edit span { font-size: 14px; flex-shrink: 0; }
.card-date-input {
  font-size: 12px; color: var(--text-secondary); border: 1.5px solid var(--border);
  border-radius: 8px; padding: 4px 8px; outline: none; background: var(--surface);
  -webkit-appearance: none; width: auto; max-width: 150px;
}
.card-date-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.card-status-edit {
  display: flex; align-items: center; gap: 8px; margin-top: 2px;
}
.card-status-edit > span { font-size: 14px; flex-shrink: 0; }
.roadbook-card.menu-open { z-index: 2; }
.roadbook-card.editing { box-shadow: 0 0 0 2px var(--primary-light), 0 1px 3px rgba(0,0,0,0.06); }
.empty-roadbook { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-roadbook .icon { font-size: 48px; margin-bottom: 12px; }
.empty-roadbook .title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-roadbook .desc { font-size: 13px; margin-bottom: 16px; }
.empty-roadbook .btn { display: inline-block; width: auto; padding: 10px 24px; }

/* ── 返回按钮 ── */
.back-btn-pill {
  width: 44px; height: 44px; border: none; background: transparent;
  cursor: pointer; color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0; flex-shrink: 0;
}

/* ── 我的页 ── */
.me-header { font-size: 26px; font-weight: 800; color: var(--text); padding: 6px 16px 16px; }
.me-menu { background: var(--surface); border-radius: var(--radius); overflow: hidden; margin: 0 14px; border: 1px solid var(--border); }
.me-menu-item { padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--border-light); }
.me-menu-item:last-child { border-bottom: none; }
.me-menu-item:active { background: var(--primary-light); }
.me-arrow { font-size: 18px; color: var(--text-muted); }

/* ── 导航选择弹窗 ── */
.nav-modal-overlay { z-index: var(--z-modal); }
.nav-modal { width: 240px; padding: 20px 16px 14px; gap: 12px; }
.nav-modal-title { font-size: 14px; font-weight: 600; color: var(--text); text-align: center; word-break: break-all; }
.nav-modal-actions { display: flex; flex-direction: column; gap: 8px; }
.nav-modal-btn {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer; text-align: center;
  transition: all var(--transition);
}
.nav-modal-btn.amap { background: var(--primary-light); color: var(--primary); }
.nav-modal-btn.amap:active { background: #dbeafe; transform: scale(0.96); }
.nav-modal-btn.baidu { background: #fef3c7; color: #d97706; }
.nav-modal-btn.baidu:active { background: #fde68a; transform: scale(0.96); }
.nav-modal-cancel {
  display: block; width: 100%; padding: 8px; border: none; background: transparent;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.nav-modal-cancel:active { color: var(--text-secondary); }

/* ── 卡片下拉菜单 ── */
.card-menu-wrap { position: relative; flex-shrink: 0; }

/* ── 列表页三点菜单 ── */
.list-menu-wrap { position: relative; flex-shrink: 0; }
.list-menu-btn { width: 42px; height: 42px; font-size: 20px; font-weight: 700; line-height: 1; border-radius: 0; border: none; background: transparent; }
.list-menu-dropdown {
  display: none; position: absolute; right: 0; top: 44px;
  background: var(--surface); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid var(--border);
  min-width: 180px; z-index: var(--z-dropdown); overflow: hidden; padding: 4px 0;
}
.list-menu-dropdown.show { display: block; }
.list-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 12px 16px; border: none;
  background: transparent; font-size: 14px; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.1s;
}
.list-menu-item:active { background: var(--bg); }
.list-menu-divider { height: 1px; background: var(--border-light); margin: 4px 12px; }
.list-menu-label {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px 6px; font-size: 14px; color: var(--text);
}
.list-menu-label svg { flex-shrink: 0; }
.list-menu-chip-row {
  display: flex; gap: 6px; padding: 0 16px 4px; flex-wrap: wrap;
}
.list-menu-chip {
  padding: 5px 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); font-size: 12px; color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
}
.list-menu-chip:active { transform: scale(0.95); }
.list-menu-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── 卡片状态标签 ── */
.card-status {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 10px;
  flex-shrink: 0;
}
.card-status.planning { background: var(--primary-light); color: var(--primary); }
.card-status.finalized { background: #fef3c7; color: #d97706; }
.card-status.completed { background: var(--success-light); color: var(--success); }
.card-status-select {
  font-size: 12px; padding: 4px 8px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); outline: none; cursor: pointer;
}
/* ── 全局焦点可见样式 ── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}
button:focus:not(:focus-visible),
[role="button"]:focus:not(:focus-visible) {
  outline: none;
}
.card-dropdown {
  display: none; position: absolute; right: 0; bottom: 100%; margin-bottom: 6px;
  background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid var(--border);
  min-width: 140px; overflow: hidden; z-index: var(--z-sticky); padding: 4px 0;
}
.card-dropdown.show { display: block; }
.card-dropdown.down {
  bottom: auto; top: 100%; margin-top: 6px; margin-bottom: 0;
}
.card-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px; border: none;
  background: transparent; font-size: 13px; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.1s;
}
.card-dropdown-item:active { background: var(--bg); }
.card-dropdown-item.danger { color: var(--danger); }

/* ── 通用底部抽屉 ── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none;
}
.sheet-overlay.show { pointer-events: auto; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,0.4);
  opacity: 0; transition: opacity 0.25s;
}
.sheet-overlay.show .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: relative; width: 100%; max-width: 420px;
  background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; gap: 12px;
}
.sheet-overlay.show .sheet-panel { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px; background: #d1d5db; border-radius: 2px;
  margin: 0 auto; flex-shrink: 0;
}
.sheet-body {
  display: flex; flex-direction: column; gap: 8px;
}
.sheet-title {
  font-size: 17px; font-weight: 700; color: var(--text);
}
.sheet-message {
  font-size: 13px; color: var(--text-secondary); line-height: 1.5;
}
.sheet-input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-xs);
  border: 1.5px solid var(--border); font-size: 15px; outline: none;
  transition: all var(--transition); color: var(--text);
}
.sheet-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.sheet-actions {
  display: flex; gap: 8px; flex-shrink: 0;
}
.sheet-actions button {
  flex: 1; padding: 12px; border-radius: var(--radius-xs);
  border: none; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.sheet-btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
.sheet-btn-primary:active { background: var(--primary-dark); transform: scale(0.97); }
.sheet-btn-secondary {
  background: var(--bg); color: var(--text-secondary);
}
.sheet-btn-secondary:active { background: var(--border); transform: scale(0.97); }
.sheet-btn-danger {
  background: var(--danger-light); color: var(--danger);
}
.sheet-btn-danger:active { background: #fde8e8; transform: scale(0.97); }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  z-index: var(--z-toast);
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px; line-height: 1.45;
  box-shadow: var(--shadow-lg);
  pointer-events: auto; cursor: pointer;
  animation: toastIn 0.3s cubic-bezier(0.4,0,0.2,1);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 100%; word-break: break-word;
}
.toast.toast-out { opacity: 0; transform: translateY(12px) scale(0.97); }

.toast--success { background: var(--success-light); color: var(--success); border: 1px solid var(--success); }
.toast--error   { background: var(--danger-light);  color: var(--danger);  border: 1px solid var(--danger); }
.toast--warning { background: var(--warning-light); color: var(--warning); border: 1px solid var(--warning); }
.toast--info    { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary); }

.toast__icon { font-size: 16px; flex-shrink: 0; line-height: 1.45; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── 探索页 ── */
#explorePage {
  position: relative; flex: 1; overflow: hidden; background: #e8ecf1;
  margin: -12px -14px;
}
.explore-map-wrapper {
  position: absolute; inset: 0; z-index: 0;
}
.explore-map-box {
  height: 100% !important; border-radius: 0; box-shadow: none; border: none;
}
.explore-locate-btn {
  position: absolute; bottom: 16px; right: 16px; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: all var(--transition);
}
.explore-locate-btn:active { transform: scale(0.92); background: var(--primary-light); color: var(--primary); }
.explore-layers-btn {
  position: absolute; top: 8px; right: 8px;
}
.explore-search-bar {
  position: absolute; top: 8px; left: 8px; right: 56px; z-index: 10;
}
.explore-search-inner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.97);
  border-radius: 22px; padding: 0 14px; height: 42px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  border: 1.5px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.explore-search-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15), 0 2px 8px rgba(0,0,0,0.12);
}
.explore-search-input {
  flex: 1; border: none; background: transparent;
  font-size: 14px; color: var(--text); outline: none; height: 100%;
}
.explore-search-input::placeholder { color: var(--text-muted); font-size: 13px; }
.explore-search-clear {
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: #d1d5db; color: #fff; font-size: 12px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background var(--transition);
}
.explore-search-clear:active { background: #94a3b8; }
.explore-autocomplete {
  position: absolute; top: 48px; left: 0; right: 0;
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  max-height: 240px; overflow-y: auto; overflow-x: hidden; z-index: 15;
}
.explore-autocomplete-item {
  padding: 12px 16px; font-size: 14px; color: var(--text); cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-autocomplete-item:last-child { border-bottom: none; }
.explore-autocomplete-item:active { background: var(--primary-light); }

/* 分类胶囊（共享用于探索页和收藏夹） */
.explore-categories {
  position: absolute; top: 58px; left: 8px; right: 8px; z-index: 10;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0; -webkit-overflow-scrolling: touch;
}
.explore-categories::-webkit-scrollbar { display: none; }
.explore-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 16px;
  border: 1.5px solid var(--border);
  background: rgba(255,255,255,0.94);
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.explore-chip:active { transform: scale(0.95); }
.explore-chip.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.25);
}
/* 底部抽屉 */
.explore-bottom-sheet {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  display: flex; flex-direction: column;
  max-height: 60vh; min-height: 80px; z-index: 10;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.explore-bottom-sheet.collapsed {
  transform: translateY(calc(100% - 80px));
}
.explore-bottom-sheet.dragging {
  transition: none !important;
}
.explore-sheet-header {
  padding: 4px 16px 8px; display: flex;
  justify-content: space-between; align-items: center; flex-shrink: 0;
}
.explore-result-count { font-size: 14px; font-weight: 600; color: var(--text); }
.explore-sheet-hint { font-size: 11px; color: var(--text-muted); }
.explore-results {
  flex: 1; overflow-y: auto; padding: 0 14px 14px; min-height: 0;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px;
}

/* POI 结果卡片 */
.explore-poi-item {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; background: var(--bg);
  border-radius: var(--radius-xs); border: 1.5px solid transparent;
  transition: all var(--transition);
}
.explore-poi-item:active { border-color: var(--primary); background: var(--primary-light); }
.explore-poi-info { flex: 1; min-width: 0; cursor: pointer; }
.explore-poi-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-poi-address {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.explore-poi-distance {
  font-size: 11px; color: var(--primary); font-weight: 500; margin-top: 2px;
}
.explore-poi-heart {
  width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0; padding: 0;
}
.explore-poi-heart:active { transform: scale(0.9); }
.explore-poi-heart--active { color: var(--danger); }
.explore-poi-add-btn {
  width: 32px; height: 32px; min-width: 32px; border-radius: 50%;
  border: none; background: var(--primary); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); flex-shrink: 0;
}
.explore-poi-add-btn:active { transform: scale(0.9); background: var(--primary-dark); }

.explore-add-day-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.explore-add-day-btn:active { background: var(--primary-light); border-color: var(--primary); }

/* ── 添加到路书选择器 ── */
.add-select-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; color: var(--text);
  cursor: pointer; transition: all var(--transition);
}
.add-select-row:active { background: var(--primary-light); border-color: var(--primary); }
.add-select-row.expanded { border-color: var(--primary); border-radius: var(--radius-xs) var(--radius-xs) 0 0; }
.add-select-label { color: var(--text-muted); font-size: 13px; flex-shrink: 0; }
.add-select-value { flex: 1; font-weight: 500; text-align: right; }
.add-select-arrow { color: var(--text-muted); font-size: 12px; transition: transform 0.2s; flex-shrink: 0; }
.add-select-row.expanded .add-select-arrow { transform: rotate(180deg); }

.add-select-options {
  display: none; flex-direction: column;
  border: 1.5px solid var(--primary); border-top: none;
  border-radius: 0 0 var(--radius-xs) var(--radius-xs);
  overflow: hidden; margin-top: -1px;
}
.add-select-options.show { display: flex; }
.add-select-option {
  padding: 11px 14px; font-size: 14px; color: var(--text);
  cursor: pointer; transition: background var(--transition);
  border-top: 1px solid var(--border); background: var(--bg);
}
.add-select-option:hover { background: var(--primary-light); }
.add-select-option:active { background: var(--primary-light); }
.add-select-option.selected { color: var(--primary); font-weight: 600; }

.add-select-divider {
  height: 8px; background: transparent;
}

.explore-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75); color: #fff; padding: 10px 22px;
  border-radius: 24px; font-size: 14px; z-index: 20;
}

/* ── 探索页收藏详情卡片 ── */
.explore-fav-detail { padding: 8px 4px; }
.explore-fav-detail-name {
  font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px;
}
.explore-fav-detail-address {
  font-size: 13px; color: var(--text-muted); margin-bottom: 6px;
}
.explore-fav-detail-note {
  font-size: 13px; color: var(--text-secondary); background: var(--bg);
  padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
}
.explore-fav-detail-meta {
  font-size: 12px; color: var(--text-muted); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.explore-fav-detail-folder {
  background: var(--primary-light, #e8f0fe); color: var(--primary);
  padding: 2px 8px; border-radius: 10px; font-size: 11px;
}
.explore-fav-detail-actions {
  display: flex; gap: 8px;
}

/* ── 收藏夹详情页（地图背景 + 拖拽抽屉） ── */
#favoritesDetail {
  display: flex; flex-direction: column; height: 100%; position: relative;
  margin: -12px -14px;
}
#favoritesDetail.show { display: flex; }

/* 全屏地图背景 */
.favorites-map-wrapper {
  position: absolute; inset: 0; z-index: 0;
}
.favorites-map-box {
  height: 100% !important; border-radius: 0; box-shadow: none; border: none;
}
.favorites-locate-btn {
  position: absolute; bottom: calc(40vh + 16px); right: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--surface); color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: bottom 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* 浮动顶栏 */
.favorites-topbar-float {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0));
  flex-shrink: 0;
}
.favorites-topbar-float .favorites-title { font-size: 18px; font-weight: 700; color: var(--text); flex: 1; }

/* ── 可拖拽底部抽屉 ── */
.favorites-drawer {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  display: flex; flex-direction: column;
  z-index: 10; overflow: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.favorites-drawer.dragging { transition: none; }
.favorites-drawer.snap-collapsed { height: 80px !important; }
.favorites-drawer.snap-half { height: 40vh; }
.favorites-drawer.snap-full { height: 85vh; }

.favorites-drawer-handle {
  padding: 8px 0 4px; cursor: grab; flex-shrink: 0;
  touch-action: none; display: flex; justify-content: center;
}
.favorites-drawer-handle:active { cursor: grabbing; }

/* 折叠态摘要 */
.favorites-collapsed-summary {
  display: none; padding: 0 16px 8px; align-items: center; justify-content: space-between;
}
.favorites-drawer.snap-collapsed .favorites-collapsed-summary { display: flex; }
.favorites-drawer.snap-collapsed .favorites-search-bar,
.favorites-drawer.snap-collapsed .favorites-folder-row,
.favorites-drawer.snap-collapsed .favorites-toolbar,
.favorites-drawer.snap-collapsed .favorites-drawer-list { display: none; }
.favorites-collapsed-text { font-size: 15px; font-weight: 600; color: var(--text); }
.favorites-collapsed-drag-hint { font-size: 11px; color: var(--text-muted); }

/* 搜索栏 */
.favorites-search-bar { padding: 0 14px 8px; flex-shrink: 0; }
.favorites-search-inner {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 0 12px;
}
.favorites-search-input {
  flex: 1; height: 36px; border: none; outline: none;
  background: transparent; font-size: 14px; color: var(--text);
}
.favorites-search-input::placeholder { color: var(--text-muted); }
.favorites-search-clear {
  width: 24px; height: 24px; border: none; background: none;
  color: var(--text-muted); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* 文件夹芯片行 */
.favorites-folder-row {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px 8px; flex-shrink: 0;
}
.favorites-folder-chips {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 2px 0;
}
.favorites-folder-chips::-webkit-scrollbar { display: none; }
.favorites-folder-chip {
  padding: 6px 14px; border-radius: 16px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 12px; font-weight: 500;
  color: var(--text-secondary); white-space: nowrap; cursor: pointer;
  transition: all var(--transition); flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
}
.favorites-folder-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.favorites-folder-chip .folder-count { font-size: 10px; opacity: 0.8; }
.favorites-folder-add-btn {
  width: 28px; height: 28px; min-width: 28px; border-radius: 50%;
  border: 1.5px dashed var(--border); background: transparent;
  color: var(--text-muted); font-size: 18px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--transition);
}
.favorites-folder-add-btn:active { border-color: var(--primary); color: var(--primary); }

/* 文件夹长按菜单 */
.fav-folder-context {
  position: absolute; background: var(--surface); border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); padding: 4px; z-index: 20;
  display: none; flex-direction: column; min-width: 100px;
}
.fav-folder-context.show { display: flex; }
.fav-folder-context button {
  padding: 10px 16px; border: none; background: none;
  font-size: 13px; color: var(--text); cursor: pointer; text-align: left;
  white-space: nowrap; border-radius: 8px;
}
.fav-folder-context button:active { background: var(--bg); }
.fav-folder-context .danger { color: var(--danger); }

/* 工具栏 */
.favorites-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 8px; flex-shrink: 0;
}
.favorites-sort-btn {
  font-size: 11px; color: var(--text-muted); background: var(--bg);
  border: 1px solid var(--border-light); border-radius: 12px;
  padding: 5px 10px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}

/* 抽屉内列表 */
.favorites-drawer-list {
  flex: 1; overflow-y: auto; padding: 0 14px 14px; min-height: 0;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 8px;
}

/* 空状态 */
.favorites-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; text-align: center;
}
.favorites-empty-icon { color: var(--text-muted); margin-bottom: 12px; }
.favorites-empty-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.favorites-empty-desc { font-size: 13px; color: var(--text-muted); }

/* 收藏卡片 */
.favorites-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; background: var(--surface); border-radius: var(--radius-sm);
  border: 1px solid var(--border-light); transition: all var(--transition);
}
.favorites-card:active { border-color: var(--primary); }
.favorites-card.highlighted {
  border-color: var(--warning); background: var(--warning-light);
  animation: favPulse 2s ease-in-out;
}
@keyframes favPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
  50% { box-shadow: 0 0 0 4px rgba(245,158,11,0.25); }
}
.favorites-card-check {
  width: 24px; height: 24px; min-width: 24px; border-radius: 50%;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
}
.favorites-card-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.favorites-card-body { flex: 1; min-width: 0; }
.favorites-card-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.favorites-card-address {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.favorites-card-note {
  font-size: 11px; color: var(--warning); margin-top: 4px;
  background: var(--warning-light); padding: 2px 8px; border-radius: 6px;
  display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.favorites-card-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.favorites-card-folder-tag {
  font-size: 10px; color: var(--primary); background: var(--primary-light, #eff6ff);
  padding: 1px 6px; border-radius: 8px; display: inline-block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px;
}
.favorites-card-more {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition);
}
.favorites-card-more:active { background: var(--bg); }

.favorites-card-popup {
  position: fixed; z-index: var(--z-toast);
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 4px 0; min-width: 140px;
}
.favorites-card-popup-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 14px; color: var(--text);
  cursor: pointer; transition: background var(--transition);
}
.favorites-card-popup-item:active { background: var(--bg); }
.favorites-card-popup-divider {
  height: 1px; background: var(--border-light); margin: 4px 0;
}
.favorites-card-popup-delete { color: var(--danger); }

/* 批量管理 */
.favorites-batch-bar {
  padding: 8px 14px; gap: 8px; align-items: center;
  border-top: 1px solid var(--border-light); background: var(--surface); flex-shrink: 0;
  display: none;
}
.favorites-batch-bar.show { display: flex; }
.favorites-batch-btn {
  width: 28px; height: 28px; min-width: 28px; border-radius: 50%;
  border: 1.5px dashed var(--border); background: transparent;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--transition);
}
.favorites-batch-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); border-style: solid; }
.favorites-batch-btn:active { transform: scale(0.92); }

.fav-note-input {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-xs); font-size: 14px; color: var(--text);
  outline: none; margin-top: 8px; transition: border-color var(--transition);
}
.fav-note-input:focus { border-color: var(--primary); }

/* 收藏夹徽标 */
.me-badge {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 600;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* 导入导出隐藏 file input */
#favImportFile { display: none; }

/* btn-sm 小按钮 */
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-xs); }

/* ── 打印样式 ── */
@media print {
  .phone-frame { border: none; box-shadow: none; max-height: none; height: auto; }
  .top-bar, .day-nav, .edit-toggle-btn, .add-stop-inline, .stop-actions,
  .bottom-nav, .detail-toolbar, .export-menu, .more-menu, .menu-drop,
  .map-container, .elevation-chart, .map-expand-btn, .map-label-toggle-btn,
  .map-layers-btn, .confirm-bar, .search-bar, .add-day-btn, .add-pending-btn,
  .section-toggle, .explore-search-bar, .explore-categories, .favorites-toolbar,
  .favorites-drawer-handle, .sheet-overlay, .modal-overlay, .toast-container,
  .btn, button, .list-actions { display: none !important; }
  body { background: white; }
  .content { overflow: visible; max-height: none; }
  .stop-card { break-inside: avoid; page-break-inside: avoid; }
  h1, h2, h3, h4 { break-after: avoid; }
}
/* ── 更新提示圆点 ── */
.update-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  margin-left: 2px;
  vertical-align: super;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--menu-bg,#fff);
}
