:root {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-subtle: #f5f5f7;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: #d2d2d7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --accent: #0f766e;
  --accent-hover: #0d645d;
  --accent-soft: rgba(15, 118, 110, 0.08);
  --accent-ring: 0 0 0 4px rgba(15, 118, 110, 0.22);
  --day1: #e85d3f;
  --day2: #0284c7;
  --pool: #64748b;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #d70015;
  --danger-soft: rgba(215, 0, 21, 0.08);
  --nav: #0f766e;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 全站隐藏原生滚动条轨道与上下滑箭头，保留完整滚轮、触控与键盘滚动能力 */
html,
body,
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:is(.header, .edit-workbench, .exec-stage, .modal-backdrop) .fw-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}

:is(.mode-btn, .hover-btn, .leg-mode-btn, .exec-mode-pill) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dropdown-item:focus-visible,
:is(.header, .edit-workbench, .modal-backdrop) :is(button, a, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dropdown-item:focus-visible {
  outline-offset: -2px;
}

.exec-complete-icon { margin-bottom: 12px; color: #86868b; }

/* ================= 极简顶栏（Apple 毛玻璃三区均衡） ================= */
.header {
  height: 56px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 45;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  padding: 1px;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-mark .fw-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.trip-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.trip-title-box h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.16s ease;
}

.trip-title-box h1:hover {
  color: var(--accent);
}

.readonly-pill {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(15, 118, 110, 0.18);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 980px;
  display: none;
}

body.readonly-mode .readonly-pill {
  display: inline-flex;
}

.mode-switch {
  display: inline-flex;
  background: #f5f5f7;
  padding: 3px;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  gap: 2px;
  flex-shrink: 0;
}

.mode-btn {
  padding: 6px 15px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mode-btn:hover {
  color: var(--text);
}

.mode-btn.active {
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 16px;
  border-radius: 980px;
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.22);
}

.btn-outline.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.btn-dark {
  background: var(--accent);
  color: #ffffff;
}

.btn-dark:hover {
  background: var(--accent-hover);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: #f5f5f7;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: #ebebf0;
  color: var(--text);
}

.btn-sm {
  min-height: 30px;
  padding: 4px 11px;
  font-size: 12px;
  border-radius: 980px;
}

/* 「⋯ 更多」下拉菜单 */
.more-menu-wrap {
  position: relative;
}

.more-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 332px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 8px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: none;
  z-index: 60;
}

.more-dropdown.open {
  display: block;
}

.dropdown-item {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  min-height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text);
  transition: background 0.14s ease;
}

.dropdown-item:hover {
  background: #f5f5f7;
}

.dropdown-item > .fw-icon {
  margin-top: 2px;
  color: var(--text-2);
}

.dropdown-item > div {
  flex: 1;
  min-width: 0;
}

.dropdown-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.dropdown-item small {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
  margin-top: 3px;
}

.dropdown-item.muted strong {
  color: var(--text-2);
  font-weight: 500;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 8px;
}

.dropdown-group-title { padding: 4px 12px 6px; font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.01em; }
.dropdown-advanced > summary { list-style: none; cursor: pointer; }
.dropdown-advanced > summary::-webkit-details-marker { display: none; }
.dropdown-advanced .more-chevron { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 4px; transition: transform 160ms ease; }
.dropdown-advanced[open] .more-chevron { transform: rotate(90deg); }
.dropdown-advanced[open] > summary { margin-bottom: 8px; }
.dropdown-item-danger strong, .dropdown-item-danger > .fw-icon { color: var(--danger); }
.dropdown-item:disabled { cursor: not-allowed; }
.dropdown-item:disabled strong, .dropdown-item:disabled > .fw-icon { color: var(--text-3); }

/* ================= 模式一：轻盈两栏桌面排线（Apple 极简中性画布） ================= */
.edit-workbench {
  display: grid;
  grid-template-columns: 1fr 440px;
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  overflow: hidden;
}

body.mode-execute .edit-workbench {
  display: none;
}

/* 左侧：宽阔干净的地图 */
.col-map {
  position: relative;
  background: #eaedf2;
  overflow: hidden;
  user-select: none;
  touch-action: none;
}

#map-viewport {
  position: absolute;
  inset: 0;
  cursor: grab;
  overflow: hidden;
  background: radial-gradient(circle at 40% 45%, #f2f5f8 0%, #e4e9f0 100%);
}

#map-viewport.dragging {
  cursor: grabbing;
}

#map-viewport.pick-cursor {
  cursor: crosshair;
}

.map-tile-layer,
.map-svg-layer,
.map-markers-layer {
  position: absolute;
  inset: 0;
}

