/* ==========================================================================
   飞行计划解析 — Liquid Glass 主题
   玻璃质感实现约定：
   1) 实体色变量(--card/--card-2/--card-3)保留，app.js 内联样式仍在用；
   2) 卡片用「半透明渐变 + 顶部高光 + 环境阴影」伪造玻璃，不加 backdrop-filter，
      否则一屏十几个模糊层会拖垮 iOS 滚动；
   3) 真模糊只留给浮层：顶栏、标签条、底部抽屉、Toast。
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #070b11;
  --card: #131b26;
  --card-2: #1a2431;
  --card-3: #1f2c3a;
  --line: #24313f;
  --ink: #e9eff7;
  --muted: #8ea3ba;
  --accent: #34d399;
  --accent-2: #fbbf24;
  --danger: #fb7185;
  --info: #60a5fa;
  --prof-edge: #22d3ee;
  --prof-rel: #c084fc;
  --wx-l1: #54a8e0;
  --wx-l2: #e08a3c;
  --wx-l3: #ef6b6b;
  --on-accent: #05140f;
  --topbar: rgba(9, 14, 21, .72);
  --tint-accent: rgba(52, 211, 153, .12);
  --warn-bg: rgba(251, 191, 36, .10);
  --warn-line: rgba(251, 191, 36, .35);
  --warn-row: rgba(251, 191, 36, .07);
  --code-bg: rgba(4, 8, 14, .55);
  --hero-grad: radial-gradient(120% 140% at 8% 0%, rgba(52, 211, 153, .22), transparent 55%),
               radial-gradient(120% 140% at 100% 10%, rgba(96, 165, 250, .18), transparent 55%),
               linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));

  /* 玻璃层 */
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .035);
  --glass-3: rgba(255, 255, 255, .085);
  --hair: rgba(255, 255, 255, .10);
  --hair-2: rgba(255, 255, 255, .06);
  --sheen: rgba(255, 255, 255, .10);
  --shadow: 0 20px 42px -24px rgba(0, 0, 0, .9), 0 2px 10px -6px rgba(0, 0, 0, .7);
  --glow: 0 8px 26px -12px rgba(52, 211, 153, .55);
  --blur: saturate(180%) blur(22px);
  --panel: rgba(17, 24, 34, .82);
  --bg-fade: rgba(7, 11, 17, 0);
  --mesh-a: rgba(52, 211, 153, .16);
  --mesh-b: rgba(96, 165, 250, .15);
  --mesh-c: rgba(167, 139, 250, .13);
  --mesh-d: rgba(251, 191, 36, .09);

  --fs: 18px;
  --radius: 22px;
  --radius-s: 14px;
}

html.light {
  color-scheme: light;
  --bg: #eef2f8;
  --card: #ffffff;
  --card-2: #f4f7fb;
  --card-3: #ffffff;
  --line: #d8e0ea;
  --ink: #131c27;
  --muted: #5d6d80;
  --accent: #0f7a52;
  --accent-2: #a4580a;
  --danger: #c62828;
  --info: #1d4ed8;
  --prof-edge: #0e7490;
  --prof-rel: #7c3aed;
  --wx-l1: #1d6fa5;
  --wx-l2: #a4580a;
  --wx-l3: #c62828;
  --on-accent: #ffffff;
  --topbar: rgba(255, 255, 255, .70);
  --tint-accent: rgba(15, 122, 82, .10);
  --warn-bg: rgba(180, 120, 20, .12);
  --warn-line: rgba(180, 120, 20, .30);
  --warn-row: rgba(180, 120, 20, .07);
  --code-bg: rgba(255, 255, 255, .7);
  --hero-grad: radial-gradient(120% 140% at 8% 0%, rgba(15, 122, 82, .16), transparent 55%),
               radial-gradient(120% 140% at 100% 10%, rgba(29, 78, 216, .12), transparent 55%),
               linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .7));

  --glass: rgba(255, 255, 255, .72);
  --glass-2: rgba(255, 255, 255, .55);
  --glass-3: rgba(255, 255, 255, .85);
  --hair: rgba(15, 23, 42, .10);
  --hair-2: rgba(15, 23, 42, .06);
  --sheen: rgba(255, 255, 255, .95);
  --shadow: 0 18px 40px -26px rgba(15, 23, 42, .45), 0 2px 8px -5px rgba(15, 23, 42, .18);
  --glow: 0 8px 24px -14px rgba(15, 122, 82, .5);
  --panel: rgba(255, 255, 255, .86);
  --bg-fade: rgba(238, 242, 248, 0);
  --mesh-a: rgba(15, 122, 82, .18);
  --mesh-b: rgba(29, 78, 216, .14);
  --mesh-c: rgba(124, 58, 237, .12);
  --mesh-d: rgba(180, 120, 20, .10);
}

* { 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;
  padding-bottom: 40px;
  letter-spacing: -.01em;
  transition: background-color .35s ease, color .35s ease;
}

/* 背景光晕：玻璃要透出东西才像玻璃 */
body::before {
  content: "";
  position: fixed; inset: -10% -10% -10% -10%; z-index: -1;
  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%),
    radial-gradient(40% 32% at 4% 72%, var(--mesh-d), transparent 62%);
  pointer-events: none;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.02em; }
h1 { font-size: calc(var(--fs) * 1.15); }
h2 { font-size: calc(var(--fs) * 1.0); }
h3 { font-size: calc(var(--fs) * .95); }
p { margin: 6px 0; }
ul { margin: 6px 0; padding-left: 18px; }
a { color: var(--accent); }

/* ---------- 顶栏 ---------- */
.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);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--hair-2);
  box-shadow: 0 12px 30px -24px rgba(0, 0, 0, .9), inset 0 1px 0 var(--sheen);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.logo {
  width: 44px; height: 44px; flex: 0 0 auto; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .45));
}
.brand p { margin: 0; font-size: calc(var(--fs) * .72); color: var(--muted); letter-spacing: 0; }
.topbar-actions { display: flex; gap: 8px; }

main { padding: 16px 14px; max-width: 780px; margin: 0 auto; }

/* ---------- 玻璃卡片 ---------- */
.card {
  position: relative;
  background: var(--glass);
  background-image: linear-gradient(158deg, var(--glass-3), var(--glass-2) 42%, var(--glass));
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--sheen);
}
.parse-warn { background: var(--warn-bg); background-image: none; border-color: var(--warn-line); }
.parse-warn p { margin: 4px 0 0; }
/* 顶部高光扫过，玻璃的关键一笔 */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, var(--sheen), transparent 34%);
  opacity: .45; pointer-events: none;
}
.card > * { position: relative; z-index: 1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: calc(var(--fs) * .82); }
.card-note { color: var(--accent-2); font-size: calc(var(--fs) * .82); text-align: right; }
.prof-head { display: flex; align-items: center; gap: 8px; flex: none; }
.tight li { margin: 2px 0; }

