    /* ─── 工具调用：隐藏详情，只显示加载状态 ─── */
    tool-message {
      display: block !important;
    }
    tool-message > div {
      padding: 6px 12px !important;
      font-size: 13px !important;
      color: var(--color-text-muted) !important;
      background: var(--color-bg-elevated) !important;
      border: 1px solid var(--color-border-default) !important;
      border-radius: 8px !important;
    }
    tool-message > div > div.space-y-3 {
      display: none !important;
    }
    tool-message > div::after {
      content: '工具调用中...';
      font-size: 13px;
      color: var(--color-text-muted);
    }
    /* ─── 强制隐藏分享弹窗（防止被其他样式覆盖） ─── */
    #share-modal-overlay {
      display: none !important;
    }
    #share-modal-overlay.open {
      display: flex !important;
    }
    /* 覆盖 hidden 属性 */
    #share-modal-overlay.open[hidden] {
      display: flex !important;
    }

    html, body { height: 100%; font-family: var(--font-sans); }
    body { background: var(--color-bg-base); color: var(--color-text-primary); }

    /* ─── Design Tokens ──────────────────────────────────── */
    :root {
      /* Colors — Light palette */
      --color-bg-base: #ffffff;
      --color-bg-surface: #f8fafc;
      --color-bg-elevated: #f1f5f9;
      --color-bg-overlay: rgba(0, 0, 0, 0.4);
      --color-text-primary: #0f172a;
      --color-text-secondary: #475569;
      --color-text-muted: #64748b;
      --color-border-subtle: #e2e8f0;
      --color-border-default: #cbd5e1;
      --color-accent-primary: #4f8ef7;
      --color-accent-hover: #3b7ae6;
      --color-accent-subtle: #6fa3ff;
      --color-success: #22c55e;
      --color-warning: #f59e0b;
      --color-danger: #ef4444;

      /* Spacing */
      --space-xs: 4px;
      --space-sm: 8px;
      --space-md: 12px;
      --space-lg: 16px;
      --space-xl: 24px;
      --space-2xl: 32px;

      /* Radius */
      --radius-sm: 6px;
      --radius-md: 8px;
      --radius-lg: 12px;

      /* Shadows */
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
      --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

      /* Type scale */
      --text-xs: 12px;
      --text-sm: 13px;
      --text-base: 14px;
      --text-lg: 16px;
      --text-xl: 18px;
      --text-2xl: 20px;

      /* Font */
      --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    }


    /* ─── 隐藏侧边栏/导航（统一为主界面） ────────────── */
    #sidebar { display: none !important; }
    #main-content { margin-left: 0 !important; width: 100% !important; }

    #app {
      display: flex;
      flex-direction: row;
      height: 100vh;
    }
    /* 地图页面隐藏 footer */
    body:has(#page-map.active) #site-footer { display: none !important; }

    #main-content {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-width: 0;
      max-width: 100%;
      margin: 0;
      width: 100%;
    }

    .page { display: none; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
    .page.active { display: flex; }

    /* header 已从 DOM 移除，样式不再需要 */
    header h1 { font-size: var(--text-xl); font-weight: 600; }
    header span { font-size: var(--text-sm); color: var(--color-text-muted); }
    #travelers-btn {
      /* Inherits .header-action-btn base styles */
      width: auto;
      padding: 0 12px;
      font-size: var(--text-xs);
    }
    #travelers-btn:hover { background: var(--color-bg-elevated); color: var(--color-text-primary); }
    #travelers-btn.active { background: rgba(79, 142, 247, 0.1); border-color: var(--color-accent-primary); color: var(--color-accent-primary); }
    .traveler-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .traveler-row label { font-size: var(--text-sm); color: var(--color-text-secondary); }
    .traveler-row input[type="number"] {
      width: 60px;
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border-default);
      color: var(--color-text-primary);
      padding: 4px 8px;
      border-radius: var(--radius-sm);
      font-size: var(--text-sm);
      text-align: center;
    }
    .traveler-row input[type="checkbox"] {
      width: 16px;
      height: 16px;
      accent-color: var(--color-accent-primary);
    }
    #travelers-save {
      width: 100%;
      margin-top: 12px;
      padding: 8px;
      background: var(--color-accent-primary);
      color: white;
      border: none;
      border-radius: var(--radius-sm);
      font-size: var(--text-sm);
      cursor: pointer;
    }
    #travelers-save:hover { background: var(--color-accent-hover); }
    #travelers-summary {
      font-size: var(--text-xs);
      color: var(--color-text-muted);
      margin-top: 8px;
      text-align: center;
    }

    #chat-container {
      flex: 1;
      overflow: hidden;
    }

    pi-chat-panel {
      display: block;
      height: 100%;
      min-width: 0;
      max-width: 100%;
    }

    /* ── 防止 Markdown 宽内容撑开对话面板 ── */
    #map-chat-body { min-width: 0; }

    /* pi-chat-panel 全链都是 Light DOM，直接选真实标签名 */
    assistant-message,
    user-message,
    markdown-block {
      max-width: 100%;
      word-break: break-word;
      overflow-wrap: break-word;
    }

    /* 消息内容层限制溢出 */
    agent-interface .overflow-y-auto {
      min-width: 0;
      overflow-x: hidden; /* 防止横向溢出撑开父容器 */
    }
    agent-interface .max-w-3xl {
      min-width: 0;
      max-width: 100% !important; /* 覆盖 Tailwind 的 768px，适应窄面板 */
    }

    /* 表格、代码块、长链接横向滚动 */
    markdown-block .overflow-x-auto,
    assistant-message .overflow-x-auto,
    user-message .overflow-x-auto {
      display: block;
      max-width: 100%;
      overflow-x: auto;
    }
    markdown-block pre,
    assistant-message pre,
    user-message pre {
      overflow-x: auto;
      max-width: 100%;
      white-space: pre-wrap;
      word-break: break-all;
    }
    markdown-block a,
    assistant-message a,
    user-message a {
      word-break: break-all;
    }

    /* 代码块容器 */
    code-block > div {
      max-width: 100%;
    }

    /* ── 行程内容排版优化 ────────────────────────── */
    /* containment: 限制样式重算范围到消息组件内部 */
    assistant-message,
    user-message {
      contain: content;
    }

    /* 用 assistant-message 统一选中（markdown-block 在其内部） */
    assistant-message h1 { font-size: 1.3em; font-weight: 700; }
    assistant-message h2 { font-size: 1.15em; font-weight: 600; }
    assistant-message h3 { font-size: 1.05em; font-weight: 600; }
    assistant-message :is(h1, h2, h3) {
      line-height: 1.4;
      margin-top: 1.2em;
      margin-bottom: 0.5em;
    }
    assistant-message :is(h1, h2, h3):first-child {
      margin-top: 0;
    }
    assistant-message p {
      margin-top: 0.5em;
      margin-bottom: 0.5em;
      line-height: 1.7;
    }
    assistant-message :is(ul, ol) {
      padding-left: 1.5em;
      margin-top: 0.4em;
      margin-bottom: 0.4em;
    }
    assistant-message li {
      line-height: 1.7;
      margin-top: 0.25em;
      margin-bottom: 0.25em;
    }
    assistant-message table {
      font-size: 13px;
      margin-top: 0.6em;
      margin-bottom: 0.6em;
      border-collapse: collapse;
      width: 100%;
    }
    assistant-message :is(th, td) {
      padding: 6px 10px;
      border: 1px solid var(--color-border-subtle, #e5e7eb);
      text-align: left;
    }
    assistant-message th {
      background: var(--color-bg-elevated, #f3f4f6);
      font-weight: 600;
    }
    assistant-message blockquote {
      margin-top: 0.6em;
      margin-bottom: 0.6em;
      padding-left: 12px;
      border-left: 3px solid var(--color-accent, #3b82f6);
      color: var(--color-text-secondary, #6b7280);
    }

    #export-toolbar {
      display: none;
      gap: var(--space-xs);
      align-items: center;
      animation: fadeIn 0.3s ease;
    }
    #export-toolbar.visible {
      display: flex;
    }

    #lang-switcher {
      display: flex;
      gap: 2px;
      margin-left: 8px;
      background: var(--color-bg-elevated);
      border-radius: var(--radius-sm);
      padding: 2px;
    }
    .lang-btn {
      background: transparent;
      border: none;
      color: var(--color-text-muted);
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: var(--text-xs);
      transition: all 0.15s;
    }
    .lang-btn:hover { color: var(--color-text-primary); }
    .lang-btn.active { background: var(--color-border-default); color: var(--color-text-primary); }

    .export-btn {
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border-default);
      color: var(--color-text-primary);
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: var(--text-sm);
      display: flex;
      align-items: center;
      gap: 4px;
      transition: background 0.15s;
    }
    .export-btn:hover { background: var(--color-bg-elevated); color: var(--color-text-primary); }
    .export-btn:active { background: var(--color-bg-surface); }

    /* TTS 按钮播放状态 */
    #btn-tts.playing {
      background: var(--color-accent, #3b82f6);
      color: white;
      animation: tts-pulse 1.5s ease-in-out infinite;
    }
    #btn-tts.paused {
      background: var(--color-bg-elevated);
      border-color: var(--color-accent, #3b82f6);
    }
    @keyframes tts-pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.7; }
    }
    #btn-tts .tts-icon {
      font-size: 14px;
    }

    /* 语音输入按钮 - 定位在对话输入框左下角 */
    .voice-input-btn {
      position: absolute;
      bottom: 8px;
      left: 8px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid var(--color-border-default);
      background: var(--color-bg-elevated);
      color: var(--color-text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      z-index: 10;
    }
    .voice-input-btn:hover {
      background: var(--color-bg-surface);
      border-color: var(--color-accent, #3b82f6);
    }
    .voice-input-btn.listening {
      background: #ef4444;
      border-color: #ef4444;
      color: white;
      animation: mic-pulse 1s ease-in-out infinite;
    }
    @keyframes mic-pulse {
      0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
      50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    }
    /* 语音按钮在输入框内部时的定位 */
    .voice-input-btn.in-input-area {
      position: absolute;
      bottom: 8px;
      left: 8px;
      width: 32px;
      height: 32px;
    }
    /* 为输入框留出语音按钮空间 */
    pi-chat-panel.has-voice-btn message-editor textarea {
      padding-left: 40px;
    }

    #toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(80px);
      background: var(--color-bg-base);
      border: 1px solid var(--color-border-default);
      color: var(--color-text-primary);
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: var(--text-base);
      opacity: 0;
      transition: all 0.3s ease;
      pointer-events: none;
      z-index: 100;
      box-shadow: var(--shadow-lg);
    }
    #toast.show {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }


    /* ─── Header Actions ────────────────────────────────── */
    .header-actions {
      display: flex;
      align-items: center;
      gap: var(--space-xs);
    }
    .header-action-btn {
      background: transparent;
      border: none;
      color: var(--color-text-secondary);
      width: 36px;
      height: 36px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .header-action-btn:hover {
      background: var(--color-bg-elevated);
      color: var(--color-text-primary);
    }
    .header-action-btn.active {
      background: rgba(79, 142, 247, 0.1);
      color: var(--color-accent-hover);
    }
    .header-divider {
      width: 1px;
      height: 20px;
      background: var(--color-border-subtle);
      margin: 0 var(--space-xs);
    }

    /* ─── Brand Gradient ────────────────────────────────── */
    header h1 {
      background: linear-gradient(135deg, var(--color-accent-subtle), var(--color-accent-primary));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* ─── Welcome Enhancements ──────────────────────────── */
    #welcome .brand-tagline {
      font-size: var(--text-sm);
      color: var(--color-accent-subtle);
      letter-spacing: 2px;
      text-transform: uppercase;
      font-weight: 500;
    }
    #welcome .prompt-card {
      position: relative;
      padding-left: 48px;
    }
    #welcome .prompt-card::before {
      content: attr(data-step);
      position: absolute;
      left: var(--space-lg);
      top: 50%;
      transform: translateY(-50%);
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: var(--color-bg-elevated);
      border: 1px solid var(--color-border-subtle);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: var(--text-xs);
      color: var(--color-text-muted);
      font-weight: 600;
    }
    #welcome .prompt-card:first-of-type {
      border-color: var(--color-accent-primary);
      background: rgba(79, 142, 247, 0.04);
    }
    #welcome .prompt-card:first-of-type::before {
      background: var(--color-accent-primary);
      color: white;
      border-color: var(--color-accent-primary);
    }
    #welcome .prompt-card:hover {
      transform: translateY(-1px);
      box-shadow: var(--shadow-md);
    }

    /* ─── Toast Variants ────────────────────────────────── */
    #toast.success { border-color: var(--color-success); color: var(--color-success); }
    #toast.warning { border-color: var(--color-warning); color: var(--color-warning); }
    #toast.error { border-color: var(--color-danger); color: var(--color-danger); }
    #toast.has-action { display: flex; align-items: center; gap: 12px; pointer-events: auto; }
    .toast-action-btn { flex-shrink: 0; padding: 4px 14px; border: 1px solid var(--color-accent-primary); background: transparent; color: var(--color-accent-primary); border-radius: var(--radius-sm); font-size: 13px; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
    .toast-action-btn:hover { background: var(--color-accent-primary); color: white; }

    /* ─── Export Toolbar Fade-in ────────────────────────── */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }


    /* PDF 打印样式 */
    @media print {
      body { background: white; color: black; }
      #app { max-width: 100%; margin: 0; }
      header { display: none; }
      #chat-container { overflow: visible; }
      pi-chat-panel { display: none; }
      #export-toolbar { display: none !important; }
      #print-content {
        display: block !important;
        padding: 40px;
        font-size: 12pt;
        line-height: 1.6;
        color: #1a1a1a;
      }
      #print-content h1 { font-size: 22pt; margin-bottom: 8px; }
      #print-content h2 { font-size: 16pt; margin-top: 20px; }
      #print-content h3 { font-size: 13pt; margin-top: 14px; }
      #print-content table { border-collapse: collapse; width: 100%; margin: 10px 0; }
      #print-content th, #print-content td { border: 1px solid #ccc; padding: 6px 10px; text-align: left; }
      #print-content th { background: #f5f5f5; }
      #print-content hr { border: none; border-top: 1px solid #ddd; margin: 16px 0; }
      @page { margin: 20mm; }
    }
    #print-content { display: none; }

    #history-panel {
      position: fixed;
      top: 0;
      right: 0;
      width: 360px;
      height: 100vh;
      background: var(--color-bg-surface);
      border-left: 1px solid var(--color-border-subtle);
      transform: translateX(100%);
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 50;
      display: flex;
      flex-direction: column;
    }
    #history-panel.open { transform: translateX(0); }
    #history-panel .panel-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--color-border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    #history-panel .panel-header h2 { font-size: var(--text-lg); }
    #history-panel .close-btn {
      background: none; border: none; color: var(--color-text-muted); font-size: var(--text-2xl); cursor: pointer;
    }
    #history-panel .close-btn:hover { color: var(--color-text-primary); }
    #history-list {
      flex: 1; overflow-y: auto; padding: 12px;
    }
    .history-item {
      border: 1px solid var(--color-border-subtle);
      border-radius: var(--radius-md);
      margin-bottom: 8px;
      cursor: pointer;
      transition: background 0.15s, box-shadow 0.15s;
      overflow: hidden;
    }
    .history-item:hover { background: var(--color-bg-elevated); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
    .history-item .item-cover {
      width: 100%; height: 80px; background-size: cover; background-position: center;
      background-color: var(--color-bg-elevated);
    }
    .history-item .item-body { padding: 10px 12px; }
    .history-item .item-header { margin-bottom: 6px; }
    .history-item .item-title { font-size: var(--text-base); font-weight: 600; margin-bottom: 4px; }
    .history-item .item-meta {
      display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--color-text-muted);
    }
    .history-item .item-meta span {
      display: inline-flex; align-items: center; gap: 2px;
      padding: 1px 6px; border-radius: 4px;
      background: var(--color-bg-surface); border: 1px solid var(--color-border-subtle);
    }
    .history-item .item-date { font-size: var(--text-xs); color: var(--color-text-muted); }
    .history-item .item-summary {
      font-size: var(--text-sm); color: var(--color-text-secondary);
      overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
      -webkit-line-clamp: 2; -webkit-box-orient: vertical;
      margin-bottom: 6px;
    }
    .history-item .item-footer {
      display: flex; justify-content: space-between; align-items: center;
    }
    .history-item .item-actions { display: flex; gap: 6px; }
    .history-item .item-actions button {
      font-size: 11px; padding: 3px 10px; border-radius: var(--radius-sm);
      border: 1px solid var(--color-border-default); background: var(--color-bg-elevated);
      color: var(--color-text-secondary); cursor: pointer; transition: all 0.15s;
    }
    .history-item .item-actions button:hover { color: var(--color-text-primary); background: var(--color-bg-surface); }
    .history-item .item-actions .delete-btn:hover { color: var(--color-danger); border-color: var(--color-danger); }
    #history-empty { text-align: center; padding: 40px 20px; color: var(--color-text-muted); font-size: var(--text-base); }

    /* ─── 地图面板（已废弃，保留 supply-marker 样式） ── */
    .supply-marker { background: transparent !important; border: none !important; }
    .map-btn {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-default);
      color: var(--color-text-primary);
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: var(--text-sm);
      transition: background 0.15s;
    }
    .map-btn:hover { background: var(--color-bg-elevated); }
    .map-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    @media (max-width: 640px) {
      /* ── 手机端全局调整 ── */
      :root {
        --text-sm: 14px;
        --text-xs: 12px;
      }

      /* 对话面板全屏 */
      #map-chat-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
      }

      /* 欢迎页紧凑 */
      #map-chat-welcome {
        padding: 16px 12px;
      }
      #map-chat-welcome .quick-prompts {
        gap: 8px;
      }
      #map-chat-welcome .quick-prompt {
        padding: 10px 14px;
        font-size: 13px;
      }

      /* 地图工具栏 */
      #page-map-toolbar {
        padding: 8px;
        gap: 6px;
      }
      .map-search-box {
        max-width: 200px;
      }
      .map-search-box input {
        font-size: 14px; /* 防止 iOS 缩放 */
      }

      /* 导出工具栏 */
      #export-toolbar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
      }
      #export-toolbar button {
        font-size: 12px;
        padding: 6px 10px;
      }

      /* 历史面板全屏 */
      #history-panel {
        width: 100%;
        right: -100%;
      }
      #history-panel.open {
        right: 0;
      }

      /* 出行人群面板全屏 */
      #travelers-panel {
        width: 100%;
        right: -100%;
      }

      /* 地图路线面板 */
      #page-map-routes {
        width: calc(100vw - 16px);
        max-height: 50vh;
      }

      /* 图层切换 */
      #map-layer-switcher {
        right: 8px;
        top: auto;
        bottom: 60px;
      }

      /* 消息编辑器 */
      message-editor textarea {
        font-size: 16px; /* 防止 iOS 缩放 */
      }

      /* 预设弹窗 */
      .preset-modal-content {
        width: 95%;
        max-height: 70vh;
      }

      /* 新手引导 */
      .onboarding-card {
        padding: 24px 20px;
        margin: 0 12px;
      }
    }

    /* ─── 平板适配（768px） ─────────────────────────── */
    @media (max-width: 768px) {
      #map-chat-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
      }
      #panel-resizer { display: none; }
      #page-map {
        flex-direction: column;
      }
      #page-map.mobile-chat-focused #map-right-area { display: none; }
      #page-map.mobile-map-focused #map-chat-panel { display: none; }
      .map-search-box { max-width: 240px; }
      #page-map-routes { width: calc(100vw - 24px); }

      /* 地图工具栏适配 */
      #page-map-toolbar {
        flex-wrap: wrap;
      }

      /* 导出工具栏适配 */
      #export-toolbar {
        flex-wrap: wrap;
        justify-content: center;
      }
    }

    /* ─── 地图页面（左右分栏：对话+地图） ──────────── */
    #page-map {
      display: none;
      flex-direction: row;
      flex: 1;
      min-height: 0;
      overflow: hidden;
      position: relative;
    }
    #page-map.active { display: flex; }

    /* 地图页直接占满 */

    /* ── 左侧对话面板 ── */
    #map-chat-panel {
      width: 480px;
      min-width: 320px;
      max-width: 60vw;
      display: flex;
      flex-direction: column;
      border-right: 1px solid var(--color-border-subtle);
      background: var(--color-bg);
      flex-shrink: 0;
      overflow: hidden;
      position: relative;
    }
    #map-chat-header {
      padding: 14px 18px;
      border-bottom: 1px solid var(--color-border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
      background: var(--color-bg-surface);
    }
    #map-chat-header h3 {
      font-size: 15px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .map-chat-back {
      background: none; border: none;
      color: var(--color-text-muted);
      font-size: 18px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
    }
    .map-chat-back:hover { background: var(--color-bg-elevated); }
    #map-chat-body {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      position: relative;
    }
    #map-chat-body pi-chat-panel {
      display: block;
      height: 100%;
    }
    /* 地图页对话区无 welcome 时隐藏 */
    #map-chat-welcome {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      padding: 30px 20px;
      text-align: center;
      gap: 12px;
    }
    #map-chat-welcome .quick-prompts {
      display: flex;
      flex-direction: column;
      gap: 8px;
      width: 100%;
      margin-top: 8px;
    }
    #map-chat-welcome .quick-prompt {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-subtle);
      border-radius: 10px;
      padding: 10px 14px;
      font-size: 13px;
      cursor: pointer;
      text-align: left;
      transition: border-color 0.15s;
      color: var(--color-text-primary);
    }
    #map-chat-welcome .quick-prompt:hover { border-color: var(--color-accent-subtle); }
    #map-chat-welcome .quick-prompt--discover {
      background: linear-gradient(135deg, var(--color-accent-subtle), var(--color-accent));
      color: #fff;
      font-weight: 600;
      border: none;
    }
    #map-chat-welcome .quick-prompt--discover:hover {
      opacity: 0.9;
    }
    #map-chat-welcome .quick-prompt--preset {
      background: linear-gradient(135deg, #f59e0b, #f97316);
      color: #fff;
      border-color: transparent;
      font-weight: 600;
    }
    #map-chat-welcome .quick-prompt--preset:hover {
      opacity: 0.9;
    }

    /* ── 预设行程选择弹窗 ── */
    .preset-modal {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: presetModalIn 0.2s ease-out;
    }
    @keyframes presetModalIn {
      from { opacity: 0; }
      to   { opacity: 1; }
    }
    .preset-modal-content {
      background: var(--color-bg-elevated, #1e1e2e);
      border-radius: 16px;
      width: 90%;
      max-width: 420px;
      max-height: 80vh;
      overflow: hidden;
      box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    }
    .preset-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      font-size: 16px;
      font-weight: 600;
      border-bottom: 1px solid var(--color-border-subtle, #333);
    }
    .preset-modal-close {
      background: none;
      border: none;
      color: var(--color-text-muted, #999);
      font-size: 18px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
    }
    .preset-modal-close:hover {
      background: var(--color-bg-hover, rgba(255,255,255,0.1));
    }
    .preset-trip-list {
      padding: 12px;
      overflow-y: auto;
      max-height: 60vh;
    }
    .preset-trip-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 14px 16px;
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.15s;
      margin-bottom: 4px;
    }
    .preset-trip-item:hover {
      background: var(--color-bg-hover, rgba(255,255,255,0.08));
    }
    .preset-trip-icon {
      font-size: 28px;
      width: 44px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--color-bg-subtle, rgba(255,255,255,0.05));
      border-radius: 10px;
      flex-shrink: 0;
    }
    .preset-trip-info {
      flex: 1;
      min-width: 0;
    }
    .preset-trip-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--color-text-primary, #e2e8f0);
    }
    .preset-trip-desc {
      font-size: 12px;
      color: var(--color-text-muted, #94a3b8);
      margin-top: 2px;
    }
    .preset-trip-badge {
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 10px;
      background: var(--color-accent-subtle, rgba(79,142,247,0.15));
      color: var(--color-accent, #4f8ef7);
      white-space: nowrap;
    }

    /* ── 快捷提示用户消息气泡 ── */
    .quick-prompt-user-msg {
      padding: 12px 16px;
      margin: 12px 16px 4px auto;
      max-width: 80%;
      background: var(--color-accent);
      color: #fff;
      border-radius: 16px 16px 4px 16px;
      font-size: 14px;
      line-height: 1.5;
      word-break: break-word;
      animation: qpFadeIn 0.2s ease-out;
    }
    @keyframes qpFadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── 右侧地图区域 ── */
    #map-right-area {
      flex: 1;
      position: relative;
      overflow: hidden;
      min-width: 0;
    }

    /* ── 拖拽分割线 ── */
    #panel-resizer {
      width: 6px;
      flex-shrink: 0;
      cursor: col-resize;
      background: transparent;
      position: relative;
      z-index: 10;
      transition: background 0.15s;
    }
    #panel-resizer:hover,
    #panel-resizer.resizing {
      background: var(--color-accent-primary);
    }
    #panel-resizer::after {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 2px;
      height: 32px;
      border-radius: 1px;
      background: var(--color-border-default);
      transition: background 0.15s;
    }
    #panel-resizer:hover::after,
    #panel-resizer.resizing::after {
      background: white;
    }

    /* 地图顶部工具栏 */
    #page-map-toolbar {
      position: absolute;
      top: 12px; left: 12px; right: 12px;
      z-index: 1000;
      display: flex;
      gap: 8px;
      align-items: center;
      pointer-events: none;
    }
    #page-map-toolbar > * { pointer-events: auto; }
    .map-search-box {
      flex: 1;
      max-width: 360px;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.15);
      padding: 8px 14px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
    }
    .map-search-box input {
      border: none;
      outline: none;
      flex: 1;
      font-size: 14px;
      background: transparent;
      color: #333;
    }
    .map-search-box input::placeholder { color: #999; }
    .map-tool-btn {
      background: white;
      border: none;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.15);
      width: 36px; height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 16px;
      color: #555;
      transition: background 0.15s;
    }
    .map-tool-btn:hover { background: #f0f0f0; }
    .map-tool-btn.active { background: var(--color-accent-primary); color: white; }

    /* 移动端专用按钮 - 默认隐藏，768px 以下显示 */
    .mobile-only { display: none; }
    @media (max-width: 768px) {
      .mobile-only { display: flex; }
    }

    /* 地图图层切换控件 */
    .map-layer-switcher {
      position: absolute;
      top: 56px; right: 12px;
      z-index: 1000;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.15);
      padding: 6px;
      display: none;
      flex-direction: column;
      gap: 2px;
    }
    .map-layer-switcher.show { display: flex; }
    .map-layer-option {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border: none;
      background: none;
      border-radius: 6px;
      cursor: pointer;
      font-size: 13px;
      color: #333;
      white-space: nowrap;
    }
    .map-layer-option:hover { background: #f5f5f5; }
    .map-layer-option.active { background: rgba(79,142,247,0.08); color: var(--color-accent-primary); font-weight: 600; }
    .map-layer-option img {
      width: 32px; height: 32px;
      border-radius: 4px;
      border: 2px solid transparent;
    }
    .map-layer-option.active img { border-color: var(--color-accent-primary); }

    /* 地图容器 - 关键：必须100%高度 */
    #page-map-container {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      overflow: hidden;
    }
    #page-map-leaflet {
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
    }

    /* 左侧路线面板 */
    #page-map-routes {
      position: absolute;
      top: 56px; left: 12px; bottom: 12px;
      width: 300px;
      z-index: 1000;
      background: white;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.12);
      display: none;
      flex-direction: column;
      overflow: hidden;
    }
    #page-map-routes.show { display: flex; }
    .route-panel-header {
      padding: 14px 16px;
      border-bottom: 1px solid #eee;
      font-weight: 600;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      flex-shrink: 0;
    }
    .route-panel-minimize {
      background: none;
      border: none;
      color: #999;
      cursor: pointer;
      padding: 4px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.15s, background 0.15s;
    }
    .route-panel-minimize:hover { color: #333; background: #f5f5f5; }
    .route-panel-body {
      flex: 1;
      overflow-y: auto;
      padding: 8px 0;
    }
    .route-day-group {
      padding: 0 12px;
      margin-bottom: 4px;
    }
    .route-day-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--color-accent-primary);
      padding: 6px 4px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .route-day-label::before {
      content: '';
      width: 8px; height: 8px;
      background: var(--color-accent-primary);
      border-radius: 50%;
      flex-shrink: 0;
    }
    .route-attr-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 8px 8px 20px;
      border-radius: 8px;
      cursor: pointer;
      transition: background 0.12s;
      font-size: 13px;
      color: #444;
    }
    .route-attr-item:hover { background: #f5f5f7; }
    .route-attr-item .attr-dot {
      width: 6px; height: 6px;
      background: #3b82f6;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .route-attr-item .attr-duration {
      margin-left: auto;
      font-size: 11px;
      color: #999;
    }

    /* 底部状态栏 */
    #page-map-statusbar {
      position: absolute;
      bottom: 12px; left: 12px;
      z-index: 1000;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.12);
      padding: 8px 14px;
      font-size: 12px;
      color: #666;
      display: none;
      align-items: center;
      gap: 12px;
    }
    #page-map-statusbar.show { display: flex; }
    .status-dot {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-weight: 500;
    }
    .status-dot::before {
      content: '';
      width: 8px; height: 8px;
      border-radius: 50%;
      display: inline-block;
      flex-shrink: 0;
    }
    .status-dot.blue::before { background: #3b82f6; }
    .status-dot.green::before { background: #22c55e; }
    .status-dot.yellow::before { background: #f59e0b; }
    .status-dot.purple::before { background: #8b5cf6; }

    /* 图例 */
    #page-map-legend {
      position: absolute;
      bottom: 12px; right: 12px;
      z-index: 1000;
      background: white;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.12);
      padding: 10px 14px;
      display: none;
      flex-direction: column;
      gap: 6px;
      font-size: 12px;
      color: #555;
    }
    #page-map-legend.show { display: flex; }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .legend-line {
      width: 20px; height: 3px;
      border-radius: 2px;
    }

    /* 空状态 */
    .map-empty-overlay {
      position: absolute;
      bottom: 20px; left: 50%; transform: translateX(-50%);
      z-index: 2;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: rgba(255,255,255,0.95);
      backdrop-filter: blur(8px);
      border-radius: 12px;
      padding: 16px 24px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.1);
      gap: 8px;
      pointer-events: none;
    }
    .map-empty-overlay .empty-icon { font-size: 64px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); }
    .map-empty-overlay .empty-title { font-size: 18px; font-weight: 600; color: #333; }
    .map-empty-overlay .empty-desc { font-size: 14px; color: #888; max-width: 320px; text-align: center; line-height: 1.6; }
    .map-empty-overlay .empty-action {
      margin-top: 8px;
      background: var(--color-accent-primary);
      color: white;
      border: none;
      border-radius: 20px;
      padding: 10px 24px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.15s;
      box-shadow: 0 4px 12px rgba(79,142,247,0.3);
    }
    .map-empty-overlay .empty-action:hover { background: var(--color-accent-hover); }

    /* 自定义 Marker 样式 */
    .custom-marker {
      background: transparent !important;
      border: none !important;
      pointer-events: auto !important;
    }
    /* ── Marker & Route 动画 ── */
    @keyframes planningPulse {
      0% { transform: scale(0.5); opacity: 1; box-shadow: 0 0 0 0 rgba(79,142,247,0.7); }
      70% { transform: scale(1); opacity: 0.7; box-shadow: 0 0 0 20px rgba(79,142,247,0); }
      100% { transform: scale(0.5); opacity: 1; box-shadow: 0 0 0 0 rgba(79,142,247,0); }
    }
    .planning-indicator { pointer-events: none !important; }
    .planning-pulse {
      width: 20px; height: 20px;
      border-radius: 50%;
      background: var(--color-accent-primary);
      margin: 0 auto;
      animation: planningPulse 1.5s ease-out infinite;
    }
    .planning-text {
      text-align: center;
      margin-top: 10px;
      font-size: 13px;
      color: var(--color-accent-primary);
      font-weight: 600;
      background: rgba(255,255,255,0.92);
      padding: 5px 14px;
      border-radius: 20px;
      backdrop-filter: blur(4px);
      white-space: nowrap;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      border: 1px solid rgba(79,142,247,0.15);
    }
    /* ── Skeleton/Shimmer 加载效果 ── */
    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }
    .skeleton-line {
      height: 12px;
      border-radius: 6px;
      background: linear-gradient(90deg, var(--color-bg-elevated) 25%, var(--color-bg-surface) 50%, var(--color-bg-elevated) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s ease-in-out infinite;
      margin-bottom: 8px;
    }
    .skeleton-line.w-75 { width: 75%; }
    .skeleton-line.w-50 { width: 50%; }
    .skeleton-line.w-90 { width: 90%; }
    .skeleton-circle {
      width: 32px; height: 32px;
      border-radius: 50%;
      background: linear-gradient(90deg, var(--color-bg-elevated) 25%, var(--color-bg-surface) 50%, var(--color-bg-elevated) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s ease-in-out infinite;
    }
    .planning-skeleton {
      pointer-events: none !important;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
      padding: 16px;
    }
    .planning-skeleton .skeleton-row {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
    }
    .planning-skeleton .skeleton-row .skeleton-line { flex: 1; }
    .planning-skeleton .planning-text {
      margin-top: 4px;
    }

    @keyframes markerPopIn {
      0% { transform: scale(0) translateY(10px); opacity: 0; }
      70% { transform: scale(1.15) translateY(-4px); opacity: 1; }
      100% { transform: scale(1) translateY(0); opacity: 1; }
    }
    @keyframes cityMarkerSlide {
      0% { transform: translateX(-20px); opacity: 0; }
      100% { transform: translateX(0); opacity: 1; }
    }
    @keyframes snakeIn {
      to { stroke-dashoffset: 0; }
    }

    /* 动画渲染时当前景点的脉冲高亮 */
    @keyframes animPulse {
      0% { box-shadow: 0 0 0 0 rgba(99,102,241,0.6); }
      70% { box-shadow: 0 0 0 12px rgba(99,102,241,0); }
      100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
    }
    .attraction-marker.anim-highlight {
      animation: markerPopIn 0.45s cubic-bezier(0.34,1.56,0.64,1) both, animPulse 1.2s ease-out 0.5s;
    }
    /* 自动弹窗动画 */
    .map-popup {
      animation: popupSlideUp 0.3s ease-out;
    }
    @keyframes popupSlideUp {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    /* 幽灵 marker 脉冲（A4 流式文本渲染） */
    .ghost-marker {
      width: 24px; height: 24px; position: relative;
    }
    .ghost-pulse {
      width: 24px; height: 24px; border-radius: 50%;
      background: rgba(99,102,241,0.3);
      border: 2px solid rgba(99,102,241,0.6);
      animation: ghostPulse 1.5s ease-in-out infinite;
    }
    @keyframes ghostPulse {
      0%, 100% { transform: scale(1); opacity: 0.6; }
      50% { transform: scale(1.4); opacity: 0.2; }
    }
    /* 带标签的幽灵 marker（新发现的地点） */
    .ghost-marker-labeled {
      position: relative;
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .ghost-marker-labeled .ghost-pulse {
      width: 20px; height: 20px;
      background: rgba(16,185,129,0.4);
      border-color: rgba(16,185,129,0.8);
    }
    .ghost-marker-labeled .ghost-label {
      background: rgba(16,185,129,0.9);
      color: white;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      margin-top: 4px;
      box-shadow: 0 2px 8px rgba(16,185,129,0.4);
      animation: markerPopIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    /* 路线信息 badge */
    .route-info-icon {
      background: transparent !important;
      border: none !important;
    }
    .route-info-badge {
      background: rgba(15,15,17,0.85);
      color: #e4e4e7;
      padding: 3px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 500;
      white-space: nowrap;
      backdrop-filter: blur(4px);
      box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      pointer-events: none;
    }
    /* 路线方向箭头 */
    .route-arrow-icon {
      background: transparent !important;
      border: none !important;
    }
    .route-arrow {
      color: #10b981;
      font-size: 10px;
      line-height: 1;
      text-shadow: 0 0 3px rgba(255,255,255,0.8);
      pointer-events: none;
    }
    /* 天数筛选按钮 */
    #page-map-day-filters {
      position: absolute;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 6px;
      z-index: 1000;
      padding: 6px 10px;
      background: rgba(15,15,17,0.85);
      border-radius: 20px;
      backdrop-filter: blur(8px);
      box-shadow: 0 4px 16px rgba(0,0,0,0.3);
      transition: opacity 0.3s;
    }
    #page-map-day-filters:empty {
      display: none;
    }
    .day-filter-btn {
      padding: 4px 12px;
      border: 2px solid transparent;
      border-radius: 14px;
      background: rgba(255,255,255,0.1);
      color: #e4e4e7;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
    }
    .day-filter-btn:hover {
      background: rgba(255,255,255,0.2);
    }
    .day-filter-btn.active {
      color: white;
      border-color: currentColor;
      box-shadow: 0 0 12px currentColor;
    }
    /* 不同天数按钮颜色 */
    .day-filter-btn[data-day="0"] { color: #e4e4e7; }
    .day-filter-btn[data-day="0"].active { background: rgba(255,255,255,0.2); }
    .day-filter-btn[data-day="1"] { --day-color: #3b82f6; }
    .day-filter-btn[data-day="2"] { --day-color: #8b5cf6; }
    .day-filter-btn[data-day="3"] { --day-color: #ec4899; }
    .day-filter-btn[data-day="4"] { --day-color: #f97316; }
    .day-filter-btn[data-day="5"] { --day-color: #14b8a6; }
    .day-filter-btn[data-day="6"] { --day-color: #6366f1; }
    .day-filter-btn[data-day="7"] { --day-color: #ef4444; }
    .day-filter-btn[data-day="8"],
    .day-filter-btn[data-day="9"],
    .day-filter-btn[data-day="10"] { --day-color: #10b981; }
    .day-filter-btn[data-day]:not([data-day="0"]) {
      color: var(--day-color);
    }
    .day-filter-btn[data-day]:not([data-day="0"]).active {
      background: var(--day-color);
      color: white;
      border-color: var(--day-color);
      box-shadow: 0 0 12px var(--day-color);
    }
    /* 景点标记非高亮状态（淡化） */
    .attraction-marker.dimmed {
      opacity: 0.3;
      transform: scale(0.8);
    }
    /* 天气覆盖 badge */
    .weather-overlay .weather-badge {
      background: rgba(15,15,17,0.8); color: #e4e4e7;
      padding: 2px 8px; border-radius: 12px; font-size: 12px;
      white-space: nowrap; backdrop-filter: blur(4px);
    }

    .attraction-marker {
      background: #3b82f6;
      color: white;
      border-radius: 50%;
      width: 32px; height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: 700;
      box-shadow: 0 3px 10px rgba(59,130,246,0.4);
      border: 2px solid white;
      transition: transform 0.15s;
      cursor: pointer !important;
      animation: markerPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }
    /* 不同天数的标记颜色 */
    .attraction-marker[data-day="1"] { background: #3b82f6; box-shadow: 0 3px 10px rgba(59,130,246,0.4); }
    .attraction-marker[data-day="2"] { background: #8b5cf6; box-shadow: 0 3px 10px rgba(139,92,246,0.4); }
    .attraction-marker[data-day="3"] { background: #ec4899; box-shadow: 0 3px 10px rgba(236,72,153,0.4); }
    .attraction-marker[data-day="4"] { background: #f97316; box-shadow: 0 3px 10px rgba(249,115,22,0.4); }
    .attraction-marker[data-day="5"] { background: #14b8a6; box-shadow: 0 3px 10px rgba(20,184,166,0.4); }
    .attraction-marker[data-day="6"] { background: #6366f1; box-shadow: 0 3px 10px rgba(99,102,241,0.4); }
    .attraction-marker[data-day="7"] { background: #ef4444; box-shadow: 0 3px 10px rgba(239,68,68,0.4); }
    .attraction-marker[data-day="8"],
    .attraction-marker[data-day="9"],
    .attraction-marker[data-day="10"] { background: #10b981; box-shadow: 0 3px 10px rgba(16,185,129,0.4); }
    .attraction-marker:hover { transform: scale(1.15); }
    /* 日期过渡标签 */
    .day-transition-label {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(15,15,17,0.9);
      color: white;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 14px;
      font-weight: 600;
      white-space: nowrap;
      z-index: 1000;
      pointer-events: none;
      animation: dayLabelFade 1.5s ease-in-out both;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    @keyframes dayLabelFade {
      0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
      20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
      100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    }
    .city-marker {
      background: var(--color-accent-primary);
      color: white;
      border-radius: 16px;
      padding: 4px 12px;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      box-shadow: 0 3px 12px rgba(79,142,247,0.4);
      border: 2px solid white;
      animation: cityMarkerSlide 0.4s ease-out both;
    }
    .waypoint-marker {
      background: white;
      border: 3px solid #3b82f6;
      border-radius: 50%;
      width: 12px; height: 12px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.2);
      cursor: pointer !important;
      animation: markerPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }
    /* 确保 Leaflet marker 可点击 */
    .leaflet-marker-pane {
      pointer-events: auto !important;
    }
    .leaflet-marker-icon {
      cursor: pointer !important;
      pointer-events: auto !important;
    }
    /* Popup 自定义样式 */
    .leaflet-popup-content-wrapper {
      border-radius: 12px !important;
      box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
      padding: 0 !important;
    }
    .leaflet-popup-content {
      margin: 0 !important;
      min-width: 200px;
    }
    .map-popup {
      padding: 14px 16px;
    }
    .map-popup .popup-title {
      font-size: 15px;
      font-weight: 600;
      color: #111;
      margin-bottom: 4px;
    }
    .map-popup .popup-desc {
      font-size: 12px;
      color: #666;
      line-height: 1.5;
      margin-bottom: 6px;
    }
    .map-popup .popup-city {
      font-size: 12px;
      color: var(--color-accent-primary);
      margin-bottom: 8px;
    }
    .map-popup .popup-meta {
      display: flex;
      gap: 12px;
      font-size: 12px;
      color: #888;
    }
    .map-popup .popup-meta span {
      display: flex;
      align-items: center;
      gap: 3px;
    }
    .map-popup .popup-tips {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid #eee;
      font-size: 12px;
      color: #666;
      line-height: 1.5;
    }
    .popup-route-info {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid #eee;
    }
    .popup-route-info .risk-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 600;
    }
    .popup-supply-list {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid #eee;
      font-size: 12px;
      color: #666;
    }
    .popup-supply-item {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 2px 0;
    }

    /* ─── 欢迎状态 ─────────────────────────────────────── */
    #welcome {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      padding: 40px 20px;
      text-align: center;
      gap: 24px;
    }
    #welcome.hidden { display: none; }
    #welcome h2 {
      font-size: var(--text-2xl);
      font-weight: 600;
      color: var(--color-text-primary);
    }
    #welcome p {
      font-size: var(--text-base);
      color: var(--color-text-secondary);
      max-width: 480px;
      line-height: 1.6;
    }
    #welcome .prompts {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
      max-width: 520px;
    }
    #welcome .prompt-card {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-subtle);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      text-align: left;
      cursor: pointer;
      transition: all 0.2s;
      font-size: var(--text-base);
      color: var(--color-text-secondary);
      line-height: 1.5;
    }
    #welcome .prompt-card:hover {
      background: var(--color-bg-elevated);
      border-color: var(--color-accent-primary);
      color: var(--color-text-primary);
    }

    /* ─── 遮罩层 ───────────────────────────────────────── */
    #overlay {
      position: fixed;
      inset: 0;
      background: var(--color-bg-overlay);
      z-index: 45;
      display: none;
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    #overlay.visible { display: block; opacity: 1; }

    /* ─── disabled ghost 按钮 ───────────────────────────── */
    .export-btn.disabled-ghost {
      opacity: 0.4;
      cursor: not-allowed;
      pointer-events: none;
    }
    .export-btn.disabled-ghost:hover {
      background: var(--color-bg-elevated);
    }

    /* ─── 出行人群抽屉 ─────────────────────────────────── */
    #travelers-panel {
      position: fixed;
      top: 0;
      right: 0;
      width: 320px;
      height: 100vh;
      background: var(--color-bg-surface);
      border-left: 1px solid var(--color-border-subtle);
      transform: translateX(100%);
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 50;
      display: flex;
      flex-direction: column;
      padding: 20px;
      overflow-y: auto;
      box-shadow: var(--shadow-lg);
    }
    #travelers-panel.open { transform: translateX(0) !important; }
    #travelers-panel .panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    #travelers-panel .panel-header h3 {
      font-size: var(--text-lg);
      font-weight: 600;
      color: var(--color-text-primary);
    }
    #travelers-panel .close-btn {
      background: none;
      border: none;
      color: var(--color-text-muted);
      font-size: var(--text-2xl);
      cursor: pointer;
    }
    #travelers-panel .close-btn:hover { color: var(--color-text-primary); }

    /* ─── 模型配置弹窗 ─────────────────────────────────── */
    #model-modal-overlay,
    #add-provider-overlay {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.4);
      z-index: 9999;
      justify-content: center;
      align-items: flex-start;
      padding-top: 60px;
    }
    #model-modal-overlay.open,
    #add-provider-overlay.open { display: flex; }
    #model-modal,
    #add-provider-dialog {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-subtle);
      border-radius: 16px;
      width: 520px;
      max-width: 90vw;
      max-height: calc(100vh - 120px);
      overflow-y: auto;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    }
    #model-modal-header,
    #add-provider-dialog .model-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 24px;
      border-bottom: 1px solid var(--color-border-subtle);
      position: sticky;
      top: 0;
      background: var(--color-bg-surface);
      border-radius: 16px 16px 0 0;
      z-index: 1;
    }
    #model-modal-header h2 {
      font-size: 17px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #model-modal .close-btn {
      background: none; border: none;
      color: var(--color-text-muted);
      font-size: 20px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
    }
    #model-modal .close-btn:hover,
    #add-provider-dialog .close-btn:hover { color: var(--color-text-primary); background: var(--color-bg-elevated); }
    #model-modal-body,
    #add-provider-dialog .model-modal-body { padding: 20px 24px; }
    .setting-section {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-subtle);
      border-radius: var(--radius-lg);
      padding: 20px;
      margin-bottom: 16px;
      max-width: 600px;
    }
    .setting-section h3 {
      font-size: var(--text-base);
      font-weight: 600;
      color: var(--color-text-primary);
      margin-bottom: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--color-border-subtle);
    }
    .setting-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
    }
    .setting-row:last-child { margin-bottom: 0; }
    .setting-row label {
      font-size: var(--text-sm);
      color: var(--color-text-secondary);
    }
    .setting-row label .hint {
      color: var(--color-text-muted);
      font-size: var(--text-xs);
      margin-left: 6px;
      font-weight: 400;
    }
    .setting-row select,
    .setting-row input[type="text"],
    .setting-row input[type="password"] {
      background: var(--color-bg-base);
      border: 1px solid var(--color-border-default);
      color: var(--color-text-primary);
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      font-size: var(--text-base);
      outline: none;
      transition: border-color 0.15s;
    }
    .setting-row select:focus,
    .setting-row input:focus {
      border-color: var(--color-accent-primary);
    }
    .setting-row select { cursor: pointer; }
    .setting-row input[type="password"] { font-family: monospace; letter-spacing: 2px; }
    .save-settings-btn {
      background: var(--color-accent-primary);
      color: white;
      border: none;
      border-radius: var(--radius-md);
      padding: 10px 24px;
      font-size: var(--text-base);
      cursor: pointer;
      transition: background 0.15s;
      margin-top: 8px;
    }
    .save-settings-btn:hover { background: var(--color-accent-hover); }

    .connection-banner {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(34, 197, 94, 0.06);
      border: 1px solid rgba(34, 197, 94, 0.2);
      border-radius: var(--radius-md);
      padding: 12px 16px;
      margin-bottom: 16px;
      font-size: var(--text-sm);
      color: var(--color-success);
    }
    .connection-banner .mode-icon { font-size: var(--text-lg); }
    .connection-banner + .setting-section {
      opacity: 0.7;
    }
    /* API Key 输入框始终可编辑，即使在代理模式下 */
    .connection-banner + .setting-section input[type="password"],
    .connection-banner + .setting-section select {
      pointer-events: auto;
      opacity: 1;
    }

    /* ─── 登录弹窗 ─────────────────────────────────────── */
    #auth-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      backdrop-filter: blur(8px);
    }
    #auth-overlay.visible { display: flex; }
    .auth-card {
      background: var(--color-bg-base);
      border: 1px solid var(--color-border-subtle);
      border-radius: 16px;
      padding: 36px 32px;
      max-width: 380px;
      width: 90%;
      text-align: center;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }
    .auth-card h2 {
      font-size: 20px;
      font-weight: 700;
      color: var(--color-text-primary);
      margin-bottom: 6px;
    }
    .auth-card .auth-subtitle {
      font-size: var(--text-sm);
      color: var(--color-text-muted);
      margin-bottom: 24px;
      line-height: 1.5;
    }
    .auth-card .auth-subtitle .tier-badge {
      display: inline-block;
      background: var(--color-accent-primary);
      color: white;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 11px;
      margin-top: 8px;
      font-weight: 500;
    }
    .oauth-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      width: 100%;
      padding: 10px 20px;
      border-radius: 10px;
      font-size: var(--text-sm);
      font-weight: 500;
      cursor: pointer;
      border: 1px solid var(--color-border-subtle);
      transition: all 0.15s;
      margin-bottom: 10px;
      color: var(--color-text-primary);
      background: var(--color-bg-surface);
      text-decoration: none;
    }
    .oauth-btn:hover { border-color: var(--color-accent-primary); background: var(--color-bg-elevated); }
    .oauth-btn.github { background: #24292e; color: white; border-color: #24292e; }
    .oauth-btn.github:hover { background: #2f363d; }
    .oauth-btn.google { background: white; border-color: var(--color-border-default); }
    .oauth-btn.google:hover { background: #f8f9fa; }
    .oauth-btn .oauth-icon { font-size: 16px; display: flex; align-items: center; }
    .oauth-btn.blog-sso { background: var(--color-accent-primary); color: white; border-color: var(--color-accent-primary); }
    .oauth-btn.blog-sso:hover { background: var(--color-accent-hover); }
    .auth-divider {
      color: var(--color-text-muted);
      font-size: 11px;
      margin: 14px 0;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .auth-divider::before, .auth-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--color-border-subtle);
    }
    .auth-terms {
      font-size: 11px;
      color: var(--color-text-muted);
      margin-top: 16px;
      line-height: 1.5;
    }
    .auth-terms a { color: var(--color-accent-primary); text-decoration: none; }
    .auth-terms a:hover { text-decoration: underline; }
    /* 游客模式提示条 */
    .guest-banner {
      display: none;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 6px 16px;
      background: var(--color-accent-primary);
      color: white;
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.15s;
    }
    .guest-banner:hover { background: var(--color-accent-hover); }
    .guest-banner.visible { display: flex; }

    /* ─── 配额栏 ───────────────────────────────────────── */
    #quota-bar {
      display: none;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      background: rgba(79, 142, 247, 0.1);
      border-radius: 8px;
      font-size: var(--text-xs);
      color: var(--color-text-secondary);
      margin-left: auto;
    }
    #quota-bar.visible { display: flex; }
    #quota-bar .quota-user {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    #quota-bar .quota-user img {
      width: 20px;
      height: 20px;
      border-radius: 50%;
    }
    #quota-bar .quota-count {
      color: var(--color-accent-subtle);
      font-weight: 600;
    }
    #quota-bar .quota-divider {
      color: var(--color-border-default);
    }
    #quota-bar .logout-btn {
      background: none;
      border: none;
      color: var(--color-text-muted);
      cursor: pointer;
      font-size: var(--text-xs);
      padding: 2px 6px;
    }
    #quota-bar .logout-btn:hover { color: var(--color-text-primary); }

    /* ─── 移动端适配 ───────────────────────────────────── */
    @media (max-width: 640px) {
      #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 56px;
        height: 100vh;
        z-index: 70;
      }
      #sidebar.expanded {
        width: 200px;
        box-shadow: var(--shadow-lg);
      }
      #main-content {
        margin-left: 56px;
        width: calc(100% - 56px);
      }
      #travelers-panel { width: 100vw; }
      #history-panel { width: 100vw; }
      header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
      }
      header h1 { font-size: var(--text-lg); }
      header span[data-i18n="subtitle"] { display: none; }
      #lang-switcher { order: 10; margin-left: 0; }
      .export-btn, #travelers-btn, .header-action-btn {
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
      }
      #welcome .prompts {
        max-width: 100%;
      }
      #welcome {
        padding: 24px 16px;
      }
      #welcome h2 { font-size: var(--text-xl); }
      /* 移动端地图页面：对话全屏，地图全屏切换 */
      #map-chat-panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-right: none;
      }
      #panel-resizer { display: none; }
      #page-map { flex-direction: column; }
      #page-map.mobile-chat-focused #map-right-area { display: none; }
      #page-map.mobile-map-focused #map-chat-panel { display: none; }
      .map-search-box { max-width: 180px; font-size: 13px; }
      #page-map-routes { width: calc(100vw - 24px); }
      #page-map-statusbar { font-size: 11px; gap: 8px; }
      #page-map-toolbar { gap: 6px; }
      .map-tool-btn { width: 32px; height: 32px; font-size: 14px; }
      /* 移动端视图切换按钮 */
      .mobile-view-toggle {
        display: flex;
        position: absolute;
        bottom: 16px;
        right: 16px;
        z-index: 1001;
        gap: 8px;
      }
      .mobile-view-btn {
        background: var(--color-accent-primary);
        color: white;
        border: none;
        border-radius: 24px;
        padding: 10px 18px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 4px 16px rgba(79, 142, 247, 0.4);
        display: flex;
        align-items: center;
        gap: 6px;
      }
    }
    /* 移动端视图切换按钮 — 桌面端隐藏 */
    .mobile-view-toggle { display: none; }

    /* ─── 减少动画偏好 ─────────────────────────────────── */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* ─── skip-link ───────────────────────────────────── */
    .skip-link {
      position: absolute;
      top: -100px;
      left: 50%;
      transform: translateX(-50%);
      background: var(--color-accent-primary);
      color: #fff;
      padding: 8px 20px;
      border-radius: 0 0 8px 8px;
      font-size: var(--text-base);
      z-index: 9999;
      text-decoration: none;
      transition: top 0.15s;
    }
    .skip-link:focus {
      top: 0;
    }

    /* ─── Footer ─────────────────────────────────────────── */
    #site-footer a:hover { color: var(--color-accent-primary); }

    /* ─── 发送按钮增强（外部覆盖 shadow DOM） ─────────── */
    pi-chat-panel::part(send-button) {
      min-width: 40px;
      min-height: 40px;
    }

    #loading {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 200px;
      color: var(--color-text-muted);
      font-size: var(--text-base);
    }

    /* ─── 分享弹窗 ─────────────────────────────────────── */
    #share-modal-overlay {
      display: none !important;
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 9999;
      justify-content: center;
      align-items: center;
    }
    #share-modal-overlay.open { display: flex !important; }
    #share-modal {
      background: var(--color-bg-surface);
      border: 1px solid var(--color-border-subtle);
      border-radius: 16px;
      width: 480px;
      max-width: 90vw;
      max-height: 90vh;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    #share-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 24px;
      border-bottom: 1px solid var(--color-border-subtle);
    }
    #share-modal-header h2 {
      font-size: 17px;
      font-weight: 600;
      margin: 0;
    }
    #share-modal-header .close-btn {
      background: none;
      border: none;
      color: var(--color-text-muted);
      font-size: 20px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 6px;
    }
    #share-modal-header .close-btn:hover {
      color: var(--color-text-primary);
      background: var(--color-bg-elevated);
    }
    #share-modal-body {
      padding: 20px 24px;
      text-align: center;
      min-height: 100px;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    #share-modal-body img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    }
    #share-modal-footer {
      display: flex;
      gap: 12px;
      justify-content: center;
      padding: 16px 24px;
      border-top: 1px solid var(--color-border-subtle);
      flex-shrink: 0;
    }
    .share-action-btn {
      background: var(--color-accent-primary, var(--color-accent-primary));
      color: white;
      border: none;
      border-radius: 8px;
      padding: 10px 24px;
      font-size: 14px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .share-action-btn:hover { background: var(--color-accent-hover, var(--color-accent-hover)); }
    .share-action-btn.secondary {
      background: var(--color-bg-elevated);
      color: var(--color-text-primary);
      border: 1px solid var(--color-border-subtle);
    }
    .share-action-btn.secondary:hover { background: var(--color-bg-tertiary); }

    /* ─── 餐厅卡片 ─────────────────────────────────── */
    .route-meals-group { margin: 8px 0 8px 12px; padding-left: 12px; border-left: 2px solid var(--color-border-subtle); }
    .route-meal-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; transition: background 0.15s; font-size: 13px; }
    .route-meal-item:hover { background: var(--color-bg-elevated); }
    .route-meal-item.plain { opacity: 0.7; cursor: default; }
    .route-meal-item.plain:hover { background: transparent; }
    .meal-icon { font-size: 16px; width: 22px; text-align: center; }
    .meal-name { flex: 1; color: var(--color-text-primary); font-weight: 500; }
    .meal-rating { color: #f59e0b; font-size: 12px; }
    .meal-cost { color: var(--color-text-secondary); font-size: 12px; }
    .meal-walk { color: var(--color-text-muted); font-size: 12px; }
    .restaurant-marker { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; border: 2px solid white; box-shadow: 0 2px 8px rgba(245,158,11,0.4); animation: markerPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }
    .hotel-marker { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; border: 2px solid white; box-shadow: 0 2px 8px rgba(139,92,246,0.4); animation: markerPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }

    /* ─── R3: 首屏加载骨架屏 ─────────────────────────── */
    .map-skeleton-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 9999;
      background: var(--color-bg-base);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 0.4s ease-out;
    }
    .map-skeleton-overlay.fade-out {
      opacity: 0;
      pointer-events: none;
    }
    .skeleton-map-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }
    .skeleton-map-shimmer {
      width: 280px;
      height: 180px;
      border-radius: 12px;
      background: linear-gradient(90deg, var(--color-bg-elevated) 25%, var(--color-bg-surface) 50%, var(--color-bg-elevated) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s ease-in-out infinite;
    }
    .skeleton-map-icon {
      font-size: 48px;
      animation: skeletonPulse 2s ease-in-out infinite;
    }
    .skeleton-map-text {
      font-size: 14px;
      color: var(--color-text-muted);
    }
    @keyframes skeletonPulse {
      0%, 100% { opacity: 0.6; transform: scale(1); }
      50% { opacity: 1; transform: scale(1.05); }
    }

    /* ─── R5: 无障碍 — prefers-reduced-motion ───────── */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
      /* 骨架屏降级为静态占位 */
      .skeleton-map-shimmer {
        animation: none;
        background: var(--color-bg-elevated);
      }
      .skeleton-map-icon {
        animation: none;
        opacity: 0.8;
      }
      /* 现有 skeleton-line 也降级 */
      .skeleton-line,
      .skeleton-circle {
        animation: none;
        background: var(--color-bg-elevated);
      }
    }

/* ─── 临时隐藏语音和海报功能 ─────────────────────────────── */
#btn-tts,
#btn-poster,
#btn-voice-companion {
  display: none !important;
}
