TripSense 行知 · 周边出行顾问:首版

零依赖 Node 服务,三步流程(选出发地 → 分析候选 → 生成方案 + 路线图 + 住宿参考)。

- 候选发现:高德 place/text 类型词跨城检索 + 内置景区/城市/小众库 + Photon 兜底
- 区县级「排除同城」判定(adname),过滤发生在轮转取样之前
- 路线图画的是 AI 方案里实际安排的每个地点,按正文顺序编号 + 虚线动线 + 真实高德底图
- 住宿:RollingGo 只读 CLI 取实时报价,无价格源时如实标注不编造
- 服务端内存缓存(指纹 + TTL + LRU),数据源层与 HTTP 层分别缓存
- 上下文瘦身:逐日天气只给 rank1,紧凑 JSON,实测约 1335 token
This commit is contained in:
2026-11-05 20:25:03 +08:00
commit c5c2ffae68
53 changed files with 8586 additions and 0 deletions
+2025
View File
File diff suppressed because it is too large Load Diff
+324
View File
@@ -0,0 +1,324 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="行知 TripSense:按时间与所在地分析周边适合出行的目的地,叠加天气与交通,并由 AI 生成逐日行程规划。">
<title>行知 · 周边出行顾问 | TripSense</title>
<link rel="stylesheet" href="styles.css?v=18">
</head>
<body>
<header class="topbar">
<div class="wrap topbar-inner">
<div class="brand">
<span class="brand-mark">◈</span>
<div class="brand-text"><strong>行知</strong><span>TripSense · 周边出行顾问</span></div>
</div>
<div class="topbar-meta">
<span class="status-pill" id="aiStatus"><i></i> 读取配置中…</span>
<button class="btn-ghost" id="openSettings">设置</button>
</div>
</div>
</header>
<main class="wrap">
<section class="hero">
<div class="hero-text">
<div class="eyebrow">周边出行 · 按时间 · 按位置 · 按天气与交通</div>
<h1>这个时间,去哪儿最合适?</h1>
<p>填入出行时间与出发地,系统检索周边目的地,叠加逐日天气、空气质量、公路与铁路可达性,给出可解释的备选清单。再补充你的具体需求,由 AI 生成可执行的逐日行程。</p>
</div>
<ol class="stepper" id="stepper">
<li class="active" data-step="1"><b>1</b><span>出行条件</span></li>
<li data-step="2"><b>2</b><span>备选清单</span></li>
<li data-step="3"><b>3</b><span>行程规划</span></li>
</ol>
</section>
<!-- ============================ STEP 1 ============================ -->
<section class="card step-panel active" id="panel1">
<div class="card-head">
<h2><span class="num">①</span> 出行条件</h2>
<p>出发地支持输入联想或浏览器定位;时间范围决定天气查询窗口与行程节奏。</p>
</div>
<div class="form-grid">
<div class="field span2 origin-field">
<label for="originInput">出发地 <em>*</em></label>
<div class="origin-row">
<input id="originInput" type="text" placeholder="输入城市 / 地名,如:杭州、成都、上海" autocomplete="off" spellcheck="false">
<button class="btn-outline" id="geoBtn" type="button">📍 使用当前位置</button>
</div>
<div class="suggest hidden" id="suggestBox"></div>
<p class="hint" id="originHint">可直接输入地名并从下拉中选择,或点击定位(浏览器会请求位置权限)。</p>
</div>
<div class="field">
<label for="startDate">开始日期 <em>*</em></label>
<input type="date" id="startDate">
</div>
<div class="field">
<label for="endDate">结束日期 <em>*</em></label>
<input type="date" id="endDate">
</div>
<div class="field span2 window-hint hidden" id="windowHint"></div>
<div class="field">
<label for="maxHours">可接受单程时长 <em id="hoursVal">2.5 小时</em></label>
<input type="range" id="maxHours" min="0.5" max="6" step="0.5" value="2.5">
<div class="range-scale"><span>0.5h</span><span>6h</span></div>
</div>
<div class="field">
<label for="radius">搜索半径</label>
<select id="radius">
<option value="50">50 km</option>
<option value="100">100 km</option>
<option value="150" selected>150 km</option>
<option value="250">250 km</option>
<option value="300">300 km</option>
</select>
</div>
<div class="field span2">
<label class="check inline-check">
<input type="checkbox" id="excludeLocal" checked>
排除出发地同城地点
<span class="label-note">剔除出发地所在城区的点位(同市下辖的其它县仍会作为周边目的地保留);想连本地一日游一起看就取消勾选</span>
</label>
</div>
<div class="field span2">
<label>交通方式 <span class="label-note">可多选,选「不限」会清空其他</span></label>
<div class="chips" id="transportChips"></div>
</div>
<div class="field span2">
<label>兴趣偏好 <span class="label-note">用于排序加成,可多选</span></label>
<div class="chips" id="interestChips"></div>
</div>
</div>
<div class="form-actions">
<button class="btn-primary" id="analyzeBtn" type="button">分析周边目的地 <span>→</span></button>
<span class="hint" id="analyzeHint">首次分析需检索多个数据源,通常 5~15 秒。</span>
</div>
<div class="progress-wrap hidden" id="progressWrap">
<div class="progress-head"><span id="progressText">准备中…</span><b id="progressPct">0%</b></div>
<div class="progress-bar"><i id="progressBar"></i></div>
<div class="progress-stages" id="progressStages"></div>
</div>
</section>
<!-- ============================ STEP 2 ============================ -->
<section class="card step-panel" id="panel2">
<div class="card-head row">
<div>
<h2><span class="num">②</span> 备选目的地清单</h2>
<p id="resultSub">按适配分排序,标注每一项的数据来源与估算内容。</p>
</div>
<div class="head-actions">
<button class="btn-outline sm" id="backBtn1" type="button">← 改条件</button>
<button class="btn-primary sm" id="toStep3" type="button">用已选目的地生成规划 →</button>
</div>
</div>
<div class="hidden" id="alertBox"></div>
<!-- 分析结果缓存提示:命中缓存时告知,并给一个强刷出口 -->
<div class="cache-bar hidden" id="cacheBar"></div>
<div class="result-top">
<div class="compass-panel">
<h3>出行方位罗盘 <span>点击圆点定位卡片</span></h3>
<div id="compass"></div>
<div class="legend">
<span><i class="lg good"></i>适配分 ≥ 60</span>
<span><i class="lg mid"></i>45 ~ 59</span>
<span><i class="lg low"></i>&lt; 45</span>
<span class="legend-note">方位=相对出发地,半径=距离</span>
</div>
</div>
<div class="summary-panel" id="summaryPanel"></div>
</div>
<div class="toolbar">
<div class="seg" id="sortSeg">
<button class="active" data-sort="score">综合评分</button>
<button data-sort="weather">天气最好</button>
<button data-sort="distance">距离最近</button>
<button data-sort="time">单程最短</button>
</div>
<label class="check"><input type="checkbox" id="onlyRec"> 仅显示「推荐」及以上</label>
<label class="check"><input type="checkbox" id="onlyNiche"> 只看小众</label>
<button class="btn-outline sm" id="compareBtn" type="button">对比已选</button>
<span class="selected-count" id="selectedCount">已选 0 个</span>
</div>
<div class="preselect-hint hidden" id="preselectHint">已自动预选评分最高的 3 个目的地,可点击卡片按钮取消或改选</div>
<div class="compare-panel hidden" id="comparePanel"></div>
<div class="cards" id="cards"></div>
<div class="notes" id="dataNotes"></div>
</section>
<!-- ============================ STEP 3 ============================ -->
<section class="card step-panel" id="panel3">
<div class="card-head row">
<div>
<h2><span class="num">③</span> 具体需求与 AI 行程规划</h2>
<p>清单数据 + 你的需求 + 本站预设提示词 → 任意 OpenAI 兼容接口(未配置时使用演示模式)。</p>
</div>
<button class="btn-outline sm" id="backBtn2" type="button">← 返回清单</button>
</div>
<div class="plan-grid">
<div class="plan-left">
<label>已选目的地 <span class="label-note" id="selHint">返回上一步可调整</span></label>
<div class="selected-chips" id="selectedChips"></div>
<label for="needs">你的具体需求</label>
<textarea id="needs" rows="9" placeholder="例如:带 6 岁孩子和一位老人,两天一晚,总预算 1500 元以内;不想走太多路;希望有室内备选;不自驾,优先高铁;想吃当地特色但别太辣……"></textarea>
<div class="lodging-row">
<span class="lodging-label">住宿价位</span>
<div class="chips" id="lodgingChips"></div>
</div>
<div class="lodging-custom hidden" id="lodgingCustom">
<span class="cny">¥</span>
<input id="lodgingMin" type="number" min="0" step="50" inputmode="numeric" placeholder="最低">
<span class="to">–</span>
<input id="lodgingMax" type="number" min="0" step="50" inputmode="numeric" placeholder="最高">
<span class="unit">元 / 晚</span>
</div>
<p class="lodging-tip" id="lodgingTip"></p>
<div class="quick-needs" id="quickNeeds"></div>
<div class="ai-inline" id="aiInline"></div>
<button class="btn-primary full" id="planBtn" type="button">生成行程规划 →</button>
<p class="hint">生成方案后,会据此给出住宿建议与路线示意图。</p>
</div>
<div class="plan-right">
<div class="output-head">
<span id="outputMeta">等待生成</span>
<div class="head-tools">
<select id="versionSelect" class="version-select hidden" title="切换版本 / 载入已保存方案"></select>
<button class="btn-ghost sm hidden" id="comparePlan" type="button">对比上一版</button>
<button class="btn-ghost sm hidden" id="savePlan" type="button">保存</button>
<button class="btn-ghost sm" id="copyBtn" type="button">复制</button>
<button class="btn-ghost sm" id="downloadBtn" type="button">下载 .md</button>
</div>
</div>
<div class="compare-wrap hidden" id="compareWrap">
<div class="compare-col"><div class="compare-col-head" id="compareLeftHead">上一版</div><div class="markdown" id="compareLeft"></div></div>
<div class="compare-col"><div class="compare-col-head" id="compareRightHead">当前版</div><div class="markdown" id="compareRight"></div></div>
</div>
<div class="markdown empty" id="planOutput">
<div class="empty-state">
<div class="empty-icon">✦</div>
<h4>方案会显示在这里</h4>
<p>包含方案总览、逐日安排表、天气与装备、交通方案、预算粗估、出发前清单和风险备选。</p>
</div>
</div>
<div class="followup hidden" id="planFollowup">
<div class="followup-row">
<input id="followupInput" type="text" placeholder="继续调整,例如:第二天改成室内为主;总预算压到 1200;换一家离景区更近的住处" autocomplete="off">
<button class="btn-primary sm" id="followupBtn" type="button">继续优化</button>
</div>
<div class="followup-hint">
<span id="followupCount">会基于当前方案重写完整版本</span>
<button class="btn-ghost sm" id="resetPlan" type="button">回到初版</button>
</div>
</div>
</div>
</div>
<!-- 方案定稿后才出现:路线示意 + 按行程与价位给的住宿建议 -->
<div class="plan-extra hidden" id="planExtra">
<div class="extra-card">
<div class="extra-head">
<span>行程路线示意</span>
<span class="extra-note" id="routeNote"></span>
</div>
<div class="route-wrap" id="routeMap"></div>
</div>
<div class="extra-card">
<div class="extra-head">
<span>住宿建议</span>
<span class="extra-note" id="stayNote"></span>
</div>
<div class="hotel-box" id="hotelBox"></div>
</div>
</div>
</section>
<footer class="footer">
<div><strong>行知 · TripSense</strong> — 周边出行决策原型</div>
<div>数据:Open-Meteo(天气/空气质量/地理编码)· OpenStreetMap / Photon(周边地点)· OSRM(公路)· 内置知名 + 小众地点库 · 可选高德 / 铁路接口 · OpenAI 兼容模型</div>
<div class="disclaimer">天气为预报或历史气候参考,铁路与部分路网耗时为估算;票价、班次、门票、开放时间请临近出发前在官方渠道核对。本工具不构成出行安全承诺。</div>
</footer>
</main>
<!-- ============================ 设置弹窗 ============================ -->
<div class="modal hidden" id="settingsModal">
<div class="modal-mask" id="modalMask"></div>
<div class="modal-box">
<div class="modal-head">
<h3>设置 <span>AI 接口 · 数据源</span></h3>
<button class="icon-btn" id="closeSettings" type="button">✕</button>
</div>
<p class="modal-desc">任何提供 <code>/chat/completions</code> 的服务都可接入。此处填写的值仅保存在本机浏览器,并随请求传给本地服务代理;生产环境建议改用服务端环境变量,不要在前端放密钥。留空 API Key 即使用演示模式。</p>
<label for="aiBase">接口地址 Base URL</label>
<input id="aiBase" type="text" placeholder="https://api.openai.com/v1" spellcheck="false">
<div class="presets" id="aiPresets"></div>
<label for="aiKey">API Key</label>
<input id="aiKey" type="password" placeholder="sk-…(留空 = 演示模式)" autocomplete="off">
<label for="aiModel">模型名称</label>
<input id="aiModel" type="text" placeholder="gpt-4o-mini" spellcheck="false">
<div class="field-row-inline">
<button class="btn-ghost sm" id="testAi" type="button">测试 AI 接口</button>
<span class="field-hint inline" id="aiTestResult"></span>
</div>
<div class="modal-divider"><span>数据源增强(可选)</span></div>
<label for="amapKey">高德 Web 服务 Key
<a class="field-link" href="https://console.amap.com/dev/key/app" target="_blank" rel="noopener">去申请 ↗</a>
</label>
<input id="amapKey" type="text" placeholder="留空 = 只用免密钥数据源" spellcheck="false" autocomplete="off">
<div class="field-row-inline">
<button class="btn-ghost sm" id="testAmap" type="button">测试这个 Key</button>
<span class="field-hint inline" id="amapTestResult"></span>
</div>
<p class="field-hint">用于实时周边 POI、国内驾车路径与中文地名检索,须选「Web服务」类型的 Key(不是「Web端(JS API)」)。填好后重新分析,清单里会出现更多实时地点,顶部「实时周边 POI 未取到」的提示也会消失。此值同样只存在本机浏览器。</p>
<label>住宿数据源</label>
<div class="field-row-inline">
<button class="btn-ghost sm" id="checkProviders" type="button">检测</button>
<span class="field-hint inline" id="providerResult">未检测</span>
</div>
<p class="field-hint">装了 <code>RollingGo</code> 的 <code>rgh</code> CLI 并执行 <code>rgh login</code> 后,住宿会显示实时报价与可预订链接;否则退回高德 POI(多数没有房价)。本项目只调用 <code>status</code> / <code>search-hotels</code> / <code>hotel-detail</code> 三个只读命令,<b>不会下单、不会取消订单</b>。</p>
<details class="prompt-details">
<summary>查看 / 复制本站预设提示词</summary>
<div class="prompt-actions"><button class="btn-ghost sm" id="copyPrompt" type="button">复制提示词</button></div>
<pre id="promptPreview"></pre>
</details>
<div class="modal-actions">
<button class="btn-primary" id="saveSettings" type="button">保存设置</button>
<button class="btn-outline" id="cancelSettings" type="button">取消</button>
<button class="btn-ghost sm" id="demoMode" type="button">强制演示模式</button>
</div>
</div>
</div>
<div class="toast hidden" id="toast"></div>
<script src="app.js?v=18"></script>
</body>
</html>
+696
View File
@@ -0,0 +1,696 @@
/* ============================================================
行知 · TripSense
简约主题:白底 + 中性灰 + 单一蓝色强调,细边框、轻阴影、圆角。
零依赖、无第三方 UI 框架。
============================================================ */
:root {
--paper: #ffffff;
--paper-2: #f6f7f9;
--sheet: #ffffff;
--sheet-2: #fafbfc;
--ink: #171a1f;
--ink-soft: #4d545c;
--muted: #8a929b;
--rule: #e8eaed;
--rule-strong: #d5d9de;
--accent: #2f6fed;
--accent-dark: #1f57c9;
--accent-soft: #eef3fe;
--moss: #2e7d5b;
--gold: #a1741f;
--bad: #c0392b;
--good: #2e7d5b;
--mid: #a1741f;
--low: #c0392b;
--shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .06);
--shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
--radius: 10px;
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
/* 简约模式:标题也用无衬线,不再用宋体 */
--serif: var(--font);
--mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: var(--font);
color: var(--ink);
background: var(--paper);
-webkit-font-smoothing: antialiased;
line-height: 1.6;
font-size: 14px;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
/* ---------------------------------------------------------- topbar */
.topbar {
position: sticky; top: 0; z-index: 40;
background: var(--sheet);
border-bottom: 1px solid var(--rule);
}
.topbar-inner { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
width: 32px; height: 32px; border-radius: 9px;
display: grid; place-items: center;
background: var(--accent); color: #fff; font-size: 17px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--font); font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--ink); }
.brand-text span { font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.status-pill {
display: inline-flex; align-items: center; gap: 7px;
font-size: 11.5px; color: var(--ink-soft);
background: var(--paper-2); border: 1px solid var(--rule);
padding: 6px 11px; border-radius: 999px;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.status-pill.live i { background: var(--good); }
/* ---------------------------------------------------------- buttons */
.btn-primary, .btn-outline, .btn-ghost {
border-radius: 8px; border: 1px solid var(--rule-strong);
transition: .15s ease; font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); padding: 11px 20px; box-shadow: none; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 0 4px 12px rgba(47, 111, 237, .28); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-primary span { margin-left: 6px; }
.btn-outline { background: var(--sheet); color: var(--ink-soft); border-color: var(--rule-strong); padding: 10px 16px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-ghost { background: transparent; color: var(--ink-soft); border-color: var(--rule); padding: 7px 13px; }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--rule-strong); }
.topbar .btn-ghost { color: var(--ink-soft); border-color: var(--rule-strong); }
.topbar .btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sm { padding: 6px 12px; font-size: 12px; }
.full { width: 100%; }
.icon-btn { border: 0; background: transparent; color: var(--muted); font-size: 17px; padding: 4px 8px; border-radius: 0; }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
/* ---------------------------------------------------------- hero */
.hero {
padding: 42px 0 26px; display: flex; justify-content: space-between;
align-items: flex-end; gap: 40px; flex-wrap: wrap;
border-bottom: 1px solid var(--rule); margin-bottom: 24px;
}
.hero-text { max-width: 700px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }
.hero h1 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.24; letter-spacing: .02em; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 14px; max-width: 660px; }
.stepper { list-style: none; display: flex; gap: 9px; margin: 0; padding: 0; }
.stepper li {
display: flex; align-items: center; gap: 8px; position: relative;
padding: 7px 13px 7px 8px; border: 1px solid var(--rule-strong);
background: var(--sheet); color: var(--muted); font-family: var(--mono); font-size: 11.5px;
transition: .18s ease; border-radius: 0;
}
.stepper li + li::before { content: ''; position: absolute; left: -10px; top: 50%; width: 9px; height: 1px; background: var(--rule-strong); }
.stepper li b { width: 20px; height: 20px; display: grid; place-items: center; background: var(--paper-2); font-size: 10px; color: var(--ink-soft); }
.stepper li.active { background: var(--ink); border-color: var(--ink); color: #fbf8f0; font-weight: 600; }
.stepper li.active b { background: var(--accent); color: #fff; }
.stepper li.done { color: var(--moss); border-color: #a9bda3; }
/* ---------------------------------------------------------- cards */
.card {
background: var(--sheet); border: 1px solid var(--rule-strong);
border-radius: var(--radius); box-shadow: var(--shadow);
padding: 26px 28px; margin-bottom: 22px;
}
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card-head { margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.card-head.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.card-head h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 21px; letter-spacing: .01em; }
.card-head h2 .num { color: var(--accent); margin-right: 6px; font-family: var(--mono); }
.card-head p { margin: 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; gap: 9px; }
/* ---------------------------------------------------------- form */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.field.span2 { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }
.field label em { font-style: normal; color: var(--accent); font-weight: 600; margin-left: 6px; font-size: 12px; }
.label-note { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.field input[type="text"], .field input[type="date"], .field select, .field textarea, .modal-box input {
width: 100%; padding: 10px 13px; border: 1px solid var(--rule-strong);
border-radius: var(--radius); background: #fffdf7; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .modal-box input:focus {
border-color: var(--accent); box-shadow: 0 0 0 2px rgba(176, 74, 43, .14);
}
.field textarea { resize: vertical; min-height: 170px; line-height: 1.7; }
.origin-row { display: flex; gap: 10px; }
.origin-row input { flex: 1; }
.origin-row .btn-outline { white-space: nowrap; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
/* 定位在非安全上下文不可用时的提示,用赭橙提醒但不至于像报错 */
.hint-warn { color: var(--accent); border-left: 3px solid var(--accent); padding-left: 9px; line-height: 1.6; }
/* 分析结果缓存提示条:告知"这是缓存"并给一个强刷出口 */
.cache-bar {
display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
padding: 9px 13px; margin: 10px 0;
background: var(--accent-soft); border: 1px solid #cdddfa; border-radius: var(--radius);
font-size: 12.5px; color: var(--accent-dark);
}
.cache-bar .link-btn {
border: 0; background: none; padding: 0; cursor: pointer;
color: var(--accent); font: inherit; font-weight: 700;
text-decoration: underline; text-underline-offset: 3px;
}
.cache-bar .link-btn:hover { color: var(--accent-dark); }
.btn-outline.geo-off { opacity: .5; border-style: dashed; cursor: not-allowed; }
.btn-outline.geo-off:hover { opacity: .5; border-color: var(--rule-strong); color: var(--ink-soft); }
.window-hint {
display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
padding: 9px 13px; background: var(--accent-soft); border: 1px solid #dcbfa9;
border-radius: var(--radius); font-family: var(--mono); font-size: 12px; color: var(--accent-dark);
}
.window-hint b { font-weight: 700; }
.window-hint button { border: 1px solid var(--accent); background: var(--sheet); color: var(--accent); border-radius: 0; padding: 3px 10px; font-family: var(--mono); font-size: 11px; font-weight: 600; }
.window-hint button:hover { background: var(--accent); color: #fff; }
/* 定位参照物:不设 relative 的话,联想下拉的 100% 会按更外层容器算,右边缘溢出卡片 */
.origin-field { position: relative; }
.suggest {
position: absolute; z-index: 20; margin-top: 4px; left: 0; right: 0; width: auto;
background: var(--sheet); border: 1px solid var(--ink); border-radius: 0;
box-shadow: 5px 5px 0 rgba(32, 44, 41, .16); overflow: hidden;
}
.suggest-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 10px; }
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover { background: var(--accent-soft); }
.suggest-item small { color: var(--muted); font-family: var(--mono); }
/* 查不到时的明确反馈,替代过去的静默隐藏 */
.suggest-empty { padding: 12px 14px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.suggest-note { padding: 8px 14px; font-family: var(--mono); font-size: 10.5px; color: var(--accent); background: var(--accent-soft); border-bottom: 1px solid var(--rule); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-scale { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
padding: 6px 13px; border: 1px solid var(--rule-strong); border-radius: 0;
background: var(--sheet); color: var(--ink-soft); font-family: var(--mono); font-size: 12px; transition: .14s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fbf8f0; font-weight: 600; }
.form-actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* ---------------------------------------------------------- progress */
.progress-wrap { margin-top: 22px; padding: 16px 18px; background: var(--sheet-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.progress-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; margin-bottom: 9px; }
.progress-head span { color: var(--ink-soft); }
.progress-head b { color: var(--accent); }
.progress-bar { height: 8px; background: var(--paper-2); border: 1px solid var(--rule); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 10px, var(--accent-dark) 10px 12px); transition: width .35s ease; }
.progress-stages { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 12px; }
.progress-stages span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.progress-stages span.done { color: var(--moss); }
.progress-stages span.now { color: var(--accent); font-weight: 600; }
/* ---------------------------------------------------------- alert */
.alert { padding: 11px 15px; border: 1px solid; border-left: 4px solid; border-radius: 0; margin-bottom: 18px; font-size: 12.5px; }
.alert.warn { background: #f8ecdc; border-color: #d9b98e; border-left-color: var(--gold); color: #7d4d1c; }
.alert.info { background: #e9eee4; border-color: #a9bda3; border-left-color: var(--moss); color: #3f5a41; }
/* ---------------------------------------------------------- result top */
.result-top { display: grid; grid-template-columns: 400px 1fr; gap: 22px; margin-bottom: 22px; }
.compass-panel, .summary-panel { background: var(--sheet-2); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 18px; }
.compass-panel h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 14px; }
.compass-panel h3 span { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 6px; font-family: var(--mono); }
#compass svg { width: 100%; height: auto; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 9px; height: 9px; display: inline-block; }
.lg.good { background: var(--good); } .lg.mid { background: var(--mid); } .lg.low { background: var(--low); }
.legend-note { margin-left: auto; }
.summary-panel { display: flex; flex-direction: column; justify-content: center; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 0; }
.stat .k { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.stat .v { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1.3; }
.stat .v small { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat .d { font-size: 11px; color: var(--muted); margin-top: 2px; }
.summary-lines { margin-top: 14px; display: flex; flex-direction: column; gap: 5px; }
.summary-lines div { font-size: 12px; color: var(--ink-soft); }
.summary-lines b { color: var(--ink); font-family: var(--mono); font-size: 11px; margin-right: 6px; }
/* ---------------------------------------------------------- toolbar */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 18px; }
.seg { display: inline-flex; background: var(--paper-2); border: 1px solid var(--rule-strong); border-radius: 0; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 0; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); }
.seg button.active { background: var(--ink); color: #fbf8f0; font-weight: 600; }
.check { font-size: 12px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.check input { accent-color: var(--accent); }
/* 「排除同城」这一行:整行浅底,说明文字另起一行,避免和后面的 chip 混在一起 */
.inline-check {
display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
padding: 10px 13px; border: 1px solid var(--rule); background: var(--sheet-2);
font-size: 12.5px; margin-bottom: 0;
}
.inline-check input { margin: 0; }
.inline-check .label-note { flex-basis: 100%; margin-left: 22px; font-size: 11px; line-height: 1.6; }
.selected-count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 600; }
.preselect-hint { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin: -6px 0 14px; padding-left: 10px; border-left: 3px solid var(--rule-strong); }
/* ---------------------------------------------------------- compare */
.compare-panel { border: 1px solid var(--rule-strong); border-left: 4px solid var(--accent); background: var(--sheet-2); border-radius: 0; padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.compare-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.compare-head h4 { margin: 0; font-family: var(--serif); font-size: 15px; }
.compare-head span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.compare-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.compare-table th, .compare-table td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; white-space: nowrap; }
.compare-table thead th { background: var(--ink); color: #fbf8f0; font-family: var(--mono); font-weight: 600; }
.compare-table tbody th { background: var(--paper-2); font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.compare-empty { font-size: 12.5px; color: var(--muted); }
/* ---------------------------------------------------------- dest cards */
/* align-items:start 是关键:一张卡片展开逐日天气时,不应把同一行另一张卡片拉高 */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dest-card {
border: 1px solid var(--rule-strong); border-left: 4px solid var(--rule-strong);
border-radius: 0; background: var(--sheet);
padding: 16px 18px; box-shadow: var(--shadow-sm);
transition: .16s ease; scroll-margin-top: 80px;
}
.dest-card:hover { border-color: var(--ink); }
.dest-card.picked { border-left-color: var(--accent); background: linear-gradient(180deg, #fdf3ea, var(--sheet) 90px); }
.dest-card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow-sm); } 30% { box-shadow: 0 0 0 4px rgba(176, 74, 43, .24); } }
.card-top { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.rank { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--paper-2); padding: 3px 8px; border: 1px solid var(--rule); }
.verdict { font-family: var(--mono); font-size: 10.5px; font-weight: 600; padding: 3px 8px; border: 1px solid; }
.verdict.v1 { background: #e3ead9; color: var(--moss); border-color: #b3c5a6; }
.verdict.v2 { background: #e8eee1; color: #41603f; border-color: #b9c9ae; }
.verdict.v3 { background: #f6ecd7; color: #8a6a20; border-color: #ddc79a; }
.verdict.v4 { background: #f6e2df; color: var(--bad); border-color: #dcb7b2; }
.niche-badge { font-family: var(--mono); font-size: 10px; padding: 3px 7px; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); }
.pick-btn { margin-left: auto; border: 1px solid var(--rule-strong); background: var(--sheet); border-radius: 0; padding: 5px 11px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); }
.pick-btn:hover { border-color: var(--accent); color: var(--accent); }
.pick-btn.on { background: var(--ink); border-color: var(--ink); color: #fbf8f0; }
.card-title h4 { margin: 0; font-family: var(--serif); font-size: 18px; letter-spacing: .01em; }
.card-title .sub { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.card-body { display: flex; gap: 16px; margin: 14px 0 12px; align-items: center; }
.score-ring { flex: 0 0 78px; text-align: center; }
.score-ring svg { width: 72px; height: 72px; }
.score-ring .score-num { font-family: var(--serif); font-size: 21px; font-weight: 800; fill: var(--ink); }
.score-ring .score-cap { font-family: var(--mono); font-size: 8px; fill: var(--muted); }
.metrics { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.metric { min-width: 0; }
.metric .k { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .03em; }
.metric .v { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .s { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .s.est { color: var(--accent); }
.reasons { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.reasons li { font-size: 12px; color: var(--ink-soft); padding-left: 15px; position: relative; }
.reasons li::before { content: "✓"; position: absolute; left: 0; color: var(--moss); font-size: 11px; }
.warnings { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.warnings span { font-family: var(--mono); font-size: 10.5px; background: #f8ecdc; color: #8a5f1c; border: 1px solid #ddc79a; padding: 3px 8px; }
.empty-mini { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 20px 0; text-align: center; }
/* 逐日天气:自定义展开箭头 + 明确展开态 + 窄卡片内横向滚动 */
.daily { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 9px; }
.daily summary {
font-family: var(--mono); font-size: 11.5px; color: var(--accent); cursor: pointer;
list-style: none; display: flex; align-items: center; gap: 7px;
padding: 2px 0; user-select: none;
}
.daily summary::-webkit-details-marker { display: none; }
.daily summary::before { content: '▸'; display: inline-block; font-size: 10px; transition: transform .18s ease; }
.daily[open] summary::before { transform: rotate(90deg); }
.daily[open] summary { color: var(--ink); font-weight: 600; }
.daily table {
width: 100%; border-collapse: collapse; margin-top: 9px; font-family: var(--mono); font-size: 10.5px;
display: block; overflow-x: auto; white-space: nowrap;
}
.daily th, .daily td { padding: 5px 7px; border-bottom: 1px solid var(--rule); text-align: left; }
.daily th { color: var(--muted); font-weight: 500; background: var(--sheet-2); }
/* ---------------------------------------------------------- notes */
.notes { margin-top: 20px; padding: 14px 16px; background: var(--sheet-2); border: 1px solid var(--rule); border-left: 4px solid var(--rule-strong); }
.notes h4 { margin: 0 0 8px; font-family: var(--serif); font-size: 13px; }
.notes ul { margin: 0; padding-left: 18px; }
.notes li { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
/* ---------------------------------------------------------- plan */
.plan-grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; }
.plan-left label { display: block; font-weight: 600; font-size: 12.5px; margin: 0 0 8px; }
.plan-left label:not(:first-child) { margin-top: 20px; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 34px; }
.sel-chip { font-family: var(--mono); font-size: 11.5px; padding: 5px 10px; background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #dcbfa9; }
.quick-needs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.quick-needs button { font-family: var(--mono); font-size: 11px; padding: 5px 10px; border: 1px solid var(--rule-strong); background: var(--sheet); border-radius: 0; color: var(--ink-soft); }
.quick-needs button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ai-inline { margin: 16px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--sheet-2); border-radius: 0; font-size: 11.5px; color: var(--ink-soft); line-height: 1.7; }
.ai-inline b { color: var(--accent); }
.plan-right { border: 1px solid var(--rule-strong); border-radius: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--sheet); min-height: 560px; }
.output-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 14px; background: var(--paper-2); border-bottom: 1px solid var(--rule); font-size: 11.5px; color: var(--ink-soft); }
.output-head > div { display: flex; gap: 7px; }
.output-head .btn-ghost { color: var(--ink-soft); border-color: var(--rule-strong); background: var(--sheet); }
.output-head .btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.markdown { padding: 22px 26px; flex: 1; overflow-y: auto; max-height: 760px; font-size: 13.5px; line-height: 1.85; }
/* 生成之后的「继续调整」区:贴在输出框底部,像对话的输入条 */
.followup {
border-top: 1px dashed var(--rule-strong);
padding: 12px 14px 13px;
background: var(--sheet-2);
flex: 0 0 auto;
}
.followup-row { display: flex; gap: 9px; }
.followup-row input {
flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--rule-strong);
background: var(--sheet); font-family: inherit; font-size: 12.5px; border-radius: 0; color: var(--ink);
}
.followup-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.followup-hint {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
margin-top: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted);
}
.followup-hint .btn-ghost { padding: 3px 8px; font-size: 10.5px; }
.markdown.empty { display: flex; align-items: center; justify-content: center; }
.empty-state { text-align: center; color: var(--muted); max-width: 320px; }
.empty-icon { font-size: 32px; color: var(--accent); opacity: .5; margin-bottom: 8px; }
.empty-state h4 { margin: 0 0 6px; color: var(--ink-soft); font-family: var(--serif); font-size: 16px; }
.empty-state p { font-size: 12.5px; }
/* markdown output */
.markdown h1, .markdown h2, .markdown h3, .markdown h4 { font-family: var(--serif); line-height: 1.4; margin: 22px 0 10px; }
.markdown h1 { font-size: 22px; }
.markdown h2 { font-size: 18px; color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.markdown h3 { font-size: 15px; } .markdown h4 { font-size: 14px; }
.markdown p { margin: 9px 0; }
.markdown ul, .markdown ol { padding-left: 22px; margin: 9px 0; }
.markdown li { margin: 4px 0; }
.markdown blockquote { margin: 12px 0; padding: 10px 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0; color: #7d4d1c; font-size: 12.5px; }
.markdown blockquote p { margin: 0; }
.markdown table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--rule); padding: 7px 10px; text-align: left; white-space: nowrap; }
.markdown th { background: var(--paper-2); font-weight: 600; }
.markdown tr:nth-child(even) td { background: var(--sheet-2); }
.markdown code { background: var(--paper-2); padding: 1px 5px; border-radius: 0; font-family: var(--mono); font-size: 11.5px; }
.markdown pre { background: var(--ink); color: #e8e4d8; padding: 14px; border-radius: 0; overflow-x: auto; font-size: 12px; }
.markdown pre code { background: transparent; color: inherit; padding: 0; }
.markdown hr { border: 0; border-top: 1px solid var(--rule-strong); margin: 20px 0; }
.markdown strong { color: var(--ink); }
.markdown a { word-break: break-all; }
.cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
/* ---------------------------------------------------------- footer */
.footer { padding: 18px 0 40px; color: var(--muted); font-family: var(--mono); font-size: 10.5px; line-height: 1.9; border-top: 1px solid var(--rule-strong); }
.footer strong { color: var(--ink-soft); }
.footer .disclaimer { margin-top: 6px; color: #93988c; }
/* ---------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.modal.hidden, .hidden { display: none !important; }
.modal-mask { position: absolute; inset: 0; background: rgba(32, 44, 41, .58); }
.modal-box {
position: relative; width: min(560px, calc(100vw - 32px)); max-height: 88vh; overflow-y: auto;
background: var(--sheet); border: 1px solid var(--ink); border-radius: 0; padding: 24px 26px;
box-shadow: 8px 8px 0 rgba(32, 44, 41, .2);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
.modal-head h3 { margin: 0; font-family: var(--serif); font-size: 18px; }
.modal-head h3 span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.modal-desc { font-size: 12px; color: var(--muted); margin: 12px 0 20px; line-height: 1.75; }
.modal-desc code { background: var(--paper-2); padding: 1px 5px; font-family: var(--mono); font-size: 11px; }
.modal-box label { display: block; font-size: 12px; font-weight: 600; margin: 14px 0 7px; }
/* 数据源增强区块:与 AI 接口分开,避免用户以为只能配模型 */
.modal-divider { display: flex; align-items: center; gap: 10px; margin: 22px 0 4px; }
.modal-divider::before, .modal-divider::after { content: ''; height: 1px; background: var(--rule); flex: 1; }
.modal-divider span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.field-link { font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--accent); margin-left: 6px; text-decoration: none; border-bottom: 1px solid currentColor; }
.field-link:hover { color: var(--accent-dark); }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.65; margin: 7px 0 0; }
.field-row-inline { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.field-hint.inline { margin: 0; }
.field-hint.good { color: var(--moss); font-weight: 600; }
.field-hint.bad { color: var(--accent); font-weight: 600; }
.alert-link { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; margin: 0 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.alert-link:hover { color: var(--accent-dark); }
.alert-link[disabled] { opacity: .5; cursor: default; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.presets button { font-family: var(--mono); font-size: 11px; padding: 5px 10px; border: 1px solid var(--rule-strong); background: var(--sheet); border-radius: 0; color: var(--ink-soft); }
.presets button:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.prompt-details { margin-top: 18px; border: 1px solid var(--rule-strong); border-radius: 0; padding: 10px 13px; }
.prompt-details summary { font-family: var(--mono); font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600; }
.prompt-actions { margin: 10px 0 8px; }
.prompt-details pre { max-height: 230px; overflow: auto; background: var(--sheet-2); padding: 12px; border: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; line-height: 1.65; white-space: pre-wrap; color: var(--ink-soft); }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
/* ---------------------------------------------------------- toast */
.toast {
position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translateX(-50%);
background: var(--ink); color: #fbf8f0; padding: 11px 18px; border: 1px solid var(--accent);
font-family: var(--mono); font-size: 12.5px; box-shadow: 5px 5px 0 rgba(32, 44, 41, .22); animation: toastIn .25s ease;
}
.toast.err { background: var(--bad); border-color: #7d2a24; }
.toast.ok { background: var(--moss); border-color: #35513a; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* ---------------------------------------------------------- responsive */
@media (max-width: 980px) {
.result-top, .plan-grid { grid-template-columns: 1fr; }
.compass-panel { max-width: 420px; }
}
@media (max-width: 720px) {
.wrap { padding: 0 14px; }
.card { padding: 20px 16px; }
.form-grid, .cards { grid-template-columns: 1fr; }
.field.span2 { grid-column: auto; }
.hero { padding-top: 28px; }
.stepper { width: 100%; overflow-x: auto; }
/* 保持横向排列:一旦变成纵向,联想下拉会被推到定位按钮下方,
手机键盘弹出时正好落在视口外,用户会以为"没有联想" */
.origin-row { flex-direction: row; align-items: stretch; }
.origin-row .btn-outline {
flex: 0 0 auto; min-width: 48px; padding: 0 12px; font-size: 0;
}
.origin-row .btn-outline::before { content: '📍'; font-size: 16px; }
/* 下拉限高 + 可滚动,保证在手机视口内能看到、能选 */
.suggest { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.summary-grid { grid-template-columns: repeat(2, 1fr); }
.head-actions { width: 100%; }
.selected-count { margin-left: 0; }
}
/* ============================================================
简约化收尾:圆角、需求框、chips
============================================================ */
.card, .dest-card, .compass-panel, .plan-right, .modal-box, .stat {
border-radius: var(--radius);
}
.card { box-shadow: var(--shadow-sm); }
.field input[type="text"], .field input[type="date"], .field select,
.field textarea, .modal-box input, .followup-row input {
border-radius: 8px;
border-color: var(--rule-strong);
background: var(--sheet);
}
/* 「你的具体需求」之前不在 .field 里,完全没吃到输入框样式,所以又小又没边界 */
.plan-left textarea {
display: block; width: 100%; min-height: 200px;
padding: 12px 14px; line-height: 1.7; font-size: 13px;
color: var(--ink); background: var(--sheet);
border: 1px solid var(--rule-strong); border-radius: 8px;
resize: vertical; transition: border-color .15s, box-shadow .15s;
}
.plan-left textarea::placeholder { color: var(--muted); }
.plan-left textarea:focus {
outline: none; border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.chip, .quick-needs button, .presets button, .stepper li { border-radius: 999px; }
.chip { padding: 6px 14px; }
.sel-chip { border-radius: 999px; border-color: var(--rule-strong); background: var(--accent-soft); color: var(--accent-dark); }
.output-head { border-radius: var(--radius) var(--radius) 0 0; }
.followup { border-radius: 0 0 var(--radius) var(--radius); }
.alert { border-radius: 8px; }
/* ------------------------------ 版本切换 / 对比 */
.head-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.version-select {
font-size: 11.5px; padding: 5px 8px; border: 1px solid var(--rule-strong);
border-radius: 6px; background: var(--sheet); color: var(--ink);
max-width: 200px; cursor: pointer;
}
.version-select:focus { outline: none; border-color: var(--accent); }
.compare-wrap {
display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
background: var(--rule); flex: 1; min-height: 0; overflow: hidden;
}
.compare-col { display: flex; flex-direction: column; background: var(--sheet); min-width: 0; }
.compare-col-head {
padding: 8px 14px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
background: var(--sheet-2); border-bottom: 1px solid var(--rule);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.compare-col .markdown { max-height: none; padding: 16px 18px; font-size: 12.5px; }
@media (max-width: 900px) {
.compare-wrap { grid-template-columns: 1fr; }
.version-select { max-width: 150px; }
}
/* ------------------------------ 周边住宿参考 */
.hotel-box { margin-top: 14px; }
.hotel-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.hotel-details { border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet-2); overflow: hidden; }
.hotel-details summary {
padding: 8px 11px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px;
}
.hotel-details summary::-webkit-details-marker { display: none; }
.hotel-details summary::before { content: '▸'; font-size: 9px; color: var(--muted); transition: transform .16s; }
.hotel-details[open] summary::before { transform: rotate(90deg); }
.hotel-details summary span { font-weight: 400; color: var(--muted); margin-left: auto; }
.hotel-list { list-style: none; margin: 0; padding: 0 11px 8px; max-height: 200px; overflow-y: auto; }
.hotel-list li {
display: flex; justify-content: space-between; gap: 10px; padding: 6px 0;
border-top: 1px dashed var(--rule); font-size: 11.5px;
}
.hotel-list .hn { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hotel-list .hm { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hotel-note { padding: 0 11px 9px; font-size: 10.5px; color: var(--muted); line-height: 1.55; }
/* ------------------------------ 强调色统一为蓝色,去掉散落的黑块 */
.stepper li.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pick-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.compare-table thead th { background: var(--paper-2); color: var(--ink-soft); }
/* 输出头按钮多,允许换行,否则会把右侧按钮挤出容器 */
.output-head { flex-wrap: wrap; row-gap: 7px; }
.head-tools { flex-wrap: wrap; row-gap: 6px; }
.version-select { max-width: 160px; }
.output-head .btn-ghost { padding: 5px 10px; }
/* ------------------------------ 住宿价位选择 */
.lodging-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.lodging-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.lodging-row .chips .chip { font-size: 11.5px; padding: 5px 11px; }
/* ------------------------------ 路线图 + 住宿(方案定稿后出现) */
.plan-extra { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; margin-top: 20px; }
.extra-card {
border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet);
box-shadow: var(--shadow-sm); overflow: hidden;
}
.extra-head {
display: flex; align-items: center; justify-content: space-between; gap: 10px;
padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--sheet-2);
font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.extra-note { font-weight: 400; font-size: 11px; color: var(--muted); }
.route-wrap { padding: 10px 12px 12px; }
.route-svg { width: 100%; height: auto; display: block; }
.rm-scale { font-size: 9px; fill: #b6bec8; }
.rm-compass { font-size: 10px; fill: var(--muted); font-weight: 700; letter-spacing: .06em; }
.rm-idx { font-size: 8.5px; fill: #fff; font-weight: 700; }
.rm-name { font-size: 11.5px; fill: var(--ink); font-weight: 600; }
.rm-dist { font-size: 9.5px; fill: var(--muted); }
.rm-origin { font-size: 10.5px; fill: var(--ink-soft); font-weight: 600; }
.route-legend {
display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
padding: 6px 2px 0; font-size: 10.5px; color: var(--muted);
}
.route-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.route-legend .dot.origin { background: #171a1f; }
.route-legend .dot.dest { background: var(--accent); }
.route-provider { margin-left: auto; }
/* 行程点清单:地图上最多画 9 个点,方案里的地点通常更多,
完整清单让用户能看到「每个安排的地点」是哪些、按什么顺序 */
.route-stops {
list-style: none; margin: 10px 0 0; padding: 0;
display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 10px;
}
.route-stops li {
display: flex; align-items: baseline; gap: 6px;
font-size: 11.5px; color: var(--ink-soft); line-height: 1.5;
}
.route-stops li b {
flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
background: var(--accent); color: #fff;
font-size: 9.5px; font-weight: 600; text-align: center; line-height: 16px;
}
.route-stops li .sn { flex: 1 1 auto; }
.route-stops li em {
flex: 0 0 auto; font-style: normal; font-size: 10px; color: var(--muted);
}
.hotel-box { padding: 12px 14px; margin-top: 0; }
.extra-card .hotel-list { padding: 0 0 6px; }
.extra-card .hotel-note { padding: 0; }
.stay-range { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.stay-range b { color: var(--ink-soft); }
/* ------------------------------------------------- 住宿自定义价位 */
.lodging-custom { display: flex; align-items: center; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.lodging-custom .cny, .lodging-custom .to { font-size: 12px; color: var(--muted); }
.lodging-custom input {
width: 96px; padding: 7px 9px; font-size: 12.5px;
border: 1px solid var(--rule-strong); border-radius: 7px; background: #fff; color: var(--ink);
font-variant-numeric: tabular-nums;
}
.lodging-custom input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 111, 237, .12); }
.lodging-custom .unit { font-size: 11px; color: var(--muted); }
.lodging-tip { margin: 7px 0 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
/* ------------------------------------------------- 住宿价格缺失与外部核对 */
.hotel-list .hn { flex: 1; min-width: 0; }
.hotel-list .hm-link {
font-size: 10.5px; color: var(--accent); text-decoration: none;
border-bottom: 1px solid transparent; white-space: nowrap;
}
.hotel-list .hm-link:hover { border-bottom-color: var(--accent); }
.price-warn {
font-size: 10.5px; line-height: 1.65; color: #8a5a00;
background: #fff8e6; border: 1px solid #f0dcae; border-radius: 7px;
padding: 8px 10px; margin: 0 0 8px;
}
.price-warn code { font-family: var(--mono); font-size: 10px; background: #fff; padding: 0 3px; border-radius: 3px; }
/* ------------------------------------------------- 真实地图图层 */
.map-layer {
position: relative; border-radius: 8px; overflow: hidden;
border: 1px solid var(--rule); background: var(--paper-2);
}
.map-layer img { display: block; width: 100%; height: auto; }
/* 标记与连线是前端叠加的 SVG,跟底图同 viewBox,自动对齐 */
.map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.map-name {
font-size: 11px; fill: #171a1f; font-weight: 600;
paint-order: stroke; stroke: rgba(255, 255, 255, .95); stroke-width: 3.5px; stroke-linejoin: round;
}
.map-legend {
position: absolute; left: 8px; bottom: 8px;
font-size: 10px; color: #fff; background: rgba(23, 26, 31, .62);
padding: 3px 8px; border-radius: 4px;
}
.route-fallback .route-svg { border-radius: 8px; background: #fbfcfd; border: 1px solid var(--rule); }
.map-hint { font-size: 10.5px; color: var(--muted); margin-top: 7px; line-height: 1.6; }
/* 两张卡内容长度差很多,按 start 对齐,别互相拉伸 */
.plan-extra { align-items: start; }
@media (max-width: 900px) {
.plan-extra { grid-template-columns: 1fr; }
}