/* 乘务组协同页 — 暗色/浅色双主题（按时间自动或手动），手机与 iPad 全宽自适应。
   视觉与主站保持一致（色板、卡片、时间轴条带、统计卡），不引主站 styles.css，
   避免主站改版牵连协同页。 */

:root {
  color-scheme: dark;
  --bg: #05080e;
  --line: rgba(148, 190, 255, .16);
  --ink: #eaf2ff;
  --muted: #8ba1bd;
  --accent: #5eead4;
  --accent-2: #fbbf24;
  --danger: #fb7185;
  --info: #60a5fa;
  --on-accent: #04231e;
  --glass: rgba(9, 15, 24, .72);
  --glass-2: rgba(12, 20, 32, .88);
  --glass-3: rgba(148, 190, 255, .08);
  --hair: rgba(148, 190, 255, .14);
  --hair-2: rgba(148, 190, 255, .09);
  --sheen: rgba(255, 255, 255, .055);
  --shadow: 0 26px 60px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .055);
  --mesh-a: rgba(94, 234, 212, .10);
  --mesh-b: rgba(96, 165, 250, .10);
  --mesh-c: rgba(94, 234, 212, .06);
  --fs: 17px;
  --radius: 16px;
  --topbar-bg: rgba(5, 8, 14, .55);
  --dlg-bg: #0b121c;
  --float-bg: rgba(9, 15, 24, .92);
  --plane: #fff;
  --tone-smooth: #48bb78;
  --tone-light: #e3c14a;
  --tone-moderate: #f08a3c;
  --tone-severe: #f56565;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #dfe8f2;
  --line: rgba(30, 64, 100, .2);
  --ink: #0d1b2a;
  --muted: #536b84;
  --accent: #0f8f75;
  --accent-2: #a16207;
  --danger: #be123c;
  --info: #2563eb;
  --on-accent: #fff;
  --glass: rgba(255, 255, 255, .8);
  --glass-2: rgba(255, 255, 255, .9);
  --glass-3: rgba(30, 64, 100, .05);
  --hair: rgba(30, 64, 100, .16);
  --hair-2: rgba(30, 64, 100, .1);
  --sheen: rgba(255, 255, 255, .7);
  --shadow: 0 18px 40px -30px rgba(13, 27, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .7);
  --mesh-a: rgba(15, 143, 117, .1);
  --mesh-b: rgba(37, 99, 235, .08);
  --mesh-c: rgba(15, 143, 117, .06);
  --topbar-bg: rgba(223, 232, 242, .72);
  --dlg-bg: #f5f9ff;
  --float-bg: rgba(255, 255, 255, .94);
  --plane: #0d1b2a;
  --tone-smooth: #2f855a;
  --tone-light: #a16207;
  --tone-moderate: #c05621;
  --tone-severe: #c53030;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs)/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: -.01em;
  padding-bottom: calc(env(safe-area-inset-bottom) + 26px);
}
body::before {
  content: "";
  position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(42% 34% at 12% 4%, var(--mesh-a), transparent 62%),
    radial-gradient(38% 30% at 92% 0%, var(--mesh-b), transparent 62%),
    radial-gradient(46% 38% at 78% 78%, var(--mesh-c), transparent 64%);
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: calc(var(--fs) * 1.0); }
p { margin: 6px 0; }
b { font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: calc(var(--fs) * .82); }
.empty { color: var(--muted); text-align: center; padding: 22px 0; font-size: calc(var(--fs) * .88); }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid var(--hair-2);
  box-shadow: 0 1px 0 var(--hair-2), 0 18px 40px -34px #000;
}
.brand { min-width: 0; display: flex; align-items: center; gap: 9px; }
.brand-logo {
  width: 46px; height: 46px; flex: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .55));
}
.brand-text { min-width: 0; }
.brand h1 { font-size: calc(var(--fs) * 1.05); }
.brand-head { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
/* 首尾同色 + background-size 200%，位移一圈无接缝 */
.brand-app {
  font-weight: 750; letter-spacing: .5px;
  background-image: linear-gradient(100deg, #f7d488 0%, #f9a8d4 22%, #93c5fd 44%, #5eead4 62%, #93c5fd 82%, #f7d488 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: rainbow-flow 7s linear infinite;
}
html[data-theme="light"] .brand-app {
  background-image: linear-gradient(100deg, #a3590b 0%, #b81d62 22%, #1d4ed8 44%, #0d746a 62%, #1d4ed8 82%, #a3590b 100%);
}
.brand-sep { color: var(--muted); font-weight: 400; }
#headTitle:empty { display: none; }
.brand p { margin: 1px 0 0; font-size: calc(var(--fs) * .72); color: var(--muted); letter-spacing: 0; word-break: keep-all; }
.hs-route:empty, .hs-time:empty { display: none; }
.hs-route + .hs-time::before { content: " · "; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex: none; }
#langBtn { font-weight: 700; letter-spacing: .03em; }
.topbar-actions .chip {
  flex: none; height: 32px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 520px) {
  .topbar { padding: calc(env(safe-area-inset-top) + 8px) 12px 8px; gap: 8px; flex-wrap: wrap; }
  .brand { flex: 1 1 100%; width: 100%; gap: 8px; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-text { flex: 1; min-width: 0; }
  .brand h1 { font-size: calc(var(--fs) * .98); }
  .brand-head { gap: 5px; min-width: 0; }
  .brand-app, .brand-sep { flex: none; }
  #headTitle { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .brand p { line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hs-route, .hs-time { display: inline; }
  .hs-route + .hs-time::before { content: " · "; }
  .topbar-actions { flex: 1 1 100%; justify-content: space-between; gap: 6px; }
  .topbar-actions .chip {
    flex: 1 1 0; width: auto; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .topbar-actions .chip .lbl { display: none; }
  .topbar-actions .chip .ico { font-size: calc(var(--fs) * .95); line-height: 1; }
  .remind { top: calc(env(safe-area-inset-top) + 106px); }
}

main { padding: 14px 14px 0; width: 100%; }

/* ---------- 卡片 / 胶囊 / 按钮 ---------- */
.card {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 15px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card > * { position: relative; z-index: 1; }
.card h2 {
  font: 600 10px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .16em; color: var(--muted);
}

.chip {
  border-radius: 10px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--hair);
  padding: 5px 11px; font-size: calc(var(--fs) * .78); color: var(--ink);
  box-shadow: inset 0 1px 0 var(--sheen), 0 8px 24px -18px #000;
  transition: border-color .2s, background .2s;
}
button.chip { font: inherit; font-size: calc(var(--fs) * .78); cursor: pointer; }
button.chip:hover { border-color: var(--line); background: var(--glass-2); }
button.chip.on {
  background: var(--accent); color: var(--on-accent);
  border-color: transparent; font-weight: 650;
  box-shadow: 0 2px 14px -5px var(--accent);
}
button.chip.off { color: var(--muted); }
/* 总飞行时间：常用项，主题色高亮 */
.chip.hl {
  background: color-mix(in srgb, var(--accent) 12%, var(--glass));
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent); font-weight: 650;
}

/* ---------- 提醒横幅 ---------- */
.remind {
  position: fixed; left: 12px; right: 12px;
  top: calc(env(safe-area-inset-top) + 62px); z-index: 30;
  max-width: none;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--hair);
  font-size: calc(var(--fs) * .9);
  animation: remind-in .24s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .95);
}
/* display:flex 会盖掉 [hidden]，关闭按钮与自动隐藏都会失效，必须显式压回 */
.remind[hidden] { display: none; }
.remind.g-moderate { background: rgba(221, 107, 32, .22); border-color: rgba(221, 107, 32, .55); }
.remind.g-severe { background: rgba(229, 62, 62, .24); border-color: rgba(229, 62, 62, .6); }
.remind.g-light { background: rgba(201, 162, 39, .20); border-color: rgba(201, 162, 39, .5); }
.remind .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.remind.g-light .dot { background: #c9a227; }
.remind.g-moderate .dot { background: #dd6b20; }
.remind.g-severe .dot { background: #e53e3e; }
.remind .msg { flex: 1; min-width: 0; }
.remind .close {
  flex: none; border: 0; background: none; color: var(--muted);
  font: inherit; font-size: calc(var(--fs) * 1.1); padding: 0 4px; cursor: pointer;
}
@keyframes remind-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- 微信内提示条 ---------- */
.wxbar {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 13px; margin-bottom: 14px; border-radius: var(--radius);
  border: 1px solid rgba(96, 165, 250, .45);
  background: rgba(96, 165, 250, .13);
  font-size: calc(var(--fs) * .84); line-height: 1.5;
  animation: remind-in .24s cubic-bezier(.2, .9, .3, 1);
}
.wxbar-ico { flex: none; color: var(--info); font-weight: 700; }
.wxbar-msg { flex: 1; min-width: 0; }
.wxbar-x { flex: none; border: 0; background: none; color: var(--muted); font: inherit; padding: 0 2px; cursor: pointer; }

/* ---------- 飞书内跳本机 App ---------- */
.appjumpwrap { margin-bottom: 14px; }
.appjump {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent); text-decoration: none; font-weight: 650;
  box-shadow: 0 2px 18px -6px var(--accent);
  animation: remind-in .24s cubic-bezier(.2, .9, .3, 1);
}
.appjump-ico {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 35, 30, .14); font-size: 17px;
}
.appjump-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.appjump-txt b { font-size: calc(var(--fs) * .95); }
.appjump-txt em { font-style: normal; font-size: calc(var(--fs) * .74); opacity: .72; }
.appjump-tip { margin: 7px 2px 0; font-size: calc(var(--fs) * .72); color: var(--muted); }

/* ---------- 颠簸统计卡 ---------- */
.turb-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.tbar { position: relative; height: 22px; margin: 12px 0 5px; }
.tbar .tseg-track { position: absolute; inset: 0; border-radius: 11px; background: var(--glass-2); border: 1px solid var(--hair-2); }
.tbar .tseg { position: absolute; top: 0; bottom: 0; border-radius: 11px; }
.tbar .tseg.g-moderate { box-shadow: 0 0 14px -3px rgba(221, 107, 32, .85); }
.tbar .tseg.g-severe { box-shadow: 0 0 14px -3px rgba(229, 62, 62, .95); }
.tbar-axis { display: flex; justify-content: space-between; font-size: calc(var(--fs) * .72); color: var(--muted); margin-bottom: 8px; }
.twin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--hair-2); font-size: calc(var(--fs) * .86); }
.twin:last-of-type { border-bottom: 0; }
.twin .sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

/* ---------- 前方颠簸简报 ---------- */
.tb-card { position: relative; overflow: hidden; }
.tb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tb-state {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--hair); background: var(--glass-3); color: var(--muted);
  font-size: calc(var(--fs) * .7); font-weight: 650;
}
.tb-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tb-state.s-smooth { color: var(--tone-smooth); border-color: color-mix(in srgb, var(--tone-smooth) 38%, transparent); background: color-mix(in srgb, var(--tone-smooth) 10%, transparent); }
.tb-state.s-light { color: var(--tone-light); border-color: color-mix(in srgb, var(--tone-light) 42%, transparent); background: color-mix(in srgb, var(--tone-light) 12%, transparent); }
.tb-state.s-moderate { color: var(--tone-moderate); border-color: color-mix(in srgb, var(--tone-moderate) 45%, transparent); background: color-mix(in srgb, var(--tone-moderate) 13%, transparent); }
.tb-state.s-severe { color: var(--tone-severe); border-color: color-mix(in srgb, var(--tone-severe) 48%, transparent); background: color-mix(in srgb, var(--tone-severe) 14%, transparent); }
.tb-state.live::before { animation: tb-pulse 1.5s ease-out infinite; }
@keyframes tb-pulse {
  0% { box-shadow: 0 0 0 0 currentColor; }
  70% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.tb-lead { margin: 10px 0 0; font-size: calc(var(--fs) * .92); line-height: 1.55; }
.tb-lead b { font-variant-numeric: tabular-nums; }
.tone-smooth { color: var(--tone-smooth); }
.tone-light { color: var(--tone-light); }
.tone-moderate { color: var(--tone-moderate); }
.tone-severe { color: var(--tone-severe); }
.tb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0 2px; }
@media (min-width: 560px) { .tb-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tb-m { min-width: 0; padding: 9px 11px 8px; border-radius: 12px; border: 1px solid var(--hair-2); background: var(--glass-3); }
.tb-k { display: block; font-size: calc(var(--fs) * .64); letter-spacing: .08em; color: var(--muted); }
.tb-v { display: block; margin-top: 3px; font-size: calc(var(--fs) * 1.22); font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tb-v i { font-style: normal; margin-left: 3px; font-size: calc(var(--fs) * .62); font-weight: 600; letter-spacing: 0; color: var(--muted); }
.tb-s { display: block; min-height: 1em; margin-top: 3px; font-size: calc(var(--fs) * .66); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tb-strip { margin-top: 13px; }
.tb-track { position: relative; height: 12px; border-radius: 999px; background: var(--glass-3); overflow: hidden; }
.tb-base { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(72, 187, 120, .38), rgba(72, 187, 120, .18)); }
.tb-seg { position: absolute; top: 0; bottom: 0; min-width: 3px; border-radius: 6px; }
.tb-scale { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: calc(var(--fs) * .68); color: var(--muted); font-variant-numeric: tabular-nums; }
.tb-caption { display: flex; align-items: center; gap: 6px; margin: 5px 0 0; font-size: calc(var(--fs) * .74); font-variant-numeric: tabular-nums; }
.tb-caption .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.tb-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: calc(var(--fs) * .74); color: var(--muted); }
.tb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--hair-2); background: var(--glass-3); color: var(--ink); font-size: calc(var(--fs) * .7); font-variant-numeric: tabular-nums; }
.tb-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.tb-chip.t-light::before { background: var(--tone-light); }
.tb-chip.t-moderate::before { background: var(--tone-moderate); }
.tb-chip.t-severe::before { background: var(--tone-severe); }
.g-none { background: var(--hair); box-shadow: none; }
.g-smooth { background-image: linear-gradient(180deg, #48bb78, #2f855a); }
.g-light { background-image: linear-gradient(180deg, #e3c14a, #c9a227); box-shadow: 0 0 16px -4px rgba(201, 162, 39, .8); }
.g-moderate { background-image: linear-gradient(180deg, #f08a3c, #dd6b20); box-shadow: 0 0 18px -4px rgba(221, 107, 32, .9); }
.g-severe { background-image: linear-gradient(180deg, #f56565, #e53e3e); box-shadow: 0 0 20px -3px rgba(229, 62, 62, .95); }

/* ---------- 图例 ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 11px; margin: 12px 0 4px; font-size: calc(var(--fs) * .74); color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend .sw { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }

/* ---------- 飞行剖面 ---------- */
.prof-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.prof-svg { display: block; width: 100%; height: auto; }
.prof-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; opacity: .75; }
.prof-base { stroke: var(--line); stroke-width: 1; }
.prof-axis { fill: var(--muted); font-size: 11px; }
.prof-alt { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* 颠簸等级色段叠在白色计划高度线上；平稳段浅绿，线宽略粗于底线 */
.prof-seg { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.prof-seg.g-smooth { stroke: #48bb78; }
.prof-seg.g-light { stroke: #e3c14a; }
.prof-seg.g-moderate { stroke: #f08a3c; }
.prof-seg.g-severe { stroke: #f56565; }
.prof-alt-area { fill: var(--ink); opacity: .06; }
.prof-tick { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; opacity: .55; }
.prof-plane-line { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 4; opacity: .85; }
/* 白色飞机带深色描边：叠在近白色航线上也能看清 */
.prof-plane text { font-size: 17px; fill: var(--plane); stroke: var(--bg); stroke-width: 3px; paint-order: stroke; }
.prof-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 8px 0 2px; font-size: calc(var(--fs) * .82); }

/* ---------- 航路热力图 ---------- */
.map-wrap { margin-top: 10px; }
.turb-map { display: block; width: 100%; height: auto; border-radius: 12px; overflow: hidden; }
.turb-map .map-heat { pointer-events: none; }
.turb-map .b-land { fill: var(--glass-3); stroke: var(--line); stroke-width: .8; stroke-opacity: .7; }
.turb-map .b-border { fill: none; stroke: var(--line); stroke-width: .6; stroke-opacity: .5; }
.turb-map .b-route { fill: none; stroke: var(--ink); stroke-opacity: .8; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.turb-map .b-wp { fill: var(--muted); }
.turb-map .b-start { fill: var(--ink); }
.turb-map .b-txt { fill: var(--ink); font-size: 13px; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.turb-map .b-txt.key { font-weight: 650; }
.turb-map .map-plane { pointer-events: none; }

/* ---------- 更新起飞时间弹层 ---------- */
dialog.upd-dlg {
  width: min(92vw, 360px); margin: auto; padding: 18px 16px 16px;
  border: 1px solid var(--hair); border-radius: var(--radius);
  background: var(--dlg-bg); color: var(--ink);
  box-shadow: var(--shadow);
  font: var(--fs)/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
dialog.upd-dlg::backdrop { background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog.upd-dlg h3 { font-size: calc(var(--fs) * 1.02); margin-bottom: 4px; }
.upd-row { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; }
.upd-row input[type="time"], .upd-row input[type="text"] {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px;
  border: 1px solid var(--hair); border-radius: 12px;
  background: var(--glass-2); color: var(--ink);
  font: inherit; font-size: calc(var(--fs) * 1.1); font-variant-numeric: tabular-nums;
}
.upd-row input[type="time"]:focus, .upd-row input[type="text"]:focus { outline: 1px solid var(--accent); }
.upd-row input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(.7); }
:root[data-theme="light"] .upd-row input[type="time"]::-webkit-calendar-picker-indicator { filter: none; }
.seg { display: flex; gap: 8px; margin: 8px 0 14px; }
.seg-btn { flex: 1; padding: 8px 12px; font-size: calc(var(--fs) * .88); }
.seg-label { margin: 12px 0 0; }
.c-foot .chip { margin: 2px 0 4px; }
.upd-msg { min-height: 1.2em; }
.upd-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.upd-actions .chip { padding: 9px 20px; font-size: calc(var(--fs) * .88); }
/* 航班号对话框：机组已解析过的日期候选 */
.flight-days {
  display: flex; flex-wrap: wrap; gap: 7px;
  max-height: 132px; overflow: auto;
  margin: 8px 0 2px;
}
.flight-days[hidden] { display: none; }
.flight-days .chip { font-size: calc(var(--fs) * .78); padding: 5px 10px; }
button.chip:disabled { opacity: .5; pointer-events: none; }

/* ---------- 页脚 / 提示 ---------- */
.c-foot { padding: 2px 4px 0; text-align: center; }
.c-foot p { margin: 4px 0; }
.install { margin-top: 6px; }
.errbox { text-align: center; padding: 40px 16px; }
.errbox .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- 页脚四件套（与主站同款，彩虹字） ---------- */
/* 彩虹字。首尾同色 + background-size 200% 才能让位移循环无接缝 */
.rainbow {
  background-image: linear-gradient(90deg, #ff0080 0%, #ff8c00 16%, #ffd700 33%, #00c853 50%, #00b0ff 66%, #8a2be2 83%, #ff0080 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: .3px;
  animation: rainbow-flow 7s linear infinite;
}
@keyframes rainbow-flow { to { background-position: 200% 0; } }
/* 五条错开相位，避免同步像闪烁 */
.app-footer .footer-beian { animation-delay: -1.4s; }
.app-footer .footer-icp { animation-delay: -2.8s; }
.footer-legal .rainbow:nth-of-type(1) { animation-delay: -4.2s; }
.footer-legal .rainbow:nth-of-type(2) { animation-delay: -5.6s; }
.app-footer .footer-copy { animation-delay: -7s; }
@media (prefers-reduced-motion: reduce) { .rainbow, .brand-app { animation: none; } }

.app-footer {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 4px 0; width: 100%; margin: 2px 0 0; padding: 10px 8px 16px;
  border-top: 1px solid var(--hair-2);
  font-size: calc(var(--fs) * .72); line-height: 1.55; text-align: center;
}
.app-footer > * + * { padding-left: 8px; margin-left: 8px; border-left: 1px solid var(--hair-2); }
.footer-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; text-decoration: none; }
.footer-legal { display: inline-flex; align-items: center; }
.footer-sep { color: var(--muted); margin: 0 3px; }
.footer-beian img { display: block; -webkit-user-drag: none; pointer-events: none; }

/* App 壳内只留协议/隐私入口（审核要求可达），备案、ICP、版权仅网页展示 */
html[data-native="1"] .app-footer .footer-beian,
html[data-native="1"] .app-footer .footer-icp,
html[data-native="1"] .app-footer .footer-copy { display: none; }
html[data-native="1"] .app-footer .footer-legal {
  padding-left: 0; margin-left: 0; border-left: 0;
}
html[data-native="1"] .app-footer { padding-bottom: calc(env(safe-area-inset-bottom) + 10px); }
html[data-native="1"] body.home .app-footer { display: none; }
/* 上架 App 内不显示页脚四件套；PWA/网页保留 */
html[data-native="1"] .app-footer { display: none !important; }

/* ---------- 顶栏与主屏统一（图标胶囊 / 浮动玻璃） ---------- */
body:not(.home) .topbar {
  background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 0; box-shadow: none;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px;
}
body:not(.home) .brand-logo { width: 42px; height: 42px; }
body:not(.home) .topbar-actions { gap: 6px; }
body:not(.home) .topbar-actions .chip {
  height: 32px; min-width: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px;
}
body:not(.home) .topbar-actions .chip .lbl { display: none; }
body:not(.home) .topbar-actions .chip .ico { font-size: 13px; line-height: 1; }
body:not(.home) #linkBtn .ico.turb { font-size: 17px; font-weight: 700; line-height: 1; }
body:not(.home) .topbar-actions .chip.on {
  background: var(--accent); border-color: transparent; color: var(--on-accent);
  box-shadow: 0 0 20px -6px var(--accent);
}
@media (min-width: 761px) {
  body:not(.home) #linkBtn.on .lbl {
    display: inline; max-width: 78px; margin-left: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: calc(var(--fs) * .7); font-weight: 650;
  }
  body:not(.home) .remind { top: calc(env(safe-area-inset-top) + 76px); }
}
@media (max-width: 760px) {
  body:not(.home) .topbar {
    padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
    flex-wrap: wrap; gap: 7px 8px;
  }
  body:not(.home) .brand { flex: 1 1 100%; width: 100%; gap: 7px; }
  body:not(.home) .brand-logo { width: 32px; height: 32px; }
  body:not(.home) .brand-app { font-size: 15px; }
  body:not(.home) #headSub { font-size: calc(var(--fs) * .66); letter-spacing: .02em; }
  body:not(.home) .topbar-actions {
    flex: 1 1 100%; justify-content: flex-end; gap: 5px;
  }
  body:not(.home) .topbar-actions .chip {
    flex: none; width: auto; min-width: 30px; height: 30px; padding: 0 7px;
  }
  body:not(.home) #linkBtn .lbl {
    display: inline; margin-left: 2px;
    font-size: calc(var(--fs) * .72); font-weight: 650;
  }
  body:not(.home) .remind { top: calc(env(safe-area-inset-top) + 96px); }
}
/* 功能键顺序：回主屏固定最右 */
body:not(.home) #linkBtn { order: 1; }
body:not(.home) #updBtn { order: 2; }
body:not(.home) #remindBtn { order: 3; }
body:not(.home) #voiceBtn { order: 4; }
body:not(.home) #langBtn { order: 5; }
body:not(.home) #homeBtn { order: 6; }
