.trip-turn {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 900px;
    align-self: stretch;
    margin: 0 auto;
}
.trip-turn + .trip-turn {
    margin-top: 6px;
    padding-top: 22px;
    border-top: 1px dashed var(--border-color);
}

.history-item .hi-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#history-trip .history-item .del { opacity: 0.7; }

/* 标题行的多选图标按钮，靠右对齐 */
.history-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.history-select-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    flex-shrink: 0;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}
.history-select-btn:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.10);
}

/* 圆形勾选圈：未选中是空心细边，选中是青色填充 + 对勾 */
.pick-dot {
    position: relative;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-right: 9px;
    border-radius: 50%;
    border: 1.5px solid #4a5568;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}
.pick-dot:hover { border-color: var(--cyan); }

.pick-dot.on {
    background-color: var(--cyan);
    border-color: var(--cyan);
}
/* 对勾用两条线拼出来，不依赖字体 */
.pick-dot.on::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #0d1117;
    border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg);
}

/* 多选模式下底部浮出的操作条 */
.history-select-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background-color: #1a222c;
    border: 1px solid var(--border-color);
    font-size: 12px;
}

.history-select-bar .hsb-link {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}
.history-select-bar .hsb-link:hover { color: var(--cyan); }

.history-select-bar .hsb-del {
    color: #fda4af;
    cursor: pointer;
    transition: color 0.2s;
}
.history-select-bar .hsb-del:hover { color: #fb7185; }
.history-select-bar .hsb-del.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.trip-scroll-wrap {
    position: relative;
}
.trip-scroll-btn {
    position: absolute !important;
    right: 28px;
    bottom: 24px;
    z-index: 5;
}

.trip-user-msg {
    align-self: flex-end;
    max-width: 78%;
    font-size: 14px;
    color: var(--text-main);
}
.trip-user-msg b {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border-top-right-radius: 2px;
    background-color: var(--bubble-user);
    border: 1px solid #334155;
    font-weight: 400;
    line-height: 1.6;
    word-break: break-all;
    text-align: left;
}

/* 开场态：欢迎语和输入框一起居中，像 DeepSeek 首页那样 */
.trip-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    padding: 0 24px 60px;
}

.hero-greeting {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

/* 左边的图标。图片是黑底线条，这里限制尺寸并稍微提亮 */
.hero-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0.92;
}

/* 居中位置的输入框，比底部的宽一些 */
.hero-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 720px;
    padding: 14px 16px;
    border-radius: 14px;
    background-color: var(--bubble-ai);
    border: 1px solid var(--border-color);
    transition: border-color 0.25s, box-shadow 0.25s;
}
.hero-input:focus-within {
    border-color: var(--cyan-border);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.12);
}

.hero-input input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 15px;
    padding: 4px 8px;
}
.hero-input input::placeholder { color: var(--text-muted); }


/* 正文容器：四段内容按顺序写进这里，读起来是一篇连贯的行程文档 */
.trip-flow {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
}

/* 每一段 = 小标题 + 正文 */
.trip-block {
    width: 100%;
}

.trip-block-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.trip-block-body {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-word;
}

/* 状态行：显示"正在做什么"，会被下一条状态覆盖，不进入正文 */
.trip-status-line {
    width: 100%;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.4px;
    min-height: 18px;
    transition: color 0.3s;
}

/* 跑完了：变青色，前面加个对勾 */
.trip-status-line[data-state="done"] { color: var(--cyan); }
.trip-status-line[data-state="done"]::before { content: "✓ "; }