/* ---------- 按钮 ---------- */
button { font: inherit; cursor: pointer; }
.primary {
  position: relative;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 55%),
                    linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 82%, #000));
  background-color: var(--accent);
  color: var(--on-accent); border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .12s ease, box-shadow .2s ease;
}
.primary:active { transform: scale(.97); box-shadow: var(--glow); }
#sampleBtn {
  display: block; margin: 10px auto 0;
  background: none; color: var(--accent);
  border: 1px solid var(--hair); border-radius: 999px;
  padding: 8px 18px; font-weight: 600;
  transition: transform .12s ease, background-color .2s ease;
}
#sampleBtn:active { transform: scale(.97); background-color: var(--glass-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass);
  color: var(--ink); border: 1px solid var(--hair);
  border-radius: 12px; min-width: 40px; height: 36px; padding: 0 8px; font-weight: 700;
  box-shadow: inset 0 1px 0 var(--sheen), 0 6px 16px -12px rgba(0, 0, 0, .8);
  transition: transform .12s ease, background-color .2s ease;
}
.icon-btn:active { transform: scale(.94); background-color: var(--glass-3); }
.link-btn {
  background: none; border: 0; color: var(--muted);
  font-size: calc(var(--fs) * .8); padding: 4px 2px;
}
.link-btn:active { color: var(--danger); }

/* ---------- 导入区 ---------- */
.drop {
  text-align: center; padding: 30px 16px;
  border-style: dashed; border-color: var(--hair);
  background-image: linear-gradient(158deg, var(--glass-3), var(--glass));
}
.drop.over {
  border-color: var(--accent); border-style: solid;
  background-image: linear-gradient(158deg, var(--tint-accent), var(--glass));
  box-shadow: var(--glow), inset 0 1px 0 var(--sheen);
}
.drop-icon {
  font-size: 38px; line-height: 1;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5));
}
#fileInput { display: none; }
.drop .primary { margin: 12px 0 6px; }

.bar {
  height: 10px; background: var(--code-bg); border-radius: 999px; overflow: hidden;
  margin-top: 12px; border: 1px solid var(--hair-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4);
}
.bar > div {
  height: 100%; width: 0;
  background-image: linear-gradient(90deg, #0ea5e9, #34d399);
  border-radius: 999px;
  box-shadow: 0 0 14px -2px rgba(52, 211, 153, .8);
  transition: width .25s ease;
}

/* ---------- 历史档案 ---------- */
.archive { display: grid; gap: 9px; margin-top: 10px; }
.archive-item {
  display: flex; justify-content: space-between; gap: 8px; align-items: center;
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  border: 1px solid var(--hair-2); border-radius: var(--radius-s); padding: 11px 13px;
  text-align: left; color: var(--ink);
  box-shadow: inset 0 1px 0 var(--sheen), 0 8px 20px -18px rgba(0, 0, 0, .9);
  transition: transform .12s ease, border-color .2s ease;
}
.archive-item:active { transform: scale(.985); border-color: var(--hair); }
.archive-item b { font-weight: 650; }
.archive-item small { color: var(--muted); display: block; font-size: calc(var(--fs) * .74); }
.archive-row {
  position: relative; border-radius: var(--radius-s); overflow: hidden;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.archive-row .archive-item {
  position: relative; z-index: 1; width: 100%;
  touch-action: pan-y; /* 触摸起点在按钮上，这里不给 pan-y 的话 iOS 会把横滑当页面手势吞掉 */
  transition: transform .22s ease, border-color .2s ease;
}
.archive-row.dragging .archive-item { transition: none; }
.archive-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 88px; z-index: 0;
  border: 0; border-radius: 0;
  background: var(--danger); color: #fff;
  font-size: calc(var(--fs) * .95); font-weight: 650;
  visibility: hidden; /* 条目玻璃背景半透明，不藏住会透出来染色整行 */
}
.archive-row.dragging .archive-del,
.archive-row.open .archive-del { visibility: visible; }
.archive-del:active { filter: brightness(.9); }

/* ---------- 概览首屏 ---------- */
.hero {
  background-image: var(--hero-grad);
  overflow: hidden;
}
.hero-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-flt {
  font-size: calc(var(--fs) * 1.7); font-weight: 750; letter-spacing: -.01em;
  text-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}
.hero-route {
  font-size: calc(var(--fs) * 1.05); color: var(--accent); font-weight: 600;
  text-shadow: 0 0 22px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

/* ---------- 胶囊 ---------- */
.chip {
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  border: 1px solid var(--hair-2); border-radius: 999px;
  padding: 4px 11px; font-size: calc(var(--fs) * .78); color: var(--ink);
  box-shadow: inset 0 1px 0 var(--sheen);
}
.chip.on {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent);
  background-color: var(--accent); color: var(--on-accent);
  border-color: transparent; font-weight: 650;
  box-shadow: var(--glow);
}
.chip.warn {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent);
  background-color: var(--warn-bg); border-color: var(--warn-line); color: var(--accent-2);
}
/* 计划飞行时间：常用项，主题色高亮 */
.chip.hl {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent);
  background-color: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent); font-weight: 650;
}

/* 乘务组协同链接文本框 */
.cabin-link {
  width: 100%; box-sizing: border-box; margin-top: 8px; padding: 10px 12px;
  border: 1px solid var(--hair-2); border-radius: 12px;
  background: var(--code-bg); color: var(--ink);
  font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all; resize: vertical;
}
.cabin-cover {
  display: block; width: 100%; max-width: 320px; margin: 12px auto 0;
  border: 1px solid var(--hair-2); border-radius: 14px;
  -webkit-user-select: none; user-select: none;
}

/* ---------- ICAO 领航计划报卡片 ---------- */
.fpl-sec { margin: 14px 0 8px; color: var(--muted); font-size: calc(var(--fs) * .84); font-weight: 600; }
.codes { display: flex; flex-wrap: wrap; gap: 7px; }
.codes .chip { max-width: 100%; }
.fpl-table td:first-child { white-space: nowrap; }
.fpl-raw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: calc(var(--fs) * .8); word-break: break-word;
}