.map-tile-layer,
.map-svg-layer {
  pointer-events: none;
}

.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  opacity: 0;
  transition: opacity 0.2s ease;
  filter: saturate(0.84) contrast(0.97);
}

.map-tile.loaded {
  opacity: 1;
}

.map-markers-layer {
  pointer-events: none;
}

/* 当前选中天的清晰大圆点 */
.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.map-pin:hover,
.map-pin.selected {
  z-index: 30;
  transform: translate(-50%, -50%) scale(1.14);
}

.map-pin-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.map-pin-tag {
  position: absolute;
  left: 50%;
  top: 32px;
  transform: translateX(-50%);
  background: rgba(29, 29, 31, 0.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 980px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.map-pin.label-top .map-pin-tag {
  top: auto;
  bottom: 32px;
}

.map-pin.label-left .map-pin-tag {
  top: 50%;
  left: auto;
  right: 32px;
  transform: translateY(-50%);
}

.map-pin.label-right .map-pin-tag {
  top: 50%;
  left: 32px;
  transform: translateY(-50%);
}

/* 非当前天的点位退居背景：极简小圆点，悬停才出名字，画面瞬间清爽 */
.map-pin.muted {
  z-index: 4;
  opacity: 0.62;
}

.map-pin.muted .map-pin-dot {
  width: 14px;
  height: 14px;
  border-width: 2px;
  font-size: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.map-pin.muted .map-pin-tag {
  display: none;
  top: 18px;
}

.map-pin.muted:hover {
  opacity: 1;
  z-index: 25;
}

.map-pin.muted:hover .map-pin-tag {
  display: block;
}

/* 地图上只在超远 (>8km) 时浮出醒目提醒，平时零气泡干扰 */
.seg-warn-pill {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--danger);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(215, 0, 21, 0.28);
  white-space: nowrap;
  z-index: 15;
}

.pick-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  background: rgba(29, 29, 31, 0.9);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: #ffffff;
  padding: 8px 10px 8px 16px;
  border-radius: 980px;
  font-size: 12.5px;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
}

.pick-banner.visible {
  display: flex;
}

.batch-popover {
  position: absolute;
  z-index: 32;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  width: 260px;
  box-shadow: var(--shadow-lg);
  display: none;
}

.batch-popover.visible {
  display: block;
}

.batch-popover input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
  background: #ffffff;
  margin: 8px 0 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.batch-popover input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--accent-ring);
}

.map-controls {
  position: absolute;
  right: 16px;
  bottom: 18px;
  z-index: 16;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-ctrl {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.map-ctrl:hover {
  background: #ffffff;
  box-shadow: var(--shadow-hover);
}

.map-ctrl:active {
  transform: scale(0.96);
}

.map-footer-pill {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 16;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}

/* 右侧：轻盈的行程清单面板 */
.col-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--border);
  overflow: hidden;
}

.sheet-header {
  padding: 14px 18px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sheet-tabs {
  display: flex;
  gap: 3px;
  background: #f5f5f7;
  padding: 3px;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow-x: auto;
}

.sheet-tab {
  flex: 1 0 auto;
  min-width: 78px;
  padding: 7px 12px;
  border-radius: 980px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  border: 1.5px solid transparent;
}

.sheet-tab:hover {
  color: var(--text);
}

.sheet-tab.active {
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sheet-tab.drop-target {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tab-badge {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.sheet-meta-bar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-2);
}

.inline-time-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-weight: 500;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 4px 10px;
  border-radius: 980px;
}

.inline-time-picker input {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  width: 64px;
  cursor: pointer;
}

.inline-time-picker input:focus {
  outline: none;
}

.drop-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 18px 40px;
}

.empty-drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}

/* 极简呼吸感点位卡（Apple 极简中性卡片，悬停轻抬浮现操作） */
.spot-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: var(--shadow);
  cursor: grab;
  transition: transform 220ms cubic-bezier(0.25, 1, 0.5, 1), box-shadow 220ms cubic-bezier(0.25, 1, 0.5, 1), border-color 180ms ease;
  position: relative;
}

.spot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 0, 0, 0.13);
  box-shadow: var(--shadow-hover);
}

.spot-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1.5px var(--accent), var(--shadow-hover);
}

.spot-card.dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.spot-card.drag-insert-before {
  box-shadow: 0 -3px 0 0 var(--accent), var(--shadow);
}

.spot-card.status-done {
  opacity: 0.58;
}

.spot-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spot-thumb-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.spot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.spot-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.spot-thumb-empty:hover {
  color: var(--text);
  background: #ebebf0;
}

