/* ══════════════════════════════════════════════════
   悠游 · AI 旅行规划师 — 全局样式
   ══════════════════════════════════════════════════ */
:root {
  --primary: #0ea5e9;
  --primary-2: #10b981;
  --gradient: linear-gradient(135deg, #0ea5e9, #10b981);
  --bg: #f4f6f9;
  --surface: #ffffff;
  --border: #e6eaf0;
  --text: #1f2937;
  --text-sub: #6b7280;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.app { display: flex; height: 100vh; }

/* ──────────────── 侧边栏 ──────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  flex-shrink: 0;
  z-index: 30;
}

.logo { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }

/* 品牌徽章（圆形插画 logo）：细描边圈住深青圆框，青调投影呼应徽章主色 */
.logo-icon {
  width: 42px; height: 42px;
  display: block; flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 10px rgba(43, 95, 110, 0.25);
  transition: transform 1.4s cubic-bezier(.3, .1, .25, 1);
}

/* 悬浮转 3 圈（1080°）+ 轻微放大；移开后原路转回，先快后缓像陀螺收势 */
.logo:hover .logo-icon { transform: rotate(1080deg) scale(1.06); }

.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 17px; font-weight: 700; }
.logo-sub { font-size: 12px; color: var(--text-sub); }

.btn-new-chat {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-new-chat:hover { opacity: 0.92; }
.btn-new-chat:active { transform: scale(0.98); }

.session-section { flex: 1; overflow-y: auto; margin-top: 18px; }
.session-title {
  font-size: 12px; color: var(--text-sub);
  padding: 0 6px 8px; letter-spacing: 1px;
}

.session-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.15s;
  position: relative;
}
.session-item:hover { background: #f1f5f9; }
.session-item.active { background: #e0f2fe; color: #0369a1; font-weight: 600; }
.session-item .s-icon { flex-shrink: 0; }
.session-item .s-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.session-item .s-title {
  overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.session-item .s-time {
  font-size: 11px; color: #9ca3af; font-weight: 400; line-height: 1.3;
}
.session-item.active .s-time { color: #0284c7; }
.session-item .s-del {
  visibility: hidden;
  border: none; background: none;
  color: #9ca3af; cursor: pointer; font-size: 14px;
  flex-shrink: 0; padding: 2px;
}
.session-item:hover .s-del { visibility: visible; }
.session-item .s-del:hover { color: #ef4444; }

.session-empty { font-size: 12px; color: #9ca3af; text-align: center; padding: 16px 0; }

.sidebar-footer {
  padding-top: 14px;
  font-size: 12px; color: var(--text-sub);
  display: flex; align-items: center; gap: 6px;
}
.sidebar-footer .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ──────────────── 主聊天区 ──────────────── */
.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }

.chat-header {
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px;
  flex-shrink: 0;
}
.menu-btn { display: none; border: none; background: none; font-size: 20px; cursor: pointer; color: var(--text-sub); }
.header-title { font-size: 15px; font-weight: 600; flex: 1; }

.messages { flex: 1; overflow-y: auto; padding: 24px 0 12px; }

.messages-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ── 欢迎屏 ── */
.welcome { text-align: center; padding: 64px 12px 30px; }
/* 品牌徽章（圆形插画 logo），与侧栏/登录弹窗同款视觉 */
.welcome .w-icon {
  width: 96px; height: 96px;
  margin: 0 auto 20px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 10px 30px rgba(43, 95, 110, 0.28);
}
.welcome h1 {
  font-size: 26px; margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.welcome p { color: var(--text-sub); font-size: 14px; margin-bottom: 30px; }
.welcome p.welcome-hint {
  margin: -16px auto 26px; font-size: 12.5px; color: #475569;
  background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 8px 14px; display: inline-block;
}

.welcome-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; text-align: left; }

/* 左下角生成计时器：等宽数字防跳动，浅青胶囊与品牌青调一致 */
.gen-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: auto; /* 贴输入区左下角，右侧留给配额徽标 */
}
.gen-timer::before { content: "⏱ "; }
.w-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.w-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #bae6fd;
}
.w-card { position: relative; }
.w-card .w-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.w-card .w-desc { font-size: 12px; color: var(--text-sub); }

/* ── 消息 ── */
.msg { display: flex; gap: 12px; margin-bottom: 22px; animation: fadeUp 0.25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.msg.user { flex-direction: row-reverse; }
.avatar {
  width: 36px; height: 36px; border-radius: 10px;
  flex-shrink: 0; display: grid; place-items: center;
  font-size: 18px;
}
.msg.assistant .avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}
/* 生成中：头像徽章持续旋转，流式结束移除类即停（保留当前角度需 JS，直接线性循环更顺滑） */
.avatar.spinning { animation: logo-spin 1.1s linear infinite; }
@keyframes logo-spin { to { transform: rotate(360deg); } }
.msg.user .avatar { background: #e2e8f0; }

.bubble-wrap { max-width: 86%; min-width: 0; }

.msg.user .bubble {
  background: var(--gradient);
  color: #fff;
  padding: 11px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* 助手卡片 */
.assistant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  padding: 4px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* 思考过程折叠区 */
.reasoning-box { border-bottom: 1px solid var(--border); }
.reasoning-box summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 18px;
  font-size: 12.5px;
  color: var(--text-sub);
  display: flex; align-items: center; gap: 6px;
  user-select: none;
}
.reasoning-box summary::-webkit-details-marker { display: none; }
.reasoning-box[open] summary { border-bottom: 1px dashed var(--border); }
.reasoning-text {
  padding: 12px 18px;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.7;
  white-space: pre-wrap;
  max-height: 240px;
  overflow-y: auto;
  background: #fafbfc;
}

.reply-body { padding: 14px 18px 10px; }

/* Markdown 内容排版 */
.md { font-size: 14.5px; line-height: 1.75; word-break: break-word; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 18px 0 10px; line-height: 1.4; }
.md h1 { font-size: 19px; }
.md h2 { font-size: 17px; padding-left: 10px; border-left: 4px solid var(--primary); }
.md h3 { font-size: 15px; }
.md p { margin: 8px 0; }
.md ul, .md ol { padding-left: 22px; margin: 8px 0; }
.md li { margin: 4px 0; }
.md strong { color: #0c4a6e; }
.md blockquote {
  margin: 10px 0; padding: 8px 14px;
  border-left: 4px solid var(--primary);
  background: #f0f9ff; border-radius: 0 8px 8px 0;
  color: #075985;
}
.md table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13.5px; }
.md th, .md td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.md th { background: #f0f9ff; color: #0c4a6e; font-weight: 600; }
.md tr:nth-child(even) td { background: #fafcfe; }
.md code {
  background: #f1f5f9; padding: 2px 6px;
  border-radius: 5px; font-size: 13px;
  font-family: "Cascadia Code", Consolas, monospace;
}
.md pre {
  background: #f8fafc; border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  overflow-x: auto; margin: 10px 0;
}
.md pre code { background: none; padding: 0; }
.md hr { border: none; border-top: 1px dashed var(--border); margin: 14px 0; }
.md a { color: var(--primary); }

/* 消息操作条 */
.msg-actions {
  display: flex; gap: 4px; padding: 6px 2px 0;
}
.msg-actions button {
  border: none; background: none;
  color: #9ca3af; font-size: 12px;
  cursor: pointer; padding: 4px 8px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 4px;
}
.msg-actions button:hover { background: #f1f5f9; color: var(--text); }
.elapsed-tag {
  display: inline-block; margin-top: 8px; align-self: flex-start;
  font-size: 11.5px; color: #9ca3af;
  background: #f8fafc; border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 999px;
}

/* 状态提示 */
.status-line {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-sub); font-size: 13px; padding: 4px 0;
}
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary);
  animation: blink 1.2s infinite;
}
.typing-dots i:nth-child(2) { animation-delay: 0.2s; }
.typing-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.cursor-blink {
  display: inline-block; width: 8px;
  height: 16px; vertical-align: -2px; margin-left: 2px;
  background: var(--primary);
  animation: blink 1s step-end infinite;
}

.msg-error {
  background: #fef2f2; border: 1px solid #fecaca;
  color: #b91c1c; border-radius: 10px;
  padding: 10px 14px; font-size: 13px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
}

/* 错误气泡内的重试按钮：按原参数重发（重新消耗配额） */
.retry-btn {
  padding: 3px 14px; border: 1px solid #fca5a5; border-radius: 999px;
  background: #fff; color: #b91c1c; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.retry-btn:hover { background: #fee2e2; }

/* ──────────────── 输入区 ──────────────── */
.composer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 24px 14px;
  flex-shrink: 0;
}
.composer-inner { max-width: 820px; margin: 0 auto; }

/* 攻略参数：画布右侧抽屉（默认收起，仅竖向把手露在画布右缘，点击整体滑出） */
.plan-panel {
  position: absolute; right: 0; top: 50%; z-index: 40;
  display: flex; align-items: stretch;
  transform: translate(calc(100% + 12px), -50%);
  transition: transform 0.25s ease;
}
.plan-panel.open { transform: translate(-8px, -50%); }

.plan-panel .plan-tip { margin: 0 0 10px; text-align: left; color: #9ca3af; font-size: 12px; }
.plan-body {
  width: 300px; max-height: min(72vh, 640px); overflow-y: auto;
  background: #fff; border: 1px solid var(--border); border-right: none;
  border-radius: 12px 0 0 12px; padding: 14px;
  box-shadow: -4px 0 18px rgba(15, 23, 42, 0.08);
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.plan-grid label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; color: var(--text-sub);
}
.plan-grid input {
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 13px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.plan-grid input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.plan-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.chip-label { font-size: 12px; color: var(--text-sub); }
.chip {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 20px; padding: 5px 12px;
  font-size: 12.5px; cursor: pointer; color: #374151;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--primary); }
/* 选中态：浅蓝底 + 深蓝文字；未选保持白底（小程序端同款） */
.chip.on {
  background: #bfdbfe;
  border-color: #93c5fd; color: #1e40af; font-weight: 600;
}

.input-row { display: flex; gap: 10px; align-items: flex-end; }
/* 齿轮（攻略参数入口）：无背景纯图标，与输入框/发送按钮同行 */
.btn-gear {
  flex: none; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0;
  font-size: 20px; line-height: 1; cursor: pointer;
  color: #6b7280; transition: transform 0.2s, color 0.2s;
}
.btn-gear:hover { color: var(--primary); }
.plan-panel.open ~ .composer .btn-gear,
.btn-gear.on { color: var(--primary); transform: rotate(30deg); }
#input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
  font-family: inherit;
  resize: none;
  max-height: 160px;
  line-height: 1.55;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.btn-send {
  width: 44px; height: 44px;
  border: none; border-radius: 12px;
  background: var(--gradient);
  color: #fff; font-size: 17px;
  cursor: pointer; flex-shrink: 0;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-send:hover { opacity: 0.9; }
.btn-send:active { transform: scale(0.94); }
.btn-send:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-stop {
  height: 44px; padding: 0 16px;
  border: 1px solid #fca5a5; border-radius: 12px;
  background: #fef2f2; color: #dc2626;
  font-size: 13px; cursor: pointer; flex-shrink: 0;
}
.btn-stop:hover { background: #fee2e2; }

.composer-hint { font-size: 11.5px; color: #b0b7c3; text-align: center; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.quota-badge {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 107, 129, 0.1); color: #ff6b81;
  border: 1px solid rgba(255, 107, 129, 0.28);
  font-size: 11px; font-weight: 600; white-space: nowrap; cursor: default;
}
.quota-badge.low { background: rgba(255, 107, 129, 0.18); border-color: #ff6b81; animation: quotaPulse 1.6s ease-in-out infinite; }
/* 额度耗尽：整行醒目提醒条，固定在输入区最底部 */
.quota-badge.exhausted {
  width: 100%; justify-content: center;
  padding: 7px 12px; margin-top: 2px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.2px;
  color: #fff; background: linear-gradient(90deg, #ef4444, #f97316);
  border-color: transparent; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
  animation: quotaPulse 2.2s ease-in-out infinite;
}
@keyframes quotaPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ──────────────── 路线地图弹层 ──────────────── */
.map-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.map-modal {
  width: min(1080px, 94vw);
  height: min(700px, 88vh);
  background: var(--surface);
  border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.map-modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.map-title { font-size: 15px; font-weight: 700; flex: 1; }
.map-download, .map-pdf, .map-share {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 8px; padding: 6px 14px;
  font-size: 12.5px; cursor: pointer; color: var(--text-sub);
  text-decoration: none;
}
.map-share { color: #e11d48; border-color: #fecdd3; background: #fff1f2; }
.map-download[hidden], .map-pdf[hidden], .map-share[hidden] { display: none; }
.map-download:hover, .map-pdf:hover {
  background: var(--gradient); color: #fff;
  border-color: transparent; font-weight: 600;
}
.map-share:hover { background: #e11d48; color: #fff; border-color: transparent; font-weight: 600; }
.map-close {
  border: none; background: var(--bg);
  width: 30px; height: 30px; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: var(--text-sub);
}
.map-close:hover { background: #fee2e2; color: #dc2626; }

.map-body { flex: 1; min-height: 0; padding: 16px 20px; display: flex; }
.map-loading, .map-error {
  margin: auto; color: var(--text-sub); font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.map-error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; padding: 10px 18px; border-radius: 10px; }

.map-layout { display: flex; gap: 16px; width: 100%; min-height: 0; }

.map-side {
  width: 312px; flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding-right: 14px;
}
/* 常驻区：标题 + 图例 + 双统计，滚动节点列表时始终吸顶可见 */
.map-side-head {
  position: sticky; top: -16px; z-index: 6;
  background: var(--surface);
  padding: 12px 0 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.map-side-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between;
}
.btn-check-all {
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 6px; padding: 2px 10px;
  font-size: 11.5px; color: var(--text-sub); cursor: pointer;
}
.btn-check-all:hover { border-color: #fb923c; color: #ea580c; }
.map-side-hint { font-size: 11px; color: #9ca3af; line-height: 1.5; margin-bottom: 8px; }

/* ── 常驻图例面板（完整中文释义，悬浮 title 显示补充提示） ── */
.map-legend-panel {
  border: 1px solid #e2e8f0; background: #f8fafc;
  border-radius: 10px; padding: 7px 9px; margin-bottom: 8px;
}
.legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 2px 0; }
.legend-row.symbols { gap: 8px; }
.legend-k {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #94a3b8;
  width: 26px; letter-spacing: 1px;
}
.lg-item {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #475569; cursor: default;
  white-space: nowrap;
}
.lg-item i { display: inline-flex; align-items: center; justify-content: center; font-style: normal; }
.lg-start, .lg-end {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; box-sizing: border-box;
}
.lg-start { border: 2.5px solid #059669; }
.lg-end { border: 2.5px solid #111827; }
.lg-diamond {
  width: 10px; height: 10px; background: #6b7280;
  transform: rotate(45deg); border-radius: 2px;
}
.lg-dash {
  width: 18px; height: 0; border-top: 2.5px dashed #9ca3af; display: inline-block;
}
.lg-risk { color: #dc2626; font-size: 11px; font-weight: 700; }

/* ── 双统计：交通耗时 / 游玩时长分开 ── */
.map-stats {
  font-size: 12px; color: #64748b; background: #f8fafc;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 10px; line-height: 1.5;
}
.stat-line { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.stat-line b { color: #dc2626; font-weight: 700; font-size: 12.5px; }
.stat-ico { flex-shrink: 0; }
.stat-line em { font-style: normal; font-size: 10.5px; color: #94a3b8; }
.stat-km { font-size: 11.5px; color: #475569; margin-top: 3px; }
.stat-km b { color: #0f172a; }
.stat-note { font-size: 10.5px; color: #b45309; line-height: 1.5; margin-top: 4px; }

/* 节点顺序列表 + 分段距离/耗时（按天分组） */
.route-steps { display: flex; flex-direction: column; }
.day-group-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: #334155;
  margin: 10px 0 3px; padding-bottom: 3px;
  border-bottom: 1px dashed #e2e8f0;
}
.day-group-title:first-child { margin-top: 2px; }
.day-group-title i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.route-step-wrap { margin: 0 -6px; border-radius: 8px; }
.route-step-wrap:hover { background: #f8fafc; }
.route-step-wrap.off { opacity: 0.42; }
.route-step-wrap.off .step-name { text-decoration: line-through; }
.route-step {
  display: flex; align-items: center; gap: 9px;
  padding: 3px 6px; border-radius: 8px;
  cursor: pointer; transition: background 0.15s ease;
}
.step-check {
  flex-shrink: 0; width: 15px; height: 15px;
  accent-color: #ea580c; cursor: pointer; margin: 0;
}
.step-no {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #e8622d;
  color: #c2410c; font-size: 12px; font-weight: 700;
}
.step-no.off { background: #f1f5f9; border-color: #cbd5e1; color: transparent; }
.step-no.start { background: #10b981; border-color: #047857; color: #fff; }
.step-no.end { background: #111827; border-color: #111827; color: #fff; }
.step-name {
  flex: 1; min-width: 0;
  font-size: 13px; color: #1f2937; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-name small { color: #9ca3af; font-weight: 500; font-size: 11px; }
/* 节点推荐评级色签（与 PNG 评级徽章配色一致） */
.step-rating {
  flex-shrink: 0;
  font-size: 10px; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 1px 6px; line-height: 1.6;
  white-space: nowrap;
}
.route-step-wrap.off .step-rating { opacity: 0.5; }
/* 起/终点文字标记 */
.end-tag {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  color: #fff; background: #111827; border-radius: 5px;
  padding: 1px 6px; line-height: 1.7;
}
.end-tag.start-tag { background: #059669; }
/* 重点风险红色高亮（闭馆/需预约） */
.step-risks {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 2px 6px 2px 38px;
}
.risk-chip {
  font-size: 10.5px; font-weight: 700; color: #dc2626;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 999px; padding: 0 8px; line-height: 1.7;
  white-space: nowrap;
}
/* 点位档案（门票/闭馆/开放/预约/停留/贴士） */
.step-meta { margin: 0 6px 4px 38px; font-size: 11.5px; }
.step-meta > summary {
  cursor: pointer; color: #64748b; font-weight: 600;
  list-style: none; user-select: none;
}
.step-meta > summary::-webkit-details-marker { display: none; }
.step-meta > summary::before { content: "▸ "; }
.step-meta[open] > summary::before { content: "▾ "; }
.step-meta > summary:hover { color: #ea580c; }
.meta-rows {
  margin-top: 5px; border: 1px solid #e2e8f0; border-radius: 8px;
  background: #f8fafc; padding: 6px 9px;
  display: flex; flex-direction: column; gap: 3px;
}
.meta-row { display: flex; gap: 6px; line-height: 1.5; }
.meta-row.danger .meta-k, .meta-row.danger .meta-v { color: #dc2626; font-weight: 700; }
.meta-k { flex-shrink: 0; min-width: 76px; color: #64748b; font-weight: 600; }
.meta-v { color: #334155; word-break: break-all; }
.meta-empty { font-size: 11px; color: #9ca3af; padding: 5px 0 2px; }
/* 点位档案展开箭头（途径点行尾，弹层 + 对话速览共用） */
.meta-chev {
  flex-shrink: 0; font-style: normal; font-size: 11px; color: #94a3b8;
  cursor: pointer; padding: 0 2px; user-select: none;
  transition: transform 0.15s ease, color 0.15s ease;
}
.route-step-wrap.meta-open .meta-chev,
.ir-point[open] .meta-chev { transform: rotate(90deg); color: #ea580c; }
.step-name.meta-toggle { cursor: pointer; }
.route-step-wrap:not(.off) .step-name.meta-toggle:hover { color: #ea580c; }
/* 对话速览：整行即折叠开关（无 checkbox，点击途径点直接展开档案） */
.ir-point > summary.ir-row { cursor: pointer; list-style: none; user-select: none; border-radius: 7px; }
.ir-point > summary.ir-row::-webkit-details-marker { display: none; }
.ir-point > summary.ir-row:hover { background: #f1f5f9; }
.ir-meta-rows { margin: 2px 0 4px 30px; }

/* PDF 附录（路线节点简介+点位档案全展开）：节点头行浅底卡片，档案缩进对齐 */
.pdf-pt-head { margin: 9px 0 2px; background: #f8fafc; }
.pdf-pt-head .meta-chev { display: none; }
.pdf-pt-head + .meta-rows { margin: 2px 0 6px 30px; }
/* 评级图例芯片（map-legend-panel 内使用） */
.rating-chip {
  font-size: 10px; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 1px 7px; line-height: 1.6; cursor: default;
}
/* 节点所属天数色点（与 PNG 节点配色一致） */
.step-day {
  flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%;
  display: inline-block; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(15, 23, 42, 0.12);
}
.route-step.off .step-day { opacity: 0.55; }
/* 天数配色图例芯片（map-legend-panel 内使用） */
.day-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: #475569;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 1px 9px;
}
.day-chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.route-dist {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 5px 0 5px 13px;
}
.route-dist i {
  flex: 0 0 auto; width: 2px; height: 14px;
  border-left: 2px dashed #fca5a5;
}
.route-dist b {
  font-size: 11.5px; font-weight: 700; color: #dc2626;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 999px; padding: 1px 9px;
}
.seg-dir {
  font-size: 11px; font-weight: 700; color: #475569;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.step-mode {
  font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 1px 9px; border: 1px solid;
  white-space: nowrap;
}
.step-mode.walk { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.step-mode.metro { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.step-mode.bus { color: #0e7490; background: #ecfeff; border-color: #a5f3fc; }
.step-mode.car { color: #b45309; background: #fffbeb; border-color: #fcd34d; }
/* ── 中转 / 返程独立区（灰虚线逻辑，不混入市内游览） ── */
.transfer-card {
  margin-top: 14px; border: 1px solid #d1d5db; border-radius: 10px;
  background: #f9fafb; padding: 9px 10px;
}
.transfer-title {
  font-size: 12.5px; font-weight: 700; color: #4b5563;
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.transfer-sub { font-size: 10.5px; font-weight: 500; color: #9ca3af; }
.hop-line { padding: 4px 2px; border-bottom: 1px dashed #e5e7eb; margin-bottom: 5px; }
.hop-line:last-of-type { border-bottom: none; }
.hop-route { font-size: 12.5px; font-weight: 700; color: #374151; }
.hop-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; align-items: center; }
.hop-mode {
  font-size: 10.5px; font-weight: 700; color: #4b5563;
  background: #e5e7eb; border-radius: 999px; padding: 0 8px; line-height: 1.8;
}
.hop-note { font-size: 10.5px; color: #9ca3af; }
.hop-drive { font-size: 10.5px; color: #6b7280; background: #f3f4f6; border-radius: 6px; padding: 0 7px; line-height: 1.8; }
.transfer-step {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 4px; border-radius: 8px; cursor: pointer;
}
.transfer-step:hover { background: #f3f4f6; }
.transfer-step.off { opacity: 0.42; }
.transfer-step.off .step-name { text-decoration: line-through; }
.trans-diamond { color: #6b7280; font-size: 12px; flex-shrink: 0; }
.trans-link {
  flex-shrink: 0; margin-left: auto;
  font-size: 10.5px; color: #6b7280; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 6px; padding: 1px 7px;
  white-space: nowrap;
}

.dir-points { display: flex; flex-wrap: wrap; gap: 5px; padding-left: 2px; }
.dir-point {
  background: #f1f5f9; border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  font-size: 12px; color: #334155;
}
.dir-point.dim { opacity: 0.6; }
.dir-unlocated { border-top: 1px dashed var(--border); padding-top: 12px; margin-top: 14px; }
.dir-note { font-size: 11px; color: #9ca3af; margin-top: 6px; }

.map-main {
  position: relative;
  flex: 1; min-width: 0; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: auto;
  border: 1px solid var(--border); background:
    linear-gradient(0deg, transparent 23px, #eef2f7 24px),
    linear-gradient(90deg, transparent 23px, #eef2f7 24px),
    #f8fafc;
  background-size: 24px 24px;
}
.map-main.redrawing .route-image { opacity: 0.45; pointer-events: none; }
.map-redraw-tip {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: none; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 18px; font-size: 13px; color: var(--text-sub);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  z-index: 5;
}
.map-main.redrawing .map-redraw-tip { display: flex; }
.map-redraw-tip[hidden] { display: none; }
.route-image {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
  background: #fff;
}

/* ──────────────── 规划模式切换（旅游 / 爬山） ──────────────── */
.model-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); background: #fff;
  border-radius: 10px; padding: 7px 30px 7px 12px;
  font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; transition: border-color 0.18s, box-shadow 0.18s;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.model-select:hover { border-color: var(--primary, #f97316); }
.model-select:focus { outline: none; border-color: var(--primary, #f97316); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }
/* 右上角头部模型选择器：徽标样式的紧凑下拉框 */
.model-select-header {
  font-size: 12px; font-weight: 500; color: var(--text-sub);
  background-color: var(--bg);
  padding: 5px 26px 5px 12px; border-radius: 20px;
  max-width: 46vw;
}
.mode-switch {
  display: flex; gap: 4px;
  background: #f1f5f9; border: 1px solid var(--border);
  border-radius: 12px; padding: 4px;
  width: fit-content; margin: 0 auto 10px;
}
.mode-btn {
  border: none; background: transparent;
  border-radius: 9px; padding: 7px 22px;
  font-size: 13.5px; font-weight: 600; color: var(--text-sub);
  cursor: pointer; transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.on {
  background: var(--surface); color: #0369a1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.mode-btn[data-mode="hiking"].on { color: #c2410c; }
.beta-tag {
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 6px; border-radius: 999px;
  color: #b45309; background: #fef3c7; border: 1px solid #fcd34d;
}
.mode-btn[data-mode="hiking"] .beta-tag { color: #c2410c; background: #ffedd5; border-color: #fdba74; }

/* ──────────────── 天气条（7 天预报 / 日出日落 / 人流） ──────────────── */
.weather-strip {
  margin: 4px 0 12px;
  border: 1px solid #bae6fd;
  background: linear-gradient(135deg, #f0f9ff, #ecfeff);
  border-radius: 12px; padding: 10px 12px;
}
.weather-strip.hike {
  border-color: #fed7aa;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}
.ws-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: #0c4a6e; margin-bottom: 8px;
}
.weather-strip.hike .ws-head { color: #9a3412; }
.ws-head b { font-size: 13.5px; }
.ws-src { font-size: 11px; color: #7c8da0; font-weight: 400; }
.ws-days {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}
.ws-day {
  flex: 1 0 88px; min-width: 88px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e0f2fe;
  border-radius: 10px; padding: 7px 8px;
  text-align: center; font-size: 11.5px; color: #475569;
}
.weather-strip.hike .ws-day { border-color: #ffedd5; }
.ws-day.today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15);
}
.ws-date { font-weight: 700; color: #334155; font-size: 11px; }
.ws-date i {
  font-style: normal; color: #fff; background: var(--primary);
  border-radius: 6px; padding: 0 5px; margin-left: 3px; font-size: 10px;
}
.ws-icon { font-size: 20px; line-height: 1.3; }
.ws-text { font-size: 11px; color: #64748b; }
.ws-temp { font-weight: 700; color: #0f172a; margin: 2px 0; }
.ws-meta { font-size: 10.5px; color: #64748b; }
.ws-sun {
  font-size: 10.5px; color: #b45309; margin-top: 3px;
  line-height: 1.5; border-top: 1px dashed #e2e8f0; padding-top: 3px;
}
.ws-crowd {
  display: inline-block; margin-top: 4px;
  font-size: 10.5px; font-weight: 600;
  border-radius: 999px; padding: 1px 8px;
}
.ws-crowd.crowd-low { background: #ecfdf5; color: #047857; }
.ws-crowd.crowd-mid { background: #fffbeb; color: #b45309; }
.ws-crowd.crowd-high { background: #fef2f2; color: #dc2626; }

/* ──────────────── 爬山路线图弹层 ──────────────── */
.hike-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.hike-tab {
  flex: 1; border: 1px solid var(--border); background: var(--bg);
  border-radius: 10px; padding: 8px 6px;
  font-size: 13px; font-weight: 700; color: var(--text-sub);
  cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.hike-tab-nodes { font-size: 10.5px; font-weight: 500; opacity: 0.8; }
.hike-tab.day:hover { border-color: #fb923c; color: #ea580c; }
.hike-tab.night:hover { border-color: #818cf8; color: #4f46e5; }
.hike-tab.day.on {
  background: #fff7ed; border-color: #ea580c; color: #c2410c;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.12);
}
.hike-tab.night.on {
  background: #eef2ff; border-color: #4f46e5; color: #3730a3;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.hike-weather {
  font-size: 11.5px; color: #7c2d12; line-height: 1.6;
  background: #fff7ed; border: 1px solid #fed7aa;
  border-radius: 9px; padding: 8px 10px; margin-bottom: 4px;
}
.hike-weather b { color: #c2410c; }
.hike-weather span { display: block; color: #9a3412; font-size: 11px; margin-top: 2px; }

.hike-stats b { color: #c2410c; }
.hike-stats.night b { color: #4f46e5; }

.hike-step { gap: 7px; }
.hike-no { border-color: #ea580c; color: #c2410c; }
.hike-step .step-name { font-size: 12.5px; }
.hike-note {
  flex-shrink: 0; font-size: 10px; font-weight: 700; color: #b45309;
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 6px; padding: 1px 6px; white-space: nowrap;
}
.hike-alt {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: #64748b;
  white-space: nowrap;
}
.route-step.off .hike-note, .route-step.off .hike-alt { opacity: 0.5; }

/* ──────────────── 对话内嵌「路线节点速览」（按天分组可展开，与旅行路线图一致） ──────────────── */
.inline-route-card {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdff;
  padding: 10px 12px 8px;
}
.ir-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ir-head b { font-size: 13.5px; color: #0f172a; }
.ir-sub { font-size: 11px; color: #94a3b8; }
.ir-day { border-top: 1px dashed #e2e8f0; padding: 4px 0; }
.ir-day:first-of-type { border-top: none; }
.ir-day > summary {
  cursor: pointer; list-style: none; user-select: none;
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: #334155;
  padding: 4px 2px;
}
.ir-day > summary::-webkit-details-marker { display: none; }
.ir-day > summary::before { content: "▸"; color: #94a3b8; font-size: 11px; }
.ir-day[open] > summary::before { content: "▾"; }
.ir-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ir-count { font-size: 10.5px; font-weight: 500; color: #94a3b8; }
.ir-rows { padding: 2px 0 4px 18px; }
.ir-row {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 4px; border-radius: 7px;
}
.ir-no {
  flex-shrink: 0;
  width: 21px; height: 21px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #cbd5e1;
  color: #475569; font-size: 11px; font-weight: 700;
}
.ir-no.start { background: #10b981; border-color: #047857; color: #fff; }
.ir-no.end { background: #111827; border-color: #111827; color: #fff; }
.ir-name {
  flex: 1; min-width: 0;
  font-size: 12.5px; color: #1f2937; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ir-dist {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin: 3px 0 3px 12px;
}
.ir-dist::before {
  content: ""; flex: 0 0 auto; width: 2px; height: 13px;
  border-left: 2px dashed #fca5a5; margin-right: 2px;
}
.ir-dist b {
  font-size: 11px; font-weight: 700; color: #dc2626;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 999px; padding: 1px 9px;
}
.ir-dir {
  font-size: 10.5px; font-weight: 700; color: #475569;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 1px 8px; white-space: nowrap;
}
.ir-row .step-risks { padding: 2px 0 2px 30px; width: 100%; }
.ir-transfer {
  margin-top: 6px; border-top: 1px dashed #e2e8f0;
  padding: 7px 2px 2px; display: flex; flex-direction: column; gap: 3px;
}
.irt-title { font-size: 11.5px; font-weight: 700; color: #6b7280; }
.irt-line { font-size: 11.5px; color: #6b7280; line-height: 1.6; }

/* ──────────────── Toast ──────────────── */
.toast {
  position: fixed; top: 24px; left: 50%;
  transform: translateX(-50%);
  background: #1f2937; color: #fff;
  padding: 10px 20px; border-radius: 10px;
  font-size: 13.5px; z-index: 999;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: fadeUp 0.25s ease;
}

/* ──────────────── 滚动条 ──────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae4; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b6c0cd; }
::-webkit-scrollbar-track { background: transparent; }

/* ──────────────── 响应式 ──────────────── */
.sidebar-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 25;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.1);
  }
  .sidebar.show { transform: none; }
  .sidebar-mask.show { display: block; }
  .menu-btn { display: block; }
  .messages-inner, .composer-inner { padding: 0 14px; }
  .composer { padding: 10px 14px 12px; }
  .welcome-cards { grid-template-columns: 1fr; }
  .welcome { padding-top: 36px; }
  .bubble-wrap { max-width: 92%; }
}

/* ═══════════════ 用户体系 / 通知 / 追问建议（2026-09 新增） ═══════════════ */

.header-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* 顶栏铃铛 */
.bell-btn {
  position: relative; border: none; background: transparent; font-size: 18px;
  cursor: pointer; padding: 6px 8px; border-radius: 10px; line-height: 1;
}
.bell-btn:hover { background: var(--bg); }
.bell-badge {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px;
  border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
}

/* 登录按钮 / 用户芯片 */
.btn-open-login {
  border: none; cursor: pointer; font-size: 12.5px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; color: #fff;
  background: var(--gradient); box-shadow: 0 3px 8px rgba(14, 165, 233, .3);
  white-space: nowrap;
}
.user-chip {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 4px 12px 4px 4px; font-size: 12.5px; font-weight: 600;
}
.user-chip .uc-avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--gradient);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.user-chip small { color: var(--text-sub); font-weight: 500; }

/* 侧栏：保留期提示 + 未登录提示 */
.session-title { display: flex; align-items: center; justify-content: space-between; }
.session-retention {
  font-size: 10px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a;
  border-radius: 999px; padding: 2px 8px; font-weight: 600;
}
.session-login-hint {
  margin-top: 10px; font-size: 11.5px; color: var(--text-sub); line-height: 1.7;
  background: var(--bg); border-radius: 10px; padding: 10px 12px; text-align: center;
}
.session-login-hint small { color: #9ca3af; }

/* 通知面板 */
.notif-panel {
  position: fixed; top: 60px; right: 76px; width: 360px; max-height: 480px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .16); z-index: 260;
  display: flex; flex-direction: column; overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px;
}
.notif-actions button {
  border: none; background: transparent; cursor: pointer; font-size: 12px;
  color: var(--text-sub); padding: 3px 7px; border-radius: 8px;
}
.notif-actions button:hover { background: var(--bg); }
.notif-list { overflow-y: auto; }
.notif-item {
  padding: 11px 14px; border-bottom: 1px solid #f1f4f8; cursor: pointer;
  display: flex; gap: 9px; align-items: flex-start;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0f9ff; }
.notif-item.unread:hover { background: #e0f2fe; }
.notif-item .ni-ico { font-size: 16px; margin-top: 1px; }
.notif-item .ni-body { flex: 1; min-width: 0; }
.notif-item .ni-title { font-size: 13px; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.notif-item .ni-dot { width: 7px; height: 7px; border-radius: 50%; background: #0ea5e9; flex: none; }
.notif-item .ni-content { font-size: 12px; color: var(--text-sub); margin-top: 3px; line-height: 1.6; }
.notif-item .ni-time { font-size: 10.5px; color: #9ca3af; margin-top: 4px; }
.notif-empty { padding: 34px 0; text-align: center; color: #9ca3af; font-size: 12.5px; }

/* 登录弹窗 */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .48); z-index: 300;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(2px);
}
.auth-modal {
  width: 380px; max-width: calc(100vw - 32px); background: #fff; border-radius: 20px;
  padding: 26px 26px 20px; position: relative; box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}
.auth-close {
  position: absolute; top: 14px; right: 14px; border: none; background: var(--bg);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 13px; color: var(--text-sub);
}
.auth-brand { text-align: center; margin-bottom: 6px; }
.auth-logo {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 8px 20px rgba(43, 95, 110, 0.28);
}
.auth-tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; margin: 12px 0 16px; }
.auth-tab {
  flex: 1; border: none; background: transparent; padding: 8px 0; font-size: 13.5px;
  font-weight: 600; color: var(--text-sub); border-radius: 9px; cursor: pointer;
}
.auth-tab.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.auth-field { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 12px; color: var(--text); }
.auth-field input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font-size: 14px;
  border: 1.5px solid var(--border); border-radius: 11px; outline: none; background: #fbfcfe;
}
.auth-field input:focus { border-color: var(--primary); background: #fff; }
.auth-error {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; font-size: 12px;
  border-radius: 10px; padding: 8px 11px; margin-bottom: 12px; line-height: 1.5;
}
.auth-submit {
  width: 100%; border: none; padding: 12px 0; font-size: 15px; font-weight: 700;
  color: #fff; background: var(--gradient); border-radius: 12px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(14, 165, 233, .3);
}
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-foot { margin-top: 14px; font-size: 11px; color: #9ca3af; text-align: center; line-height: 1.7; }

/* 图形验证码行（登录/注册/找回密码共用） */
.auth-captcha { margin-bottom: 12px; }
.auth-captcha-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); }
.auth-captcha-box { display: flex; gap: 8px; margin-top: 6px; }
.auth-captcha-box input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 14px; letter-spacing: 3px;
  border: 1.5px solid var(--border); border-radius: 11px; outline: none; background: #fbfcfe;
}
.auth-captcha-box input:focus { border-color: var(--primary); background: #fff; }
.auth-captcha-box img {
  height: 42px; width: auto; max-width: none; border-radius: 9px; cursor: pointer;
  border: 1.5px solid var(--border); background: #f1f5f9; flex: none;
}
.auth-captcha-box img:hover { border-color: var(--primary); }

/* 次要文字按钮（忘记密码 / 返回登录） */
.auth-link {
  display: block; width: 100%; margin-top: 12px; border: none; background: none;
  font-size: 12.5px; font-weight: 600; color: var(--text-sub); cursor: pointer; padding: 4px 0;
}
.auth-link:hover { color: var(--primary); }

/* 字段下的小提示（如注册页支持的邮箱类型） */
.auth-hint {
  font-size: 11px; font-weight: 400; color: var(--text-sub);
  margin: -6px 0 10px; line-height: 1.6;
}

/* 忘记密码面板 */
.auth-view-title { font-size: 15px; font-weight: 700; text-align: center; margin: 4px 0 14px; }
.auth-secq {
  font-size: 12px; color: var(--text-sub); background: var(--bg);
  border-radius: 10px; padding: 9px 11px; margin-bottom: 12px; line-height: 1.6;
}
.auth-secq b { color: var(--text); display: block; margin-top: 2px; font-size: 13px; }

/* 用户菜单 */
.user-menu {
  position: fixed; top: 60px; right: 76px; width: 260px; background: #fff;
  border: 1px solid var(--border); border-radius: 16px; z-index: 260;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .16); overflow: hidden;
}
.um-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; }
.um-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gradient);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}
.um-head b { font-size: 14px; display: block; }
.um-head small { font-size: 11px; color: var(--text-sub); }
.um-quota {
  margin: 4px 14px 10px; font-size: 12px; font-weight: 600; color: #0369a1;
  background: #f0f9ff; border-radius: 10px; padding: 8px 10px;
}
.um-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 12px 14px; font-size: 13px; cursor: pointer; border-top: 1px solid #f1f4f8;
}
.um-item:hover { background: var(--bg); }

/* 追问建议芯片（生成完成后展示） */
.followups { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px 46px; }
.followups .fu-label { font-size: 11.5px; color: var(--text-sub); align-self: center; }
.fu-chip {
  border: 1px solid rgba(14, 165, 233, .25); background: rgba(14, 165, 233, .07);
  color: #0284c7; font-size: 12px; border-radius: 999px; padding: 6px 13px;
  cursor: pointer; font-weight: 600;
}
.fu-chip:hover { background: rgba(14, 165, 233, .15); }
/* 澄清轮快捷回答（多选拼接 v2）：候选=浅描边白底；已选=实色+✕可删可改；
   分组单行横向滚动不换行；输入框为唯一事实源，芯片仅做快捷回填 */
.followups.qr-panel { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 7px; margin: 2px 0 8px 46px; align-items: stretch; }
.qr-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* 已选条件行：换行收纳全部已选标签（不裁切、不出屏） */
.qr-row.qr-sel { align-items: flex-start; }
.qr-row.qr-sel .fu-label { margin-top: 5px; }
.qr-wrap { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.qr-glabel { flex: none; font-size: 11px; color: var(--text-sub); background: #f1f5f9; border-radius: 999px; padding: 2px 9px; }
.qr-scroll { position: relative; display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
.qr-scroll::-webkit-scrollbar { display: none; }
/* 右缘渐隐：提示候选行可横向滑动，避免芯片被裁切误认为溢出 */
.qr-scroll::after { content: ""; position: absolute; right: 0; top: 0; bottom: 2px; width: 26px; background: linear-gradient(90deg, rgba(244, 246, 249, 0), var(--bg)); pointer-events: none; }
.qr-scroll .fu-chip { flex: none; white-space: nowrap; }
.fu-chip.qr-chip { background: #fff; border: 1px solid #bae6fd; color: #0369a1; font-weight: 500; }
.fu-chip.qr-chip:hover { background: #f0f9ff; }
.fu-chip.qr-chip.on { background: #0284c7; border: 1px solid #0284c7; color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 2px 8px rgba(2, 132, 199, .35); }
.fu-chip.qr-chip.on:hover { background: #0369a1; }
.fu-chip.qr-chip.on .qr-x { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: rgba(255, 255, 255, .25); font-size: 10px; line-height: 1; }
.fu-chip.qr-chip.on .qr-x:hover { background: rgba(255, 255, 255, .5); }
.fu-chip.qr-add { background: transparent; border-style: dashed; border-color: #cbd5e1; color: #64748b; }
.fu-chip.qr-add:hover { background: #f8fafc; }
.qr-hint { font-size: 11px; color: var(--text-sub); }
/* 生成中隐藏上一轮的追问/快捷回答芯片 */
body.generating .followups { display: none; }

/* 配额徽标新配色（低额红色在 .low 基础上加强） */
.quota-badge { background: #f0f7fc; border-radius: 999px; padding: 2px 9px; }
.quota-badge.low { background: #fff7ed; color: #c2560c; }
.quota-badge.exhausted { background: #fef2f2; color: #b91c1c; }

@media (max-width: 760px) {
  .notif-panel, .user-menu { right: 12px; width: calc(100vw - 24px); }
  .followups { margin-left: 0; }
}

/* hidden 属性修复：组件类 display:flex 会覆盖 UA 的 [hidden]{display:none}，统一强制 */
[hidden] { display: none !important; }

.composer-hint { justify-content: flex-end; }

/* ═══ 设置弹窗（修改密码/联系我们/关于我们）与管理后台 ═══ */
.site-title { font-size: 20px; font-weight: 800; color: #0c4a6e; margin: 6px 0 18px; }
.info-rows { display: flex; flex-direction: column; gap: 12px; }
.info-row { display: flex; align-items: baseline; gap: 14px; font-size: 14px; }
.info-row span { color: #94a3b8; flex: none; width: 44px; }
.info-row b { color: #1f2937; word-break: break-all; }
.about-desc { font-size: 13px; color: #64748b; line-height: 1.8; margin-top: 6px; }
.um-admin { color: #b45309; font-weight: 700; }
.um-logout { color: #dc2626; }

/* 管理后台 */
.admin-modal {
  width: min(960px, 94vw); max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 16px; padding: 22px 24px; position: relative;
  box-shadow: 0 24rpx 80rpx rgba(15, 23, 42, .25);
}
.admin-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.admin-toolbar input {
  flex: 1; padding: 8px 12px; border: 1px solid #e3e8ef; border-radius: 8px; font-size: 13px;
}
.admin-count { font-size: 12px; color: #94a3b8; flex: none; }
.admin-btn {
  padding: 8px 16px; border: 1px solid #e3e8ef; border-radius: 8px; background: #fff;
  font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;
}
.admin-btn:hover { background: #f6f8fa; }
.admin-btn.primary { background: #0ea5e9; border-color: #0ea5e9; color: #fff; }
.admin-btn.danger { color: #dc2626; border-color: #fecaca; }
.admin-table-wrap { overflow-x: auto; border: 1px solid #eef1f5; border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th {
  background: #f7fafc; color: #475569; font-weight: 700; text-align: left;
  padding: 8px 10px; white-space: nowrap;
}
.admin-table td { padding: 8px 10px; border-top: 1px solid #f1f5f9; color: #334155; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-card {
  border: 1px solid #eef1f5; border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.admin-card h4 { font-size: 14px; color: #0c4a6e; margin: 0; }
.admin-card input, .admin-card textarea {
  padding: 8px 12px; border: 1px solid #e3e8ef; border-radius: 8px;
  font-size: 13px; width: 100%; box-sizing: border-box; resize: vertical;
}
.admin-check { font-size: 13px; color: #475569; display: flex; gap: 6px; align-items: center; }
.admin-row { display: flex; gap: 10px; }

/* ═══ Web 协议勾选与协议弹窗（与小程序同步） ═══ */
.web-agree-row {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  font-size: 11px; color: #0284c7; margin: 4px 0 12px; user-select: none;
}
.web-agree-link {
  color: #0284c7 !important; font-weight: 700; text-decoration: underline;
  text-underline-offset: 2px;
}
.web-agree-link:hover { color: #0ea5e9 !important; }

/* 注册：一行两列（昵称|邮箱、密码|确认密码、密保问题|答案）；提示/验证码/按钮整行 */
.auth-modal.reg { width: min(560px, calc(100vw - 32px)); }
#authForm.reg-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
#authForm.reg-grid .auth-field { display: flex; flex-direction: column; }
#authForm.reg-grid .auth-field > input { margin-top: 6px; width: 100%; }
#authForm.reg-grid .auth-hint,
#authForm.reg-grid .auth-field.auth-captcha,
#authForm.reg-grid .auth-error,
#authForm.reg-grid .web-agree-row,
#authForm.reg-grid .auth-submit,
#authForm.reg-grid .auth-link { grid-column: 1 / -1; }
#authForm.reg-grid .auth-field.auth-captcha { flex-direction: column; }
.web-agree-check {
  position: relative; display: inline-flex; width: 16px; height: 16px;
  border: 1.5px solid #cbd5e1; border-radius: 4px; margin-right: 6px;
  cursor: pointer; flex: none; background: #fff;
}
.web-agree-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
#webAgreeTick { position: absolute; inset: 0; display: none; align-items: center;
  justify-content: center; font-size: 12px; color: #fff; }
.web-agree-check.on { border-color: #0ea5e9; background: #0ea5e9; }
.web-agree-check.on #webAgreeTick { display: flex; }
.web-agree-link { color: #0284c7; cursor: pointer; font-weight: 600; }
.web-agree-link:hover { text-decoration: underline; }
.agr-modal {
  width: min(760px, 92vw); max-height: 84vh; overflow-y: auto;
  background: #fff; border-radius: 16px; padding: 26px 30px; position: relative;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}
.agr-title { font-size: 20px; font-weight: 800; color: #0f172a; }
.agr-updated { display: block; font-size: 12px; color: #94a3b8; margin: 6px 0 18px; }
.agr-sec { margin-bottom: 16px; }
.agr-h { display: block; font-size: 14.5px; font-weight: 700; color: #0c4a6e; margin-bottom: 6px; }
.agr-p { display: block; font-size: 13px; color: #475569; line-height: 1.85; }

/* web 反馈表单与关于我们品牌区 */
.fb-web-tip { font-size: 13px; color: #94a3b8; margin: -6px 0 12px; }
.fb-web-area {
  width: 100%; box-sizing: border-box; border: 1px solid #e3e8ef; border-radius: 10px;
  padding: 12px 14px; font-size: 14px; line-height: 1.7; resize: vertical;
  font-family: inherit; margin-bottom: 10px;
}
.fb-web-area:focus, .fb-web-contact:focus { outline: 2px solid rgba(14, 165, 233, .25); border-color: #0ea5e9; }
.fb-web-contact {
  width: 100%; box-sizing: border-box; border: 1px solid #e3e8ef; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; font-family: inherit;
}
.fb-web-mail { text-align: center; font-size: 12px; color: #94a3b8; margin-top: 12px; }
.web-ab-brand { text-align: center; padding: 8px 0 18px; }
.web-ab-logo {
  width: 76px; height: 76px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, .05), 0 12px 32px rgba(43, 95, 110, .28);
}
.web-ab-name {
  font-size: 24px; font-weight: 800; margin-top: 12px;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.web-ab-slogan { font-size: 12.5px; color: #94a3b8; margin-top: 4px; }
.web-ab-rows {
  background: #f8fafc; border-radius: 12px; padding: 4px 16px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 0;
}
.web-ab-rows .info-row { padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.web-ab-rows .info-row:last-child { border-bottom: none; }
.web-ab-foot { text-align: center; font-size: 11.5px; color: #c3cbd6; }

/* 管理后台·反馈列表 */
.admin-feedback-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.fb-item {
  border: 1px solid #eef1f5; border-radius: 10px; padding: 10px 12px; font-size: 12.5px;
}
.fb-item.done { opacity: .55; }
.fb-item .fb-meta { display: flex; gap: 8px; color: #94a3b8; font-size: 11.5px; margin-bottom: 4px; flex-wrap: wrap; }
.fb-item .fb-text { color: #334155; line-height: 1.6; word-break: break-all; }
.fb-item .fb-ops { margin-top: 6px; }
.fb-item .fb-ops button {
  border: none; background: none; color: #0284c7; font-size: 12px; cursor: pointer; padding: 0; font-weight: 600;
}

/* ═══ 历史会话条：悬浮上浮浮现删除钮（默认隐藏） ═══ */
.session-item {
  position: relative;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.session-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .1);
  background: #f6fafd;
  z-index: 3;
}
.session-item .s-del {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}
.session-item:hover .s-del,
.session-item .s-del:focus-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (hover: none) {
  /* 触屏无 hover：点按也会聚焦按钮，保持可用 */
  .session-item .s-del { opacity: 1; transform: none; pointer-events: auto; }
}


/* ═══ 站内通知：标题列表 + 阅读弹窗 ═══ */
.ni-pin {
  flex: none; font-size: 11px; font-weight: 700; color: #0369a1;
  background: #dbeafe; border-radius: 6px; padding: 2px 8px; margin-left: 6px;
}
.ni-go { color: #94a3b8; font-size: 11px; margin-left: 8px; }
.notif-item { cursor: pointer; }
.nr-head { padding: 4px 4px 0; }
.nr-ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; background: linear-gradient(135deg, #e0f2fe, #d1fae5);
}
.nr-title { font-size: 19px; font-weight: 800; color: #0f172a; line-height: 1.45; margin-top: 14px; }
.nr-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.nr-meta span { font-size: 12.5px; color: #94a3b8; }
.rd-web-pin {
  font-size: 11.5px !important; font-weight: 700; color: #0369a1;
  background: #dbeafe; border-radius: 6px; padding: 2px 9px !important;
}
.nr-divider { border-top: 1px solid #eef2f7; margin: 16px 0 4px; }
.nr-body { max-height: 46vh; overflow-y: auto; }
/* 阅读弹层删除按钮：仅已读且非置顶的通知显示（未读由后端拒绝） */
.nr-del {
  display: block; width: 100%; margin-top: 12px; padding: 10px 0;
  border: 1px solid #fecaca; background: #fef2f2; color: #dc2626;
  border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.nr-del:hover { background: #fee2e2; }
.nr-para { font-size: 14px; color: #334155; line-height: 1.9; padding: 8px 0 2px; }
.nr-para + .nr-para { border-top: 1px dashed #f1f5f9; }

/* 💰 预算对比卡：预算明细 + 概览对比收尾（与路线卡同款卡片壳） */
.budget-card {
  display: none; /* 默认隐藏：仅完整攻略轮有预算内容时由 .show 点亮（思考/追问轮不显示） */
  margin-top: 12px; background: linear-gradient(180deg, #fffbeb, #ffffff 30%);
  border: 1px solid #fde68a; border-radius: 14px; padding: 14px 16px;
}
.budget-card.show { display: block; }
.budget-card .bc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.budget-card .bc-title { font-size: 15px; font-weight: 800; color: #92400e; }
.budget-card .bc-sub { font-size: 11.5px; color: #b45309; }
/* 预算金额上色（与小程序同步）：自己的预算金额金色加粗；超出预算红色加粗；预算内/节省绿色加粗 */
.budget-card .amt-y { color: #d97706; font-weight: 800; }
.budget-card .amt-r { color: #dc2626; font-weight: 800; }
.budget-card .amt-g { color: #059669; font-weight: 800; }
/* 「预算对比」（预算明细）折叠行：默认折叠，点击展开（与小程序一致） */
.budget-card .bc-fold-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding: 8px 12px; cursor: pointer;
  background: rgba(253, 230, 138, 0.35); border-radius: 10px;
}
.budget-card .bc-fold-head[hidden] { display: none; }
.budget-card .bc-fold-title { font-size: 13px; font-weight: 700; color: #92400e; }
.budget-card .bc-chev { font-size: 12px; color: #b45309; }
.budget-card .bc-fold-body { margin-top: 6px; }
.budget-card .bc-fold-body[hidden] { display: none; }