/* ---------- 标签条 ---------- */
.tabs {
  display: flex; gap: 7px; overflow-x: auto; padding: 4px 0 10px;
  position: sticky; top: calc(env(safe-area-inset-top) + 65px); z-index: 10;
  background: linear-gradient(180deg, var(--bg) 58%, var(--bg-fade));
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 1 0 auto;
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  border: 1px solid var(--hair-2); color: var(--muted);
  border-radius: 999px; padding: 9px 15px; font-weight: 600;
  font-size: calc(var(--fs) * .9);
  box-shadow: inset 0 1px 0 var(--sheen);
  transition: transform .12s ease, color .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.tabs button:active { transform: scale(.96); }
.tabs button.active {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .3), transparent);
  background-color: var(--accent); color: var(--on-accent);
  border-color: transparent; font-weight: 700;
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 9px; }
.kpi {
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  border: 1px solid var(--hair-2); border-radius: 18px; padding: 12px 14px;
  box-shadow: inset 0 1px 0 var(--sheen), 0 10px 24px -22px rgba(0, 0, 0, .95);
}
.kpi span { display: block; color: var(--muted); font-size: calc(var(--fs) * .78); }
.kpi b { font-size: calc(var(--fs) * 1.28); font-weight: 700; letter-spacing: -.02em; }
.kpi.warn b { color: var(--accent-2); text-shadow: 0 0 20px color-mix(in srgb, var(--accent-2) 40%, transparent); }
.etp-sep { margin: 12px 0; border-top: 1px solid var(--hair-2); }

/* ---------- 重量条 ---------- */
.wbar { margin-top: 14px; }
.wbar:first-child { margin-top: 4px; }
.wbar-head, .wbar-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
/* 限制值（灰）是参考，实际值（彩色，随余量绿/琥珀/红）是主角，避免两组数字都白看不清 */
.wbar-head { font-size: calc(var(--fs) * .84); color: var(--muted); }
.wbar-head b { color: var(--muted); font-weight: 600; }
.wbar-sub { font-size: calc(var(--fs) * .92); color: var(--accent); }
.wbar-sub span, .wbar-sub b { color: inherit; }
.wbar-sub.l2 { color: var(--accent-2); }
.wbar-sub.l3 { color: var(--danger); }
.wbar-sub b { font-weight: 650; }
.wbar-track {
  height: 12px; border-radius: 999px; margin: 7px 0 6px;
  background: var(--hair-2); border: 1px solid var(--hair-2); overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}
.wbar-fill { height: 100%; border-radius: 999px; background: var(--accent); opacity: .9; }
.wbar-fill.l2 { background: var(--accent-2); }
.wbar-fill.l3 { background: var(--danger); }
.wbar-margin { font-size: calc(var(--fs) * .8); color: var(--muted); }
.wbar-margin.warn { color: var(--danger); font-weight: 650; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td {
  text-align: left; padding: 9px 9px; font-size: calc(var(--fs) * .86);
  vertical-align: top; border-bottom: 1px solid var(--hair-2);
}
th {
  color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums;
  background-color: var(--panel);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  position: sticky; top: 0; z-index: 2;
}
th:first-child { border-top-left-radius: 12px; }
th:last-child { border-top-right-radius: 12px; }
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; }
.row-warn td { background: var(--warn-row); }

