/* style.css — 趣浪ao v0.3.2
   风格：轻松活泼 · CITY FLY 天蓝清新系
   原则：克制用色 / 统一线性图标 / 中央主功能突出
   注：内部注释里的 v7.x 历史标记为旧编号体系，新版本号自 v0.3.2 起 */

/* ===== Design Tokens（v7 第三版视觉：白底轻盈 · 卡通点缀 · 青蓝只做功能高亮） ===== */
:root {
  /* 色彩 */
  --primary: #55C9F3;
  --primary-dark: #2FA8D5;        /* 可读性达标的主色文本/选中态 */
  --primary-gradient: linear-gradient(160deg, #74D9FA 0%, #55C9F3 100%);
  --primary-soft: #E6F8FF;
  --accent: #FFD84A;              /* 黄：仅装饰/下划线/星点/提醒 */
  --bg: #F8FCFE;
  --card: #FFFFFF;
  --text: #18324D;
  --text-mid: #657788;
  --text-dim: #657788;
  --text-light: #93A2AF;
  --border: #E8F0F4;
  --divider: #EDF3F6;
  --lime: #A9D83F;                /* 绿：下载成功/NEW/完成 */
  /* 语义色 */
  --success-bg: #E8F8EF; --success-tx: #2E9E63;
  --warn-bg: #FFF8E5;    --warn-tx: #C77B1F;
  --danger: #E05A4E;               /* 失败/错误态（离线包下载失败） */
  /* 圆角 */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  /* 间距 */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 16px;
  --gap-lg: 24px;
  --gap-xl: 32px;
  /* 阴影 */
  --shadow-card: 0 6px 20px rgba(31,90,120,.08);
  --shadow-fab: 0 6px 16px rgba(47,168,213,.32);
  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', Roboto, sans-serif; /* X5 已落地：对齐实际渲染 */
}

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;                    /* 正文常规 */
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
/* 字重分级：页面大标题 800 / 区块标题 700 / 卡片标题 600 / 正文 400 */
h1, h2, h3 { font-weight: 800; letter-spacing: .3px; }
h4, b { font-weight: 700; }
button { font-family: var(--font); }
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(47,168,213,.45);
  outline-offset: 2px;
}

/* ===== 全局线性图标 ===== */
svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 56px; height: 56px; }
.ic.xl { width: 30px; height: 30px; }
.muted { color: var(--text-light); }

/* ===== App Shell ===== */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  /* v7：白底轻盈。极淡波点纹理，删除贯穿式天空渐变底板 */
  background-image:
    radial-gradient(rgba(85,201,243,.08) 1.5px, transparent 1.5px),
    linear-gradient(var(--bg), var(--bg));
  background-size: 24px 24px, 100% 100%;
}

/* ===== 固定 Hero 头部（v7.2）：整图背景（主/副文案已烘焙）+ 透明 Logo + 搜索框 ===== */
.hero-header {
  position: relative;
  aspect-ratio: 1350 / 1165;
  overflow: hidden;
  z-index: 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url('assets/hero-background.webp') top center / 100% 100% no-repeat;
}
/* 底部渐隐：背景图过渡到页面底色，衔接三工具卡 */
.hero-bg::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 36px;
  background: linear-gradient(180deg, rgba(248,252,254,0) 0%, rgba(248,252,254,.55) 45%, var(--bg) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 14px) var(--gap-md) 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand-logo {
  width: 118px;
  height: auto;
  display: block;
  pointer-events: none;
}
.header-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; flex-shrink: 0;
  font-size: 11px; font-weight: 600;
  color: #fff;
  background: #3C536C;
  border-radius: var(--radius-pill);
  padding: 0 10px;
}
.header-badge svg { width: 13px; height: 13px; }
.hero-header .search-bar {
  position: absolute;
  left: var(--gap-md); right: var(--gap-md);
  top: calc(env(safe-area-inset-top) + 68px);
  height: 44px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 10px rgba(31,90,120,.10);
  z-index: 2;
}
/* 二级页隐藏首页 Hero；详情页沉浸式由底部导航区的 transform 规则处理 */
body.subpage .header { display: none; }

.icon-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: transform .15s, background .15s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.outline { background: transparent; border: 1.2px solid var(--border); color: var(--text-mid); }
.icon-btn svg { width: 19px; height: 19px; }

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 0 5px 0 16px;
  height: 44px;
}
.search-bar input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
}
.search-bar input::placeholder { color: var(--text-light); }

/* ===== 二级页头部（v7：极淡天空蓝渐变 + 右上离线 badge） ===== */
.page-head { position: relative; padding: 20px var(--gap-md) 2px; z-index: 0; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: .3px; }
.page-head p { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.page-head::before {
  content: "";
  position: absolute;
  inset: -20px 0 auto;
  height: 136px;
  background: linear-gradient(180deg, #EAF9FF 0%, rgba(234,249,255,0) 100%);
  z-index: -1;
}
.head-badge-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.page-head .header-badge { flex-shrink: 0; margin-top: 4px; }


/* ===== Content ===== */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}
.content::-webkit-scrollbar { display: none; }

/* 视图切换：默认隐藏，仅 active 显示（修复堆叠 bug） */
.view { display: none; }
.view.active { display: block; animation: viewIn .18s ease-out; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Section Title ===== */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap-md);
  margin: 22px 0 var(--gap-sm);
}
.section-title h3 {
  font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
/* 青蓝短杠 + 黄色点缀：手绘感分区标记 */
.section-title h3::before {
  content: "";
  width: 4px; height: 16px;
  border-radius: 2px;
  background: var(--primary-dark);
  box-shadow: 3px 1px 0 0 var(--accent);
  transform: rotate(-6deg);
}
.section-title .more { font-size: 13px; color: var(--text-dim); cursor: pointer; }

/* ===== 行程攻略（v7.6 已整合进详情页「随行攻略」，首页不再展示；样式随 .guide-* 一并移除） ===== */

/* ===== 三工具入口（v7：Hero 后第一张白卡，三列等宽；负上移贴近渐隐区） ===== */
.core-tools {
  display: flex;
  margin: -10px var(--gap-md) 0;
  height: 164px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
}
.tool-col {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 4px;
  cursor: pointer;
  transition: transform .16s;
  position: relative;
}
.tool-col:active { transform: scale(.97); }
.tool-col + .tool-col::before {
  content: "";
  position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 1px;
  background: var(--border);
}
.tool-col img {
  width: 78px; height: 66px;
  flex: 0 0 66px;
  object-fit: contain;
}
/* 三张源插画的画布留白不同；只校正视觉位置，不改变三列文字基线。 */
.tool-col img[src$="tool-plan.png"] { transform: translateY(2px); }
.tool-col b { font-size: 15px; font-weight: 700; margin-top: 10px; color: var(--text); width: 100%; }
.tool-col > span { font-size: 12px; color: var(--text-light); margin-top: 5px; width: 100%; }

/* ===== 首页灵感目的地横滑卡 ===== */
.city-strip {
  display: flex;
  gap: 12px;
  padding: 2px var(--gap-md) 6px;
  scroll-padding-left: var(--gap-md);  /* snap 对齐左页边 */
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.city-strip::-webkit-scrollbar { display: none; }
.city-card {
  position: relative;
  flex: 0 0 118px;
  height: 150px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--primary-soft);
  box-shadow: var(--shadow-card);
  scroll-snap-align: start;
  transition: transform .15s;
  border: 3px solid #FFFFFF;            /* 贴纸感白描边（卡通插画风格关键细节） */
}
.city-card:last-child { margin-right: 0; }
.city-card:active { transform: scale(.96); }
.cc-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.cc-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(10,40,55,.72));
  color: #fff;
}
.cc-body b { display: block; font-size: 15px; font-weight: 800; letter-spacing: .5px; text-shadow: 0 1px 3px rgba(10,40,55,.45); }
.cc-body span { font-size: 10.5px; opacity: .9; display: block; margin-top: 1px; text-shadow: 0 1px 2px rgba(10,40,55,.4); }