.spot-cat-tile {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 20px;
  cursor: pointer;
}

.spot-cat-tile span {
  font-size: 10px;
  font-weight: 700;
}

.exec-place-banner {
  border-radius: 16px;
  padding: 20px 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 14px;
}

.exec-place-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.anno-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  border: 1.5px solid #fff;
}

.spot-info {
  flex: 1;
  min-width: 0;
}

.spot-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
}

.spot-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.spot-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-micro {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 只有一行轻盈状态，绝不堆满边框盒 */
.spot-quiet-meta {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-ok {
  color: var(--accent);
  font-weight: 600;
}

.meta-early {
  color: #9a5b13;
  background: rgba(180, 83, 9, 0.1);
  padding: 2px 8px;
  border-radius: 980px;
  font-weight: 600;
}

.meta-conflict {
  color: var(--danger);
  background: var(--danger-soft);
  padding: 2px 8px;
  border-radius: 980px;
  font-weight: 600;
}

/* 悬停才浮现的轻操作条（平时隐身，保持画面干净） */
.card-hover-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 3px;
  border-radius: 980px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.spot-card:hover .card-hover-bar,
.spot-card.selected .card-hover-bar {
  opacity: 1;
  pointer-events: auto;
}

.hover-btn {
  padding: 4px 9px;
  border-radius: 980px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.14s ease, color 0.14s ease;
}

.hover-btn:hover {
  background: #f5f5f7;
  color: var(--text);
}

.hover-btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.hover-btn.primary:hover {
  background: var(--accent-hover);
}

/* 站点之间的安静连接线 */
.leg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 3px 6px 3px 26px;
  padding: 5px 10px;
  border-left: 1.5px dashed rgba(0, 0, 0, 0.14);
  font-size: 11.5px;
  color: var(--text-3);
}

.leg-row.over-distance {
  border-left: 2px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 0 10px 10px 0;
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 6px;
}

.leg-override-btn {
  font-size: 11px;
  color: var(--text-3);
  opacity: 0;
  transition: opacity 0.14s ease, color 0.14s ease;
}

.leg-row:hover .leg-override-btn {
  opacity: 1;
}

.leg-override-btn:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ========== 地图顶部极简搜索框 & 候选下拉 ========== */
.map-search-wrap {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 26;
  width: min(376px, calc(100% - 28px));
}

.map-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 5px 6px 5px 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.map-search-box:focus-within {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: var(--accent-ring), 0 8px 24px rgba(0, 0, 0, 0.09);
}

.search-icon {
  font-size: 13.5px;
  color: var(--text-2);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.map-search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 5px 0;
}

.map-search-box input::placeholder {
  color: var(--text-3);
}

.search-clear-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  color: var(--text-3);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, color 0.14s ease;
}

.search-clear-btn.visible {
  display: inline-flex;
}

.search-clear-btn:hover {
  background: #f5f5f7;
  color: var(--text);
}

.search-go-btn {
  padding: 6px 13px;
  border-radius: 980px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 0.16s ease;
}

.search-go-btn:hover {
  background: var(--accent-hover);
}

.map-search-results {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-height: 310px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  padding: 6px;
}

.map-search-results.open {
  display: block;
}

.search-res-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.search-res-item:hover {
  background: #f5f5f7;
}

.search-res-info {
  flex: 1;
  min-width: 0;
}

.search-res-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-res-addr {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-res-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.search-empty-tip {
  padding: 16px 12px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.search-empty-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.engine-status-note {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f5f5f7;
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.engine-status-note.is-active {
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.2);
  color: var(--accent);
}

/* 搜索预览临时定位钉 */
.search-preview-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  z-index: 28;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.search-preview-pin .pin-head {
  background: rgba(29, 29, 31, 0.92);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 980px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
  white-space: nowrap;
}

.search-preview-pin .pin-stem {
  width: 2.5px;
  height: 10px;
  background: #1d1d1f;
}

.search-preview-pin .pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.26);
}

/* 弹窗内部搜索 */
.modal-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-search-row input {
  flex: 1;
}

.modal-search-results {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
  max-height: 170px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: none;
  padding: 5px;
}

.modal-search-results.open {
  display: block;
}

/* ========== 段间出行方式切换条 ========== */
.leg-row {
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
}

.leg-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.leg-meta-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.leg-summary-tag {
  font-size: 10.5px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 980px;
  font-weight: 600;
}

