/* =============================================
   TaihuGuard — 太湖水质智能预警系统 V3
   指挥中心级 · 权威可信 · 移动端适配
   ============================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root, [data-theme="dark"] {
    /* 升级: 更深的蓝基调 + 紫色辅助 */
    --bg-primary: #05070e;
    --bg-secondary: #0a0f1c;
    --bg-card: #0f1524;
    --bg-card-hover: #151c33;
    --border-color: #1a2238;
    --border-bright: #2a3554;
    --text-primary: #f1f5f9;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;
    --accent: #22d3ee;
    --accent-secondary: #a855f7;
    --accent-tertiary: #f97316;
    --accent-dim: rgba(34, 211, 238, 0.08);
    --accent-glow: rgba(34, 211, 238, 0.25);
    --accent-grad: linear-gradient(135deg, #22d3ee 0%, #a855f7 100%);
    --accent-grad-soft: linear-gradient(135deg, rgba(34,211,238,0.18) 0%, rgba(168,85,247,0.18) 100%);

    --wq-1: #22c55e; --wq-2: #84cc16; --wq-3: #eab308;
    --wq-4: #f97316; --wq-5: #ef4444; --wq-6: #991b1b;
    --alert-none: #22c55e; --alert-low: #eab308;
    --alert-mid: #f97316; --alert-high: #ef4444;

    --glass-bg: rgba(15, 21, 36, 0.78);
    --glass-border: rgba(40, 52, 82, 0.7);
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.35), 0 6px 30px rgba(0,0,0,0.22);
    --shadow-glow: 0 0 28px rgba(34, 211, 238, 0.1), 0 0 60px rgba(168, 85, 247, 0.06);
}

/* ==================== 浅色主题 ==================== */
[data-theme="light"] {
    --bg-primary: #f4f7fb;
    --bg-secondary: #eef2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --border-bright: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #0284c7;
    --accent-secondary: #0369a1;
    --accent-dim: rgba(2, 132, 199, 0.08);
    --accent-glow: rgba(2, 132, 199, 0.18);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(226, 232, 240, 0.9);
    --shadow-card: 0 1px 3px rgba(15,23,42,0.06), 0 4px 18px rgba(15,23,42,0.05);
    --shadow-glow: 0 0 18px rgba(2, 132, 199, 0.05);
}

[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(2, 132, 199, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(2, 132, 199, 0.04) 1px, transparent 1px);
}
[data-theme="light"] body::after {
    background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(15,23,42,0.08) 100%);
}
[data-theme="light"] .stat-value {
    background: linear-gradient(135deg, #0f172a, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
}
[data-theme="light"] .map-container::after { display: none; }
[data-theme="light"] .station-marker { border-color: rgba(15, 23, 42, 0.15); }
[data-theme="light"] .mapboxgl-popup-content {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    box-shadow: 0 8px 28px rgba(15,23,42,0.15) !important;
}
[data-theme="light"] .mapboxgl-popup-tip { border-top-color: #ffffff !important; }
[data-theme="light"] .header { background: rgba(255, 255, 255, 0.88); }
[data-theme="light"] .stats-bar { background: rgba(255, 255, 255, 0.7); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: inline !important; }
[data-theme="light"] .smart-summary {
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.04), rgba(2, 132, 199, 0.08), rgba(2, 132, 199, 0.04));
    border-bottom: 1px solid rgba(2, 132, 199, 0.15);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI',
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* — 网格背景 — */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
}

/* — 暗角 — */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(0,0,0,0.5) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== Header 升级 ==================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 68px;
    background:
        radial-gradient(ellipse at 20% 100%, rgba(34,211,238,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(168,85,247,0.08) 0%, transparent 60%),
        rgba(10, 15, 28, 0.92);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}

.header-wave {
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    width: 100%; height: 60px;
    pointer-events: none;
    opacity: 0.7;
}

/* 渐变底部光带 */
.header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--accent) 30%, var(--accent-secondary) 70%, transparent 95%);
    opacity: 0.6;
}

.header-left { display: flex; align-items: center; position: relative; z-index: 1; }
.header-right { position: relative; z-index: 1; }

.logo { display: flex; align-items: center; gap: 14px; }

.logo-mark {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 30%, rgba(34,211,238,0.12) 0%, transparent 60%),
        rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2), inset 0 0 10px rgba(168, 85, 247, 0.08);
    animation: logoBreath 4s ease-in-out infinite;
}
@keyframes logoBreath {
    0%, 100% { box-shadow: 0 0 20px rgba(34, 211, 238, 0.2), inset 0 0 10px rgba(168, 85, 247, 0.08); }
    50%      { box-shadow: 0 0 28px rgba(34, 211, 238, 0.35), inset 0 0 14px rgba(168, 85, 247, 0.15); }
}
.logo-icon {
    width: 34px; height: 34px;
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.logo-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.1; }
.logo h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.15;
    text-shadow: 0 0 18px rgba(34, 211, 238, 0.3);
}

.subtitle {
    font-size: 10.5px;
    color: var(--text-muted);
    white-space: nowrap;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-transform: uppercase;
}

.header-right { display: flex; align-items: center; gap: 16px; }

/* 顶部小图标按钮（主题/语言） */
.icon-btn {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
    padding: 0;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.3px;
}
.icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}
.icon-btn svg { display: block; }

/* 对比按钮 */
.compare-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.compare-btn:hover { border-color: var(--accent); color: var(--accent); }
.compare-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

/* 导出下拉 */
.export-dropdown {
    position: relative;
}
.export-dropdown-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 6px;
    width: 30px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.export-dropdown-btn:hover { border-color: var(--accent); color: var(--accent); }