/* 出错：变红色 */
.trip-status-line[data-state="error"] { color: #fda4af; }
.trip-status-line[data-state="error"]::before { content: "! "; }

.trip-chat {
    width: 100%;
    align-self: flex-start;
    padding: 14px 16px;
    border-radius: 8px;
    border-top-left-radius: 2px;
    border: 1px solid var(--cyan-border);
    background-color: var(--bubble-ai);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    animation: slide-up 0.3s ease-out forwards;
}

/* 后端一收到请求就发的那句反馈，改成顶部状态行显示，不进入正文 */
.trip-err {
    width: 100%;
    align-self: flex-start;
    padding: 13px 16px;
    border-radius: 8px;
    border: 1px solid rgba(251, 113, 133, 0.4);
    background-color: rgba(251, 113, 133, 0.07);
    color: #fda4af;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    animation: slide-up 0.3s ease-out forwards;
}

.trip-scroll-btn {
    position: absolute;
    right: 28px;
    bottom: 120px;
    z-index: 50;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid var(--cyan-border);
    background: var(--bg-sidebar);
    color: var(--cyan);
    font-size: 12px;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 0 15px var(--cyan-dim);
}
.trip-scroll-btn:hover {
    background: var(--cyan);
    color: #000;
    box-shadow: 0 0 15px var(--cyan);
}

.trip-scroll-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.trip-fixed {
    position: sticky;
    top: 0;
    z-index: 2;
    flex: 0 0 auto;
    padding: 12px 10% 10px;
    border-bottom: 1px solid var(--cyan-border);
    background-color: var(--bg-main);
    box-shadow: 0 6px 18px -8px rgba(34, 211, 238, 0.35);
}

.trip-stream {
    padding-top: calc(var(--sticky-h, 0px) + 20px);
}
.trip-stream:empty {
    padding-top: var(--sticky-h, 0px);
}

/* 顶部标题：开场时稍大，跑起来后缩成一行小字，把空间让给内容 */
.trip-fixed .trip-header {
    text-align: center;
    margin: 0;
}
.trip-fixed .trip-header h2 {
    font-family: monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0 0 8px;
    transition: font-size 0.25s, color 0.25s;
}
.trip-fixed.is-running .trip-header h2 {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 6px;
}

.trip-stream {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 10%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
}

.trip-fixed .process-step {
    position: relative;
    transition: color 0.3s;
}
.trip-fixed .process-step[data-state="wait"] { color: var(--text-muted); opacity: 0.55; }
.trip-fixed .process-step[data-state="busy"] { color: var(--text-main); opacity: 1; }
.trip-fixed .process-step[data-state="done"] { color: var(--cyan); opacity: 1; }
.trip-fixed .process-step[data-state="error"] { color: #fda4af; opacity: 1; }

.trip-fixed .process-step .step-num {
    transition: all 0.3s;
}
.trip-fixed .process-step[data-state="wait"] .step-num {
    border-color: var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
}
.trip-fixed .process-step[data-state="busy"] .step-num {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-dim);
    box-shadow: 0 0 12px var(--cyan-dim);
    animation: pulse-logo 1.2s infinite alternate;
}
.trip-fixed .process-step[data-state="done"] .step-num {
    border-color: var(--cyan);
    color: #000;
    background: var(--cyan);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.45);
}
.trip-fixed .process-step[data-state="error"] .step-num {
    border-color: #fb7185;
    color: #fb7185;
    background: rgba(251, 113, 133, 0.12);
}

.trip-fixed .step-arrow::before {
    animation-play-state: paused;
    opacity: 0.35;
}
.trip-fixed .step-arrow.is-active::before,
.trip-fixed .step-arrow.is-past::before {
    animation-play-state: running;
    opacity: 1;
}

@media (max-width: 900px) {
    .trip-fixed { padding: 12px 16px 10px; }
    .trip-stream { padding: 16px; }
    .trip-fixed .process-flow { flex-wrap: wrap; row-gap: 8px; }
    .trip-fixed .step-arrow { width: 18px; }
}

.trip-fixed .trip-cards {
    margin-top: 4px;
}

.cust-msg {
    display: flex;
    gap: 16px;
    max-width: 85%;
    animation: slide-up 0.3s ease-out forwards;
}
.cust-msg.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.cust-msg.cs, .cust-msg.error { align-self: flex-start; }

.cust-msg .avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: bold;
    background-color: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid var(--cyan-border);
}
.cust-msg.user .avatar {
    background-color: #374151;
    color: #d1d5db;
    border: 1px solid #4b5563;
}
.cust-msg.error .avatar {
    background-color: rgba(251, 113, 133, 0.12);
    color: #fb7185;
    border-color: rgba(251, 113, 133, 0.35);
}

.cust-bubble {
    padding: 12px 16px;
    border-radius: 8px;
    border-top-left-radius: 2px;
    background-color: var(--bubble-ai);
    border: 1px solid #1f2937;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-all;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.cust-msg.user .cust-bubble {
    border-radius: 8px;
    border-top-right-radius: 2px;
    background-color: var(--bubble-user);
    border-color: #334155;
}
.cust-msg.error .cust-bubble {
    background-color: rgba(251, 113, 133, 0.08);
    border-color: rgba(251, 113, 133, 0.35);
    color: #fda4af;
    white-space: pre-wrap;
}