/* ===== Trip Card（v7.2：方图封面 + 右侧信息，不再竖条拉伸） ===== */
.trip-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius-md);
  margin: 0 var(--gap-md) var(--gap-sm);
  cursor: pointer;
  transition: transform .16s;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.trip-card:active { transform: scale(.985); }
.tc-cover {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  object-fit: cover;
  border-radius: 12px;
  margin: 12px 0 12px 12px;
}
.tc-main { flex: 1; min-width: 0; padding: 12px 14px 12px 12px; }
.trip-card.has-nu-strip .tc-main { padding-bottom: 0; }
.trip-card.has-nu-strip .tc-progress-line { margin-bottom: 0; }
.trip-card.has-nu-strip .tc-cover { margin-bottom: 12px; }
.trip-card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.trip-card-title {
  font-size: 17px; font-weight: 700;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trip-badge {
  font-size: 11px; font-weight: 600;
  height: 24px; line-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.trip-badge.st-planned  { background: #E1F6FF; color: #16739C; }
.trip-badge.st-ongoing  { background: var(--success-bg); color: var(--success-tx); }
.trip-badge.st-done     { background: var(--divider); color: var(--text-dim); }
.trip-badge.st-idle     { background: var(--warn-bg); color: var(--warn-tx); }
.tc-meta-line {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 首页行程卡航班概要行（v7.7）：meta 行与进度条之间，读缓存渲染 */
.tc-flight {
  display: flex; align-items: center; gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #F1F5F8;
  font-size: 11.5px;
}
.tc-flight .ic { width: 12px; height: 12px; color: var(--text-mid); flex-shrink: 0; }
.tc-flight b { font-weight: 800; letter-spacing: .3px; flex-shrink: 0; }
.tc-flight span { color: var(--text-mid); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-flight.st-ok    { background: var(--success-bg); }  .tc-flight.st-ok b    { color: var(--success-tx); }
.tc-flight.st-live  { background: var(--primary-soft); }.tc-flight.st-live b  { color: var(--primary-dark); }
.tc-flight.st-warn  { background: var(--warn-bg); }     .tc-flight.st-warn b  { color: var(--warn-tx); }
.tc-flight.st-err   { background: #FDECEA; }            .tc-flight.st-err b   { color: var(--danger); }
.tc-progress-line { display: flex; align-items: center; gap: 8px; }
.tc-bar {
  flex: 1;
  height: 5px;
  background: var(--divider);
  border-radius: 3px;
  overflow: hidden;
}
.tc-bar .bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  transition: width .35s ease;
}
.tc-pct { font-size: 11px; font-weight: 700; color: var(--primary-dark); }

/* ===== Empty State ===== */
.empty-plain {
  padding: 40px var(--gap-lg);
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}
.empty-plain .more-link {
  color: var(--primary-dark); font-weight: 600; cursor: pointer;
}

/* ===== 详情页沉浸式头图（v7.6：216→176pt，首屏让位给当天行程与攻略） ===== */
.detail-hero {
  position: relative;
  height: 176px;
  margin: -1px -1px 0;             /* 吃掉视图间 1px 缝隙 */
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(160deg, #74E1FF, #B8ECFF);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,35,48,.38) 0%, rgba(10,35,48,.05) 38%, rgba(10,35,48,.62) 100%);
}
.hero-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 0;
  z-index: 2;
}
.hero-bar-right { display: flex; gap: 8px; }
.hero-btn {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(10,35,48,.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, transform .12s;
  position: relative;
}
/* 触控热区外扩至 ~44px，视觉尺寸不变 */
.hero-btn::after { content: ""; position: absolute; inset: -7px; }
.hero-btn:active { transform: scale(.92); background: rgba(10,35,48,.58); }
.hero-btn svg { width: 19px; height: 19px; }
.hero-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 18px 16px;
  z-index: 1;
  color: #fff;
}
.hero-body h2 { font-size: 22px; font-weight: 800; letter-spacing: .4px; }
.hero-body p { font-size: 12.5px; opacity: .92; margin-top: 3px; }
.hero-ring {
  position: absolute; right: 16px; bottom: 18px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero-ring span {
  font-size: 11px; font-weight: 800; color: #fff;
  margin-top: 2px;
  text-shadow: 0 1px 4px rgba(10,35,48,.5);
}
.hero-ring svg { filter: drop-shadow(0 1px 3px rgba(10,35,48,.4)); }

/* ===== 快捷功能 2×2 卡片 ===== */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 var(--gap-md);
  margin-bottom: var(--gap-lg);
}
.feat-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 10px rgba(38,51,59,.07);
  transition: transform .15s;
  display: flex; flex-direction: column; gap: 3px;
  align-items: center;
  text-align: center;
}
.feat-card:active { transform: scale(.97); }
.feat-card b { font-size: 14px; margin-top: 6px; }
.feat-desc { font-size: 11px; color: var(--text-light); }
.feat-ico {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.feat-ico svg { width: 19px; height: 19px; }
.feat-ico.c-yellow { background: #FFF6DC; color: #C08A1E; }
.feat-ico.c-purple { background: #EFEAFF; color: #7A5FD0; }
.feat-ico.c-green  { background: #E3F7EA; color: #2E9E63; }
.feat-ico.c-blue   { background: #E1F6FF; color: var(--primary-dark); }

/* ===== 详情页其余部分 ===== */
.stats-row {
  display: flex; gap: 10px;
  padding: var(--gap-md) var(--gap-md) 0;
  margin-bottom: var(--gap-md);
}
.stat-card { 
  flex: 1;
  background: transparent;
  border-radius: 0;
  padding: 0;
  text-align: center;
  box-shadow: none;
  position: relative;
}
.stat-card + .stat-card::before {
  content: "";
  position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px;
  background: #E8F0F4;
}
.stat-val { font-size: 19px; font-weight: 800; color: var(--text); }
.stat-label { font-size: 11px; color: var(--text-light); margin-top: 2px; }
/* v7.6：4 格碎片卡 → 1 条 3 项总览（72pt 高，左右16pt距Hero12pt） */
.stats-row {
  display: flex; align-items: center;
  margin: 12px var(--gap-md) 16px;   /* 底部与日期条留出呼吸位 */
  padding: 12px 8px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.detail-actions { padding: var(--gap-md) var(--gap-md) 28px; }
.btn-share {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  border: none;
  background: linear-gradient(145deg, #74E1FF, #57D2F7);
  color: #063A4C;
  border-radius: var(--radius-pill);
  padding: 13px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(111,216,255,.4);
  transition: transform .15s;
  font-family: var(--font);
}
.btn-share:active { transform: scale(.97); }

.day-tabs {
  display: flex;
  gap: 6px;
  padding: 2px var(--gap-md) 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gap-md);  /* 与首页城市条同规范：snap/滚动对齐左页边 */
  overscroll-behavior-x: contain;
}
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .18s;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--border);
}
/* 右缘渐隐：还有更多日期时提示「滑一滑」；滚到尽头由 JS 摘除 */
.day-tabs.can-more {
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent calc(100% - 6px));
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent calc(100% - 6px));
}
.day-tab .day-label { font-size: 13px; font-weight: 700; color: var(--text-dim); }
.day-tab .day-date { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.day-tab.active .day-label,
.day-tab.active .day-date { color: #fff; }
.day-tab.active { background: #2FA8D5; }

.day-content {
  margin: 0 var(--gap-md) var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  box-shadow: var(--shadow-card);
}

/* ===== Activity List ===== */
.activity-list { list-style: none; }
.activity-item {
  display: flex; align-items: flex-start; gap: 6px;
  flex-wrap: wrap;                       /* 航班条独占下一行 */
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.activity-body { min-width: 0; }
.activity-item:last-child { border-bottom: none; }
.activity-item.completed { opacity: .45; }
.activity-item.completed .activity-name { text-decoration: line-through; }
.activity-item.dragging { opacity: .3; }
.activity-item.drag-over { box-shadow: inset 0 2px 0 var(--primary); }
.drag-handle {
  color: var(--text-light);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
  padding-top: 2px;
}
.drag-handle svg { width: 16px; height: 16px; }

.a-time {
  flex-shrink: 0;
  width: 42px;
  text-align: right;
  font-size: 11px; font-weight: 600;
  color: var(--text-dim);
  padding-top: 3px;
  line-height: 1.35;
}
.a-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.a-dot.attraction { background: #4FC3F7; box-shadow: 0 0 0 3px rgba(79,195,247,.18); }
.a-dot.restaurant { background: #FFB74D; box-shadow: 0 0 0 3px rgba(255,183,77,.18); }
.a-dot.transport  { background: #81C784; box-shadow: 0 0 0 3px rgba(129,199,132,.18); }
.a-dot.hotel      { background: #E57373; box-shadow: 0 0 0 3px rgba(229,115,115,.18); }
.a-dot.other      { background: #B8C4CC; box-shadow: 0 0 0 3px rgba(184,196,204,.18); }
.activity-body { flex: 1; min-width: 0; cursor: pointer; }
.activity-name {
  font-size: 15px; font-weight: 600;
  line-height: 1.45;
  margin-bottom: 2px;
  word-break: break-word;               /* 中英混排断行：优先词边界，避免硬撕 */
  overflow-wrap: anywhere;
}
.activity-note {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 3px;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px;  /* 📍等前缀与文字同行排 */
}
.activity-note > svg { display: none; }
/* 打卡圆钮：44px 真实触控尺寸（Codex review #3：伪元素外扩与编辑钮热区重叠） */
.check-btn {
  width: 44px; height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  border: 1.6px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  transition: all .18s;
}
.check-btn svg { width: 17px; height: 17px; stroke-width: 2.4; }
.check-btn:active { transform: scale(.92); }
.check-btn.done {
  background: var(--success-tx);
  border-color: var(--success-tx);
  color: #fff;
  animation: popIn .3s cubic-bezier(.34,1.56,.64,1);
}
@keyframes popIn {
  0% { transform: scale(.5); }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.activity-actions { flex-shrink: 0; }
.btn-icon {
  width: 44px; height: 44px;
  min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  opacity: .65;
  transition: opacity .2s;
}
.btn-icon:hover { opacity: 1; }
.btn-icon svg { width: 18px; height: 18px; }

/* ===== 航班状态条（v7.7）：活动卡内嵌独占一行，点击=强制刷新 ===== */
.flight-bar {
  flex: 1 1 100%;                        /* 独占整行：不被打卡/编辑钮挤压 */
  display: flex; align-items: center; gap: 10px;
  margin: 10px 4px 2px calc(42px + 9px + 9px);   /* 对齐文字起点(时间列+圆点列) */
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--primary-soft);
  cursor: pointer;
  transition: transform .14s;
}
.flight-bar:active { transform: scale(.98); }
.flight-bar .fb-main { flex: 1; min-width: 0; }
.flight-bar b { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.flight-bar span { display: block; font-size: 11px; color: var(--text-mid); margin-top: 1px; }
.flight-bar > svg { color: var(--primary-dark); flex-shrink: 0; }
.flight-bar .fb-refresh { opacity: .45; }
.flight-bar.ok      { background: var(--success-bg); }   .flight-bar.ok b      { color: var(--success-tx); }
.flight-bar.live    { background: var(--primary-soft); } .flight-bar.live b    { color: var(--primary-dark); }
.flight-bar.warn    { background: var(--warn-bg); }      .flight-bar.warn b    { color: var(--warn-tx); }
.flight-bar.err     { background: #FDECEA; }             .flight-bar.err b     { color: var(--danger); }
.flight-bar.dim     { background: #F1F5F8; }             .flight-bar.dim b     { color: var(--text-mid); }

/* ===== 随行攻略（v7.6：整合自原首页攻略，位置=活动列表后、添加活动前） ===== */
.trip-guide {
  margin: 16px 0 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 16px;
}
.tg-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.tg-head img { width: 36px; height: 30px; object-fit: contain; flex-shrink: 0; }
.tg-head h4 { flex: 1; font-size: 18px; font-weight: 800; color: var(--text); }
.tg-head .tg-more {
  display: inline-flex; align-items: center; gap: 2px;
  font-size: 14px; font-weight: 600; color: var(--primary-dark);
  cursor: pointer;
  padding: 10px 0 10px 10px;            /* 44pt 热区：视觉 14pt、触区外扩 */
  margin: -10px 0;
}
.tg-strip {
  display: flex; gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
}
.tg-strip::-webkit-scrollbar { display: none; }
.tg-card {
  flex: 0 0 158px;
  min-height: 196px;
  height: auto;
  scroll-snap-align: start;
  background: #FFFDF7;
  border-radius: 16px;
  padding: 12px 12px 14px;
  cursor: pointer;
  transition: transform .15s;
  display: flex; flex-direction: column;
}
.tg-card:active { transform: scale(.97); }
.tg-tag {
  align-self: flex-start;
  display: inline-flex; align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11.5px; font-weight: 800;
  background: #FFF3D6; color: #A8741A;   /* 出发前/交通：浅黄底+黄褐字 */
}
.tg-tag.tg-blue { background: #E1F3FC; color: var(--primary-dark); }  /* 目的地：浅蓝底+青蓝字 */
.tg-card img { width: 126px; height: 84px; object-fit: contain; margin: 10px auto; }
/* 摘要文字沉底：有图卡图文紧凑，无图卡标签下自然留白，两卡文字基线对齐不漂移 */
.tg-text {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 「查看全部」底部抽屉 */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  max-height: 82vh;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-bar { display: flex; justify-content: center; margin-bottom: 6px; }
.sheet-bar span { width: 38px; height: 4.5px; border-radius: 3px; background: var(--border); }
.sheet-title { font-size: 18px; font-weight: 800; text-align: center; margin-bottom: 12px; }
.guide-sheet-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.guide-sheet-list .tg-card { width: 100%; flex: none; height: auto; min-height: 188px; }
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .tg-card, .btn-share, .btn-primary { transition: none; }
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(145deg, #74E1FF, #57D2F7);
  color: #063A4C;
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(111,216,255,.35);
  transition: transform .15s, opacity .15s;
  font-family: var(--font);
}
.btn-primary .arrow { width: 15px; height: 15px; transform: rotate(180deg); }
.btn-primary:active { transform: scale(.96); }
.btn-outline {
  background: transparent;
  color: var(--text-mid);
  border: 1.2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 11px 20px;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
}
.btn-danger-text {
  background: none; border: none;
  color: #D64541;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  padding: 8px 4px;
  font-family: var(--font);
}
.btn-add {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  margin-top: var(--gap-xs);
  transition: border-color .2s, color .2s;
  font-family: var(--font);
}
.btn-add:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-back {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent;
  border: none;
  font-size: 14px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  padding: 6px 10px 6px 2px;
  border-radius: var(--radius-pill);
  font-family: var(--font);
}
.btn-danger-outline {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: none;
  border: 1.2px solid #F2C1C0;
  color: #D64541;
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}

/* ===== Notes ===== */
.notes-section { margin-top: 18px; padding-top: var(--gap-md); border-top: 1px solid var(--divider); }
.notes-section h4 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.notes-section textarea {
  width: 100%; min-height: 80px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14.5px;
  color: var(--text);
  font-family: var(--font);
  resize: vertical;
  background: #FAFBFC;
  outline: none;
  transition: border-color .2s;
}
.notes-section textarea:focus { border-color: var(--primary); background: var(--card); }

/* ===== 设置页 ===== */
.set-group {
  margin: 0 var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
}
.set-row:last-child { border-bottom: none; }
.set-row.static { cursor: default; }
.set-left { display: flex; align-items: center; gap: 12px; }
.set-ico {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.set-ico svg { width: 18px; height: 18px; }
.set-ico.c-blue   { background: #E1F6FF; color: var(--primary-dark); }
.set-ico.c-green  { background: #E3F7EA; color: #2E9E63; }
.set-ico.c-yellow { background: #FFF6DC; color: #C08A1E; }
.set-ico.c-purple { background: #EFEAFF; color: #7A5FD0; }
.set-name { font-size: 15px; font-weight: 600; }
.set-desc { font-size: 12px; color: var(--text-light); margin-top: 1px; }
.arrow { color: var(--text-light); transform: rotate(180deg) !important; }
.danger-zone { padding: var(--gap-lg) var(--gap-md) 40px; }
.danger-tip { font-size: 11.5px; color: var(--text-light); text-align: center; margin-top: 8px; }

/* ===== Modal（活泼版） ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,30,38,.42);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--gap-lg) 20px calc(var(--gap-lg) + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  animation: slideUp .28s cubic-bezier(.32,.72,.33,1);
}
.modal.slim { padding-bottom: calc(var(--gap-lg) + env(safe-area-inset-bottom, 0px)); }
@keyframes slideUp {
  from { transform: translateY(60%); }
  to   { transform: translateY(0); }
}
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 18px; text-align: center; }
.modal-sub { font-size: 12.5px; color: var(--text-dim); text-align: center; margin: 2px 0 6px; }
.cf-text { font-size: 14px; color: var(--text-mid); text-align: center; line-height: 1.6; margin-bottom: 6px; }
/* 顶部小徽章：让弹窗开口第一眼不是白纸 */
.modal-hero-chip {
  width: 56px; height: 56px;
  margin: 4px auto 14px;
  border-radius: 20px;
  background: var(--primary-gradient);
  color: #0C4A63;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(111,216,255,.4);
  border: 3px solid #FFFFFF;
  transform: rotate(-6deg);           /* 贴纸歪贴感 */
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.modal.show .modal-hero-chip { transform: rotate(3deg) scale(1.04); }   /* 打开时回弹摆正，俏皮 */
.modal-hero-chip.c-green { background: linear-gradient(145deg, #9BE8B4, #63D48E); color: #0A5230; box-shadow: 0 4px 12px rgba(99,212,142,.35); }
.modal-hero-chip svg { width: 24px; height: 24px; }
.modal.fun h3 { font-size: 20px; font-weight: 800; margin-bottom: 6px; letter-spacing: .5px; }
/* 小屏长滚动：操作区粘底，填完不用再滑回去 */
.modal.fun { max-height: 88dvh; }
.modal.fun .modal-actions {
  position: sticky;
  bottom: calc(-1 * var(--gap-lg));
  padding: 12px 0 env(safe-area-inset-bottom, 0);
  background: var(--card);
}
/* 弹窗内步骤标题 */
.mstep {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 8px;
  font-size: 13.5px; font-weight: 700;
  color: var(--text-mid);
}
.mstep-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #0C4A63;
  font-size: 11.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal.fun .modal-actions { margin-top: 24px; }
/* 步骤 2 内容收纳进浅底容器：分组有边界，不再散落 */
.mcard {
  background: #F7FBFD;
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 14px 12px 12px;
  position: relative;
}
/* 视觉主次：目的地输入框是这一步的主角，放大加重 */
.mcard > input:first-of-type {
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  border-color: rgba(47,168,213,.4);
  background: #FFFFFF;
}
/* 分层分隔：日期区与目的地之间 */
.mcard .form-row { margin-top: 12px; }
.mcard .day-presets { margin-top: 10px; }
.mcard input { background: var(--card); }
/* 城市胶囊：单行横滑不换行，间距统一 */
.mcard .dest-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.mcard .dest-chips::-webkit-scrollbar { display: none; }
.mcard .dest-chip { flex-shrink: 0; }
/* 弹窗内 label 收紧 */
.modal.fun label { margin-top: 10px; margin-bottom: 4px; font-size: 11.5px; font-weight: 500; letter-spacing: .5px; color: var(--text-light); }

/* ===== 新建行程两步 bottom sheet（v7） ===== */
.modal.fun.sheet { border-radius: 28px 28px 0 0; padding-top: 0; max-height: 92dvh; }
.nt-topbar {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  margin: 0 -20px;
  padding: 0 20px;
  background: var(--card);
  z-index: 2;
}
.nt-topbar::before {
  content: "";
  position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 36px; height: 5px;
  border-radius: 3px;
  background: var(--border);
}
.nt-cancel {
  border: none; background: transparent;
  font-size: 16px; color: var(--text-mid);
  font-family: var(--font);
  cursor: pointer;
  padding: 10px 0;
}
.nt-title { font-size: 20px; font-weight: 800; }
.nt-step { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.nt-headrow {
  display: flex; align-items: center; gap: 16px;
  margin: 18px 0 16px;
}
.nt-headrow .nt-illu { width: 118px; height: 100px; object-fit: contain; flex-shrink: 0; }
.nt-headrow h3 { text-align: left; font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.nt-headrow .modal-sub { text-align: left; font-size: 14px; margin: 0; }
.nt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
}
.nt-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  margin: 14px 0 8px;
}
.nt-label:first-child { margin-top: 0; }
.nt-label svg { color: var(--primary-dark); }
.nt-dest-value {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  height: 56px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #FBFDFE;
  padding: 0 14px;
  font-size: 18px; font-weight: 700;
  color: var(--text);
  font-family: var(--font);
  cursor: pointer;
}
.nt-dest-value.picked { color: var(--text); }
.nt-dest-value .arrow { transform: rotate(180deg); color: var(--text-light); }
.nt-chips { margin: 10px 0 4px; }
.nt-dates { margin-top: 4px; }
.nt-dates > div { flex: 1; }
.nt-date-arrow { flex: 0 0 auto !important; display: flex; align-items: center; color: var(--text-light); transform: rotate(180deg); }
.day-presets { display: flex; gap: 10px; margin-top: 12px; }
.day-presets button {
  flex: 1;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  font-size: 15px; font-weight: 600;
  color: var(--text-mid);
  font-family: var(--font);
  cursor: pointer;
  transition: all .16s;
}
.day-presets button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.day-presets button:active { transform: scale(.97); }
.nt-next-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 60px;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 0 14px;
  font-family: var(--font);
  cursor: pointer;
}
.nt-next-row b { font-size: 16px; font-weight: 700; color: var(--text); }
.nt-next-row span { flex: 1; font-size: 13px; color: var(--text-light); }
.nt-next-row .arrow { transform: rotate(180deg); color: var(--text-light); }
.nt-next-row svg:first-child { color: var(--primary-dark); }
.nt-pane[hidden] { display: none; }
.nt-hint { font-size: 12.5px; color: var(--text-light); text-align: center; margin-top: 14px; }
.nt-actions {
  display: flex; align-items: center; gap: 16px;
  margin-top: 20px;
  padding-top: 4px;
}
.nt-back-link {
  border: none; background: transparent;
  font-size: 15px; font-weight: 600;
  color: var(--text-mid);
  font-family: var(--font);
  cursor: pointer;
  padding: 10px 0;
  flex-shrink: 0;
}
.nt-actions .btn-primary { flex: 1; height: 52px; font-size: 16px; }
/* 分享弹窗按钮：横向 flex，图标文字同行 */
.btn-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
/* 天数快捷胶囊 */
.day-presets { display: flex; gap: 8px; margin-top: 10px; }
.modal input, .modal select, .modal textarea {
  width: 100%; height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font);
  background: #FAFBFC;
  outline: none;
  transition: border-color .2s;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--primary); background: var(--card); }
.modal textarea { height: 80px; padding: 10px 12px; resize: vertical; }
.modal select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%237A8891' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-row { display: flex; gap: var(--gap-sm); }
.form-row > div { flex: 1; min-width: 0; }  /* min-width:0 允许日期等宽输入框收缩，窄屏不撑破容器 */
.modal-actions { display: flex; gap: var(--gap-sm); margin-top: var(--gap-lg); }
.modal-actions button { flex: 1; }
.spacer { flex: 1; }
.modal-actions .btn-danger-text { flex: unset; }

.day-presets button {
  flex: 1;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #F7FBFD;
  font-size: 13px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.day-presets button.active {
  background: var(--primary-gradient);
  border-color: rgba(47,168,213,.4);
  color: #0C4A63;
  font-weight: 700;
}

/* ===== 目的地选择 chips ===== */
.dest-chips { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.dest-chip {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: #F1F5F7;
  font-size: 13px; font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}
.dest-chip.active {
  background: var(--primary-gradient);
  border-color: rgba(47,168,213,.35);
  color: var(--text);
  font-weight: 700;
}

/* ===== 底部操作面板（Action Sheet）===== */
.sheet h3 {
  font-size: 15px; font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.sheet-list { display: flex; flex-direction: column; gap: 8px; }
.sheet-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: #F1F5F7;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: transform .12s, background .15s;
  font-family: var(--font);
}
.sheet-item:active { transform: scale(.98); background: #E4EBEF; }
.sheet-item svg { width: 19px; height: 19px; color: var(--text-mid); }
.sheet-item.danger { background: #FDEEEE; color: #D64541; }
.sheet-item.danger svg { color: #D64541; }
.sheet-cancel { margin-top: 10px; width: 100%; }

/* ===== 分享预览 ===== */
.share-preview {
  background: #F7FBFD;
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  margin-top: 12px;
  max-height: 38vh;
  overflow-y: auto;
}
.sp-text {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-mid);
  padding: 14px 16px;
  font-variant-numeric: tabular-nums;
}
.share-tip { font-size: 11.5px; color: var(--text-light); text-align: center; margin-top: 12px; line-height: 1.6; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(38,51,59,.92);
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  opacity: 0;
  transition: all .3s;
  z-index: 200;
  pointer-events: none;
  white-space: nowrap;
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 底部 Tab 栏（v7：白底实色 · 无毛玻璃） ===== */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 68px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: transform .2s ease, opacity .2s ease;
}
/* 沉浸式详情页：底部导航滑走（不用 display:none，保留过渡动画） */
body.immersive .bottom-nav {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
body.immersive .content { padding-bottom: env(safe-area-inset-bottom, 0px); }
.bottom-nav .tab-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  min-width: 56px;
}
.bottom-nav .tab-icon { color: var(--text-light); transition: color .16s; }
.bottom-nav .tab-icon svg { width: 24px; height: 24px; }
/* 线性/面性双图标：默认线性，选中切面性（同一图形，形态切换） */
.tab-icon .ic-fill { display: none; }
.tab-item.active .tab-icon .ic-line { display: none; }
.tab-item.active .tab-icon .ic-fill { display: block; }
.bottom-nav .tab-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-light);
  letter-spacing: .3px;
  transition: color .16s;
}
.bottom-nav .tab-item.active .tab-icon { color: var(--primary-dark); transform: translateY(-1px); }
.bottom-nav .tab-item.active .tab-label { color: var(--primary-dark); font-weight: 700; }

/* 中央主功能按钮：凸起 FAB（v7：青蓝实心 + 白描边） */
.tab-item.center { margin-top: -20px; padding: 0; }
.fab {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-fab), 0 0 0 3px #FFFFFF;
  transition: transform .16s;
  cursor: pointer;
}
.fab:active { transform: scale(.92); }
.fab svg { width: 26px; height: 26px; stroke-width: 2.2; }

/* ===== 倒计时提醒条（v7.3：加重视觉权重，醒目可点） ===== */
.trip-card .nu-strip {
  display: flex; align-items: center; gap: 10px;
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 48px;
  margin: 0 !important;
  background: linear-gradient(90deg, var(--primary) 0%, #6FD4F7 100%);
  border-radius: 0;
  padding: 0 14px;
  cursor: pointer;
  box-shadow: none;
  border: none;
  transition: filter .15s;
}
.trip-card { position: relative; }
.trip-card.has-nu-strip { padding-bottom: 48px; }
.trip-card.has-nu-strip .tc-cover { margin: 12px 0 12px 12px; }
@supports selector(:has(.nu-strip)) {
  .trip-card:has(.nu-strip) { padding-bottom: 48px; }
  .trip-card:has(.nu-strip) .tc-cover { margin: 12px 0 12px 12px; }
}
.trip-card .nu-strip:active { filter: brightness(.94); }
.nu-strip .nu-cal {
  width: 17px; height: 17px;
  color: #fff;
  flex-shrink: 0;
}
.nu-strip b {
  font-size: 22px; font-weight: 800;
  color: #FFFFFF;
  letter-spacing: .5px;
}
.nu-strip span { font-size: 13px; color: #FFFFFF; font-weight: 700; }
.nu-strip .nu-go {
  margin-left: auto;
  width: 16px; height: 16px;
  color: rgba(255,255,255,.9);
  transform: rotate(180deg);
  flex-shrink: 0;
}
/* X8：倒计时条内「日期区」可点直达编辑行程（与整条跳行前准备分区） */
.nu-strip .nu-datezone {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
  border-radius: var(--radius-sm);
  margin: 0 -6px; padding: 4px 6px;
  cursor: pointer;
  transition: background .15s;
}
.nu-strip .nu-datezone:active { background: rgba(255,255,255,.18); }
.nu-strip .nu-datezone span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ===== 全部打卡完成卡 ===== */
.alldone-card {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(120deg, #E3F7EA, #F2FBF5);
  color: var(--success-tx);
  font-size: 13.5px; font-weight: 700;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: var(--gap-sm);
}
.alldone-card svg { width: 16px; height: 16px; stroke-width: 2.4; }

/* ===== 详情页「接下来」卡（na- 前缀，与行程卡 tc- 隔离） ===== */
.today-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(120deg, #E3F6FF 0%, #EFFCF3 100%);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: var(--gap-sm);
}
.na-label {
  font-size: 10px; font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary-dark);
  background: #FFFFFF;
  border-radius: 6px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.na-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.na-ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.na-body b { display: block; font-size: 14px; }
.na-body span { font-size: 11.5px; color: var(--text-dim); }
.na-done {
  display: inline-flex; align-items: center; gap: 4px;
  border: none;
  background: var(--text);
  color: #fff;
  font-size: 12px; font-weight: 600;
  border-radius: var(--radius-pill);
  padding: 8px 13px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: var(--font);
  transition: transform .12s;
}
.na-done:active { transform: scale(.92); }


/* ===== 地图定位图钉（focusSpot 注入的 divIcon） ===== */
.focus-pin {
  animation: pinDrop .4s cubic-bezier(.34,1.56,.64,1);
  filter: drop-shadow(0 3px 4px rgba(12,42,58,.35));
}
@keyframes pinDrop {
  0% { transform: translateY(-18px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ===== 可撤销 toast ===== */
.toast.has-undo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.toast-undo {
  font-weight: 800;
  color: var(--primary);
  cursor: pointer;
  padding: 2px 6px;
}
.toast-undo:active { opacity: .7; }

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ===== 出发准备页（卡通日历备忘录） ===== */
.prep-head {
  display: flex; align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gap-md) 2px;
}
.prep-back { background: rgba(109,223,255,.16); color: var(--primary-dark); }
.prep-back::after { content: none; }
.prep-title-wrap { flex: 1; min-width: 0; }
.prep-title-wrap h2 { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.prep-title-wrap p { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.prep-count {
  display: flex; flex-direction: column; align-items: center;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  padding: 7px 12px 5px;
  box-shadow: 0 3px 10px rgba(111,216,255,.35);
}
.prep-count b {
  font-size: 22px; font-weight: 800; line-height: 1;
  color: #0C4A63;
  font-variant-numeric: tabular-nums;
}
.prep-count span { font-size: 9.5px; font-weight: 600; color: #0C4A63; opacity: .75; margin-top: 2px; }

/* 月历卡：贴纸感白描边 + 波点，和整体卡通语言一致 */
.cal-card {
  margin: 14px var(--gap-md) var(--gap-sm);
  background: var(--card);
  border: 3px solid #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(31,110,140,.12);
  padding: 14px 14px 10px;
}
.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal-nav b { font-size: 15.5px; font-weight: 800; letter-spacing: .5px; }
.cal-nav-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #F7FBFD;
  color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
}
.cal-nav-btn:active { transform: scale(.9); }
.cal-nav-btn.flip svg { transform: rotate(180deg); }
.cal-nav-btn svg { width: 15px; height: 15px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-dow {
  text-align: center;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-light);
  padding: 4px 0;
}
.cal-cell {
  position: relative;
  min-height: 36px; /* 不支持 aspect-ratio 的旧 WebView 保持稳定的日历行高 */
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
}
.cal-cell.empty { visibility: hidden; }
/* 行程区间：淡青底胶囊连成带状 */
.cal-cell.in-trip { background: rgba(109,223,255,.18); }
.cal-cell.cal-start, .cal-cell.cal-end {
  background: var(--primary-gradient);
  color: #0C4A63; font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(111,216,255,.4);
  transform: rotate(-3deg);
  z-index: 1;
}
.cal-cell.cal-end { transform: rotate(3deg); }
/* 单日行程同时是出发和返程，合并为一张贴纸，避免相反旋转叠加。 */
.cal-cell.cal-start.cal-end { transform: none; }
/* 今天：绿点标记 */
.cal-cell.cal-today::after {
  content: "";
  position: absolute; bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--success-tx);
}
.cal-legend {
  display: flex; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--text-light);
  padding: 10px 2px 2px;
}
.lg-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-left: 10px; }
.lg-dot:first-child { margin-left: 0; }
.lg-start, .lg-end { background: var(--primary-gradient); }
.lg-today { background: var(--success-tx); border-radius: 50%; }

/* 物品清单卡 */
.prep-list-card {
  margin: 0 var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 4px 14px 12px;
}
.prep-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--divider);
}
.prep-item:last-child { border-bottom: none; }
.prep-item.done .prep-item-body b { text-decoration: line-through; opacity: .45; }
.prep-check {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .18s;
  padding: 0;
}
.prep-check svg { width: 13px; height: 13px; stroke-width: 3; }
.prep-check.ok {
  background: var(--success-bg);
  border-color: var(--success-tx);
  color: var(--success-tx);
}
.prep-item-body { flex: 1; min-width: 0; cursor: pointer; }
.prep-item-body b { display: block; font-size: 14.5px; font-weight: 600; }
.prep-item-body span { font-size: 10.5px; color: var(--text-light); }
.prep-del {
  border: none; background: transparent;
  color: var(--text-light);
  opacity: 0;
  cursor: pointer;
  padding: 6px;
  transition: opacity .15s, color .15s;
  flex-shrink: 0;
}
.prep-item:hover .prep-del { opacity: .7; }
.prep-del:active { color: #E5534B; }
.prep-del svg { width: 16px; height: 16px; }
@media (hover: none) {
  .prep-del { opacity: .5; }
}
.prep-add {
  display: flex; gap: 8px;
  margin-top: 10px;
}
.prep-add input {
  flex: 1; min-width: 0;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 14px;
  font-family: var(--font);
  background: #FAFBFC;
  outline: none;
  transition: border-color .2s;
}
.prep-add input:focus { border-color: var(--primary); background: #fff; }
.prep-add-btn {
  width: 40px; height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  color: #0C4A63;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s;
}
.prep-add-btn:active { transform: scale(.9); }

/* ===== 分段器（语言/地图共用 · v7 白胶囊 48pt） ===== */
.seg {
  display: flex;
  gap: 4px;
  margin: 18px var(--gap-md) var(--gap-sm);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  box-shadow: 0 1px 4px rgba(31,90,120,.05);
}
.seg-btn {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 14px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all .16s;
  font-family: var(--font);
}
.seg-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(47,168,213,.28);
}
.seg-btn:active { transform: scale(.97); }
.seg-pane { display: none; }
.seg-pane.active { display: block; animation: viewIn .18s ease-out; }

/* ===== 场景句库 ===== */
.scene-tabs, .city-tabs {
  display: flex; gap: 8px;
  padding: 2px var(--gap-md) 10px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--gap-md);
}
.scene-tabs::-webkit-scrollbar, .city-tabs::-webkit-scrollbar { display: none; }
.scene-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  font-size: 14px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: all .16s;
  font-family: var(--font);
}
.scene-tab svg { width: 18px; height: 18px; flex-shrink: 0; }
.scene-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.scene-tab.active svg { fill: currentColor; stroke: currentColor; stroke-width: 1.6; }
.scene-tab:active { transform: scale(.97); }
.phrase-cat {
  font-size: 12px; font-weight: 700;
  color: var(--text-light);
  letter-spacing: 1px;
  padding: 14px var(--gap-md) 8px;
}
.phrase-card {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 var(--gap-md) 10px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-card);
}
.phrase-main { flex: 1; min-width: 0; }
.phrase-en { font-size: 15px; font-weight: 600; line-height: 1.4; }
.phrase-zh { font-size: 13.5px; color: var(--text-mid); margin-top: 3px; }
.phrase-tip {
  font-size: 12px; color: #8A6D1F;
  background: #FFF9E8;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 8px;
  line-height: 1.5;
}
.phrase-actions { display: flex; gap: 2px; flex-shrink: 0; }
.pi-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: 50%;
  color: var(--text-light);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pi-btn:active { transform: scale(.88); background: var(--divider); }
.pi-btn.active { color: #F5A623; }
.pi-btn.active svg { fill: #F5A623; }

/* ===== 翻译 ===== */
.ts-card {
  margin: 0 var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--gap-md);
  box-shadow: var(--shadow-card);
}
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ts-lang {
  flex: 1;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: #F1F5F7;
  font-size: 14px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
}
.ts-swap {
  width: 36px; height: 36px;
  border: none; border-radius: 50%;
  background: var(--primary-gradient);
  color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
#ts-input {
  width: 100%; min-height: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 15px;
  font-family: var(--font);
  resize: vertical;
  background: #FAFBFC;
  outline: none;
}
#ts-input:focus { border-color: var(--primary); background: var(--card); }
.ts-result { min-height: 72px; margin-top: 12px; padding: 12px; background: #F7FBFD; border-radius: var(--radius-sm); }
.ts-placeholder { font-size: 13px; color: var(--text-light); text-align: center; padding: 12px 0; }
.ts-hit { padding: 8px 4px; border-bottom: 1px solid var(--divider); cursor: pointer; }
.ts-hit:last-child { border-bottom: none; }
.ts-hit:active { background: var(--divider); }
.ts-en { font-size: 15px; font-weight: 600; }
.ts-zh { font-size: 13px; color: var(--text-mid); margin-top: 2px; }
.ts-miss { text-align: center; padding: 10px 0; }
.ts-miss p { font-size: 14px; color: var(--text-mid); }
.ts-miss .sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.ts-mode { font-size: 11px; color: var(--text-light); text-align: center; margin-top: 10px; }

/* ===== 我的句库 ===== */
.add-phrase-card {
  margin: 0 var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
}
.add-phrase-card input {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 15px;
  font-family: var(--font);
  outline: none;
}
.add-phrase-card input:focus { border-color: var(--primary); }

/* ===== 地图 ===== */
#map {
  height: 320px;
  margin: 0 var(--gap-md);
  border-radius: var(--radius-lg);
  z-index: 1;
  background: #DDEDF4;
  position: relative;
}
#map[data-loading]::after {
  content: '地图加载中…（首次加载瓦片需几秒，之后有缓存会快很多）';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #7A8891;
}
.net-chip {
  display: flex; align-items: center; gap: 7px;
  margin: 0 var(--gap-md) 10px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
}
.net-chip.on  { background: var(--success-bg); color: var(--success-tx); }
.net-chip.off { background: var(--warn-bg); color: var(--warn-tx); }

/* ===== G4 全球搜索页（定稿 §2.2，调性沿用现网 tokens） ===== */
/* page-head 的 ::before 渐变向下延伸 136px，会盖住紧随其后的搜索框——提层解决 */
#view-search .searchbar { position: relative; z-index: 1; }
#view-search .searchbar {
  margin: 0 16px 14px; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  padding: 11px 16px; transition: border-color .15s, box-shadow .15s;
}
#view-search .searchbar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
#view-search .searchbar input { border: none; outline: none; flex: 1; font-size: 15px; background: transparent; color: var(--text); min-width: 0; }
#view-search .searchbar input::placeholder { color: var(--text-light); }
#view-search .searchbar.dimmed { opacity: .5; pointer-events: none; }
#view-search .go-btn {
  background: var(--primary-gradient); color: #fff; border: none; font-size: 13px; font-weight: 600;
  padding: 7px 15px; border-radius: var(--radius-pill); cursor: pointer; flex-shrink: 0;
}
#view-search .go-btn:active { transform: scale(.95); }
#view-search .tip-line { font-size: 11px; color: var(--text-light); margin: 0 16px 10px; }
#view-search .results { padding: 0 16px 140px; }
#view-search .spot {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: var(--radius-md); padding: 13px 14px; margin-bottom: 10px; box-shadow: var(--shadow-card);
}
#view-search .spot .ico {
  width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
#view-search .spot .body { flex: 1; min-width: 0; }
#view-search .spot .name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-search .spot .meta { font-size: 12px; color: var(--text-mid); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view-search .addbtn {
  width: 36px; height: 36px; border-radius: 50%; border: none; flex-shrink: 0; cursor: pointer;
  background: var(--primary-gradient); color: #fff; font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: transform .12s, background .15s;
}
#view-search .addbtn.added { background: #EEF2F5; color: var(--lime); }
#view-search .addbtn:active { transform: scale(.9); }
#view-search .skel {
  background: var(--card); border-radius: var(--radius-md); padding: 13px 14px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-card);
}
#view-search .skel .b {
  background: linear-gradient(90deg, #EFF5F8 25%, #F7FBFD 50%, #EFF5F8 75%);
  background-size: 200% 100%; animation: g4shimmer 1.2s infinite; border-radius: 8px;
}
@keyframes g4shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
#view-search .empty { text-align: center; padding: 48px 32px 0; }
#view-search .empty .big { font-size: 44px; margin-bottom: 12px; }
#view-search .empty h3 { font-size: 16px; margin-bottom: 6px; }
#view-search .empty p { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin-bottom: 16px; }
#view-search .quickbtn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--card);
  border: 1.5px solid var(--border); color: var(--text); font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--radius-pill); cursor: pointer;
}
#view-search .tray {
  position: fixed; left: 14px; right: 14px; bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  background: #14283C; color: #fff; border-radius: var(--radius-lg);
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(20,40,60,.35); transition: transform .25s, opacity .25s; z-index: 30;
}
#view-search .tray.hidden { transform: translateY(120px); opacity: 0; pointer-events: none; }
#view-search .tray .cnt { font-size: 14px; font-weight: 600; }
#view-search .tray .cnt small { display: block; font-size: 11px; opacity: .65; font-weight: 400; margin-top: 2px; }
#view-search .tray .go {
  background: var(--primary-gradient); border: none; color: #fff; font-size: 14px; font-weight: 700;
  padding: 10px 20px; border-radius: var(--radius-pill); cursor: pointer;
}
#view-search .tray .clr { background: transparent; border: none; color: rgba(255,255,255,.6); font-size: 12px; cursor: pointer; margin-right: 8px; }
.map-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin: 10px var(--gap-md) 0;
  flex-wrap: wrap;
}
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1.2px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  font-size: 13px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s;
}
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.map-hint { font-size: 11px; color: var(--text-light); flex: 1; min-width: 120px; }

/* ===== 目的地切换器（v7：常驻白卡，点击展开城市抽屉） ===== */
.destination-switcher {
  display: flex; align-items: center; gap: 14px;
  margin: 0 var(--gap-md);
  min-height: 102px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 18px;
  cursor: pointer;
  transition: transform .16s;
}
.destination-switcher:active { transform: scale(.985); }
.ds-illu { width: 68px; height: 56px; object-fit: contain; flex-shrink: 0; }
.ds-body { flex: 1; min-width: 0; }
.ds-title { font-size: 17px; font-weight: 800; color: var(--text); }
.ds-title b { color: var(--primary-dark); }
.ds-sub {
  display: flex; align-items: center; gap: 5px;
  margin-top: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--success-tx);
}
.ds-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--success-tx);
  color: #fff;
}
.ds-check svg { width: 11px; height: 11px; stroke-width: 2.6; }
.ds-arrow { color: var(--text-light); transform: rotate(180deg); flex-shrink: 0; }
/* 城市抽屉：默认收起，点切换器展开 */
.dest-drawer { display: none; padding: 12px var(--gap-md) 2px; }
.dest-drawer.open { display: flex; flex-wrap: wrap; gap: 10px; }
.dest-drawer .scene-tab { height: 40px; }

/* 探索标题 */
.explore-title {
  margin: 24px var(--gap-md) 10px;
  font-size: 18px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
}
.explore-title::before {
  content: "";
  width: 4px; height: 16px;
  border-radius: 2px;
  background: var(--primary-dark);
  box-shadow: 3px 1px 0 0 var(--accent);
  transform: rotate(-6deg);
}

/* 我的图钉浮动按钮（v7：右下 FAB，仅推荐/地图模式显示） */
.pin-fab {
  position: fixed;
  right: max(16px, calc(50% - 224px));
  bottom: 96px;
  z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 14px; font-weight: 700;
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(47,168,213,.35);
  cursor: pointer;
  transition: transform .16s, opacity .2s;
}
.pin-fab:active { transform: scale(.95); }
.pin-fab.active { background: var(--success-tx); box-shadow: 0 4px 14px rgba(46,158,99,.35); }
.pin-fab svg { width: 18px; height: 18px; }
body.subpage[data-view="detail"] .pin-fab { display: none; }

/* ===== POI 推荐卡（v7：分组白面板 + 88 图 + 行分隔线） ===== */
#spot-list {
  margin: 0 var(--gap-md);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 4px 0;
}
.spot-card {
  display: flex; align-items: center; gap: 12px;
  margin: 0;
  background: transparent;
  border-radius: 0;
  padding: 14px;
  min-height: 104px;
  box-shadow: none;
  cursor: pointer;
  transition: transform .16s, background .15s;
  position: relative;
}
.spot-card + .spot-card::before {
  content: "";
  position: absolute; top: 0; right: 0; bottom: auto;
  left: 116px;
  height: 1px;
  background: var(--divider);
}
.spot-card:active { transform: none; background: #F6FAFC; }
.spot-media {
  position: relative;
  width: 88px; height: 88px;
  flex: 0 0 88px;
  border-radius: 12px;
  overflow: hidden;
  background: #DDEDF4;
}
.spot-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-fallback { display: none; }
.spot-media.is-fallback .spot-img { visibility: hidden; }
.spot-media.is-fallback .spot-fallback {
  display: block;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  color: var(--text-light);
}
.spot-ico {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.spot-ico.c-blue   { background: var(--primary-soft); color: var(--primary-dark); }
.spot-ico.c-green  { background: #E3F7EA; color: #2E9E63; }
.spot-ico.c-yellow { background: #FFF6DC; color: #C08A1E; }
.spot-ico.c-red    { background: #FDEEEE; color: #D64541; }
.spot-body { flex: 1; min-width: 0; }
.spot-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.spot-cat {
  font-size: 10px; font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 2px 7px;
}
.spot-en { font-size: 11.5px; color: var(--text-light); margin-top: 1px; }
.spot-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.spot-go { color: var(--text-light); flex-shrink: 0; }

/* ===== GPX 路书 ===== */
.import-card {
  margin: 0 var(--gap-md) var(--gap-sm);
  background: var(--card);
  border: 1.5px dashed #BBD9E6;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.import-card h4 { font-size: 15px; font-weight: 700; }
.import-card p { font-size: 12.5px; color: var(--text-dim); line-height: 1.6; }
.import-card .btn-primary { margin-top: 8px; }
.c-blue { color: var(--primary-dark); }
.pin-row {
  display: flex; align-items: center; gap: 12px;
  margin: 0 var(--gap-md) 8px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.pin-row .spot-ico { width: 40px; height: 40px; border-radius: 13px; }

/* ===== 设置：离线包卡 + 详情弹窗（v7.3） ===== */
.net-card {
  display: flex; align-items: center; gap: 14px;
  margin: 12px var(--gap-md) 0;
  min-height: 92px;
  padding: 14px 16px 14px 18px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  overflow: hidden;
}
.net-card .nc-illu { width: 76px; height: 60px; object-fit: contain; flex-shrink: 0; }
.net-card .nc-body { flex: 1; min-width: 0; }
.net-card b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .2px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net-card b.err { color: var(--danger); }
.net-card span { display: block; font-size: 13px; color: var(--text-mid); margin-top: 6px; line-height: 1.35; }
.net-card span.err { color: var(--danger); }
.net-card span.nc-state { display: grid; }   /* 状态圆标：grid 居中，压过上面的 span{display:block} */
.net-card .nc-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* 状态圆标 v3：四态（已下载/部分/未下载/失败）共用同一几何 —— 同尺寸同圆心，
   glyph 12px 网格几何居中（不用绝对定位/位移补偿），换态只变底色与路径 */
.nc-state {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  color: #FFFFFF;                       /* glyph 主色：描边与填充统一走 currentColor */
}
.nc-state svg {
  display: block;
  width: 13px; height: 13px;
  stroke: currentColor;                 /* 覆盖全局 svg{stroke:currentColor} 的继承行为 */
  fill: none;
  stroke-width: 3;                      /* ≥2.9px 实际宽度，抗锯齿不再吞细笔画 */
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nc-state.ok      { background: var(--lime); }          /* 已下载：确认稿绿 */
.nc-state.partial { background: var(--primary); }       /* 部分缓存：主青蓝 */
.nc-state.none    { background: var(--accent); color: #7A5800; }  /* 未下载：黄底深棕 glyph */
.nc-state.fail    { background: var(--danger); }        /* 下载失败：红 */
.nc-arrow { width: 24px; height: 24px; color: var(--text-mid); transform: rotate(180deg); }
/* 离线包详情弹窗 */
.of-list { text-align: left; }
.of-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
}
.of-row:last-child { border-bottom: none; }
.of-ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--success-bg); color: var(--success-tx);
}
.of-ico.pend { background: var(--warn-bg); color: var(--warn-tx); }
.of-ico svg { width: 15px; height: 15px; stroke-width: 2.2; }
.of-row .of-body { flex: 1; min-width: 0; }
.of-row b { display: block; font-size: 14px; }
.of-row span { font-size: 11.5px; color: var(--text-light); }
.of-state { font-size: 12px; font-weight: 700; color: var(--success-tx); flex-shrink: 0; }
.of-state.pend { color: var(--warn-tx); }
.of-actions { margin: 14px 0 4px; }
.of-progress {
  height: 8px;
  background: var(--primary-soft);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}
.of-progress .bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 4px;
  transition: width .3s;
}

/* ===== 桌面端宽屏：手机壳容器 ===== */
@media (min-width: 768px) {
  body {
    background: linear-gradient(180deg, #DDEDF4 0%, #CFE6EF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
  }
  .app {
    height: min(844px, calc(100dvh - 48px));
    border-radius: 36px;
    box-shadow:
      0 24px 64px rgba(31,71,89,.22),
      0 0 0 1px rgba(255,255,255,.6);
    overflow: hidden;
  }
}
