/* 飞常稳 · 全球航班态势主界面
   地图全屏 + 玻璃面板。仅 body.home 生效，不影响协同页。 */

body.home {
  --hm-bg: #05080e;
  --hm-panel: rgba(9, 15, 24, .74);
  --hm-panel-2: rgba(12, 20, 32, .9);
  --hm-line: rgba(148, 190, 255, .14);
  --hm-line-2: rgba(148, 190, 255, .26);
  --hm-ink: #f2f7ff;
  --hm-mut: #a8bbd2;
  --hm-dim: #7890aa;
  --hm-cyan: #5eead4;
  --hm-blue: #60a5fa;
  --hm-amber: #fbbf24;
  --hm-rose: #fb7185;
  --hm-glow: rgba(94, 234, 212, .22);
  overflow: hidden;
  height: 100dvh;
  background: var(--hm-bg);
  color: var(--hm-ink);
  padding: 0;
  overscroll-behavior: none;
}
body.home::before { display: none; }
html[data-theme="light"] body.home {
  --hm-bg: #dfe8f2;
  --hm-panel: rgba(255, 255, 255, .8);
  --hm-panel-2: rgba(255, 255, 255, .94);
  --hm-line: rgba(30, 64, 100, .16);
  --hm-line-2: rgba(30, 64, 100, .3);
  --hm-ink: #0d1b2a;
  --hm-mut: #536b84;
  --hm-dim: #7a8ea3;
  --hm-cyan: #0f8f75;
  --hm-blue: #2563eb;
  --hm-amber: #a16207;
  --hm-rose: #be123c;
  --hm-glow: rgba(15, 143, 117, .18);
}

body.home main {
  position: fixed; inset: 0; padding: 0; width: 100%; height: 100dvh;
}

/* ---------- 地图 ---------- */
body.home .hm-map { position: absolute; inset: 0; background: #030812 url('icons/stars.png') repeat; background-size: 512px 512px; }
.hm-starsfx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .hm-starsfx { display: none; }
}
.hm-boot {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: var(--hm-bg); color: var(--hm-ink);
  animation: hmBootIn .5s ease both;
}
.hm-boot img { width: 62px; height: 62px; filter: drop-shadow(0 10px 34px rgba(56, 189, 248, .38)); }
.hm-boot b { font-size: 18px; font-weight: 600; letter-spacing: .22em; text-indent: .22em; }
.hm-boot span { font-size: 9px; letter-spacing: .18em; color: var(--hm-mut); text-transform: uppercase; }
.hm-boot span::after {
  content: ""; display: inline-block; width: 1.2em; text-align: left;
  animation: hmDots 1.4s steps(4, end) infinite;
}
@keyframes hmDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes hmBootIn { from { opacity: 0; } }
.hm-map::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, transparent 66%, rgba(2, 6, 12, .5) 100%);
}
html[data-theme="light"] .hm-map::after {
  background: linear-gradient(180deg, transparent 0%, transparent 68%, rgba(4, 10, 18, .32) 100%);
}
.maplibregl-ctrl-bottom-right { bottom: 86px; right: 10px; }
.maplibregl-ctrl-attrib {
  background: rgba(5, 10, 18, .55) !important;
  color: var(--hm-dim) !important;
  font-size: 9px !important;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}
.maplibregl-ctrl-attrib a { color: var(--hm-mut) !important; }
html[data-theme="light"] .maplibregl-ctrl-attrib { background: rgba(255, 255, 255, .7) !important; }
.maplibregl-canvas:focus { outline: none; }
html[data-theme="light"] body.home .maplibregl-canvas { filter: saturate(1.08) contrast(1.03); }

/* ---------- 顶栏 ---------- */
body.home .topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 0; box-shadow: none;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px;
  pointer-events: none;
}
body.home .topbar .brand,
body.home .topbar .topbar-actions { pointer-events: auto; }
body.home .brand-logo { width: 42px; height: 42px; filter: drop-shadow(0 0 14px rgba(94, 234, 212, .3)); }
body.home .brand-app {
  font-size: calc(var(--fs) * 1.05);
  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; color: transparent;
  animation: rainbow-flow 7s linear infinite;
}
html[data-theme="light"] body.home .brand-app {
  background-image: linear-gradient(100deg, #ffe2a8 0%, #ffc2e2 22%, #bfe0ff 44%, #8ff7e2 62%, #bfe0ff 82%, #ffe2a8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="light"] body.home #headSub { color: rgba(226, 238, 255, .82); }
html[data-theme="light"] body.home #headSub .hs-live { color: #5eead4; }
html[data-theme="light"] body.home #headSub .hs-live::before { background: #5eead4; box-shadow: 0 0 8px rgba(94, 234, 212, .6); }
body.home #headTitle { display: none; }
body.home #brandSep { display: none; }
body.home #headSub {
  margin: 2px 0 0; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--hm-mut);
  white-space: nowrap;
}
body.home #headSub .hs-live {
  display: inline-flex; align-items: center; gap: 5px; color: var(--hm-cyan);
}
body.home #headSub .hs-live::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--hm-cyan); box-shadow: 0 0 8px var(--hm-cyan);
  animation: hmPulse 2s ease-in-out infinite;
}
@keyframes hmPulse { 50% { opacity: .3; transform: scale(.7); } }