.cust-bubble .cust-loading {
    display: inline-block;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}
.cust-bubble .cust-loading::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 12px;
    margin-left: 3px;
    vertical-align: middle;
    background-color: var(--cyan);
    animation: blink 0.8s infinite;
}

/* ===== 登录页 ===== */

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0a0e14);
  z-index: 9999;
}

.login-box {
  width: 100%;
  max-width: 380px;
  padding: 40px 36px;
  background: rgba(16, 22, 32, 0.9);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.06);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-brand .logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00e5ff, #0077ff);
  color: #001018;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand .logo-text h1 {
  font-size: 16px;
  margin: 0;
  letter-spacing: 1px;
  color: #e6f7ff;
}

.login-brand .logo-text p {
  font-size: 9px;
  margin: 2px 0 0;
  letter-spacing: 2px;
  color: #4a6a7a;
}

.login-title {
  font-size: 20px;
  margin: 0 0 6px;
  color: #e6f7ff;
  font-weight: 600;
}

.login-sub {
  font-size: 12px;
  color: #6f8b9b;
  margin: 0 0 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
}

.login-label {
  font-size: 11px;
  color: #7d96a5;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.login-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  margin-bottom: 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 7px;
  color: #e6f7ff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: rgba(0, 229, 255, 0.5);
}

.login-input::placeholder {
  color: #3d5262;
}

.login-error {
  display: none;
  font-size: 12px;
  color: #ff6b6b;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: rgba(255, 107, 107, 0.08);
  border-radius: 5px;
  border-left: 2px solid #ff6b6b;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #00e5ff, #0077ff);
  border: none;
  border-radius: 7px;
  color: #001018;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.login-btn:hover:not(:disabled) {
  opacity: 0.88;
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-toggle {
  margin-top: 16px;
  background: none;
  border: none;
  color: #4a9ebb;
  font-size: 12px;
  cursor: pointer;
  padding: 8px;
}

.login-toggle:hover {
  color: #00e5ff;
}

/* ===== 预设账号：一键体验（不需要了连同 index.html 里的按钮块一起删） ===== */

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  font-size: 11px;
  color: #3d5262;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(0, 229, 255, 0.12);
}

.login-trial-btn {
  width: 100%;
  padding: 11px;
  background: transparent;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 7px;
  color: #00e5ff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.login-trial-btn:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
}

.login-trial-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-trial-hint {
  margin: 9px 0 0;
  text-align: center;
  font-size: 11px;
  color: #3d5262;
  line-height: 1.5;
}

/* 侧栏底部的退出按钮 */
.logout-btn {
  margin-top: 10px;
  width: 100%;
  padding: 6px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 5px;
  color: #ff8080;
  font-size: 11px;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 107, 107, 0.16);
}

/* ===== 应用容器 =====
   加登录页时用 <div id="app-root"> 包住了 sidebar + main-content。
   原来 body 是 flex 容器，两个子元素并排；加了这一层之后，
   body 只有一个子元素，必须让 app-root 自己也是 flex，
   否则 sidebar 和主内容会上下堆叠。 */
.app-root {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}


/* ============================================================
   手机端适配（宽度 ≤ 768px）
   ------------------------------------------------------------
   桌面端的样式一行不动，所有改动都包在媒体查询里。
   目标是「能用」，不是「精致」：
     - 侧栏收成抽屉，点汉堡按钮滑出
     - 主区占满屏幕
     - 输入框字号 16px（小于 16px iOS 会自动放大页面）
     - 用 dvh 代替 vh，软键盘弹出时布局跟着缩，输入框不会被顶出屏幕
   ============================================================ */

/* 汉堡按钮和遮罩：桌面上不存在 */
.sidebar-toggle { display: none; }
.sidebar-mask { display: none; }