.leg-mode-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.leg-mode-btn {
  padding: 3px 8px;
  border-radius: 980px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.leg-mode-btn:hover {
  background: #ebebf0;
  color: var(--text);
}

.leg-mode-btn.active {
  background: #ffffff;
  color: var(--accent);
  font-weight: 600;
  border-color: rgba(15, 118, 110, 0.22);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 手机执行端：轻量出行方式切换胶囊 */
.exec-mode-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.exec-mode-pill {
  padding: 6px 4px;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
  text-align: center;
  transition: all 0.14s ease;
}

.exec-mode-pill.active {
  background: rgba(22, 119, 255, 0.22);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.45);
}

/* ================= 视图切换：欢迎页 vs 工作区 ================= */
body.view-welcome .header,
body.view-welcome .edit-workbench,
body.view-welcome .exec-stage {
  display: none !important;
}

body.view-workspace .welcome-screen {
  display: none !important;
}

/* 返回行程库按钮 */
.back-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 4px;
  border-radius: 980px;
  transition: background 0.16s ease, color 0.16s ease;
}

.back-home-btn:hover {
  background: #f5f5f7;
}

.back-home-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.back-home-btn:hover .back-home-label {
  color: var(--text);
}

/* 欢迎页设计独立维护于 welcome.css。 */

/* ================= 模式二：手机执行模式（Apple 极简 · 当前任务优先） ================= */
.exec-stage {
  --exec-ink: #1d1d1f;
  --exec-muted: #6e6e73;
  --exec-accent: #0f766e;
  --exec-accent-hover: #0d645d;
  --exec-soft: #edf5f3;
  --exec-bg: #f5f5f7;
  --exec-line: #e5e5e8;
  --exec-danger: #d70015;
  --exec-danger-soft: rgba(215, 0, 21, 0.08);
  display: none;
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  overflow: hidden;
  background: var(--exec-bg);
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
.exec-stage [hidden] { display: none !important; }
.exec-stage button:disabled { opacity: 0.45; cursor: not-allowed; }
.exec-stage :is(button, a):focus-visible { outline: 2px solid var(--exec-accent); outline-offset: 2px; }

body.mode-execute .exec-stage {
  display: flex;
}

.phone-shell {
  width: min(420px, 100%);
  height: min(840px, 100%);
  background: #ffffff;
  color: var(--exec-ink);
  border-radius: 28px;
  border: 1px solid #d9d9de;
  box-shadow: 0 20px 56px -32px rgba(29, 29, 31, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.exec-head {
  padding: 12px 20px 10px;
  background: #ffffff;
  border-bottom: 1px solid #ebebee;
  flex: 0 0 auto;
}

.exec-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.exec-day-switch {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 980px;
  background: var(--exec-bg);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.exec-day-switch::-webkit-scrollbar { display: none; }

.exec-day-switch button {
  min-height: 36px;
  min-width: 60px;
  padding: 6px 12px;
  border-radius: 980px;
  color: var(--exec-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.exec-day-switch button:hover { color: var(--exec-ink); }
.exec-day-switch button[aria-pressed="true"] {
  background: #ffffff;
  color: var(--exec-accent);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.exec-progress-copy {
  color: var(--exec-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.exec-progress-track {
  height: 3px;
  margin-top: 12px;
  border-radius: 980px;
  background: #e9eded;
  overflow: hidden;
}

.exec-progress-fill {
  height: 100%;
  background: var(--exec-accent);
  border-radius: 980px;
  transition: width 220ms cubic-bezier(0.25, 1, 0.5, 1);
}

/* Official / Travel Officer Route Certification Progress Strip in Execution Header */
.exec-cert-bar {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--exec-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.exec-cert-bar.is-blue {
  background: rgba(0, 113, 227, 0.07);
  border-color: rgba(0, 113, 227, 0.16);
}
.exec-cert-bar.is-red {
  background: rgba(215, 0, 21, 0.06);
  border-color: rgba(215, 0, 21, 0.14);
}
.exec-cert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.exec-cert-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--exec-ink);
  min-width: 0;
}
.exec-cert-title .fw-v-mark { width: 15px; height: 15px; vertical-align: 0; }
.exec-cert-hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--exec-muted);
  white-space: nowrap;
}
.exec-cert-hint.is-warn { color: var(--exec-danger); }
.exec-cert-track {
  height: 4px;
  margin-top: 7px;
  border-radius: 980px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.exec-cert-fill {
  height: 100%;
  border-radius: 980px;
  transition: width 240ms cubic-bezier(0.25, 1, 0.5, 1);
}
.exec-cert-bar.is-blue .exec-cert-fill { background: #0071e3; }
.exec-cert-bar.is-red .exec-cert-fill { background: #d70015; }
.exec-cert-submit-btn {
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 980px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 160ms ease, transform 120ms ease;
}
.exec-cert-submit-btn:active:not(:disabled) { transform: scale(0.97); }
.exec-cert-bar.is-blue .exec-cert-submit-btn { background: #0071e3; }
.exec-cert-bar.is-blue .exec-cert-submit-btn:hover:not(:disabled) { background: #0062c4; }
.exec-cert-bar.is-red .exec-cert-submit-btn { background: #d70015; }
.exec-cert-bar.is-red .exec-cert-submit-btn:hover:not(:disabled) { background: #b80012; }
.exec-cert-link-btn {
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 980px;
  background: #ffffff;
  color: var(--exec-ink);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
.exec-cert-link-btn:hover { background: var(--exec-bg); }

.exec-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
}

.exec-focus-inner {
  padding: 22px 20px 24px;
  transition: transform 220ms ease, opacity 220ms ease;
}
.exec-focus-inner.slide-out {
  transform: translateX(-36px);
  opacity: 0;
}

.exec-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--exec-muted);
  margin-bottom: 10px;
}

.exec-location-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 500;
}
.exec-location-name > span { overflow-wrap: anywhere; }
.exec-location-name .fw-icon { width: 16px; height: 16px; flex-basis: 16px; color: var(--exec-accent); }

.exec-tiny-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--exec-accent);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 0;
  white-space: nowrap;
}
.exec-tiny-btn:hover { color: var(--exec-accent-hover); }
.exec-tiny-btn .fw-icon { width: 15px; height: 15px; flex-basis: 15px; }

.exec-status-tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--exec-soft);
  color: var(--exec-accent);
  font-size: 12px;
  font-weight: 500;
}

.exec-task-title {
  font-size: 24px;
  line-height: 1.38;
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--exec-ink);
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}

.exec-task-sub {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--exec-muted);
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.exec-time-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.exec-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--exec-muted);
  background: var(--exec-bg);
  border-radius: 9px;
  padding: 7px 10px;
}
.exec-time-chip .fw-icon { width: 15px; height: 15px; flex-basis: 15px; vertical-align: 0; }
.exec-time-chip.is-light { background: var(--exec-soft); color: #18645e; }
.exec-time-chip.is-warn { background: var(--exec-danger-soft); color: var(--exec-danger); }

.exec-sample-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--exec-muted);
  margin-bottom: 8px;
}
.exec-sample-label > span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--exec-accent);
  font-weight: 500;
}
.exec-sample-label .fw-icon { width: 15px; height: 15px; flex-basis: 15px; vertical-align: 0; }