.export-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 132px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    padding: 4px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.15s;
}
.export-menu.open {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.export-menu button {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 7px 12px;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.15s;
}
.export-menu button:hover { background: var(--accent-dim); color: var(--accent); }

/* About 按钮 */
.about-btn {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
}
.about-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-dim);
}

/* 状态胶囊 */
.status-indicator {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    letter-spacing: 0.3px;
}

.status-indicator.demo-mode {
    background: rgba(249, 115, 22, 0.08);
    border-color: rgba(249, 115, 22, 0.2);
}
.status-indicator.demo-mode .status-text { color: var(--alert-mid); }
.status-indicator.demo-mode .status-dot { background: var(--alert-mid); }
.status-indicator.demo-mode .status-dot::before,
.status-indicator.demo-mode .status-dot::after { background: var(--alert-mid); }

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--alert-none);
    position: relative;
    flex-shrink: 0;
}
.status-dot::before, .status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--alert-none);
    opacity: 0;
    animation: ripple 2.4s ease-out infinite;
}
.status-dot::after { animation-delay: 1s; }

@keyframes ripple {
    0% { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* 地图标记脉冲（蓝藻预警站点） */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.status-text { color: var(--alert-none); }
.update-time { font-size: 11px; color: var(--text-muted); }

/* ==================== Data Notice Banner ==================== */
.data-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: rgba(249, 115, 22, 0.08);
    border-bottom: 1px solid rgba(249, 115, 22, 0.2);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
.data-notice strong { color: var(--alert-mid); font-weight: 700; }
.data-notice-icon { font-size: 16px; color: var(--alert-mid); flex-shrink: 0; }
.data-notice-close {
    background: none; border: none;
    color: var(--text-muted); font-size: 18px;
    cursor: pointer; padding: 0 4px; margin-left: auto;
    flex-shrink: 0; line-height: 1;
}
.data-notice-close:hover { color: var(--text-primary); }

/* ==================== Stats Bar — 升级为数据带 ==================== */
.stats-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 0;
    padding: 10px 28px;
    background:
        linear-gradient(180deg, rgba(10, 15, 28, 0.55) 0%, rgba(10, 15, 28, 0.85) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}
.stats-bar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-secondary), transparent);
    opacity: 0.35;
}

.stat-item {
    display: flex; align-items: baseline; gap: 7px;
    padding: 4px 22px;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.04);
}
.stat-item:last-child { border-right: none; }
.stat-icon {
    font-size: 13px;
    color: var(--accent);
    opacity: 0.7;
    margin-right: 1px;
    filter: drop-shadow(0 0 4px var(--accent-glow));
}
.stat-value {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* ==================== Smart Summary — 升级 ==================== */
.smart-summary {
    position: relative;
    z-index: 1;
    padding: 12px 28px;
    background: linear-gradient(90deg,
        rgba(34, 211, 238, 0.05) 0%,
        rgba(34, 211, 238, 0.1) 40%,
        rgba(168, 85, 247, 0.08) 70%,
        rgba(168, 85, 247, 0.05) 100%);
    border-bottom: 1px solid rgba(34, 211, 238, 0.2);
    overflow: hidden;
}
.smart-summary::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.04) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: summarySweep 8s ease-in-out infinite;
    pointer-events: none;
}
@keyframes summarySweep {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}
.summary-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.summary-icon {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 50%;
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
    animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(0, 212, 255, 0); }
}
.summary-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.summary-text strong { color: var(--text-primary); font-weight: 700; }
.summary-text .sum-up    { color: var(--alert-high); font-weight: 700; }
.summary-text .sum-down  { color: var(--alert-none); font-weight: 700; }
.summary-text .sum-warn  { color: var(--alert-mid); font-weight: 700; }
.summary-text .sum-stable{ color: var(--accent); font-weight: 700; }

.stat-item {
    display: flex; align-items: baseline; gap: 6px;
    font-size: 13px;
}
.stat-icon { font-size: 14px; opacity: 0.5; margin-right: 2px; }
.stat-label { color: var(--text-muted); font-size: 12px; }
.stat-value {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Main Content ==================== */
.main-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

/* ==================== Panel 通用 — 升级 ==================== */
.panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-card);
    animation: panelFadeIn 0.6s ease-out both;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.panel:hover {
    border-color: rgba(34, 211, 238, 0.28);
    box-shadow: var(--shadow-card), 0 0 28px rgba(34, 211, 238, 0.08);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 10%, var(--accent-glow) 50%, transparent 90%);
    z-index: 1;
}

/* 强调面板（如 health-hero）使用双色渐变顶条 */
.health-hero::before,
.alert-panel::before {
    background: var(--accent-grad) !important;
    height: 2px !important;
    opacity: 0.85;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.top-section .side-panel > :nth-child(1) { animation-delay: 0.05s; }
.top-section .side-panel > :nth-child(2) { animation-delay: 0.1s; }
.middle-section .panel { animation-delay: 0.15s; }
.middle-section .mini-panel:nth-child(1) { animation-delay: 0.2s; }
.middle-section .mini-panel:nth-child(2) { animation-delay: 0.25s; }
.bottom-section .panel:nth-child(1) { animation-delay: 0.3s; }
.bottom-section .panel:nth-child(2) { animation-delay: 0.35s; }
.bottom-section .panel:nth-child(3) { animation-delay: 0.4s; }

.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
}
.panel-header h2 {
    font-size: 13px; font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.badge {
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 11px; font-weight: 700;
    padding: 2px 9px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

/* ==================== Top Section ==================== */
.top-section {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 18px;
    min-height: 620px;
}

/* ---------- Map ---------- */
.map-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    min-height: 620px;
}

/* 简化 HUD: 仅保留顶部 1px 渐变条 + 右下角极简标注 */
.map-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-grad);
    opacity: 0.55;
    z-index: 3;
    pointer-events: none;
}
.map-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(34,211,238,0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 2;
}