@media (max-width: 768px) {

  /* ---------- 1. 视口高度：100dvh 跟着地址栏/软键盘变化 ---------- */
  html, body { height: 100dvh; }

  /* 防止 iOS 双击放大后回不去 */
  body { touch-action: manipulation; }

  /* ---------- 2. 侧栏改成抽屉 ---------- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 82vw);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    /* 刘海屏左侧留白 */
    padding-left: env(safe-area-inset-left);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }

  /* 抽屉打开时把汉堡按钮藏起来，否则会盖住侧栏的 logo */
  body.sidebar-open .sidebar-toggle {
    opacity: 0;
    pointer-events: none;
  }

  /* 抽屉打开时的遮罩 */
  .sidebar-mask {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s;
  }

  body.sidebar-open .sidebar-mask {
    opacity: 1;
    pointer-events: auto;
  }

  /* 汉堡按钮：固定在左上角 */
  .sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    z-index: 300;
    width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(13, 17, 23, 0.92);
    border: 1px solid var(--border-color);
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: opacity 0.2s;
  }

  .sidebar-toggle span {
    display: block;
    height: 2px;
    background: var(--cyan);
    border-radius: 1px;
    transition: 0.2s;
  }

  /* ---------- 3. 主区占满、给汉堡按钮让位 ---------- */
  .main-content {
    width: 100%;
    padding-top: env(safe-area-inset-top);
  }

  /* 顶部导航：汉堡按钮占了左边，给 tab 让出位置 */
  .top-nav {
    height: 54px;
    padding: 0 8px 0 54px;
    gap: 6px;
  }

  .nav-tabs {
    flex: 1;
    min-width: 0;
    padding: 3px;
    gap: 2px;
  }

  .nav-tab {
    flex: 1;
    min-width: 0;
    padding: 6px 4px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 右上角的状态标签和「新会话」在手机上没地方放，隐藏状态标签 */
  .nav-status { gap: 6px; flex-shrink: 0; }
  .tag-status { display: none !important; }

  .new-session-btn {
    padding: 5px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* ---------- 4. 聊天区：左右留白收窄，气泡放宽 ---------- */
  .chat-area {
    padding: 16px 12px;
    gap: 16px;
  }

  .message-row { max-width: 94%; }
  .bubble { padding: 10px 13px; font-size: 14px; }
  .cust-msg { max-width: 94%; }
  .cust-bubble { padding: 10px 13px; }

  .bottom-section {
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    gap: 8px;
  }

  /* 字体 16px：iOS 上小于 16px 的输入框，聚焦时会自动放大整个页面 */
  .input-wrapper input { font-size: 16px; }
  .input-wrapper { padding: 6px 12px; }

  .quick-prompts { gap: 6px; }
  .prompt-btn { padding: 5px 9px; font-size: 11px; }

  /* ---------- 5. 出行页 ---------- */
  .trip-hero { padding: 0 16px 40px; gap: 20px; }
  .hero-greeting { font-size: 20px; gap: 8px; text-align: center; }
  .hero-icon { width: 32px; height: 32px; }
  .hero-input { max-width: 100%; padding: 10px 12px; }
  .hero-input input { font-size: 16px; }

  .trip-fixed { padding: 10px 12px 8px; }
  .trip-stream { padding: 0 12px; }

  .trip-flow { gap: 14px; }
  .trip-block-body { font-size: 14px; line-height: 1.7; }
  .trip-user-msg { max-width: 92%; }
  .trip-chat, .trip-err { padding: 12px 13px; font-size: 13px; }

  /* 进度条：手机上四个步骤横排太挤，缩小间距 */
  .trip-fixed .process-flow { gap: 6px; row-gap: 6px; }
  .trip-fixed .process-step { font-size: 11px; gap: 5px; }
  .trip-fixed .step-num { width: 20px; height: 20px; font-size: 10px; }
  .trip-fixed .step-arrow { width: 12px; }

  /* 示例卡片竖排 */
  .trip-cards { grid-template-columns: 1fr; gap: 8px; }
  .trip-card { padding: 12px; }

  .trip-scroll-btn { right: 14px; bottom: 100px; }

  /* ---------- 6. 客服页 ---------- */
  .customer-welcome { margin-top: -30px; }
  .radar-wrap { width: 64px; height: 64px; }
  .customer-welcome h2 { font-size: 17px; }

  /* ---------- 7. 登录页：手机上几乎铺满 ---------- */
  .login-screen { padding: 16px; }
  .login-box {
    max-width: 100%;
    padding: 28px 22px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
  .login-input { font-size: 16px; }

  /* ---------- 8. 侧栏内部：底部信息精简 ---------- */
  .sidebar-footer {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    gap: 6px;
  }
  .sidebar-header { padding: 16px; }
  .history-section { padding: 12px; }
}


/* 很窄的老手机（iPhone SE 320px）：再收一档 */
@media (max-width: 380px) {
  .nav-tab { font-size: 11px; padding: 5px 2px; }
  .hero-greeting { font-size: 17px; }
  .message-row { max-width: 96%; }
}


/* 横屏手机：高度很矮，去掉一些上下留白 */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .top-nav { height: 46px; }
  .trip-hero { padding-bottom: 20px; gap: 14px; }
  .hero-greeting { font-size: 18px; }
}

/* ============================================================
   ===== 反馈（独立功能，不需要了整段删掉）=====
   ------------------------------------------------------------
   入口有两个：
     - 桌面：侧栏底部的 #feedback-entry
     - 手机：右下角的 #feedback-fab（侧栏是抽屉，放侧栏里找不到）
   弹窗两者共用。
   ============================================================ */

/* ---------- 桌面侧栏入口 ---------- */
.feedback-entry {
  margin-top: 6px;
  width: 100%;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  background: rgba(34, 211, 238, 0.06);
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 7px;
  color: var(--cyan);
  font-size: 12px;
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.feedback-entry:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.2);
}