body.home #updBtn, body.home #remindBtn, body.home #voiceBtn { display: none; }
body.home .topbar-actions { gap: 6px; }
body.home .topbar-actions .chip {
  height: 32px; min-width: 32px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--hm-panel);
  border: 1px solid var(--hm-line);
  color: var(--hm-ink);
  font-size: 13px;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 8px 24px -16px #000;
}
body.home .topbar-actions .chip:hover { border-color: var(--hm-line-2); background: var(--hm-panel-2); }
body.home .topbar-actions .chip .lbl { display: none; }
/* 主界面必须有可见的「航班号」入口：只露图标时用户找不到 */
body.home #linkBtn {
  display: inline-flex; gap: 4px;
  border-color: color-mix(in srgb, var(--hm-cyan) 45%, transparent);
  color: var(--hm-cyan);
}
body.home #linkBtn .lbl { display: inline; font-weight: 650; }
body.home #linkBtn .ico.turb { font-size: 18px; font-weight: 700; line-height: 1; }
html[data-theme="light"] body.home #linkBtn { color: #0e7490; }
@media (max-width: 430px) {
  body.home #linkBtn .lbl { font-size: 12px; }
}
@media (min-width: 761px) {
  body.home #linkBtn.on .lbl {
    display: inline; max-width: 78px; margin-left: 5px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}
body.home #hmSearchBtn { display: inline-flex; }
body.home #hmGlobeBtn { display: inline-flex; }
body.home #hmFilterBtn { display: inline-flex; }
body.home #homeBtn { display: none; }

/* 页眉筛选菜单 */
.hm-fmenu {
  position: fixed; z-index: 55; padding: 12px;
  max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 16px; border: 1px solid var(--hm-line-2);
  background: var(--hm-panel-2); color: var(--hm-ink);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 24px 60px -24px #000, 0 1px 0 rgba(255, 255, 255, .06) inset;
}
.hm-fmenu[hidden] { display: none; }
.hm-fmenu-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
  font: 600 10px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--hm-cyan);
}
.hm-fmenu-x {
  border: 0; background: none; padding: 2px 4px;
  color: var(--hm-dim); font: 500 13px/1 -apple-system, sans-serif; cursor: pointer;
}
.hm-fmenu-x:hover { color: var(--hm-ink); }
.hm-fmenu-seg { margin-top: 7px; }
.hm-fmenu .hm-airline { margin-top: 10px; }
.hm-fmenu-gap { height: 12px; }
.hm-fmenu .hm-layer-row { padding: 8px 0; }

/* ---------- 左侧态势栏 ---------- */
/* 各尺寸统一：菜单功能收进页眉筛选键，左侧栏不再展开 */
.hm-rail, .hm-rail-open { display: none !important; }
.hm-rail {
  position: fixed; z-index: 30; left: 16px; top: calc(env(safe-area-inset-top) + 82px);
  width: 252px; display: flex; flex-direction: column; gap: 10px;
  max-height: calc(100dvh - 206px); overflow: auto; scrollbar-width: none;
}
.hm-rail::-webkit-scrollbar { display: none; }
body.rail-folded .hm-rail { display: none; }
.hm-rail-open {
  position: fixed; z-index: 31; left: 16px; top: calc(env(safe-area-inset-top) + 82px);
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--hm-line);
  background: var(--hm-panel); color: var(--hm-cyan); cursor: pointer;
  display: none; place-items: center; font-size: 14px;
  -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}
body.rail-folded .hm-rail-open { display: grid; }
.hm-rail-scrim { display: none; }
.hm-rail-scrim[hidden] { display: none; }
.hm-fold {
  flex: none; width: 24px; height: 24px; padding: 0; border-radius: 7px;
  border: 1px solid var(--hm-line); background: rgba(148, 190, 255, .06);
  color: var(--hm-mut); cursor: pointer; display: grid; place-items: center;
  font: 600 11px/1 ui-monospace, Menlo, monospace;
}
.hm-fold:hover { color: var(--hm-ink); border-color: var(--hm-line-2); }
.hm-rail-fold { width: 19px; height: 19px; margin-left: 2px; }
.hm-card {
  border-radius: 16px; border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 26px 60px -40px #000, inset 0 1px 0 rgba(255, 255, 255, .055);
  padding: 14px;
}
.hm-live-card { position: relative; overflow: hidden; overflow: clip; }
.hm-live-card::after {
  content: ""; position: absolute; right: -40px; top: -60px; width: 150px; height: 150px;
  background: radial-gradient(circle, var(--hm-glow), transparent 66%);
  pointer-events: none;
}
.hm-eyebrow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font: 600 9px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .18em; text-transform: uppercase; color: var(--hm-dim);
}
.hm-live-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--hm-cyan); letter-spacing: .12em; }
.hm-live-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--hm-cyan);
  box-shadow: 0 0 10px var(--hm-cyan); animation: hmPulse 2s ease-in-out infinite;
}
.hm-big {
  margin: 4px 0 0; font: 200 40px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--hm-ink);
}
.hm-big small { font-size: 11px; font-weight: 500; letter-spacing: .08em; color: var(--hm-dim); margin-left: 6px; }
.hm-subline { margin-top: 3px; font-size: 10px; color: var(--hm-mut); letter-spacing: .02em; }
.hm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.hm-stat {
  padding: 8px 7px 7px; border-radius: 10px;
  background: rgba(148, 190, 255, .055); border: 1px solid var(--hm-line);
}
.hm-stat b {
  display: block; font: 600 16px/1.1 ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums; color: var(--hm-ink);
}
.hm-stat span { display: block; margin-top: 3px; font-size: 8.5px; letter-spacing: .1em; color: var(--hm-dim); text-transform: uppercase; }