/* 保留结构类名但隐藏（兼容旧 HTML） */
.map-hud-corner-tr, .map-hud-corner-bl, .map-hud-corner-br { display: none; }

.map { width: 100%; height: 100%; }

.map-legend {
    position: absolute;
    bottom: 16px; left: 16px;
    background: rgba(10, 15, 28, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 10px 14px;
    z-index: 4;
    box-shadow: 0 4px 18px rgba(0,0,0,0.35);
}
.legend-title { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.legend-items { display: flex; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-secondary); }
.legend-color { width: 10px; height: 10px; border-radius: 2px; }

.map-controls { position: absolute; top: 16px; right: 16px; z-index: 4; }

.param-select {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 7px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.param-select:focus { border-color: var(--accent); }
.param-select option { background: var(--bg-card); color: var(--text-primary); }
[data-theme="light"] .param-select {
    background: rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .station-search { background: rgba(255, 255, 255, 0.95); }

/* ---------- Side Panel ---------- */
.side-panel { display: flex; flex-direction: column; gap: 14px; }

/* ==================== 健康指数 Hero Card ==================== */
.health-hero {
    padding: 16px 18px;
    background: linear-gradient(135deg,
        rgba(34, 211, 238, 0.06) 0%,
        rgba(15, 21, 36, 0.92) 40%,
        rgba(168, 85, 247, 0.08) 100%);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    min-height: 240px;
}
.health-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-grad);
    opacity: 0.8;
}
.health-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 100% 0%, rgba(168,85,247,0.08) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(34,211,238,0.06) 0%, transparent 50%);
    pointer-events: none;
}
.health-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    margin-bottom: 4px;
}
.health-hero-eyebrow {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.health-hero-title {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.7;
    text-transform: uppercase;
}
.health-hero-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid transparent;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);
    letter-spacing: 0.3px;
    transition: all 0.4s;
}
.health-hero-body {
    display: grid;
    grid-template-columns: 1fr 130px;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.health-gauge-canvas {
    width: 100%;
    height: 170px;
}
.health-hero-metrics {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}
.hhm-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    transition: all 0.2s;
}
.hhm-row:hover { border-color: var(--border-bright); background: rgba(34, 211, 238, 0.04); }
.hhm-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}
.hhm-value {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    white-space: nowrap;
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.hhm-value small {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}
.hhm-trend.up   { color: var(--alert-high); }
.hhm-trend.down { color: var(--alert-none); }
.hhm-trend.stable { color: var(--text-secondary); }

/* ==================== Metric Strip (新版指标条) ==================== */
.metric-strip {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.metric-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}
.metric-strip-hint {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}
.metric-row {
    display: grid;
    grid-template-columns: 8px 1fr auto auto auto;
    gap: 10px;
    align-items: center;
    padding: 9px 4px;
    border-bottom: 1px dashed rgba(255,255,255,0.04);
    transition: all 0.2s;
    cursor: default;
}
.metric-row:last-child { border-bottom: none; }
.metric-row:hover {
    background: rgba(34, 211, 238, 0.03);
    padding-left: 10px;
    padding-right: 0;
}
.mr-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--c, var(--accent));
    box-shadow: 0 0 6px var(--c, var(--accent));
}
.mr-name {
    font-size: 12.5px;
    color: var(--text-primary);
    font-weight: 600;
}
.mr-unit {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.2px;
}
.mr-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    min-width: 50px;
    text-align: right;
}
.mr-trend {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 12px;
    letter-spacing: 0;
    min-width: 56px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 2px;
    justify-content: center;
}
.mr-trend .arrow { font-size: 11px; font-weight: 900; }
.mr-trend .uncertain { opacity: 0.55; font-size: 9px; margin-left: 1px; }
.mr-trend.up     { background: rgba(239,68,68,0.12);  color: var(--alert-high); }
.mr-trend.down   { background: rgba(34,197,94,0.12);  color: var(--alert-none); }
.mr-trend.stable { background: rgba(148,163,184,0.08); color: var(--text-muted); }

/* ---------- Alert Panel ---------- */
.alert-panel { min-height: 0; }
.alert-list { padding: 6px; overflow-y: auto; max-height: 180px; }

.alert-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    margin-bottom: 3px;
    background: rgba(255, 255, 255, 0.02);
}
.alert-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px var(--accent-dim);
}
.alert-item.alert-high { border-left-color: var(--alert-high); background: rgba(239,68,68,0.05); }
.alert-item.alert-mid  { border-left-color: var(--alert-mid);  background: rgba(249,115,22,0.05); }
.alert-item.alert-low  { border-left-color: var(--alert-low);  background: rgba(234,179,8,0.04); }

.alert-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.alert-info { flex: 1; min-width: 0; }
.alert-station { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-detail { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.alert-level {
    font-size: 11px; font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.alert-level.high { background: rgba(239,68,68,0.12); color: var(--alert-high); }
.alert-level.mid  { background: rgba(249,115,22,0.12); color: var(--alert-mid); }
.alert-level.low  { background: rgba(234,179,8,0.12); color: var(--alert-low); }

.no-alerts { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }

/* ---------- Metric Cards ---------- */
.metrics-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 12px 10px 10px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.metric-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: inset 0 0 0 1px var(--accent), 0 0 20px var(--accent-dim);
}
.metric-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}
.metric-card:hover::after { opacity: 1; }

.metric-label { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap; }
.metric-value {
    font-size: 22px; font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.1;
    white-space: nowrap;
}
.metric-trend { font-size: 11px; margin-top: 5px; font-weight: 600; }
.metric-trend.up   { color: var(--alert-high); }
.metric-trend.down { color: var(--alert-none); }
.metric-trend.stable { color: var(--text-muted); }

/* ==================== Timeline ==================== */
.timeline-section { margin-bottom: 4px; }

.timeline-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    box-shadow: var(--shadow-card);
}