.scroll-x {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: 14px; border: 1px solid var(--hair-2);
}
.scroll-y { max-height: 68vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.toolbar { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 10px; }
/* 同一时段可能上百条同组通告，给选择区限高滚动，别把正文顶出屏幕 */
.bm-list { max-height: 128px; overflow-y: auto; padding-right: 4px; }
input[type=search], input[type=text] {
  flex: 1 1 150px; min-width: 120px;
  background-color: var(--code-bg); border: 1px solid var(--hair-2);
  color: var(--ink); border-radius: 12px; padding: 9px 12px; font: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
input[type=search]:focus, input[type=text]:focus {
  outline: none; border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 0 0 3px var(--tint-accent);
}

/* ---------- 通告 ---------- */
/* 两大类节标题：机场类 / 航路类 */
.clshead {
  color: var(--muted); font-size: calc(var(--fs) * .78); font-weight: 650;
  letter-spacing: .04em; margin: 12px 2px 7px;
  display: flex; align-items: center; gap: 8px;
}
.clshead::after { content: ''; flex: 1; height: 1px; background: var(--hair); }
.notam {
  border: 1px solid var(--hair-2); border-radius: 18px; padding: 12px 14px;
  margin-bottom: 9px;
  /* 通告里有上千字符不断行的坐标串（632830N0534000E-…），必须允许任意位置换行 */
  overflow-wrap: anywhere;
  background-image: linear-gradient(158deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  box-shadow: inset 0 1px 0 var(--sheen), 0 10px 24px -22px rgba(0, 0, 0, .95);
}
.notam-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.notam-head .ap { font-weight: 700; color: var(--accent); }
.notam-head .cat { color: var(--accent-2); font-size: calc(var(--fs) * .8); }
.notam-head .id { color: var(--muted); font-size: calc(var(--fs) * .76); margin-left: auto; font-variant-numeric: tabular-nums; }
.notam p { margin: 5px 0 0; }
.notam .remark { color: var(--accent-2); font-size: calc(var(--fs) * .82); }
.notam .valid { color: var(--muted); font-size: calc(var(--fs) * .76); }
/* 中文术语解读：只在中文界面出现，与英文原文区分（列表、详情抽屉共用） */
.zhdec {
  color: var(--accent); font-size: calc(var(--fs) * .88); line-height: 1.6;
  border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-left: 9px; margin-top: 7px;
}
.notam.lv-red { border-left: 3px solid var(--danger); box-shadow: inset 3px 0 18px -12px var(--danger), inset 0 1px 0 var(--sheen); }
.notam.lv-orange { border-left: 3px solid var(--wx-l2); box-shadow: inset 3px 0 18px -12px var(--wx-l2), inset 0 1px 0 var(--sheen); }
.notam.lv-yellow { border-left: 3px solid var(--accent-2); box-shadow: inset 3px 0 18px -12px var(--accent-2), inset 0 1px 0 var(--sheen); }
.notam.lv-green { opacity: .58; border-left: 3px solid var(--hair); }
.notam.lv-必看 { border-left: 3px solid var(--danger); box-shadow: inset 3px 0 18px -12px var(--danger), inset 0 1px 0 var(--sheen); }
.notam.lv-关注 { border-left: 3px solid var(--accent-2); box-shadow: inset 3px 0 18px -12px var(--accent-2), inset 0 1px 0 var(--sheen); }
.notam.lv-信息 { border-left: 3px solid var(--info); box-shadow: inset 3px 0 18px -12px var(--info), inset 0 1px 0 var(--sheen); }
.notam.lv-已过滤 { opacity: .58; border-left: 3px solid var(--hair); }
.notam-head .lvtag {
  font-size: calc(var(--fs) * .72); color: var(--muted);
  border: 1px solid var(--hair-2); border-radius: 999px; padding: 1px 9px;
}
.notam-head .ax {
  font-size: calc(var(--fs) * .7); color: var(--muted); opacity: .5;
  border: 1px solid var(--hair-2); border-radius: 999px; padding: 1px 8px;
}
.notam-head .ax.on { opacity: 1; color: var(--ink); background: var(--glass); border-color: var(--hair); }
.notam-head .axnote { font-size: calc(var(--fs) * .7); color: var(--muted); }
.chip .lvdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.notam-params label { display: inline-flex; align-items: center; gap: 6px; font-size: calc(var(--fs) * .78); color: var(--muted); }
.notam-params select { background: var(--card-2); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: calc(var(--fs) * .78); }

/* ---------- 天气 ---------- */
.wx {
  border: 1px solid var(--hair-2); border-radius: 18px; margin-bottom: 9px; overflow: hidden;
  background-image: linear-gradient(158deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  box-shadow: inset 0 1px 0 var(--sheen), 0 10px 24px -22px rgba(0, 0, 0, .95);
}
.wx summary {
  padding: 12px 14px; cursor: pointer; font-weight: 650;
  display: flex; gap: 8px; align-items: center;
  list-style: none;
}
.wx summary::-webkit-details-marker { display: none; }
.wx summary::after {
  content: "›"; margin-left: auto; color: var(--muted); font-size: 1.2em;
  transform: rotate(90deg); transition: transform .2s ease;
}
.wx[open] summary::after { transform: rotate(-90deg); }
.wx summary .tag { font-size: calc(var(--fs) * .74); color: var(--muted); font-weight: 400; }
.wx .body { padding: 0 14px 14px; }
.wx .raw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: calc(var(--fs) * .82); word-break: break-word;
}
.wx .raw + .raw { margin-top: 6px; }
/* 中文术语解读：中文界面在报文原文下方显示 */
.wxzh {
  margin-top: 7px; padding-left: 9px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  font-size: calc(var(--fs) * .84); line-height: 1.6; color: var(--accent);
}
.wxzh p { margin: 2px 0 0; }
.wxzh p:first-child { margin-top: 0; }
.wx-item + .wx-item { margin-top: 12px; }
.wxtags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.wxtag {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  border: 1px solid var(--hair); font-size: calc(var(--fs) * .74); line-height: 1.65;
}
.wxtag.l1 { color: var(--wx-l1); border-color: color-mix(in srgb, var(--wx-l1) 45%, transparent); background: color-mix(in srgb, var(--wx-l1) 12%, transparent); }
.wxtag.l2 { color: var(--wx-l2); border-color: color-mix(in srgb, var(--wx-l2) 45%, transparent); background: color-mix(in srgb, var(--wx-l2) 12%, transparent); }
.wxtag.l3 { color: var(--wx-l3); border-color: color-mix(in srgb, var(--wx-l3) 50%, transparent); background: color-mix(in srgb, var(--wx-l3) 14%, transparent); }
.wxtag.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--tint-accent); }
.wx-l1 { color: var(--wx-l1); }
.wx-l2 { color: var(--wx-l2); }
.wx-l3 { color: var(--wx-l3); }
.wx .raw b { font-weight: 650; }

/* ---------- 航路串 ---------- */
pre.route {
  white-space: pre-wrap; word-break: break-word;
  background: var(--code-bg); border: 1px solid var(--hair-2);
  border-radius: 16px; padding: 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: calc(var(--fs) * .8); max-height: 240px; overflow: auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
.route-item { margin-bottom: 12px; }
.route-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.route-item-head b { font-size: calc(var(--fs) * .9); }

/* ---------- .EFBcfp 计划正文 ---------- */
pre.cfp-pre {
  white-space: pre; overflow-x: auto;
  background: var(--code-bg); border: 1px solid var(--hair-2);
  border-radius: 16px; padding: 12px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: calc(var(--fs) * .68); line-height: 1.45;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .4);
}
pre.cfp-pre mark.cfp-ck {
  background: rgba(255, 210, 74, .22); color: inherit;
  border-bottom: 1px solid rgba(255, 210, 74, .75);
  border-radius: 2px; padding: 0 1px;
}

/* ---------- 颠簸时间轴 ---------- */
.turb-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.turb-wrap { position: relative; }
.turb-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
/* 手动滑动暂停跟随后出现的「回到当前」浮标 */
.turb-recenter {
  position: absolute; right: 6px; top: 4px; z-index: 3;
  padding: 3px 10px; font-size: calc(var(--fs) * .72);
  background-color: rgba(9, 14, 21, .9);
}
.turb-axis { display: flex; gap: 4px; align-items: flex-end; position: relative; }
.turb-cell {
  flex: 0 0 auto; width: 44px; height: 148px; padding: 0; border: 0; background: none;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px;
  border-radius: 12px; position: relative;
}
.turb-fixdot {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px -1px var(--accent);
}
.turb-plane {
  position: absolute; top: 0; bottom: 0; width: 24px; margin-left: -12px;
  background: none; opacity: .9; border-radius: 2px;
  cursor: grab; touch-action: none;
}
.turb-plane:active { cursor: grabbing; }
.turb-plane::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--accent) 30%, var(--accent));
  border-radius: 2px;
}
.turb-plane::after {
  content: '✈'; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-size: calc(var(--fs) * .78); color: #fff;
  padding: 1px 3px; border-radius: 7px; background: rgba(0, 0, 0, .38);
}
.turb-drag-tip {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  background: rgba(0, 0, 0, .72); color: #fff; padding: 2px 7px; border-radius: 8px;
  font-size: calc(var(--fs) * .68); white-space: nowrap; pointer-events: none;
}
.turb-cell:active { background: var(--glass-2); }
.turb-t, .turb-n { font-size: calc(var(--fs) * .6); color: var(--muted); line-height: 1.2; }
.turb-n { max-width: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turb-sr { font-size: calc(var(--fs) * .7); font-weight: 700; line-height: 1; }
/* 航段柱体列：骑在两航路点之间的分界线上（左移 24px = 半个格距），
   底边让出名称行高度，内部高度与格高一致，柱高百分比不变 */
.turb-leg {
  position: absolute; left: -24px; bottom: calc(var(--fs) * .72 + 3px);
  width: 44px; height: 148px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px;
}
.turb-leg .turb-t { white-space: nowrap; }
.turb-bar {
  width: 100%; min-height: 6px; border-radius: 7px 7px 3px 3px; position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.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); }