.hm-group-title {
  display: flex; align-items: center; justify-content: space-between;
  font: 600 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .18em;
  text-transform: uppercase; color: var(--hm-dim); margin-bottom: 9px;
}
.hm-seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(148, 190, 255, .06); border: 1px solid var(--hm-line); }
.hm-seg button {
  flex: 1; border: 0; border-radius: 7px; padding: 7px 4px;
  background: transparent; color: var(--hm-mut); font: 500 10.5px/1 -apple-system, "PingFang SC", sans-serif;
  cursor: pointer; white-space: nowrap; transition: .15s;
}
.hm-seg button:hover { color: var(--hm-ink); }
.hm-seg button.on {
  color: #04231e; background: var(--hm-cyan); font-weight: 650;
  box-shadow: 0 2px 12px -4px var(--hm-cyan);
}
html[data-theme="light"] .hm-seg button.on { color: #fff; }
.hm-airline {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font: 600 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .14em;
  text-transform: uppercase; color: var(--hm-dim);
}
.hm-airline select {
  flex: 1; min-width: 0; padding: 7px 26px 7px 9px; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--hm-line); border-radius: 8px;
  background-color: rgba(148, 190, 255, .06); color: var(--hm-ink);
  font: 500 11px/1 -apple-system, "PingFang SC", sans-serif; letter-spacing: 0;
  background-image: linear-gradient(45deg, transparent 50%, var(--hm-dim) 50%), linear-gradient(135deg, var(--hm-dim) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
  cursor: pointer; outline: none;
}
.hm-airline select:focus { border-color: var(--hm-line-2); }
html[data-theme="light"] .hm-airline select { background-color: rgba(255, 255, 255, .74); }
html[data-theme="light"] .hm-airline select option { color: #0d1b2a; background: #fff; }
.hm-layer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 0; font-size: 12px; color: var(--hm-ink); cursor: pointer;
}
.hm-layer-row + .hm-layer-row { border-top: 1px solid var(--hm-line); }
.hm-layer-row span { display: flex; align-items: center; gap: 8px; }
.hm-layer-row em { font-style: normal; font-size: 8.5px; letter-spacing: .12em; color: var(--hm-dim); text-transform: uppercase; }
.hm-switch {
  position: relative; width: 32px; height: 18px; flex: none; border-radius: 999px;
  background: rgba(148, 190, 255, .16); border: 1px solid var(--hm-line); transition: .2s;
}
.hm-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--hm-mut); transition: .2s;
}
.hm-layer-row.on .hm-switch { background: var(--hm-cyan); border-color: transparent; }
.hm-layer-row.on .hm-switch::after { left: 16px; background: #04231e; }
.hm-btn {
  border: 1px solid var(--hm-line); background: rgba(148, 190, 255, .06);
  color: var(--hm-ink); border-radius: 9px; padding: 9px 8px;
  font: 500 11px/1 -apple-system, "PingFang SC", sans-serif; cursor: pointer; transition: .15s;
}
.hm-btn:hover { border-color: var(--hm-line-2); background: rgba(148, 190, 255, .12); }
.hm-btn:disabled,
.hm-btn:disabled:hover { opacity: .42; cursor: default; border-color: var(--hm-line); background: rgba(148, 190, 255, .05); color: var(--hm-dim); }

.hm-rail-foot {
  padding: 2px 4px 0; font: 9px/1.5 ui-monospace, Menlo, monospace; color: var(--hm-dim);
  letter-spacing: .04em;
}

/* ---------- 底部时间轴 ---------- */
.hm-timeline {
  position: fixed; z-index: 35; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 37px);
  width: min(880px, calc(100vw - 320px));
  padding: 10px 14px 9px; border-radius: 16px;
  border: 1px solid var(--hm-line);
  background: var(--hm-panel);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 28px 70px -42px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: center;
}
.hm-play {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hm-line-2);
  background: linear-gradient(145deg, rgba(94, 234, 212, .2), rgba(96, 165, 250, .1));
  color: var(--hm-cyan); font-size: 13px; cursor: pointer; display: grid; place-items: center;
  transition: .15s;
}
.hm-play:hover { background: rgba(94, 234, 212, .24); box-shadow: 0 0 22px -6px var(--hm-cyan); }
.hm-tl-main { min-width: 0; }
.hm-tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.hm-tl-time {
  font: 500 12px/1 ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums;
  color: var(--hm-ink); letter-spacing: .01em;
}
.hm-tl-mode {
  font: 600 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase;
  color: var(--hm-cyan);
}
.hm-tl-mode.off { color: var(--hm-amber); }
.hm-range { position: relative; }
.hm-range input {
  -webkit-appearance: none; appearance: none; width: 100%; height: 18px; margin: 0;
  background: transparent; cursor: pointer; display: block;
}
.hm-range input::-webkit-slider-runnable-track {
  height: 3px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(94, 234, 212, .9), rgba(96, 165, 250, .6) var(--p, 0%), rgba(148, 190, 255, .14) var(--p, 0%));
}
.hm-range input::-moz-range-track {
  height: 3px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(94, 234, 212, .9), rgba(96, 165, 250, .6) var(--p, 0%), rgba(148, 190, 255, .14) var(--p, 0%));
}
.hm-range input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; margin-top: -5px;
  border-radius: 50%; background: var(--hm-ink); border: 2px solid var(--hm-cyan);
  box-shadow: 0 0 14px var(--hm-cyan);
}
.hm-range input::-moz-range-thumb {
  width: 11px; height: 11px; border-radius: 50%; background: var(--hm-ink);
  border: 2px solid var(--hm-cyan); box-shadow: 0 0 14px var(--hm-cyan);
}
.hm-ticks { display: flex; justify-content: space-between; margin-top: 2px; font: 8px/1 ui-monospace, Menlo, monospace; color: var(--hm-dim); letter-spacing: .03em; }
.hm-ticks span { white-space: nowrap; }
.hm-track-note { margin-top: 5px; font: 9px/1.45 ui-monospace, Menlo, monospace; color: var(--hm-amber); letter-spacing: .02em; }
.hm-track-note[hidden] { display: none; }
.hm-tl-right { display: flex; align-items: center; gap: 6px; }
.hm-speed {
  height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--hm-line);
  background: rgba(148, 190, 255, .07); color: var(--hm-ink);
  font: 600 10px/1 ui-monospace, Menlo, monospace; cursor: pointer;
}
.hm-livebtn {
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--hm-line);
  background: rgba(148, 190, 255, .07); color: var(--hm-mut);
  font: 600 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; cursor: pointer;
}
.hm-livebtn.on { color: #04231e; background: var(--hm-cyan); border-color: transparent; }
html[data-theme="light"] .hm-livebtn.on { color: #fff; }
.hm-timeline[hidden] { display: none; }
.hm-trackline .hm-ticks { font-variant-numeric: tabular-nums; }

/* ---------- 主屏协同航路 ---------- */
body.home .topbar-actions .chip.on {
  background: var(--hm-cyan); border-color: transparent; color: #04231e;
  box-shadow: 0 0 20px -6px var(--hm-cyan);
}
html[data-theme="light"] body.home .topbar-actions .chip.on { color: #fff; }
.hm-crew {
  position: fixed; z-index: 56;
  width: 284px; max-width: calc(100vw - 20px); padding: 12px 13px 11px; border-radius: 16px;
  border: 1px solid var(--hm-line); background: var(--hm-panel-2);
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 30px 70px -42px #000, inset 0 1px 0 rgba(255, 255, 255, .06);
  display: flex; flex-direction: column; gap: 8px;
  animation: hmIn .22s cubic-bezier(.2, .8, .2, 1);
}
.hm-crew[hidden] { display: none; }
.hm-crew-head { display: flex; align-items: center; gap: 8px; }
.hm-crew-head .hm-crew-src { margin-left: auto; }
.hm-crew-x {
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--hm-mut); font-size: 11px; line-height: 1; cursor: pointer;
}
.hm-crew-x:hover { background: var(--hm-panel); color: var(--hm-ink); }
.hm-crew-tag {
  font: 600 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em;
  text-transform: uppercase; color: var(--hm-amber);
}
.hm-crew-src {
  font: 600 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em;
  color: var(--hm-dim);
}
.hm-crew-src.live { color: var(--hm-cyan); }
.hm-crew-main {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.hm-crew-no {
  font: 650 25px/1.05 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -.01em; color: var(--hm-ink);
}
.hm-crew-route {
  font-size: 11px; color: var(--hm-mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-crew-main:hover .hm-crew-route { color: var(--hm-ink); }
.hm-crew-sub { font-size: 10px; line-height: 1.5; color: var(--hm-mut); min-height: 15px; }
.hm-crew-legend {
  display: flex; flex-wrap: wrap; gap: 4px 11px; align-items: center;
  font-size: 9.5px; line-height: 1; color: var(--hm-mut); letter-spacing: .2px;
}
.hm-crew-legend[hidden] { display: none; }
.hm-crew-legend span { display: inline-flex; align-items: center; gap: 4px; }
.hm-crew-legend i { width: 12px; height: 3px; border-radius: 2px; display: block; }
.hm-crew-legend .lg-smooth i { background: #5eead4; box-shadow: 0 0 6px -1px #5eead4; }
.hm-crew-legend .lg-light i { background: #e3c14a; box-shadow: 0 0 6px -1px #e3c14a; }
.hm-crew-legend .lg-moderate i { background: #f08a3c; box-shadow: 0 0 6px -1px #f08a3c; }
.hm-crew-legend .lg-severe i { background: #f56565; box-shadow: 0 0 6px -1px #f56565; }
.hm-crew-actions { display: grid; grid-template-columns: 1.2fr .8fr; gap: 6px; }
.hm-crew-actions .hm-btn { padding: 8px 6px; }
.hm-crew-actions .hm-btn.primary {
  background: var(--hm-cyan); border-color: transparent; color: #04231e; font-weight: 650;
}
html[data-theme="light"] .hm-crew-actions .hm-btn.primary { color: #fff; }
.hm-crew-del:hover { color: var(--hm-rose); border-color: var(--hm-rose); }

/* 颠簸协同详情（主屏内，替代跳转飞常稳整页） */
.hm-crew-sheet { z-index: 41; }
.hm-crew-sheet .hm-cs-hero {
  padding: 11px 12px; border-radius: 12px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(94, 234, 212, .12), rgba(240, 138, 60, .1));
  border: 1px solid rgba(255, 255, 255, .09);
}
.hm-crew-sheet .hm-cs-hero b { display: block; font-size: 15px; line-height: 1.35; }
.hm-crew-sheet .hm-cs-hero span { display: block; margin-top: 3px; font-size: 11px; color: var(--hm-mut); }
.hm-crew-sheet .hm-cs-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px;
}
.hm-crew-sheet .hm-cs-grid div {
  padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
}
.hm-crew-sheet .hm-cs-grid span { display: block; color: var(--hm-dim); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.hm-crew-sheet .hm-cs-grid b { display: block; margin-top: 2px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hm-crew-sheet .hm-cs-list { display: flex; flex-direction: column; gap: 5px; }
.hm-crew-sheet .hm-cs-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px;
  background: rgba(255, 255, 255, .03); font-size: 11px; color: var(--hm-mut);
}
.hm-crew-sheet .hm-cs-row.now { background: rgba(94, 234, 212, .1); color: var(--hm-ink); }
.hm-crew-sheet .hm-cs-row.past { opacity: .45; }
.hm-crew-sheet .hm-cs-row i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.hm-crew-sheet .hm-cs-row b { font-size: 11px; min-width: 34px; }
.hm-crew-sheet .hm-cs-row .hm-cs-span { flex: 1; font-variant-numeric: tabular-nums; }
.hm-crew-sheet .hm-cs-row em { font-style: normal; font-variant-numeric: tabular-nums; }
.hm-crew-sheet .hm-cs-empty { color: var(--hm-mut); font-size: 11px; line-height: 1.6; padding: 6px 0; }
.hm-crew-sheet .hm-cs-actions { display: flex; gap: 8px; margin-top: 12px; }
.hm-crew-sheet .hm-cs-actions .hm-btn { flex: 1; }
.hm-crew-sheet .hm-cs-actions .hm-btn.primary { background: var(--hm-cyan); border-color: transparent; color: #04231e; font-weight: 650; }

/* ---------- 右侧详情 ---------- */
.hm-drawer {
  position: fixed; z-index: 38; right: 16px; top: calc(env(safe-area-inset-top) + 82px);
  bottom: calc(env(safe-area-inset-bottom) + 113px);
  width: 372px; display: flex; flex-direction: column;
  border-radius: 18px; border: 1px solid var(--hm-line);
  background: var(--hm-panel-2);
  -webkit-backdrop-filter: blur(28px) saturate(180%); backdrop-filter: blur(28px) saturate(180%);
  box-shadow: 0 34px 80px -42px #000, inset 0 1px 0 rgba(255, 255, 255, .07);
  overflow: hidden;
  animation: hmIn .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes hmIn { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.hm-drawer[hidden] { display: none; }
.hm-drawer.folded .hm-drawer-body { display: none; }
.hm-drawer.folded .hm-drawer-head { border-bottom: 0; }
.hm-drawer.folded .hm-fold { transform: rotate(180deg); }
@media (min-width: 761px) { .hm-drawer.folded { bottom: auto; } }
.hm-drawer-head {
  display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 12px;
  border-bottom: 1px solid var(--hm-line);
  background: linear-gradient(180deg, rgba(148, 190, 255, .05), transparent);
}
.hm-drawer-head .hm-dh-main { flex: 1; min-width: 0; }
.hm-cs {
  font: 650 26px/1.05 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: -.02em; color: var(--hm-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hm-cs-sub { margin-top: 4px; font-size: 11px; color: var(--hm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-close {
  width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1px solid var(--hm-line);
  background: rgba(148, 190, 255, .06); color: var(--hm-mut); cursor: pointer; font-size: 13px;
}
.hm-close:hover { color: var(--hm-ink); border-color: var(--hm-line-2); }
.hm-drawer-body { flex: 1; overflow: auto; padding: 14px 16px; scrollbar-width: thin; }
.hm-drawer-body::-webkit-scrollbar { width: 4px; }
.hm-drawer-body::-webkit-scrollbar-thumb { background: var(--hm-line-2); border-radius: 4px; }
.hm-route { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(148, 190, 255, .06); border: 1px solid var(--hm-line); }
.hm-route .hm-ap { flex: 1; min-width: 0; }
.hm-route .hm-ap b { display: block; font: 650 18px/1.1 ui-monospace, Menlo, monospace; }
.hm-route .hm-ap span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--hm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-route .hm-ap.r { text-align: right; }
.hm-route .hm-ap b.hm-ap-link {
  display: inline-block; padding: 5px 4px; margin: -5px -4px; cursor: pointer;
  text-decoration: underline dotted rgba(94, 234, 212, .55); text-underline-offset: 4px;
}
.hm-route .hm-ap b.hm-ap-link:hover,
.hm-route .hm-ap b.hm-ap-link:active,
.hm-route .hm-ap b.hm-ap-link:focus-visible { color: var(--hm-cyan); outline: none; }
.hm-route .hm-ap.r b.hm-ap-link { text-align: right; }
.hm-route .hm-arrow { color: var(--hm-cyan); font-size: 14px; flex: none; }
.hm-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.hm-kv > div { padding: 10px; border-radius: 10px; background: rgba(148, 190, 255, .045); border: 1px solid var(--hm-line); }
.hm-kv span { display: block; font: 600 8.5px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .14em; color: var(--hm-dim); text-transform: uppercase; }
.hm-kv b { display: block; margin-top: 4px; font: 600 18px/1.1 ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; color: var(--hm-ink); }
.hm-kv b i { font-style: normal; font-size: 9.5px; color: var(--hm-dim); margin-left: 3px; }
.hm-adsb-more { margin-top: 10px; }
.hm-adsb-more summary {
  cursor: pointer; list-style: none; padding: 10px 2px;
  font: 600 10px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em;
  color: var(--hm-cyan); text-transform: uppercase;
}
.hm-adsb-more summary::-webkit-details-marker { display: none; }
.hm-adsb-more summary::after { content: " +"; color: var(--hm-dim); }
.hm-adsb-more[open] summary::after { content: " –"; }
.hm-detail-group { margin-top: 8px; }
.hm-kv-more { margin-top: 6px; gap: 5px; }
.hm-kv-more > div { padding: 8px; }
.hm-kv-more b { font-size: 13px; }
.hm-kv-more b i { font-size: 8.5px; }
.hm-photo-link {
  display: block; margin-top: 6px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--hm-line); background: rgba(148, 190, 255, .045);
  -webkit-tap-highlight-color: transparent;
}
.hm-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hm-section { margin-top: 14px; }
.hm-section-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font: 600 9px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--hm-dim); }
.hm-profile { width: 100%; height: 76px; display: block; border-radius: 10px; background: linear-gradient(180deg, rgba(94, 234, 212, .07), transparent); border: 1px solid var(--hm-line); }
.hm-drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.hm-drawer-actions .hm-btn { padding: 10px; }
.hm-drawer-actions .hm-btn.primary { background: var(--hm-cyan); border-color: transparent; color: #04231e; font-weight: 650; }
html[data-theme="light"] .hm-drawer-actions .hm-btn.primary { color: #fff; }
.hm-loading { padding: 18px 0; text-align: center; color: var(--hm-dim); font-size: 11px; letter-spacing: .08em; }
.hm-loading::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; vertical-align: -2px;
  border: 1.5px solid var(--hm-line-2); border-top-color: var(--hm-cyan); border-radius: 50%;
  animation: hmSpin .8s linear infinite;
}
@keyframes hmSpin { to { transform: rotate(360deg); } }
.hm-note { margin-top: 10px; font-size: 9.5px; line-height: 1.5; color: var(--hm-dim); }
.hm-note-warn { color: #fbbf24; }
.hm-status-band {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px; margin-bottom: 10px;
  border-radius: 12px; background: rgba(148, 190, 255, .06); border: 1px solid var(--hm-line);
}
.hm-status-band b { font: 650 12px/1 ui-monospace, Menlo, monospace; letter-spacing: .1em; color: var(--hm-ink); }
.hm-status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--hm-cyan); box-shadow: 0 0 8px var(--hm-cyan); }
.hm-status-band.hm-ci-warn .hm-status-dot { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
.hm-status-band.hm-ci-ok .hm-status-dot { background: #34d399; box-shadow: 0 0 8px #34d399; }
.hm-status-band.hm-ci-bad .hm-status-dot { background: #f87171; box-shadow: 0 0 8px #f87171; }
.hm-status-time { margin-left: auto; font: 9px/1.3 ui-monospace, Menlo, monospace; color: var(--hm-dim); }
.hm-status-progress { margin-top: 12px; }
.hm-progress { height: 5px; border-radius: 999px; background: rgba(148, 190, 255, .12); overflow: hidden; }
.hm-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hm-cyan), #818cf8); }
.hm-progress-lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; font: 9px/1.3 ui-monospace, Menlo, monospace; color: var(--hm-dim); }

/* 机场面板 */
.hm-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(148, 190, 255, .06); border: 1px solid var(--hm-line); margin: 10px 0; }
.hm-tabs button {
  flex: 1; border: 0; background: transparent; color: var(--hm-mut); border-radius: 7px;
  padding: 7px 2px; font: 600 9.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; cursor: pointer;
}
.hm-tabs button.on { background: rgba(94, 234, 212, .16); color: var(--hm-cyan); }
.hm-report-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 9.5px; color: var(--hm-dim); margin-bottom: 8px; }
.hm-report-raw {
  font: 10.5px/1.65 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; word-break: break-word;
  color: var(--hm-ink); background: rgba(0, 0, 0, .22); border: 1px solid var(--hm-line);
  border-radius: 10px; padding: 10px;
}
html[data-theme="light"] .hm-report-raw { background: rgba(15, 35, 55, .04); }
.hm-decode { display: flex; flex-direction: column; gap: 1px; border-radius: 10px; overflow: hidden; border: 1px solid var(--hm-line); }
.hm-dg-title { padding: 7px 10px; background: rgba(94, 234, 212, .09); color: var(--hm-cyan); font: 600 9px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; }
.hm-dg-row { display: grid; grid-template-columns: 84px 1fr; gap: 8px; padding: 7px 10px; background: rgba(148, 190, 255, .035); font-size: 11px; }
.hm-dg-row code { color: var(--hm-blue); font: 10px/1.5 ui-monospace, Menlo, monospace; word-break: break-all; }
.hm-dg-row span { color: var(--hm-ink); }
.hm-notam { padding: 10px 0; border-top: 1px solid var(--hm-line); }
.hm-notam:first-child { border-top: 0; }
.hm-notam-h { display: flex; align-items: center; gap: 6px; font: 600 9px/1 ui-monospace, Menlo, monospace; color: var(--hm-dim); }
.hm-notam-h .hm-badge { padding: 3px 5px; border-radius: 4px; background: rgba(96, 165, 250, .14); color: var(--hm-blue); }
.hm-notam-h .hm-badge.c { background: rgba(251, 113, 133, .14); color: var(--hm-rose); }
.hm-notam-txt { margin-top: 6px; font: 11px/1.6 ui-monospace, Menlo, monospace; color: var(--hm-ink); white-space: pre-wrap; word-break: break-word; }
.hm-notam-time { margin-top: 4px; font-size: 9px; color: var(--hm-dim); }
/* 机场概况：标高/国家/时区/跑道/频率 */
.hm-info { display: flex; flex-direction: column; gap: 1px; }
.hm-info-row { display: flex; gap: 10px; padding: 5px 0; font-size: 11.5px; line-height: 1.45; }
.hm-info-k { flex: none; width: 62px; color: var(--hm-dim); font-size: 10.5px; }
.hm-info-v { color: var(--hm-ink); min-width: 0; }
.hm-info-v b { color: #fff; font-weight: 650; letter-spacing: .02em; }
html[data-theme="light"] .hm-info-v b { color: #0b1a29; }
.hm-info-sec {
  margin: 12px 0 3px; font: 600 9px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .12em; text-transform: uppercase; color: var(--hm-dim);
}
.hm-frs { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px 0 4px; }
.hm-fr {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 8px; border-radius: 8px;
  background: rgba(148, 190, 255, .07); border: 1px solid var(--hm-line);
  font-size: 11px; color: var(--hm-ink); font-variant-numeric: tabular-nums;
}
.hm-fr i { font-style: normal; color: var(--hm-mut); font-size: 9.5px; }
.hm-fr em { font-style: normal; color: var(--hm-dim); font-size: 9px; }
.hm-rw-extra { display: block; margin-top: 2px; color: var(--hm-mut); font-size: 10px; font-variant-numeric: tabular-nums; }

/* ---------- 搜索面板 ---------- */
.hm-cmd {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: start center;
  padding: 11vh 16px 16px; background: rgba(2, 6, 12, .62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: hmFade .18s ease;
}
@keyframes hmFade { from { opacity: 0; } }
.hm-cmd[hidden] { display: none; }
.hm-cmd-panel {
  width: min(620px, 100%); border-radius: 18px; overflow: hidden;
  border: 1px solid var(--hm-line-2); background: var(--hm-panel-2);
  box-shadow: 0 50px 120px -40px #000; animation: hmCmdIn .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes hmCmdIn { from { opacity: 0; transform: translateY(-10px) scale(.985); } }
.hm-cmd-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--hm-line); }
.hm-cmd-in .hm-sb-ico { font-size: 18px; color: var(--hm-cyan); }
.hm-cmd-in input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--hm-ink);
  font: 500 16px/1 -apple-system, "PingFang SC", sans-serif;
}
.hm-cmd-in input::placeholder { color: var(--hm-dim); }
.hm-cmd-in kbd { font: 10px/1 ui-monospace, Menlo, monospace; color: var(--hm-dim); border: 1px solid var(--hm-line); border-radius: 5px; padding: 4px 6px; }
.hm-cmd-list { max-height: min(52vh, 440px); overflow: auto; padding: 6px; scrollbar-width: thin; }
.hm-cmd-sec { padding: 8px 10px 5px; font: 600 8.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--hm-dim); }
.hm-cmd-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px; cursor: pointer;
}
.hm-cmd-item.sel { background: rgba(94, 234, 212, .12); }
.hm-cmd-item .hm-ci-ico {
  width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: rgba(148, 190, 255, .08); border: 1px solid var(--hm-line); color: var(--hm-cyan); font-size: 12px;
}
.hm-cmd-item .hm-ci-main { flex: 1; min-width: 0; }
.hm-cmd-item b { display: block; font: 600 13px/1.2 ui-monospace, Menlo, monospace; color: var(--hm-ink); }
.hm-cmd-item span { display: block; margin-top: 2px; font-size: 10px; color: var(--hm-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-cmd-item em { font-style: normal; font-size: 9px; color: var(--hm-dim); text-align: right; }
.hm-cmd-item em.hm-ci-live { color: var(--hm-cyan); }
.hm-cmd-item em.hm-ci-warn { color: #fbbf24; }
.hm-cmd-item em.hm-ci-ok { color: #34d399; }
.hm-cmd-item em.hm-ci-bad { color: #f87171; }
.hm-cmd-item .hm-ci-ico.hm-spin { animation: hmSpin 1.4s linear infinite; }
.hm-cmd-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.hm-cmd-col { min-width: 0; padding: 2px 5px 6px; }
.hm-cmd-col + .hm-cmd-col { border-left: 1px solid var(--hm-line); }
.hm-cmd-col .hm-cmd-sec { padding-left: 7px; }
.hm-cmd-item.compact { gap: 8px; padding: 8px; }
.hm-cmd-item.compact .hm-ci-ico { width: 24px; height: 24px; border-radius: 6px; font-size: 10px; }
.hm-cmd-item.compact b { font-size: 12px; }
.hm-cmd-col-empty { padding: 14px 8px 16px; color: var(--hm-dim); font-size: 10.5px; line-height: 1.65; }
.hm-cmd-chip {
  display: block; width: max-content; margin-top: 9px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--hm-line-2); background: rgba(94, 234, 212, .08);
  color: var(--hm-cyan); font: 600 11px/1 ui-monospace, Menlo, monospace; cursor: pointer;
}
.hm-cmd-chip:hover { background: rgba(94, 234, 212, .16); }
.hm-cmd-empty { padding: 30px 10px; text-align: center; color: var(--hm-dim); font-size: 11px; }
.hm-retry { display: inline-block; margin-left: 8px; border: 1px solid rgba(94,234,212,.4); background: rgba(94,234,212,.1); color: #5eead4; border-radius: 8px; padding: 4px 10px; font-size: 11px; }
.hm-retry:active { transform: scale(.96); }
.hm-cmd-foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--hm-line); font-size: 9px; color: var(--hm-dim); }
.hm-cmd-foot kbd { font: 9px/1 ui-monospace, Menlo, monospace; border: 1px solid var(--hm-line); border-radius: 4px; padding: 2px 4px; margin-right: 3px; }

/* ---------- 提示 ---------- */
.hm-toast {
  position: fixed; z-index: 70; left: 50%; bottom: 104px; transform: translate(-50%, 8px);
  padding: 9px 14px; border-radius: 9px; border: 1px solid var(--hm-line-2);
  background: var(--hm-panel-2); color: var(--hm-ink); font-size: 11px;
  opacity: 0; pointer-events: none; transition: .2s;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.hm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 移动端 ---------- */
@media (max-width: 1099px) {
  .hm-rail {
    display: none; left: 12px; right: 12px; top: calc(env(safe-area-inset-top) + 112px);
    width: auto; max-height: calc(100dvh - 190px); z-index: 47;
  }
  body.rail-mobile-open .hm-rail { display: flex; }
  .hm-rail-open { display: none !important; }
  body.home #hmFilterBtn { display: inline-flex; }
  .hm-rail-scrim {
    position: fixed; inset: 0; z-index: 46; display: block;
    background: rgba(4, 12, 22, .38);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  }
  .hm-timeline { width: calc(100vw - 32px); }
  body.home #hmSearchBtn { display: inline-flex; }
  body.home #hmGlobeBtn { display: inline-flex; }
  .hm-drawer { width: 356px; }
}
@media (max-width: 760px) {
  body.home .topbar {
    padding: calc(env(safe-area-inset-top) + 8px) 10px 8px;
    flex-wrap: nowrap; align-items: center; gap: 8px;
  }
  body.home .brand { flex: 1 1 auto; width: auto; min-width: 0; gap: 7px; }
  body.home .brand-text { min-width: 0; }
  body.home .brand-head { min-width: 0; }
  body.home .brand-logo { width: 32px; height: 32px; }
  body.home .brand-app { font-size: 15px; }
  body.home #headSub { font-size: 8px; letter-spacing: .1em; }
  body.home .topbar-actions { flex: none; justify-content: flex-end; gap: 5px; }
  body.home .topbar-actions .chip { flex: none; width: auto; min-width: 30px; height: 30px; padding: 0 7px; }
  body.home #tzBtn { display: none; }
  .hm-rail {
    left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 56px);
    max-height: calc(100dvh - 130px);
  }
  body.home #hmSearchBtn { display: inline-flex; }
  .hm-timeline {
    left: 0; transform: none; width: 100%;
    bottom: calc(env(safe-area-inset-bottom) + 37px);
    border-radius: 16px; border-left: 0; border-right: 0;
    padding: 9px 12px;
    grid-template-columns: auto 1fr; gap: 8px 10px;
  }
  .hm-tl-right { display: none; }
  .hm-trackline { grid-template-columns: auto 1fr auto; }
  .hm-trackline .hm-tl-right { display: flex; }
  .hm-trackline #hmTrackSpeed { display: none; }
  .hm-play { width: 34px; height: 34px; }
  .hm-drawer {
    right: 0; left: 0; top: auto; width: 100%;
    max-height: 64dvh; bottom: 0;
    border-radius: 18px 18px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    animation: hmUp .24s cubic-bezier(.2, .8, .2, 1);
  }
  body.trackline-open .hm-drawer { bottom: calc(env(safe-area-inset-bottom) + 111px); }
  .hm-drawer.folded { bottom: calc(env(safe-area-inset-bottom) + 37px); }
  body.trackline-open .hm-drawer.folded { bottom: calc(env(safe-area-inset-bottom) + 111px); }
  html[data-native="1"] .hm-drawer.folded { bottom: env(safe-area-inset-bottom); }
  html[data-native="1"] body.trackline-open .hm-drawer.folded { bottom: calc(env(safe-area-inset-bottom) + 111px); }
  .hm-crew { padding: 10px 12px 9px; }
  .hm-crew-no { font-size: 21px; }
  .hm-crew-sub { font-size: 9.5px; }
  .hm-crew-actions .hm-btn { padding: 8px; }
  @keyframes hmUp { from { transform: translateY(30px); opacity: 0; } }
  .hm-drawer-head { padding: 13px 14px 10px; }
  .hm-cs { font-size: 22px; }
  .hm-drawer-body { padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px); }
  .hm-toast { bottom: calc(env(safe-area-inset-bottom) + 125px); }
  .maplibregl-ctrl-bottom-right { bottom: 119px; right: 8px; }
  .hm-kv b { font-size: 16px; }
  .hm-cmd { padding: calc(env(safe-area-inset-top) + 56px) 10px 10px; }
  .hm-cmd-in { height: 52px; }
  body.home:has(#hmDrawer:not([hidden])) .app-footer { display: none; }
}
@media (max-width: 390px) {
  body.home .topbar-actions .chip { height: 30px; min-width: 30px; padding: 0 7px; }
  .hm-tl-head { gap: 6px; }
  .hm-tl-time { font-size: 11px; }
}

/* 主页页脚（家族四件套）固定于底部，不加背景烟罩 */
body.home .app-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: flex; margin: 0; padding: 2px 8px calc(env(safe-area-inset-bottom) + 3px);
  border-top: 0; background: none;
  font-size: 8px; line-height: 1.45; color: var(--hm-mut);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .75);
  pointer-events: auto;
}
/* 星空底上改用高亮彩虹与浅色分隔，避免深色段落看不清 */
html[data-theme="light"] body.home .app-footer {
  --muted: #a8bbd2;
  --hair-2: rgba(168, 187, 210, .22);
}
html[data-theme="light"] body.home .app-footer .rainbow {
  background-image: linear-gradient(90deg, #ff6fb0 0%, #ffb347 16%, #ffe45c 33%, #5df0a0 50%, #5fd0ff 66%, #c08bff 83%, #ff6fb0 100%);
}
html[data-native="1"] body.home .app-footer { display: none; }
/* 上架 App 内不显示页脚四件套；PWA/网页保留 */
html[data-native="1"] .app-footer { display: none !important; }

/* 无 WebGL 兜底 */
body.home-fallback .hm-map::before {
  content: "当前浏览器无法载入三维地图 · WebGL unavailable";
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--hm-mut); font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  body.home *, body.home *::before, body.home *::after {
    animation-duration: .001ms !important; transition-duration: .001ms !important;
  }
}