.timeline-bar { display: flex; align-items: center; gap: 14px; }
.timeline-label { color: var(--text-muted); font-size: 11px; white-space: nowrap; min-width: 36px; font-weight: 600; }
.timeline-track { flex: 1; position: relative; height: 36px; }

.timeline-progress {
    position: absolute; top: 10px; left: 0; height: 4px;
    background: linear-gradient(90deg, var(--accent), #0099cc);
    border-radius: 2px; pointer-events: none; z-index: 1; transition: width 0.1s;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}
.timeline-slider {
    position: absolute; top: 0; left: 0; width: 100%; height: 24px;
    -webkit-appearance: none; appearance: none;
    background: transparent; cursor: pointer; z-index: 2;
}
.timeline-slider::-webkit-slider-runnable-track { height: 4px; background: var(--border-color); border-radius: 2px; }
.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}
.timeline-slider::-moz-range-track { height: 4px; background: var(--border-color); border-radius: 2px; border: none; }
.timeline-slider::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.timeline-ticks { position: absolute; top: 18px; left: 0; right: 0; height: 26px; pointer-events: none; }
.tick { position: absolute; width: 1px; height: 4px; background: var(--border-color); }
.tick-now { width: 2px; height: 8px; background: var(--accent); top: -2px; }
.tick-label {
    position: absolute;
    top: 8px;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.tick-label-now {
    color: var(--accent);
    font-weight: 700;
    top: 10px;
}

.timeline-info { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
#timelineDate { color: var(--accent); font-size: 12px; font-weight: 600; }
.timeline-buttons { display: flex; gap: 8px; }
.tl-btn {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    width: 30px; height: 30px;
    border-radius: 6px;
    cursor: pointer; font-size: 12px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.tl-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ==================== Middle Section ==================== */
.middle-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    height: 380px;
}
.chart-panel { height: 100%; display: flex; flex-direction: column; }
.chart-controls { display: flex; align-items: center; gap: 10px; }

/* 站点搜索 + 下拉 合成控件 */
.station-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.station-search {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 6px 0 0 6px;
    padding: 6px 10px;
    font-size: 12px;
    width: 110px;
    outline: none;
    transition: border-color 0.2s, width 0.25s;
}
.station-search:focus { border-color: var(--accent); width: 160px; }
.station-search::placeholder { color: var(--text-muted); }
.station-search-wrap select {
    border-radius: 0 6px 6px 0;
    border-left: none;
    min-width: 140px;
}

.param-tabs { display: flex; gap: 3px; }
.param-tab {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px; font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.param-tab:hover { border-color: var(--accent); color: var(--accent); }
.param-tab.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.chart-container { flex: 1; padding: 8px; min-height: 0; }

/* 分析侧栏 */
.analysis-sidebar { display: flex; flex-direction: column; gap: 16px; }
.mini-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mini-chart-container { flex: 1; min-height: 0; padding: 2px 6px; }

/* ==================== Bottom Section (3 列) ==================== */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    height: 310px;
}
.bottom-panel { height: 100%; display: flex; flex-direction: column; }
.chart-container-sm { flex: 1; min-height: 0; padding: 4px 8px; }
.param-select-sm { padding: 3px 8px; font-size: 11px; }

/* 模型性能面板 */
.model-metrics-body { padding: 10px 16px; overflow-y: auto; flex: 1; }

.metric-row-bar { display: flex; flex-direction: column; gap: 5px; padding: 7px 0; border-bottom: 1px solid var(--border-color); }
.metric-row-bar .metric-row-top { display: flex; justify-content: space-between; font-size: 12px; }
.metric-row-bar .metric-row-top span:first-child { color: var(--text-muted); }
.metric-val { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }

.metric-progress { width: 100%; height: 3px; background: rgba(30,41,59,0.6); border-radius: 2px; overflow: hidden; }
.metric-progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), #0099cc); transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1); }

.model-summary { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-color); }
.model-summary-row { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 0; color: var(--text-muted); }
.model-summary-row span:last-child { color: var(--text-secondary); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==================== Modal ==================== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 720px; max-width: 95vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-close {
    background: none; border: none;
    color: var(--text-muted); font-size: 24px;
    cursor: pointer; padding: 0 4px; line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-chart { height: 250px; margin-top: 16px; }

.station-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.station-info-item { background: var(--bg-secondary); border-radius: 8px; padding: 12px; text-align: center; position: relative; }
.station-info-item .label { font-size: 10px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.station-info-item .value { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.station-info-item .unit { font-size: 10px; color: var(--text-muted); }
.station-info-item.empty .value { color: var(--text-muted); font-size: 16px; }
.station-info-item.empty .empty-hint {
    font-size: 9px; color: var(--text-muted); margin-top: 2px;
    display: block; line-height: 1.3;
    font-style: italic; opacity: 0.75;
}

.modal-info-note {
    margin-top: 14px;
    padding: 10px 12px;
    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.modal-info-note .note-icon { color: var(--alert-mid); flex-shrink: 0; font-weight: 700; }

/* 选中站点高亮环 */
.station-marker.selected {
    box-shadow: 0 0 0 3px var(--accent), 0 0 16px var(--accent) !important;
    transform: scale(1.3);
    z-index: 10;
}

/* 训练历史图容器 */
.training-history-chart {
    height: 220px;
    margin-top: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
}

.popup-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.popup-level { font-size: 11px; padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.popup-params { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; }
.popup-param { display: flex; justify-content: space-between; }
.popup-param .name { color: var(--text-muted); }
.popup-param .val { color: var(--text-primary); font-weight: 500; font-variant-numeric: tabular-nums; }
.popup-bloom { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border-color); font-size: 12px; }

/* ==================== Mapbox Popup ==================== */
.mapboxgl-popup-content {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
    min-width: 220px;
}
.mapboxgl-popup-tip { border-top-color: var(--bg-card) !important; }
.mapboxgl-popup-close-button { color: var(--text-muted) !important; font-size: 18px !important; right: 8px !important; top: 8px !important; }

/* ==================== Loading / Skeleton ==================== */
.loading-placeholder { text-align: center; padding: 30px; color: var(--text-muted); font-size: 13px; }
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 整站初次加载 skeleton — 给值元素加占位 */
.skeleton-bar {
    display: inline-block;
    height: 1em;
    min-width: 32px;
    vertical-align: middle;
    background: linear-gradient(90deg, rgba(148,163,184,0.08) 25%, rgba(148,163,184,0.16) 50%, rgba(148,163,184,0.08) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 4px;
}

/* ==================== 健康指数评分构成条 ==================== */
.health-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
    position: relative;
    z-index: 1;
    cursor: pointer;
}
.hb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    gap: 2px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.hb-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: var(--hb-pct, 0%);
    background: var(--accent-grad);
    opacity: 0.7;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hb-item:hover { background: rgba(34, 211, 238, 0.06); }
.hb-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}
.hb-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
    line-height: 1;
}
.hb-max {
    font-size: 9px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* ==================== 健康指数算法说明 Modal ==================== */
.he-modal-overlay { display: none; }
.he-modal-overlay.active { display: flex; }
.he-modal { width: 560px !important; max-width: 92vw !important; }
.he-breakdown-list { display: flex; flex-direction: column; gap: 12px; }
.he-row {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.he-row-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.he-row-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.he-row-score strong { font-size: 20px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.he-row-max { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.he-row-bar { height: 6px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.he-row-fill { height: 100%; background: var(--accent-grad); border-radius: 3px; transition: width 0.5s; }
.he-row-detail { font-size: 11px; color: var(--text-secondary); }

.he-rule { margin-top: 20px; padding: 14px 16px; background: rgba(34, 211, 238, 0.04); border: 1px solid rgba(34, 211, 238, 0.15); border-radius: 10px; }
.he-rule-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.he-rule ul { list-style: none; padding: 0; margin: 0; }
.he-rule li { font-size: 12px; color: var(--text-secondary); line-height: 1.8; padding: 2px 0; }
.he-rule strong { color: var(--text-primary); }

/* ==================== 趋势 pill 定性标签 ==================== */
.mr-trend.qualitative { font-size: 9.5px; padding: 3px 6px; min-width: 68px; }

/* ==================== 站点侧滑抽屉 ==================== */
.station-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 250;
    opacity: 0; visibility: hidden;
    transition: opacity 0.28s, visibility 0.28s;
    display: flex;
    justify-content: flex-end;
}
.station-drawer-overlay.active { opacity: 1; visibility: visible; }
.station-drawer {
    width: 520px; max-width: 95vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.34, 0.07, 0.28, 0.97);
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 48px rgba(0, 0, 0, 0.4);
}
.station-drawer-overlay.active .station-drawer { transform: translateX(0); }
.station-drawer-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
}
.station-drawer-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.station-drawer-sub {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    font-size: 11.5px; color: var(--text-muted);
}
.sd-pill {
    font-size: 11px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}
.station-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px 24px;
}

/* ==================== 时间轴速度按钮 ==================== */
.tl-speed {
    display: inline-flex;
    gap: 1px;
    padding: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    margin-right: 6px;
}
.tl-speed-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}
.tl-speed-btn:hover { color: var(--text-primary); }
.tl-speed-btn.active {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ==================== 移动端底部选站抽屉 ==================== */
.bottom-sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
    display: flex;
    align-items: flex-end;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.bottom-sheet-overlay.active { opacity: 1; visibility: visible; }
.bottom-sheet {
    width: 100%;
    max-height: 85vh;
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
    border-top: 1px solid var(--border-bright);
    box-shadow: 0 -16px 48px rgba(0,0,0,0.5);
    padding: 8px 0 16px;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.34, 0.07, 0.28, 0.97);
}
.bottom-sheet-overlay.active .bottom-sheet { transform: translateY(0); }
.bottom-sheet-handle {
    width: 40px; height: 4px;
    background: var(--border-bright);
    border-radius: 2px;
    margin: 4px auto 12px;
}
.bottom-sheet-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px 10px;
    border-bottom: 1px solid var(--border-color);
}
.bottom-sheet-header h3 { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.bottom-sheet-close { background: none; border: none; color: var(--text-muted); font-size: 24px; width: 32px; height: 32px; cursor: pointer; }
.bottom-sheet-search {
    margin: 10px 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}
.bottom-sheet-search:focus { border-color: var(--accent); }
.bottom-sheet-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 12px 12px;
    -webkit-overflow-scrolling: touch;
}
.bottom-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}
.bottom-sheet-item:hover, .bottom-sheet-item:active { background: var(--bg-card-hover); }
.bottom-sheet-item.active {
    background: var(--accent-dim);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
}
.bottom-sheet-item .bs-dot {
    width: 10px; height: 10px; border-radius: 50%;
    box-shadow: 0 0 6px currentColor; flex-shrink: 0;
}
.bottom-sheet-item .bs-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bottom-sheet-item .bs-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.bottom-sheet-item .bs-meta { font-size: 11px; color: var(--text-muted); }
.bottom-sheet-item .bs-bloom { color: var(--alert-mid); font-weight: 600; }
.bottom-sheet-item .bs-check { color: var(--accent); font-size: 16px; font-weight: 900; }
.bottom-sheet-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

/* ==================== 模型性能基线徽章 ==================== */
.baseline-badge {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    width: fit-content;
    border: 1px solid rgba(255,255,255,0.05);
}
.baseline-badge .bb-arrow { color: var(--text-muted); font-weight: 600; }
.baseline-badge .bb-arrow.up { color: var(--alert-none); }
.baseline-badge .bb-arrow.down { color: var(--alert-high); }
.baseline-badge .bb-model { color: var(--text-muted); letter-spacing: 0.3px; }
.baseline-badge .bb-pct {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}
.baseline-badge .bb-pct.up { color: var(--alert-none); }
.baseline-badge .bb-pct.down { color: var(--alert-high); }

/* ==================== 底部面板统一视觉（加 icon + 彩色顶条） ==================== */
.bottom-section .panel-header h2 {
    position: relative;
    padding-left: 16px;
}
.bottom-section .panel-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: var(--accent-grad);
    border-radius: 2px;
}
.middle-section .panel-header h2,
.top-section .alert-panel .panel-header h2 {
    position: relative;
    padding-left: 14px;
}
.middle-section .panel-header h2::before,
.top-section .alert-panel .panel-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background: var(--accent-grad);
    border-radius: 2px;
}