.exec-sample-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #e5e5e9;
  border-radius: 16px;
  overflow: hidden;
  background: var(--exec-bg);
  text-align: left;
  cursor: zoom-in;
  transition: border-color 160ms ease;
}
.exec-sample-button:hover { border-color: #91b5ad; }

.exec-photo-stage {
  position: relative;
  height: 196px;
  width: 100%;
  display: block;
  background: #eef1f1;
}
.exec-photo-stage img,
.exec-photo-stage svg.anno-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.exec-photo-stage svg.anno-svg { pointer-events: none; }

.exec-no-photo {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--exec-bg);
  border-radius: 16px;
  margin-bottom: 16px;
}
.exec-no-photo .fw-icon { width: 24px; height: 24px; flex-basis: 24px; color: var(--exec-accent); }
.exec-no-photo strong { display: block; font-size: 15px; font-weight: 600; color: var(--exec-ink); }
.exec-no-photo p { font-size: 12.5px; color: var(--exec-muted); margin: 3px 0 0; }

.exec-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--exec-muted);
  font-size: 13px;
  line-height: 1.65;
  margin-top: 14px;
}
.exec-info-row .fw-icon { width: 16px; height: 16px; flex-basis: 16px; margin-top: 2px; color: var(--exec-accent); }

/* Optional Field Verification Evidence (GPS distance + field photo) */
.exec-evidence-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--exec-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.exec-evidence-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--exec-ink);
  margin-bottom: 8px;
}
.exec-evidence-head span:last-child { font-weight: 400; color: var(--exec-muted); }
.exec-evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exec-evidence-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 980px;
  background: #ffffff;
  border: 1px solid #d9d9df;
  color: var(--exec-ink);
  font-size: 12.5px;
  font-weight: 500;
}
.exec-evidence-btn:hover:not(:disabled) { border-color: var(--exec-accent); color: var(--exec-accent); }
.exec-evidence-btn.is-ok { background: var(--exec-soft); border-color: #9ec5bc; color: var(--exec-accent); }
.exec-evidence-btn .fw-icon { width: 14px; height: 14px; flex-basis: 14px; vertical-align: 0; }
.exec-evidence-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--exec-muted);
  line-height: 1.5;
}
.exec-evidence-photo {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.exec-evidence-photo img {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.exec-evidence-photo span { flex: 1; font-size: 12px; color: var(--exec-accent); font-weight: 500; }
.exec-evidence-photo button { font-size: 12px; color: var(--exec-muted); min-height: 32px; padding: 0 6px; }
.exec-evidence-photo button:hover { color: var(--exec-danger); }

.solar-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 980px;
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.exec-details-btn {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--exec-line);
  color: var(--exec-muted);
  font-size: 13px;
  font-weight: 500;
}
.exec-details-btn:hover { color: var(--exec-accent); }
.exec-details-btn .fw-icon { width: 16px; height: 16px; flex-basis: 16px; }

.exec-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 100%;
  padding: 40px 24px;
}
.exec-complete-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--exec-soft);
  color: var(--exec-accent);
  margin-bottom: 18px;
}
.exec-complete-icon .fw-icon { width: 26px; height: 26px; flex-basis: 26px; vertical-align: 0; }
.exec-complete h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 10px; color: var(--exec-ink); }
.exec-complete p { font-size: 14px; color: var(--exec-muted); line-height: 1.65; margin: 0 0 24px; }
.exec-complete-certs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.exec-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.exec-reset-btn {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  background: var(--exec-accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}
.exec-reset-btn:hover { background: var(--exec-accent-hover); }
.exec-reset-btn.is-blue { background: #0071e3; }
.exec-reset-btn.is-blue:hover:not(:disabled) { background: #0062c4; }
.exec-reset-btn.is-red { background: #d70015; }
.exec-reset-btn.is-red:hover:not(:disabled) { background: #b80012; }
.exec-reset-btn.is-secondary {
  background: var(--exec-bg);
  color: var(--exec-ink);
  border: 1px solid #d9d9df;
}
.exec-reset-btn.is-secondary:hover { background: #ebebef; }

/* Persistent Single-Hand Bottom Dock */
.exec-dock {
  flex: 0 0 auto;
  padding: 8px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--exec-line);
  background: rgba(255, 255, 255, 0.98);
}

.exec-next-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.exec-next-button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 0;
}
.exec-next-button > span { min-width: 0; flex: 1; }
.exec-next-button small { font-size: 11px; display: block; color: var(--exec-muted); }
.exec-next-button strong { font-size: 12.5px; font-weight: 500; color: var(--exec-ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exec-next-button .fw-icon { width: 16px; height: 16px; flex-basis: 16px; color: var(--exec-muted); }

.exec-pool-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--exec-accent);
  padding: 8px 0;
}
.exec-pool-button:hover { color: var(--exec-accent-hover); }
.exec-pool-button .fw-icon { width: 16px; height: 16px; flex-basis: 16px; vertical-align: 0; }

.exec-dock-buttons {
  display: grid;
  grid-template-columns: 52px 1fr 1fr;
  gap: 8px;
}
.exec-dock-buttons.is-readonly {
  grid-template-columns: 1fr;
}
.exec-dock-buttons button {
  height: 50px;
  min-width: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 500;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.exec-dock-buttons button:active:not(:disabled) { transform: scale(0.985); }
.exec-dock-buttons .fw-icon { width: 18px; height: 18px; flex-basis: 18px; vertical-align: 0; }

.exec-skip-btn { color: var(--exec-muted); font-size: 13px !important; }
.exec-skip-btn:hover:not(:disabled) { background: var(--exec-bg); color: var(--exec-ink); }
.exec-nav-btn { background: var(--exec-accent); color: #ffffff; }
.exec-nav-btn:hover:not(:disabled) { background: var(--exec-accent-hover); }
.exec-done-btn { background: var(--exec-bg); color: var(--exec-ink); border: 1px solid #d9d9df; }
.exec-done-btn:hover:not(:disabled) { background: #ebebef; }

/* In-Phone Undo Toast */
.exec-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 136px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  background: #243b39;
  color: #ffffff;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.exec-toast span { overflow-wrap: anywhere; }
.exec-toast button {
  min-height: 36px;
  min-width: 44px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-shrink: 0;
}

/* Light Apple Execution Modal Sheet (Route List, Standby Pool, Navigation, Details) */
.exec-sheet {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #dedee2;
  border-radius: 24px;
  background: #ffffff;
  color: #1d1d1f;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.22);
  overflow: auto;
}
.exec-sheet::backdrop {
  background: rgba(23, 46, 43, 0.36);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.exec-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
  border-bottom: 1px solid #ececef;
}
.exec-sheet-head h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.exec-sheet-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f5f5f7;
  color: #6e6e73;
}
.exec-sheet-close:hover { background: #ebebf0; color: #1d1d1f; }
.exec-sheet-close .fw-icon { width: 16px; height: 16px; flex-basis: 16px; vertical-align: 0; }
.exec-sheet-body { padding: 18px 20px 22px; }

.exec-sheet-intro { font-size: 13px; color: #6e6e73; line-height: 1.7; margin: 0 0 16px; }
.exec-sheet-info { font-size: 14px; line-height: 1.75; color: #6e6e73; margin: 0 0 14px; overflow-wrap: anywhere; }
.exec-sheet-info strong { color: #1d1d1f; font-weight: 600; }
.exec-sheet-list { display: grid; gap: 10px; }

.exec-stop-select {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  text-align: left;
  padding: 14px;
  border: 1px solid #e0e0e5;
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 160ms ease, background 160ms ease;
}
.exec-stop-select:hover { border-color: #90b6ad; background: #fafcfb; }
.exec-stop-select[aria-pressed="true"] { border-color: #0f766e; background: #f6fbfa; }
.exec-stop-num {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid #d6dfdc;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  background: #ffffff;
}
.exec-stop-select[aria-pressed="true"] .exec-stop-num { background: #0f766e; color: #ffffff; border-color: #0f766e; }
.exec-stop-num.is-done { background: #edf5f3; color: #0f766e; border-color: #b5d4ce; }
.exec-stop-num .fw-icon { width: 15px; height: 15px; flex-basis: 15px; vertical-align: 0; }
.exec-stop-copy { flex: 1; min-width: 0; }
.exec-stop-copy strong { display: block; font-size: 14px; font-weight: 600; color: #1d1d1f; overflow-wrap: anywhere; }
.exec-stop-copy small { display: block; font-size: 12px; color: #6e6e73; margin-top: 3px; }
.exec-stop-state { font-size: 11.5px; color: #6e6e73; white-space: nowrap; padding-top: 4px; }

.exec-sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e0e0e5;
  border-radius: 14px;
}
.exec-sheet-row > div { min-width: 0; }
.exec-sheet-row strong { display: block; font-size: 14px; font-weight: 600; color: #1d1d1f; overflow-wrap: anywhere; }
.exec-sheet-row small { display: block; font-size: 12px; color: #6e6e73; margin-top: 4px; }
.exec-sheet-row :is(button, a) {
  min-height: 40px;
  min-width: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 10px;
  background: #edf5f3;
  color: #0f766e;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
}
.exec-sheet-row :is(button, a):hover { background: #dcece8; }

.exec-mode-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}
.exec-mode-options button {
  min-width: 68px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #d2d2d7;
  border-radius: 980px;
  color: #6e6e73;
  font-size: 13px;
  font-weight: 500;
}
.exec-mode-options button[aria-pressed="true"] {
  background: #edf5f3;
  border-color: #7ca79d;
  color: #0f766e;
  font-weight: 600;
}
.exec-mode-options .fw-icon { width: 15px; height: 15px; flex-basis: 15px; vertical-align: 0; }

.exec-sheet-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.exec-sheet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.exec-sheet-link:hover { background: #ebebf0; }
.exec-sheet-link.is-primary { background: #0f766e; color: #ffffff; }
.exec-sheet-link.is-primary:hover { background: #0d645d; }
.exec-sheet-sublinks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #ececef;
  font-size: 13px;
}
.exec-sheet-sublinks :is(a, button) {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  color: #0f766e;
  font-weight: 500;
  text-decoration: none;
}
.exec-sheet-sublinks :is(a, button):hover { text-decoration: underline; text-underline-offset: 4px; }

/* ================= 弹窗与灯箱（Apple 极简圆角与表单） ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(29, 29, 31, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open { display: flex; }

.modal-box {
  width: min(640px, 100%);
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.2);
  padding: 24px;
}

.modal-box.narrow { width: min(440px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.modal-head h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field { margin-bottom: 14px; }

.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--text);
  background: #ffffff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-field textarea {
  min-height: 68px;
  resize: vertical;
}

.form-field :is(input, textarea, select):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--accent-ring);
}

.light-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.light-opt {
  padding: 6px 12px;
  border-radius: 980px;
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 500;
  background: #ffffff;
  color: var(--text-2);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.light-opt:hover {
  background: #f5f5f7;
  color: var(--text);
}

.light-opt.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.coord-readonly-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  background: #f5f5f7;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 8px 6px 12px;
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.annotator-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f5f5f7;
  margin-bottom: 16px;
}

.annotator-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.annotator-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.annotator-canvas-box {
  position: relative;
  width: 100%;
  min-height: 190px;
  max-height: 340px;
  background: #1d1d1f;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.annotator-canvas-box img {
  max-width: 100%;
  max-height: 340px;
  display: block;
  user-select: none;
  pointer-events: none;
}

#anno-svg-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.paste-drop-zone {
  padding: 26px 16px;
  text-align: center;
  color: #a1a1aa;
  font-size: 12.5px;
  line-height: 1.6;
}

.photo-thumbs-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.mini-thumb {
  width: 56px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
}

.mini-thumb.active { border-color: var(--accent); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(10, 10, 12, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.lightbox.open { display: flex; }

.lightbox-stage {
  position: relative;
  max-width: 94vw;
  max-height: 76vh;
  display: inline-block;
}

.lightbox-stage img {
  max-width: 94vw;
  max-height: 76vh;
  display: block;
  border-radius: 12px;
}

.lightbox-stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 18px;
}

.toast {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 150;
  background: rgba(29, 29, 31, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 980px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .dropdown-advanced .more-chevron,
  .spot-card,
  .btn,
  .mode-btn,
  .map-ctrl,
  .map-pin,
  .toast,
  .exec-focus-inner,
  .exec-progress-fill,
  .exec-cert-fill,
  .fw-liquid-pill,
  .community-like.is-popping .fw-icon {
    transition: none !important;
    animation: none !important;
  }
  .spot-card:hover {
    transform: none;
  }
}

/* ================= 流体胶囊滑块 & 弹性水感按钮动效 ================= */
.fw-liquid-track {
  position: relative;
  isolation: isolate;
}

.fw-liquid-track.has-liquid-pill > button {
  position: relative;
  z-index: 1;
}

.fw-liquid-track.has-liquid-pill > button[aria-pressed="true"],
.fw-liquid-track.has-liquid-pill > button[aria-selected="true"],
.fw-liquid-track.has-liquid-pill > button.active {
  background: transparent !important;
  box-shadow: none !important;
}

.fw-liquid-track.has-liquid-pill > button:active {
  transform: scale(0.965);
}

.fw-liquid-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 980px;
  background: #ffffff;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 0.5px 1.5px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transform-origin: center center;
  will-change: transform, width;
  opacity: 0;
}

/* 按钮按压弹簧回弹反馈（无波纹） */
:is(.welcome-button, .btn, .account-primary, .account-secondary, .exec-dock-buttons button, .exec-reset-btn, .community-filter-trigger, .community-like) {
  -webkit-tap-highlight-color: transparent;
  transition:
    background 200ms cubic-bezier(0.25, 1, 0.5, 1),
    border-color 200ms cubic-bezier(0.25, 1, 0.5, 1),
    color 200ms cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 220ms cubic-bezier(0.25, 1, 0.5, 1),
    transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

:is(.welcome-button, .btn, .account-primary, .account-secondary, .exec-dock-buttons button, .exec-reset-btn, .community-filter-trigger, .community-like):active:not(:disabled) {
  transform: scale(0.955);
  transition-duration: 90ms;
}

/* 点赞按钮弹性心跳动效 */
.community-like.is-popping .fw-icon {
  animation: fw-heart-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fw-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.3); }
  68% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@media (max-width: 900px) {
  .edit-workbench {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .col-map {
    min-height: 340px;
  }

  .exec-stage {
    padding: 0;
    background: #ffffff;
  }

  .phone-shell {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .exec-focus-inner {
    max-width: 640px;
    margin-inline: auto;
  }

  .exec-dock {
    padding-inline: max(20px, calc((100vw - 600px) / 2));
  }

  .exec-day-switch button {
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .header { padding-inline: 8px; gap: 4px; }
  .header-left { flex: 0 0 44px; }
  .header .back-home-btn { width: 44px; min-height: 44px; justify-content: center; padding: 0; }
  .header :is(.back-home-label, .trip-title-box, .workspace-button-label) { display: none; }
  .header .mode-switch { gap: 0; }
  .header .mode-btn { padding: 8px 4px; font-size: 12px; min-height: 38px; }
  .header .mode-btn .fw-icon { display: none; }
  .header-right { gap: 4px; }
  .header :is(#btn-new-spot, #btn-more-menu, .account-workspace-button) { width: 44px; height: 44px; min-width: 44px; padding: 0; }
}