.feedback-entry .fe-ic { font-size: 13px; }

/* ---------- 手机浮标 ---------- */
.feedback-fab {
  display: none;
  position: fixed;
  right: 14px;
  /* 让开底部输入框，再避开 iPhone 底部横条 */
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 150;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  background: rgba(13, 17, 23, 0.92);
  border: 1px solid var(--cyan-border);
  color: var(--cyan);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 14px rgba(34, 211, 238, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feedback-fab:active {
  transform: scale(0.94);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

/* ---------- 弹窗 ---------- */
.feedback-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 9, 13, 0.78);
  backdrop-filter: blur(3px);
}

.feedback-modal.show { display: flex; }

.fb-box {
  width: 100%;
  max-width: 400px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #0f151d;
  border: 1px solid var(--cyan-border);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(34, 211, 238, 0.1);
}

.fb-title { font-size: 15px; font-weight: 600; color: var(--text-main); }
.fb-sub { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-top: -8px; }

.fb-moods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fb-mood {
  padding: 9px 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-main);
  background: #0b1118;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.fb-mood:hover { border-color: var(--cyan-border); background: #131c26; }

.fb-mood.on {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.18);
}

.fb-input {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  background: #0b1118;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  resize: none;
  transition: border-color 0.2s;
}

.fb-input:focus { border-color: var(--cyan-border); }
.fb-input::placeholder { color: #4b5563; }

textarea.fb-input { height: 84px; line-height: 1.6; }

.fb-count { font-size: 10px; color: #4b5563; text-align: right; margin-top: -10px; }
.fb-label { font-size: 11px; color: var(--text-muted); margin-bottom: -8px; }
.fb-opt { color: #4b5563; }

.fb-error {
  display: none;
  font-size: 12px;
  color: #fda4af;
  padding: 8px 10px;
  background: rgba(251, 113, 133, 0.08);
  border-radius: 6px;
  border-left: 2px solid #fb7185;
}

.fb-actions { display: flex; gap: 10px; margin-top: 2px; }

.fb-btn {
  flex: 1;
  padding: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  transition: box-shadow 0.2s, border-color 0.2s, color 0.2s;
}

.fb-btn.primary { background: var(--cyan); border: 1px solid var(--cyan); color: #001018; }
.fb-btn.primary:hover:not(:disabled) { box-shadow: 0 0 18px rgba(34, 211, 238, 0.5); }
.fb-btn.primary:disabled { opacity: 0.55; cursor: not-allowed; }

.fb-btn.ghost { background: transparent; border: 1px solid var(--border-color); color: var(--text-main); }
.fb-btn.ghost:hover { border-color: var(--cyan-border); color: var(--cyan); }

/* 提交成功的小提示 */
.feedback-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  z-index: 999;
  padding: 10px 18px;
  font-size: 13px;
  color: #001018;
  background: var(--cyan);
  border-radius: 20px;
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.4);
  animation: fb-toast-in 0.25s ease-out;
}

@keyframes fb-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 手机上：入口换成浮标，弹窗铺满 ---------- */
@media (max-width: 768px) {
  /* 抽屉里那个入口在手机上用不上，藏掉 */
  .feedback-entry { display: none; }

  .feedback-fab { display: flex; align-items: center; justify-content: center; }

  .fb-box { max-width: none; padding: 20px; }

  /* 输入框 16px：小于 16px 时 iOS 聚焦会自动放大整个页面 */
  .fb-input { font-size: 16px; }

  textarea.fb-input { height: 96px; }
}