.turb-hit {
  position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px var(--bg), 0 0 12px rgba(251, 113, 133, .9);
}
.turb-uptag, .turb-lowtag {
  position: absolute; top: 0; font-size: calc(var(--fs) * .6); font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 6px; z-index: 1;
}
.turb-uptag { left: -24px; color: #1a1205; background: var(--accent-2); box-shadow: 0 0 10px -2px var(--accent-2); }
.turb-lowtag { right: 24px; color: #fff; background: var(--info); box-shadow: 0 0 10px -2px var(--info); }
.turb-sr.bf::before { content: '~'; }
.turb-sr.bf { font-style: italic; opacity: .9; }
.upmark { color: var(--accent-2); }
.askmark { color: var(--info); }
.tb-badge {
  display: inline-block; font-size: calc(var(--fs) * .68); font-weight: 600;
  padding: 1px 7px; border-radius: 999px; margin-left: 4px; vertical-align: 1px;
}
.tb-badge.up { color: #1a1205; background: var(--accent-2); }
.tb-badge.low { color: #fff; background: var(--info); }
.tb-badge.bf { color: var(--muted); background: var(--glass-2); border: 1px solid var(--hair); }
.turb-logic { margin: 6px 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.turb-logic li { font-size: calc(var(--fs) * .78); color: var(--muted); line-height: 1.45; }
.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; }
.legend .sw.hit { border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px rgba(251, 113, 133, .8); }

/* ---------- 飞行剖面图 ---------- */
.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-elev { fill: var(--muted); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.prof-alt { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.prof-alt-area { fill: var(--ink); opacity: .06; }
.prof-tick { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; opacity: .55; }
.prof-fuel { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.prof-fuel-area { fill: var(--accent); opacity: .14; }
.prof-mline { stroke: var(--accent-2); stroke-width: 1.4; stroke-dasharray: 4 4; opacity: .85; }
.prof-mlabel { fill: var(--accent-2); font-size: 11px; font-weight: 600; paint-order: stroke; stroke: var(--card); stroke-width: 3px; stroke-linejoin: round; }
.prof-mk-depress .prof-mline { stroke: var(--danger); }
.prof-mk-depress .prof-mlabel { fill: var(--danger); }
.prof-mk-etops .prof-mline { stroke: var(--info); }
.prof-mk-etops .prof-mlabel { fill: var(--info); }
.prof-mk-etopsEdge .prof-mline { stroke: var(--prof-edge); }
.prof-mk-etopsEdge .prof-mlabel { fill: var(--prof-edge); }
.prof-mk-rerelease .prof-mline { stroke: var(--prof-rel); }
.prof-mk-rerelease .prof-mlabel { fill: var(--prof-rel); }
.prof-mhit { fill: transparent; cursor: pointer; }
.prof-mark-g:active .prof-mline { opacity: 1; stroke-width: 2.2; }
.prof-plane text { fill: #fff; stroke: rgba(0, 0, 0, .6); stroke-width: 1.2; paint-order: stroke; font-size: 15px; }
.prof-plane-line { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 2 3; opacity: .9; }
.prof-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: calc(var(--fs) * .8); }
.prof-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 0; font-size: calc(var(--fs) * .78); color: var(--muted); }
.prof-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; background: var(--accent-2); }
.prof-legend .pl-depress i { background: var(--danger); }
.prof-legend .pl-etops i { background: var(--info); }
.prof-legend .pl-etopsEdge i { background: var(--prof-edge); }
.prof-legend .pl-rerelease i { background: var(--prof-rel); }

/* ---------- 时刻对比（计划 vs 实际） ---------- */
.tcmp-gantt { display: flex; flex-direction: column; gap: 12px; }
.tcmp-row { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; }
.tcmp-tag { font-size: calc(var(--fs) * .82); color: var(--muted); }
.tcmp-track { position: relative; height: 32px; }
.tcmp-span { position: absolute; top: 5px; height: 10px; border-radius: 5px; background: var(--line); opacity: .85; }
.tcmp-span.act { background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .95; }
.tcmp-t { position: absolute; bottom: 0; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tcmp-t.end { transform: translateX(-100%); }
.tcmp-prog { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: color-mix(in srgb, var(--ink) 34%, transparent); }
.tcmp-span.act .tcmp-prog { background: color-mix(in srgb, #000 20%, transparent); }
.tcmp-plane {
  position: absolute; top: -8px; transform: translateX(-50%); pointer-events: none;
  font-size: 12px; line-height: 1; color: var(--ink);
  text-shadow: 0 0 3px var(--card), 0 0 3px var(--card), 0 0 3px var(--card);
}
.tcmp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tcmp-chip.late { border-color: color-mix(in srgb, var(--danger) 55%, transparent); color: var(--danger); }
.tcmp-chip.early { border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }

/* ---------- 事件流（SR 告警 / 风变） ---------- */
.aflow { display: flex; flex-direction: column; }
.aflow-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair-2); }
.aflow-item:last-child { border-bottom: 0; padding-bottom: 2px; }
.aflow-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.aflow-main { flex: 1; min-width: 0; }
.aflow-main b { display: block; font-size: calc(var(--fs) * .95); }
.aflow-main span { display: block; margin-top: 2px; }
.aflow-end { text-align: right; flex: none; }
.aflow-end b { display: block; font-size: calc(var(--fs) * .95); }
.aflow-end span { display: block; margin-top: 2px; }

/* ---------- 航路点表视觉编码 ---------- */
.wp-etp td:first-child { box-shadow: inset 3px 0 0 var(--accent-2); }
.wp-vertex td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.wpbar { display: inline-block; width: 26px; height: 4px; border-radius: 2px; background: var(--hair-2); margin-right: 5px; vertical-align: middle; overflow: hidden; }
.wpbar i { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.wpdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.wp-up { color: var(--accent); font-style: normal; }
.wp-dn { color: var(--accent-2); font-style: normal; }
.wp-arrup { color: var(--accent-2); font-style: normal; margin-right: 3px; font-size: calc(var(--fs) * .72); }
.wp-ask { color: var(--info); font-style: normal; margin-right: 3px; font-size: calc(var(--fs) * .72); }

/* ---------- 提醒排程时间轴 ---------- */
.tl { display: flex; flex-direction: column; }
.tl-item { position: relative; padding: 0 0 16px 22px; }
.tl-item:last-child { padding-bottom: 2px; }
.tl-item::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: -2px; width: 1px; background: var(--hair-2); }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 4px; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 3px var(--card); }
.tl-main { min-width: 0; }
.tl-top { display: flex; align-items: baseline; gap: 7px; }
.tl-top b { font-size: calc(var(--fs) * .95); }
.tl-cd { margin-left: auto; flex: none; font-size: calc(var(--fs) * .8); font-variant-numeric: tabular-nums; padding: 1px 8px; border-radius: 999px; background: var(--hair-2); }
.tl-title { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.tl-title b { font-size: calc(var(--fs) * .95); }
.tl-tag { font-size: calc(var(--fs) * .72); line-height: 16px; padding: 0 6px; border-radius: 6px; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); flex: none; }
.tl-main p { margin: 3px 0 0; }
.tl-item.off { opacity: .45; }
.tl-item.fired .tl-cd { opacity: .6; }

/* ---------- 颠簸统计卡 ---------- */
.tbar { position: relative; height: 22px; margin: 12px 0 5px; }
.dftmap { margin: 10px 0 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dftmap svg { display: block; width: 100%; height: auto; min-width: 0; background: var(--bg); border: 1px solid var(--hair-2); border-radius: 10px; }
.dftmap .b-land { fill: var(--card-2); stroke: var(--muted); stroke-opacity: .45; stroke-width: .8; }
.dftmap .b-border { fill: none; stroke: var(--muted); stroke-opacity: .40; stroke-width: .8; }
.dftmap .dft-grat line { stroke: var(--muted); stroke-opacity: .20; stroke-width: 1; }
.dftmap polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dftmap polyline.dft-real { stroke: #fff; stroke-opacity: .6; stroke-width: 1.6; }
html.light .dftmap polyline.dft-real { stroke: #334155; stroke-opacity: .55; }
.dftmap circle { fill: var(--accent-2); stroke: var(--bg); stroke-width: 2; }
.dftmap text { fill: var(--ink); font-size: 13px; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.dftmap .dft-plane path { fill: #fff; stroke: rgba(0, 0, 0, .6); stroke-width: .6; paint-order: stroke; }
/* 通告区域简图：限制区/禁飞区等点串坐标的地图式呈现（列表卡与详情抽屉共用） */
.notammap-tag { margin: 8px 0 0; }
.notammap-tag .tag { padding: 1px 7px; border: 1px solid var(--hair-2); border-radius: 999px; font-size: calc(var(--fs) * .72); color: var(--muted); }
.notammap { margin: 6px 0 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.notammap svg { display: block; width: 100%; height: auto; min-width: 0; background: var(--bg); border: 1px solid var(--hair-2); border-radius: 10px; }
.notammap .b-land { fill: var(--card-2); stroke: var(--muted); stroke-opacity: .45; stroke-width: .8; }
.notammap .b-border { fill: none; stroke: var(--muted); stroke-opacity: .40; stroke-width: .8; }
.notammap .n-grat line { stroke: var(--muted); stroke-opacity: .20; stroke-width: 1; }
.notammap .n-area { fill: var(--wx-l2); fill-opacity: .18; stroke: var(--wx-l2); stroke-width: 2.4; stroke-linejoin: round; }
.notammap .n-line { fill: none; stroke-linecap: round; }
.notammap .n-dot { fill: var(--accent-2); stroke: var(--bg); stroke-width: 2; }
.notammap .n-rad { fill: var(--wx-l2); fill-opacity: .12; stroke: var(--wx-l2); stroke-width: 2; stroke-dasharray: 6 5; }
.notammap text { fill: var(--ink); font-size: 12px; font-weight: 600; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.notammap-legend { margin: 4px 2px 0; font-size: calc(var(--fs) * .72); color: var(--muted); line-height: 1.5; }
.manual-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.manual-pager { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.manual-viewer { overflow: auto; max-height: 58vh; border: 1px solid var(--hair-2); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.manual-viewer canvas { display: block; width: 100%; height: auto; }
.dftcharts { margin: 12px 0 4px; }
.dftcharts-title { margin: 0 0 6px; font-size: calc(var(--fs) * .86); color: var(--muted); }
.dftchart-group { margin: 10px 0 6px; font-size: calc(var(--fs) * .8); font-weight: 600; color: var(--accent-2); }
.dftchart { margin-bottom: 10px; border: 1px solid var(--hair-2); border-radius: 12px; overflow: hidden; background: var(--glass-2); }
.dftchart.related { border-color: var(--accent-2); }
.dftchart-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 10px; font-size: calc(var(--fs) * .78); }
.dftchart-head .tag { padding: 1px 7px; border: 1px solid var(--hair-2); border-radius: 999px; font-size: calc(var(--fs) * .72); color: var(--muted); white-space: nowrap; }
.dftchart-head .tag.hot { border-color: var(--accent-2); color: var(--accent-2); font-weight: 600; }
.dftchart-head .t { flex: 1 1 100%; color: var(--muted); }
.dftchart-head .zoom { margin-left: auto; font-size: calc(var(--fs) * .72); color: var(--muted); }
.dftchart-canvas { border-top: 1px solid var(--hair-2); background: #fff; cursor: zoom-in; }
.dftchart-canvas canvas { display: block; width: 100%; height: auto; }
.dftchart-canvas .ph { margin: 0; padding: 22px 10px; text-align: center; font-size: calc(var(--fs) * .8); color: var(--muted); }
.dftchart-text .dftchart-canvas { background: var(--glass-2); }
.dfttext-pre { margin: 0; padding: 10px 12px; max-height: 360px; overflow: auto; font-family: inherit; font-size: calc(var(--fs) * .78); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.dftprogs { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 4px; }
.dftprog { border: 1px solid var(--hair-2); border-radius: 10px; padding: 8px 10px; background: var(--glass-2); }
.dftprog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.dftprog-no { font-weight: 700; color: var(--accent-2); white-space: nowrap; }
.dftprog-seg { font-weight: 650; letter-spacing: .02em; }
.dftprog-equip { font-size: calc(var(--fs) * .72); color: var(--muted); }
.dftprog-note { margin-top: 6px; padding: 4px 8px; border-left: 3px solid var(--accent-2); background: var(--warn-row); border-radius: 4px; font-weight: 650; font-size: calc(var(--fs) * .82); color: var(--accent-2); }
.dftprog-para { margin-top: 6px; }
.dftprog-para + .dftprog-para { border-top: 1px dashed var(--hair-2); padding-top: 6px; }
.dftprog-desc { margin: 0; font-size: calc(var(--fs) * .82); line-height: 1.65; }
.dftprog-alts { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dftprog-alts .k { font-size: calc(var(--fs) * .72); color: var(--muted); }
.dftprog-alts .chip { padding: 1px 9px; border: 1px solid var(--hair-2); border-radius: 999px; font-size: calc(var(--fs) * .76); background: var(--glass-2); }
.dftprog .ph.small { font-size: calc(var(--fs) * .76); }
p.dftprog-foot { padding: 0 12px 10px; margin: 0; }
p.dft-relnote { color: var(--accent-2); }
p.dft-relnote b { color: var(--accent-2); }
table.dft-table th { white-space: nowrap; position: static; }
table.dft-table th, table.dft-table td { font-size: calc(var(--fs) * .8); padding-left: 5px; padding-right: 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; }

/* ---------- SIGMET ---------- */
.sigmet {
  border: 1px solid var(--hair-2); border-left: 3px solid var(--hair); border-radius: 18px;
  padding: 12px 14px; margin-bottom: 9px;
  background-image: linear-gradient(158deg, var(--glass-3), var(--glass-2));
  background-color: var(--glass-2);
  box-shadow: inset 0 1px 0 var(--sheen), 0 10px 24px -22px rgba(0, 0, 0, .95);
}
.sigmet.cov-hit { border-left-color: var(--danger); box-shadow: inset 3px 0 18px -12px var(--danger), inset 0 1px 0 var(--sheen); }
.sigmet.cov-cover, .sigmet.cov-covers { border-left-color: var(--accent-2); box-shadow: inset 3px 0 18px -12px var(--accent-2), inset 0 1px 0 var(--sheen); }
.sigmet.cov-future { border-left-color: var(--info); box-shadow: inset 3px 0 18px -12px var(--info), inset 0 1px 0 var(--sheen); }
.sigmet.cov-unknown { border-left-color: var(--accent); box-shadow: inset 3px 0 18px -12px var(--accent), inset 0 1px 0 var(--sheen); }
.sigmet.cov-cnl { border-left-color: var(--hair); opacity: .55; }
.sigmet.cov-expired { border-left-color: var(--hair); opacity: .55; }
.sigmet-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.sigmet-head .ap { font-weight: 700; color: var(--accent); }
.sigmet-head .cat { color: var(--accent-2); font-size: calc(var(--fs) * .82); }
.sigmet-head .badge {
  border: 1px solid var(--hair-2); border-radius: 999px; padding: 1px 9px;
  color: var(--muted); font-size: calc(var(--fs) * .72);
}
.sigmet-head .id { margin-left: auto; color: var(--muted); font-size: calc(var(--fs) * .76); font-variant-numeric: tabular-nums; }
.sigmet p { margin: 4px 0 0; }
.hit-chip { margin: 4px 4px 0 0; padding: 2px 10px; }

/* ---------- 底部抽屉 ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(3, 6, 11, .5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end;
}
/* display:flex 会盖掉 hidden 属性自带的 display:none，必须显式关掉，否则遮罩永远盖在页面上挡住点击 */
.sheet[hidden] { display: none; }
.sheet-body {
  position: relative;
  background: var(--card-3);
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  border-radius: 26px 26px 0 0; padding: 22px 16px calc(env(safe-area-inset-bottom) + 18px);
  width: 100%; max-height: 80vh; overflow: auto;
  border-top: 1px solid var(--hair);
  box-shadow: 0 -24px 60px -30px rgba(0, 0, 0, .95), inset 0 1px 0 var(--sheen);
  animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1);
}
@keyframes sheet-up { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-body::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 5px; border-radius: 999px; background: var(--hair);
}
.sheet-body h3 { margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.kv div { border-bottom: 1px solid var(--hair-2); padding: 7px 0; font-size: calc(var(--fs) * .84); }
.kv div span { color: var(--muted); }

/* ---------- 天气图查看器 ---------- */
.wx-viewer { max-height: 62vh; overflow: auto; -webkit-overflow-scrolling: touch; padding-right: 2px; }
.wx-viewer .wx-canvas {
  display: block; width: 100%; height: auto; margin: 0 0 12px;
  border-radius: 12px; border: 1px solid var(--hair); background: var(--card-2);
}
.wx-viewer .wx-canvas:last-child { margin-bottom: 0; }
.wx-viewer .shot-item { margin-bottom: 14px; }
.wx-viewer .shot-item:last-child { margin-bottom: 0; }
.wx-viewer .shot-item .wx-canvas { margin-bottom: 6px; }
.wx-viewer .shot-item .chip { width: 100%; }

/* ---------- 提醒 ---------- */
.alert-banner {
  position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top) + 8px);
  z-index: 70; max-height: 62vh; overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--card-3);
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  border: 1px solid var(--hair); border-left: 4px solid var(--accent);
  border-radius: 16px; padding: 12px 14px;
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 var(--sheen);
  animation: toast-in .24s cubic-bezier(.2, .9, .3, 1);
}
.alert-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.alert-head b { font-size: calc(var(--fs) * .95); }
.alert-row {
  display: flex; gap: 9px; align-items: flex-start;
  border-top: 1px solid var(--hair-2); padding: 9px 0 3px; margin-top: 9px;
}
.alert-row b { display: block; font-size: calc(var(--fs) * .92); }
.alert-row small { display: block; font-size: calc(var(--fs) * .76); margin-top: 2px; }
.alert-tag {
  flex: 0 0 auto; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: calc(var(--fs) * .74); font-weight: 700; white-space: nowrap;
}
.alert-form { display: flex; gap: 8px; margin: 10px 0 4px; }
.alert-form input[type="datetime-local"],
.alert-form input[type="date"],
.alert-form input[type="time"] {
  min-width: 0;
  background: var(--glass-2); border: 1px solid var(--hair-2); color: var(--ink);
  border-radius: 12px; padding: 9px 11px; font-size: calc(var(--fs) * .86);
}
.alert-form input[type="datetime-local"] { flex: 1 1 auto; }
/* 起飞/飞越点修正以分钟为主：日期只占窄位，时间栏放大 */
.dt-split { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; }
.dt-split .dt-date { flex: 0 1 8.6em; min-width: 0; }
.dt-split .dt-time { flex: 1 1 auto; font-size: calc(var(--fs) * 1.12); font-weight: 650; letter-spacing: .02em; }
.alert-form select {
  flex: 0 0 auto;
  background: var(--glass-2); border: 1px solid var(--hair-2); color: var(--ink);
  border-radius: 12px; padding: 9px 11px; font-size: calc(var(--fs) * .86);
}
.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--hair-2); cursor: pointer;
}
.switch:first-child { border-top: 0; }
.switch span { display: block; }
.switch b { display: block; font-size: calc(var(--fs) * .9); }
.switch small { display: block; font-size: calc(var(--fs) * .74); }
.switch input[type="checkbox"] {
  flex: 0 0 auto; appearance: none; -webkit-appearance: none;
  width: 46px; height: 26px; border-radius: 999px; margin: 0;
  background: var(--glass-2); border: 1px solid var(--hair-2);
  position: relative; transition: background-color .18s ease, border-color .18s ease;
}
.switch input[type="checkbox"]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--muted);
  transition: transform .18s ease, background-color .18s ease;
}
.switch input[type="checkbox"]:checked { background: var(--accent); border-color: transparent; }
.switch input[type="checkbox"]:checked::after { transform: translateX(20px); background: var(--on-accent); }
.switch .lead-num {
  appearance: none; -webkit-appearance: none;
  width: 54px; height: 26px; margin: 0 2px; padding: 0 6px;
  background: var(--glass-2); border: 1px solid var(--hair-2); color: var(--ink);
  border-radius: 7px; font-size: calc(var(--fs) * .74); text-align: center;
  vertical-align: middle; cursor: text;
}
.switch .lead-num::-webkit-outer-spin-button,
.switch .lead-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 60; max-width: 88vw;
  background: var(--card-3);
  background-image: linear-gradient(180deg, var(--glass-3), var(--glass-2));
  border: 1px solid var(--hair); color: var(--ink);
  padding: 11px 18px; border-radius: 999px; font-size: calc(var(--fs) * .88);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  box-shadow: var(--shadow), inset 0 1px 0 var(--sheen);
  animation: toast-in .24s cubic-bezier(.2, .9, .3, 1);
}
@keyframes toast-in { from { transform: translate(-50%, 10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.empty { color: var(--muted); text-align: center; padding: 22px 0; font-size: calc(var(--fs) * .88); }

/* ---------- 页脚：两个备案 + 隐私条款 + 版权 ---------- */

/* 彩虹字。首尾同色 + 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; } }
/* 浅色底上原色阶的黄色几乎看不见，换一档更深的色阶 */
html.light .rainbow {
  background-image: linear-gradient(90deg, #c2185b 0%, #e65100 16%, #9a7400 33%, #1b7a3f 50%, #0d6efd 66%, #6a1b9a 83%, #c2185b 100%);
}
.brand h1.rainbow { letter-spacing: -.01em; }
/* 页脚四条错开相位，避免四条同步像闪烁 */
/* 页脚五条错开相位，避免五条同步像闪烁 */
.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 { animation: none; } }

.app-footer {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px 0; margin-top: 4px; padding: 16px 10px 24px;
  border-top: 1px solid var(--hair-2);
  font-size: calc(var(--fs) * .78); line-height: 1.7; text-align: center;
}
.app-footer > * + * { padding-left: 12px; margin-left: 12px; 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; }
/* 英文版按惯例隐藏公安备案，ICP 顶到首位，去掉残留分隔线 */
body.lang-en .footer-beian { display: none; }
body.lang-en .footer-icp { padding-left: 0; margin-left: 0; border-left: 0; }

/* ---------- 宽屏 / iPad 横屏 ---------- */
@media (min-width: 900px) {
  main { max-width: 1180px; padding: 20px 24px; }
  /* 导入页拆两栏：顶部导入区通栏，下面档案与包内容并排 */
  /* 必须带 :not([hidden])，否则 display 会盖掉 [hidden] 让导入页和报告页同时显示 */
  #importView:not([hidden]) {
    display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    gap: 14px; align-items: start;
  }
  #importView > .card { margin-bottom: 0; }
  #dropZone, #progressCard { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  /* 通告卡片窄，双栏排；通栏一列行长过百字，读起来费眼 */
  #notamList { columns: 2; column-gap: 12px; }
  #notamList .notam { break-inside: avoid; }
  #tab-weather .wx .raw { max-width: 92ch; }
}

/* ---------- 简报页：时间轴 + 航路图 ---------- */

.brief-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.brief-svg { display: block; width: 100%; height: auto; min-width: 0; }
.brief-map { min-width: 0; }
.brief-svg .b-fir { fill: var(--glass-3); }
.brief-svg .b-fir.alt { fill: var(--glass-2); }
.brief-svg .b-txt { fill: var(--muted); font-size: 11px; }
.brief-svg .b-txt.key { fill: var(--accent-2); }
.brief-svg .b-tick { stroke: var(--hair); stroke-width: 1; }
.brief-svg .b-cursor { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; }
.brief-svg .b-bar { opacity: .85; cursor: pointer; }
.brief-svg .b-bar:hover { opacity: 1; }
.brief-svg .b-dens { opacity: .55; pointer-events: none; }
.brief-svg .b-bar.dim { opacity: .32; }
.brief-svg .b-bar.b-red { fill: var(--danger); }
.brief-svg .b-bar.b-orange { fill: var(--wx-l2); }
.brief-svg .b-bar.b-yellow { fill: var(--accent-2); }
.brief-svg .b-bar.b-green { fill: var(--info); }
.brief-svg .b-land { fill: var(--card-2); stroke: var(--line); stroke-width: .8; }
.brief-svg .b-border { fill: none; stroke: var(--line); stroke-width: .6; stroke-opacity: .7; }
.brief-svg .b-area { fill-opacity: .16; stroke-width: 1.1; cursor: pointer; }
.brief-svg .b-area:hover { fill-opacity: .3; }
.brief-svg .b-area.faint { fill-opacity: .05; stroke-opacity: .35; }
.brief-svg .b-area.b-red { fill: var(--danger); stroke: var(--danger); }
.brief-svg .b-area.b-orange { fill: var(--wx-l2); stroke: var(--wx-l2); }
.brief-svg .b-area.b-yellow { fill: var(--accent-2); stroke: var(--accent-2); }
.brief-svg .b-area.b-green { fill: var(--info); stroke: var(--info); }
.brief-svg .b-route { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brief-svg .b-wp { fill: var(--accent-2); stroke: var(--bg); stroke-width: 1.4; }
.brief-svg .b-start { fill: var(--ink); }
.brief-svg .b-plane { fill: #fff; stroke: rgba(0, 0, 0, .6); stroke-width: .6; paint-order: stroke; }
.brief-svg .b-plane-t { fill: var(--ink); font-size: 13px; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.brief-range { width: 100%; margin-top: 8px; accent-color: var(--accent); }
.brief-readout { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: calc(var(--fs) * .86); color: var(--muted); }
.brief-readout .b-cur { color: var(--ink); }
.brief-readout .b-act { color: var(--accent-2); }

/* ---------- 12 分钟化学氧禁飞警告 ---------- */
.card.nofly { border-left: 3px solid var(--danger); box-shadow: inset 3px 0 18px -12px var(--danger), inset 0 1px 0 var(--sheen); }
.card.nofly .card-head .tag.hot {
  padding: 1px 7px; border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent);
  border-radius: 999px; font-size: calc(var(--fs) * .72); color: var(--danger); font-weight: 700; white-space: nowrap;
}
.nofly-note { margin: 6px 0 8px; }
.nofly-list { margin: 0; padding-left: 18px; font-size: calc(var(--fs) * .86); }
.nofly-list li { margin: 3px 0; }
.nofly-list b { color: var(--danger); font-weight: 650; }
.nofly-suspect { margin: 10px 0 6px; color: var(--accent-2); font-weight: 650; }
.nofly-list-suspect b { color: var(--accent-2); }

/* ---------- 移动端 ---------- */
@media (max-width: 420px) {
  main { padding: 12px 10px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .card { border-radius: 20px; padding: 14px; }
}

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

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: var(--card); }
  .sheet { background: rgba(3, 6, 11, .78); }
}
