/* ============================================================
   气象观测手记 · 前台样式  (Meridian 淡橙设计语言)
   ============================================================ */

/* ===== 设计令牌 ===== */
:root {
  --bg: #FAF7F2;
  --fg: #1C1A17;
  --primary: #C0512F;          /* 赭橙 */
  --primary-soft: #E9A98F;
  --accent: #2F5B4F;           /* 松绿 */
  --accent-soft: #7FA79B;
  --surface: #FFFFFF;
  --surface-2: #F3EDE3;        /* 羊皮纸 */
  --muted: #8A817A;
  --border: rgba(28, 26, 23, .09);
  --border-strong: rgba(28, 26, 23, .16);
  --shadow-sm: 0 1px 3px rgba(28,26,23,.05);
  --shadow-md: 0 6px 24px rgba(28,26,23,.08);
  --shadow-lg: 0 16px 48px rgba(28,26,23,.12);
  --radius: 12px;
  --radius-lg: 18px;
  --font-display: 'Noto Serif SC', 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --max-w: 1160px;
  --header-h: 66px;
}
[data-theme="dark"] {
  --bg: #1A1714;
  --fg: #EDE8E0;
  --primary: #D4714F;
  --primary-soft: #B05B3D;
  --accent: #5E9B8A;
  --accent-soft: #3F6E60;
  --surface: #242019;
  --surface-2: #2B2620;
  --muted: #9B938A;
  --border: rgba(237,232,224,.10);
  --border-strong: rgba(237,232,224,.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 6px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.45);
}

/* ===== 重置与基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
  overflow-x: hidden;
}
/* 环境底纹：柔和的暖色渐变光晕 */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1000px 520px at 88% -8%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 62%),
    radial-gradient(900px 560px at -8% 32%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%);
}
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.22; letter-spacing: -.01em; }
a { color: var(--primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
img, svg, iframe { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ===== 通用元件 ===== */
.kicker {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--accent); opacity: .6; }
.chip {
  display: inline-block; font-size: .66rem; font-weight: 600; letter-spacing: .05em;
  padding: 3px 10px; border-radius: 100px; vertical-align: 2px;
  background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary);
}
.chip.green { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.chip.gray  { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border: none; border-radius: var(--radius);
  padding: 12px 24px; font-size: .9rem; font-weight: 600; letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
}
.btn-primary { background: var(--primary); color: #FFF7F0; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 32%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 40%, transparent); color: #FFF7F0; }
.btn-ghost {
  background: transparent; color: var(--fg); border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: .8rem; border-radius: 9px; }

/* 滚动揭示 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* 顶部滚动进度条 */
#progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .1s linear; }

/* ===== 页头 ===== */
.site-header {
  position: sticky; top: 0; z-index: 120; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--fg); }
.brand:hover { color: var(--fg); }
.brand-crest {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.06rem; line-height: 1.1; }
.brand-name em { font-style: normal; color: var(--primary); }
.brand-name small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .58rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-size: .87rem; font-weight: 500; color: var(--muted); padding: 8px 13px; border-radius: 9px;
  transition: color .18s ease, background .18s ease;
}
.main-nav a:hover { color: var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); }
.main-nav a.active { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.main-nav a.nav-admin { color: var(--accent); border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); }

.header-right { display: flex; align-items: center; gap: 12px; }
#sys-clock { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.theme-toggle {
  width: 37px; height: 37px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong); background: transparent; color: var(--fg);
  transition: transform .2s ease, border-color .2s ease, color .2s ease;
}
.theme-toggle:hover { transform: rotate(20deg) scale(1.06); border-color: var(--primary); color: var(--primary); }
.theme-toggle svg { width: 17px; height: 17px; }
.icon-moon { display: block; } .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; } [data-theme="dark"] .icon-sun { display: block; }

/* ===== 英雄区 ===== */
.hero { padding: 78px 0 70px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero-grid.no-live { grid-template-columns: 1fr; }
.hero-grid.no-live .hero-copy { max-width: 60ch; }
.hero-eyebrow { margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.4rem); font-weight: 900; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--primary); position: relative; }
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px; z-index: -1;
  background: color-mix(in srgb, var(--primary) 22%, transparent); border-radius: 3px;
}
.hero-deck { font-size: 1.06rem; color: var(--muted); max-width: 46ch; margin-bottom: 32px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* 英雄区右侧：实时状态卡 */
.live-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 24px 24px 20px; position: relative; overflow: hidden;
}
.live-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); }
.live-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.live-card-head h3 { font-size: .95rem; font-weight: 700; }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: .68rem;
  color: var(--accent); font-weight: 600; letter-spacing: .08em; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.live-dot i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: .5; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.5); opacity: .7; } 80% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }
.live-rows { display: flex; flex-direction: column; gap: 0; }
.live-row { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 0;
  border-bottom: 1px dashed var(--border); font-size: .84rem; }
.live-row:last-child { border-bottom: none; }
.live-row .k { color: var(--muted); }
.live-row .v { font-family: var(--font-mono); font-weight: 600; color: var(--fg); font-size: .82rem; }
.live-row .v.hl { color: var(--primary); }
.live-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.metric { background: var(--surface-2); border-radius: 10px; padding: 12px 8px; text-align: center; }
.metric b { display: block; font-family: var(--font-mono); font-size: 1.05rem; color: var(--accent); font-weight: 600; }
.metric span { font-size: .64rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ===== 板块通用 ===== */
.panel-section { padding: 76px 0; position: relative; }
.panel-section.alt { background: color-mix(in srgb, var(--surface-2) 55%, transparent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 900; margin: 12px 0 10px; }
.section-desc { color: var(--muted); max-width: 56ch; font-size: .98rem; }

/* ===== 雷达外推 ===== */
.radar-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 18px; }
.radar-pane {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s ease, transform .25s ease;
}
.radar-pane:hover { box-shadow: var(--shadow-md); }
.radar-pane .pane-cap {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 18px;
  border-bottom: 1px solid var(--border); font-size: .78rem; font-weight: 600;
}
.radar-pane .pane-cap .tag { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.radar-pane .pane-cap .tag.fc { color: var(--primary); }
.radar-pane .pane-cap .tag.ob { color: var(--accent); }
.viewer-radar { background: #FBFAF7; min-height: 320px; display: flex; align-items: center; justify-content: center; padding: 10px; }
[data-theme="dark"] .viewer-radar { background: #201C17; }
.viewer-radar img { width: 100%; height: auto; border-radius: 8px; }
.viewer-empty { color: var(--muted); font-size: .9rem; padding: 40px 0; }

.radar-thumbs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.radar-thumb {
  flex: 1 1 110px; max-width: 150px; background: var(--surface); border: 2px solid var(--border);
  border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.radar-thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.radar-thumb.active { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.radar-thumb img { width: 100%; height: 74px; object-fit: cover; }
.radar-thumb .t-label { font-family: var(--font-mono); font-size: .66rem; text-align: center; padding: 5px 2px; color: var(--muted); }
.radar-thumb.active .t-label { color: var(--primary); font-weight: 600; }

.radar-status {
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 9px; padding: 11px 16px;
}

/* ===== 公报 / 研究：卡片网格 ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.entry-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; cursor: pointer;
}
.entry-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.entry-cover { height: 150px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.entry-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.entry-card:hover .entry-cover img { transform: scale(1.05); }
.entry-cover .no-cover { color: var(--muted); font-size: 2rem; }
.entry-cover .pdf-badge {
  position: absolute; top: 10px; right: 10px; background: var(--primary); color: #fff; font-size: .64rem;
  font-weight: 700; padding: 4px 10px; border-radius: 100px; letter-spacing: .05em;
}
.entry-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.entry-body h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.4; }
.entry-meta { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.entry-excerpt { font-size: .86rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-more { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.entry-more::after { content: "→"; transition: transform .2s ease; }
.entry-card:hover .entry-more::after { transform: translateX(4px); }

/* 研究列表（紧凑行式） */
.research-list { display: flex; flex-direction: column; gap: 14px; }
.research-item {
  display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.research-item:hover { transform: translateX(6px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.research-item .r-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)); flex-shrink: 0; }
.research-item h3 { font-size: .98rem; font-weight: 700; }
.research-item .r-meta { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-top: 3px; }
.research-item .r-go { margin-left: auto; color: var(--accent); font-size: 1.1rem; transition: transform .2s ease; }
.research-item:hover .r-go { transform: translateX(4px); }

/* ===== 详情页（列表↔详情 切换） ===== */
.detail-view { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.detail-back { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 100px; padding: 8px 18px; margin-bottom: 26px; background: var(--surface);
  transition: color .2s ease, border-color .2s ease, transform .2s ease; }
.detail-back:hover { color: var(--primary); border-color: var(--primary); transform: translateX(-3px); }
.article-shell {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); max-width: 820px; margin: 0 auto; padding: 46px 52px 52px;
}
.article-shell .a-kicker { text-align: center; margin-bottom: 14px; }
.article-shell h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 900; margin-bottom: 12px; }
.article-date { text-align: center; font-family: var(--font-mono); font-size: .76rem; color: var(--muted);
  padding-bottom: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-content { font-size: .97rem; line-height: 1.9; color: color-mix(in srgb, var(--fg) 88%, var(--muted)); }
.article-content .inline-img { margin: 26px auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.article-content .fig-cap { text-align: center; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-top: -16px; margin-bottom: 26px; }
.article-content .pdf-embed { margin: 28px 0; }
.article-content .pdf-embed h6 { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.pdf-viewer { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: var(--radius); background: #525659; }
.article-content .pdf-open { display: inline-block; margin-top: 8px; font-size: .8rem; font-weight: 600; }

/* 空状态 */
.empty-state { text-align: center; padding: 64px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 14px; }
.empty-state p { font-size: .92rem; }

/* ===== 云状识别 ===== */
.cloud-wrap { max-width: 760px; margin: 0 auto; }
.cloud-notice {
  display: flex; align-items: center; gap: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); border-radius: var(--radius);
  padding: 13px 18px; margin-bottom: 26px; font-size: .87rem; color: var(--accent);
}
.cloud-notice .n-ic { font-size: 1.05rem; }
.upload-area {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface);
  padding: 52px 24px; text-align: center; cursor: pointer; transition: border-color .25s ease, background .25s ease, transform .2s ease;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); transform: scale(1.01); }
.upload-icon { font-size: 2.6rem; margin-bottom: 14px; animation: float 3.2s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.upload-tip { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.upload-sub-tip { font-size: .8rem; color: var(--muted); }
#preview-container { display: none; margin: 22px auto 0; max-width: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
#image-preview { width: 100%; height: auto; }

.loading-box { display: none; align-items: center; justify-content: center; gap: 14px; margin: 26px auto 0; color: var(--muted); font-size: .88rem; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.result-box {
  display: none; margin: 26px auto 0; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-md);
  animation: fadeUp .4s ease both;
}
.result-box.error-style { border-left-color: #C0392B; }
.result-header { font-size: 1rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.result-header #cloud-name-target { color: var(--primary); font-family: var(--font-display); font-size: 1.15rem; }
.result-box.error-style #cloud-name-target { color: #C0392B; }
.confidence-container { display: none; height: 8px; background: var(--surface-2); border-radius: 100px; overflow: hidden; margin-bottom: 14px; }
.confidence-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 100px; transition: width 1s cubic-bezier(.2,.7,.3,1); }
.confidence-bar.low-confidence { background: #C0392B; }
.result-intro { font-size: .88rem; color: var(--muted); line-height: 1.75; }

/* ===== 页脚 ===== */
footer.site-footer { border-top: 1px solid var(--border); padding: 52px 0 40px; margin-top: 20px; }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 36px; }
.footer-brand p { font-size: .85rem; color: var(--muted); margin-top: 10px; max-width: 34ch; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer-col a { display: block; font-size: .87rem; color: var(--fg); opacity: .82; margin-bottom: 9px; }
.footer-col a:hover { opacity: 1; color: var(--primary); }
.footer-copy { font-size: .74rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copy .mono { font-family: var(--font-mono); }

/* ===== 公告弹窗 ===== */
#popOverlay { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--fg) 40%, transparent); backdrop-filter: blur(4px); padding: 20px; }
.pop-card { background: var(--surface); border-radius: var(--radius-lg); max-width: 420px; width: 100%; overflow: hidden;
  box-shadow: var(--shadow-lg); animation: popIn .35s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes popIn { from { opacity: 0; transform: scale(.9) translateY(16px); } to { opacity: 1; transform: none; } }
.pop-card-titlebar { background: var(--primary); color: #FFF7F0; font-weight: 700; font-size: .85rem; padding: 12px 20px; letter-spacing: .04em; }
.pop-img { height: 180px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.pop-body { padding: 26px 26px 28px; text-align: center; }
.pop-body h5 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.pop-body p { font-size: .86rem; color: var(--muted); margin-bottom: 20px; }

/* ===== AI 聊天挂件 ===== */
#chat-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 250; width: 56px; height: 56px; border-radius: 50%;
  border: none; background: var(--primary); color: #fff; font-size: 1.45rem; display: grid; place-items: center;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 45%, transparent);
  transition: transform .2s ease, box-shadow .2s ease;
}
#chat-bubble:hover { transform: scale(1.08) rotate(-6deg); }
#chat-bubble .pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary); animation: pulse 2s ease-out infinite; }
#chat-bubble.hidden { display: none; }
#chat-panel {
  position: fixed; right: 24px; bottom: 92px; z-index: 250; width: 340px; max-width: calc(100vw - 40px);
  height: 470px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(18px) scale(.97); pointer-events: none;
  transition: opacity .28s ease, transform .28s cubic-bezier(.2,.8,.3,1.1);
}
#chat-panel.open { opacity: 1; transform: none; pointer-events: auto; }
#chat-panel-header { display: flex; align-items: center; gap: 11px; padding: 13px 16px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.chat-avatar { font-size: 1.35rem; }
.chat-title h4 { font-size: .9rem; font-weight: 700; }
.chat-title small { font-family: var(--font-mono); font-size: .62rem; color: var(--muted); }
.chat-close { margin-left: auto; border: none; background: none; color: var(--muted); font-size: 1rem; width: 28px; height: 28px; border-radius: 7px; }
.chat-close:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }
#chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-welcome { text-align: center; padding: 24px 8px; }
.chat-welcome .welcome-icon { font-size: 2.2rem; margin-bottom: 10px; }
.chat-welcome h5 { font-size: .98rem; font-weight: 700; margin-bottom: 6px; }
.chat-welcome p { font-size: .78rem; color: var(--muted); margin-bottom: 16px; }
.chat-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-quick-btn { border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg); font-size: .74rem;
  padding: 7px 12px; border-radius: 100px; transition: border-color .2s ease, color .2s ease, transform .15s ease; }
.chat-quick-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.chat-msg { max-width: 84%; padding: 10px 14px; border-radius: 14px; font-size: .84rem; line-height: 1.55; word-break: break-word; white-space: pre-wrap; }
.chat-msg.user { align-self: flex-end; background: var(--primary); color: #FFF7F0; border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: var(--surface-2); color: var(--fg); border-bottom-left-radius: 4px; }
.chat-msg.error { align-self: flex-start; background: color-mix(in srgb, #C0392B 12%, var(--surface)); color: #C0392B; }
.chat-thinking { align-self: flex-start; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; padding: 8px 12px; }
.chat-thinking .dots { display: inline-flex; gap: 4px; }
.chat-thinking .dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.chat-thinking .dots span:nth-child(2) { animation-delay: .2s; }
.chat-thinking .dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
.typing-cursor { display: inline-block; width: 7px; height: 14px; background: var(--primary); margin-left: 2px; animation: blink 1s infinite; vertical-align: -2px; }
#chat-input-area { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
#chat-input { flex: 1; resize: none; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 12px;
  font-family: inherit; font-size: .84rem; background: var(--bg); color: var(--fg); max-height: 100px; }
#chat-input:focus { outline: none; border-color: var(--primary); }
#chat-send { width: 40px; border: none; border-radius: 10px; background: var(--primary); color: #fff; font-size: 1rem; transition: opacity .2s ease; }
#chat-send:disabled { opacity: .45; }

/* ===== 响应式 ===== */
@media (max-width: 1023px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .live-card { max-width: 480px; }
  .radar-stage { grid-template-columns: 1fr; }
  #sys-clock { display: none; }
}
@media (max-width: 760px) {
  .main-nav { display: none; } /* 移动端用底部锚点/简化导航 */
  .mobile-nav { display: flex; }
  .panel-section { padding: 54px 0; }
  .article-shell { padding: 32px 22px 38px; }
  .hero { padding: 52px 0 46px; }
}
@media (min-width: 761px) { .mobile-nav { display: none; } }
.mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 150; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--border); justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
.mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .62rem; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.mobile-nav a .mi { font-size: 1.15rem; }
.mobile-nav a.active { color: var(--primary); }

/* 触屏设备：关闭页头毛玻璃（修复移动端 WebKit 在 sticky+backdrop-filter 下吞掉子元素点击，导致主题切换失灵）*/
@media (hover: none) and (pointer: coarse) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 97%, transparent); }
}
/* 消除移动端 300ms 点击延迟 / 双击缩放干扰 */
a, button, [onclick] { touch-action: manipulation; }