/* ==================== 打印 CSS (一键 PDF 报告) ==================== */
@media print {
    @page { size: A4; margin: 10mm; }
    html, body { background: white !important; color: black !important; }
    body::before, body::after, .header-wave { display: none !important; }
    .header, .stats-bar, .smart-summary, .panel, .dashboard-footer {
        background: white !important;
        color: black !important;
        border-color: #cbd5e1 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }
    .header { position: static; height: auto; padding: 10px 0; border-bottom: 2px solid #0f172a !important; }
    .logo h1 { color: #0f172a !important; text-shadow: none !important; }
    .subtitle, .stat-label, .panel-header h2, .mr-name {
        color: #334155 !important;
    }
    .stat-value, .mr-value, .hhm-value, .hb-val { color: #0f172a !important; -webkit-text-fill-color: #0f172a !important; background: none !important; }
    .summary-text { color: #334155 !important; }
    .icon-btn, .intro-btn, .about-btn, .update-time, .status-indicator,
    .compare-btn, .export-dropdown, .chart-controls, .timeline-section,
    .station-search-wrap, #compareStationWrap {
        display: none !important;
    }
    .main-content { padding: 10mm 0 !important; gap: 8mm !important; }
    .top-section, .middle-section { grid-template-columns: 1fr 1fr !important; min-height: auto !important; height: auto !important; page-break-inside: avoid; }
    .bottom-section { grid-template-columns: 1fr 1fr !important; height: auto !important; page-break-inside: avoid; }
    .map-container { height: 100mm !important; min-height: 100mm !important; page-break-inside: avoid; }
    .map-container::before, .map-container::after { display: none !important; }
    .chart-panel, .bottom-panel, .mini-panel { height: auto !important; min-height: 60mm !important; }
    .tl-speed, .tl-btn { display: none !important; }
    /* 打印水印 */
    .dashboard-footer { position: static; padding: 8mm 0 !important; border-top: 1px solid #94a3b8 !important; text-align: center; font-size: 9pt; }
    .hb-item { border: 1px solid #e2e8f0; }
}

/* 截图模式（临时 class，PDF 生成时使用） */
.pdf-export-mode .icon-btn,
.pdf-export-mode .intro-btn,
.pdf-export-mode .about-btn,
.pdf-export-mode .compare-btn,
.pdf-export-mode .export-dropdown,
.pdf-export-mode .chart-controls { visibility: hidden; }

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==================== About Drawer ==================== */
.about-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    opacity: 0; visibility: hidden;
    transition: all 0.3s;
}
.about-drawer-overlay.active { opacity: 1; visibility: visible; }

.about-drawer {
    position: fixed; top: 0; right: 0;
    width: 460px; max-width: 100vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    overflow: hidden;
}
.about-drawer-overlay.active .about-drawer { transform: translateX(0); }

.about-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.about-drawer-header h2 { font-size: 16px; font-weight: 700; }
.about-drawer-close { background: none; border: none; color: var(--text-muted); font-size: 22px; cursor: pointer; padding: 4px; line-height: 1; }
.about-drawer-close:hover { color: var(--text-primary); }
.about-drawer-body { flex: 1; overflow-y: auto; padding: 24px; }

.about-section { margin-bottom: 28px; }
.about-section:last-child { margin-bottom: 0; }
.about-section h3 {
    font-size: 11px; font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.about-section h3::before { content: ''; width: 3px; height: 14px; background: var(--accent); border-radius: 2px; flex-shrink: 0; }
.about-section p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

.pipeline-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pipeline-node { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px; padding: 6px 12px; font-size: 12px; color: var(--text-primary); white-space: nowrap; }
.pipeline-arrow { color: var(--accent); font-size: 14px; flex-shrink: 0; }

.arch-blocks { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.arch-block { background: var(--bg-card); border: 1px solid var(--border-color); border-left: 3px solid var(--accent); border-radius: 6px; padding: 10px 14px; }
.arch-block .arch-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.arch-block .arch-desc { font-size: 11px; color: var(--text-muted); line-height: 1.6; }

.key-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.key-stat { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; text-align: center; }
.key-stat .ks-value { font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.key-stat .ks-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tech-tag { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,212,255,0.15); border-radius: 4px; padding: 3px 10px; font-size: 12px; font-weight: 600; }

/* ==================== Intro Button ==================== */
.intro-btn {
    background: transparent;
    border: 1px solid var(--border-bright);
    color: var(--text-muted);
    width: 34px; height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s;
    padding: 0;
}
.intro-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 12px var(--accent-dim);
}
.intro-btn svg { display: block; }

/* ==================== Intro Drawer Content ==================== */
.intro-param-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
}
.intro-param {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 12px;
}
.intro-param-name { color: var(--text-primary); font-weight: 500; }
.intro-param-unit { color: var(--text-muted); font-size: 11px; }

.intro-sources { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.intro-source {
    display: flex;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}
.intro-source-icon { font-size: 20px; flex-shrink: 0; opacity: 0.6; line-height: 1.2; }
.intro-source-body { flex: 1; }
.intro-source-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.intro-source-desc { font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.intro-source-desc strong { color: var(--text-secondary); }

.intro-bloom-levels { display: flex; flex-direction: column; gap: 6px; }
.intro-bloom-level {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px;
}
.intro-bloom-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.intro-bloom-name { font-weight: 600; color: var(--text-primary); min-width: 48px; }
.intro-bloom-cond { color: var(--text-muted); }

.intro-schedule { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.intro-schedule-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
}
.intro-schedule-freq { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.intro-schedule-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

.intro-features { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.intro-feature {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px;
}
.intro-feature-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 3px; }
.intro-feature-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

.intro-wq-table { margin-top: 4px; }
.intro-wq-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr;
    gap: 8px;
    padding: 7px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.intro-wq-header {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-card);
    border-radius: 4px 4px 0 0;
}

/* ==================== Footer ==================== */
.dashboard-footer {
    padding: 18px 28px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
    background: rgba(12, 18, 33, 0.5);
}
.dashboard-footer a { color: var(--accent); text-decoration: none; }
.footer-sep { margin: 0 10px; opacity: 0.3; }

/* ========================================================================
   RESPONSIVE — 移动端全面优化
   ======================================================================== */

/* ---------- Tablet (<=1200px) ---------- */
@media (max-width: 1200px) {
    .main-content { padding: 16px; gap: 16px; }

    .top-section {
        grid-template-columns: 1fr;
        height: auto;
    }
    .map-container { height: 380px; }

    .middle-section {
        grid-template-columns: 1fr;
        height: auto;
    }
    .chart-panel { min-height: 320px; }
    .analysis-sidebar { flex-direction: row; }
    .analysis-sidebar .mini-panel { min-height: 220px; }

    .bottom-section {
        grid-template-columns: 1fr 1fr;
        height: auto;
    }
    .bottom-panel { min-height: 260px; }
    .bottom-panel:last-child {
        grid-column: 1 / -1;
    }

    .metrics-cards { grid-template-columns: repeat(3, 1fr); }

    .stats-bar { gap: 24px; flex-wrap: wrap; }
    .about-drawer { width: 100%; }
    .station-info-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Mobile (<=768px) ---------- */
@media (max-width: 768px) {
    .header { padding: 0 14px; height: 52px; gap: 8px; }
    .logo h1 { font-size: 15px; letter-spacing: 0 !important; }
    .logo { gap: 8px; }
    .logo-icon { width: 24px; height: 24px; }
    .subtitle { display: none; }
    .header-right { gap: 6px; }
    .update-time { display: none; }
    .about-btn, .intro-btn { width: 32px; height: 32px; font-size: 13px; }
    .status-indicator { padding: 3px 8px; font-size: 10px; gap: 5px; }
    .status-indicator .status-text { font-size: 10px; }

    /* stats-bar: 横向滚动 + snap */
    .stats-bar {
        gap: 0;
        padding: 6px 4px;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }
    .stats-bar::-webkit-scrollbar { display: none; }
    .stat-item {
        flex-shrink: 0;
        font-size: 11px;
        padding: 4px 12px;
        scroll-snap-align: start;
        border-right: 1px solid var(--border-color);
    }
    .stat-item:last-child { border-right: none; }
    .stat-icon { display: none; }
    .stat-value { font-size: 15px; }
    .stat-label { font-size: 10px; }

    /* smart-summary */
    .smart-summary { padding: 8px 14px; }
    .summary-text { font-size: 11.5px; line-height: 1.45; }
    .summary-icon { width: 22px; height: 22px; font-size: 11px; }

    .main-content { padding: 10px; gap: 10px; }

    /* top-section 移动端 */
    .top-section { gap: 10px; min-height: auto; }
    .map-container {
        height: 340px;
        min-height: 340px;
        border-radius: 12px;
    }

    /* 健康指数 Hero 在移动端 */
    .health-hero { padding: 14px 16px; min-height: auto; }
    .health-hero-body { grid-template-columns: 1fr 110px; gap: 8px; }
    .health-gauge-canvas { height: 150px; }
    .hhm-row { padding: 6px 10px; }
    .hhm-value { font-size: 14px; }

    /* 指标条在移动端 */
    .metric-strip { padding: 10px 12px; }
    .metric-strip-header { font-size: 10px; padding-bottom: 6px; }
    .metric-row { grid-template-columns: 6px 1fr auto auto auto; gap: 8px; padding: 8px 2px; }
    .mr-name { font-size: 12px; }
    .mr-unit { font-size: 9px; }
    .mr-value { font-size: 14.5px; min-width: 44px; }
    .mr-trend { font-size: 10px; min-width: 50px; padding: 2px 6px; }
    /* HUD 角装饰在小屏上缩小 */
    .map-container::before,
    .map-hud-corner-tr,
    .map-hud-corner-bl,
    .map-hud-corner-br { width: 24px; height: 24px; opacity: 0.3; }
    /* 扫描线在小屏太干扰，隐藏 */
    .map-container::after { display: none; }

    .map-legend { bottom: 8px; left: 8px; padding: 6px 10px; font-size: 10px; }
    .legend-title { font-size: 9px; margin-bottom: 4px; }
    .legend-items { gap: 8px; flex-wrap: wrap; }
    .legend-item { font-size: 10px; gap: 3px; }
    .legend-color { width: 8px; height: 8px; }
    .map-controls { top: 8px; right: 8px; }
    .param-select { font-size: 12px; padding: 6px 10px; }

    .side-panel { gap: 10px; }
    .alert-list { max-height: 220px; }

    /* 指标卡 2x3 在移动端 */
    .metrics-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }
    .metric-card { padding: 10px 8px 8px; }
    .metric-label { font-size: 10px; line-height: 1.3; }
    .metric-value { font-size: 20px; }
    .metric-trend { font-size: 10px; }

    /* 时间轴: 粘性 + 滑块加大 */
    .timeline-section {
        position: sticky;
        top: 52px;
        z-index: 50;
        margin-left: -10px;
        margin-right: -10px;
    }
    .timeline-panel {
        padding: 10px 14px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        background: rgba(6, 10, 19, 0.96);
        backdrop-filter: blur(16px);
    }
    .timeline-slider::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -8px; }
    .timeline-slider::-moz-range-thumb { width: 20px; height: 20px; }
    .tl-btn { width: 32px; height: 32px; font-size: 13px; }
    .timeline-label { font-size: 10px; min-width: 30px; }

    .middle-section { gap: 10px; }
    .chart-panel { min-height: 320px; }
    .panel-header { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
    .panel-header h2 { font-size: 12px; }
    .chart-controls {
        flex-wrap: wrap;
        gap: 6px;
        width: 100%;
    }
    .station-search-wrap { flex: 1; min-width: 0; }
    .station-search { width: 80px; font-size: 11px; padding: 6px 8px; }
    .station-search:focus { width: 110px; }
    .station-search-wrap select { flex: 1; min-width: 0; width: auto; font-size: 11px; padding: 6px 8px; }
    .param-tabs { flex-wrap: wrap; gap: 3px; width: 100%; }
    .param-tab { padding: 6px 10px; font-size: 11px; flex: 1; min-width: 60px; text-align: center; }

    .analysis-sidebar { flex-direction: column; }
    .analysis-sidebar .mini-panel { min-height: 240px; }

    .bottom-section {
        grid-template-columns: 1fr;
        height: auto;
    }
    .bottom-panel { min-height: 260px; }
    .bottom-panel:last-child { grid-column: auto; }

    .modal { width: 96vw; max-height: 92vh; border-radius: 14px; }
    .modal-header { padding: 14px 18px; }
    .modal-header h2 { font-size: 14px; }
    .modal-close { width: 32px; height: 32px; font-size: 22px; }
    .modal-body { padding: 14px 18px 18px; }
    .station-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .station-info-item { padding: 10px 8px; }
    .station-info-item .value { font-size: 16px; }
    .modal-chart { height: 200px; margin-top: 14px; }

    .dashboard-footer { padding: 14px 16px; font-size: 10px; line-height: 1.6; }
    .footer-sep { margin: 0 6px; display: inline; }
}

/* ---------- Small Mobile (<=480px) ---------- */
@media (max-width: 480px) {
    .header { height: 50px; padding: 0 12px; }
    .logo-icon { width: 22px; height: 22px; }
    .logo h1 {
        font-size: 13px;
        letter-spacing: 0 !important;
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .status-indicator { display: none; }

    .stats-bar { padding: 6px 2px; }
    .stat-item { padding: 4px 10px; font-size: 11px; }
    .stat-value { font-size: 14px; }
    .stat-label { font-size: 10px; }

    .smart-summary { padding: 7px 12px; }
    .summary-inner { gap: 8px; }
    .summary-text { font-size: 11px; }

    .main-content { padding: 8px; gap: 8px; }
    .map-container { height: 280px; }
    .timeline-section { top: 50px; margin-left: -8px; margin-right: -8px; }

    .metrics-cards { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .metric-card { padding: 9px 6px 7px; }
    .metric-value { font-size: 18px; }
    .metric-label { font-size: 9.5px; margin-bottom: 4px; }

    .chart-panel { min-height: 300px; }
    .analysis-sidebar .mini-panel { min-height: 220px; }
    .bottom-panel { min-height: 240px; }

    .modal { border-radius: 12px; }
    .station-info-grid { grid-template-columns: 1fr 1fr; }

    .about-drawer-body { padding: 16px; }
    .about-section { margin-bottom: 20px; }
    .about-section h3 { font-size: 10px; }
    .about-section p { font-size: 12px; line-height: 1.65; }
    .key-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .key-stat .ks-value { font-size: 18px; }
    .intro-param-grid { grid-template-columns: 1fr; }
    .pipeline-flow { flex-direction: column; align-items: stretch; }
    .pipeline-arrow { transform: rotate(90deg); text-align: center; align-self: center; }
    .pipeline-node { text-align: center; }
    .intro-wq-row { grid-template-columns: 56px 1fr 1fr 1fr; font-size: 11px; padding: 6px 8px; }

    .training-history-chart { height: 180px; }
}

/* ---------- Touch device specific ---------- */
@media (hover: none) and (pointer: coarse) {
    .alert-item { padding: 12px; min-height: 44px; }
    .param-tab { min-height: 32px; }
    .tl-btn { min-width: 36px; min-height: 36px; }
    .metric-card:hover { transform: none; }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .status-dot::before, .status-dot::after { animation: none; }
    .panel { animation: none; opacity: 1; }
}
