/* ============================================================
   覆冰监测系统 · 网页版样式
   ⚠️ 本文件由 web/tools/build_css.py 从 miniprogram/ 的 wxss 生成，
      不要直接改这里 —— 改 miniprogram 的 wxss 后重新生成：
          python web/tools/build_css.py
   ============================================================ */

/* ── 浏览器基础重置（小程序 <view>/<text>/<button> 的默认排版等价物） ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }

button {
  font-family: inherit;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button:disabled { cursor: default; }
image, img { display: block; }


/* ════════ 来源: miniprogram/app.wxss ════════ */
/* ═══════════════════════════════════════════
   GLACIAL TERMINAL — Design System
   Aesthetic: cold precision, frost-glass,
   crystalline geometries, midnight-grid.
   ═══════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  --bg-deep:     #0a0e27;   /* midnight void */
  --bg-panel:    #111640;   /* frosted panel */
  --bg-elevated: #181d4a;   /* lifted surface */
  --border:      #1e2460;   /* subtle rule */
  --border-glow: rgba(0,212,255,0.18); /* electric halo */
  --accent:      #00d4ff;   /* electric blue */
  --accent-dim:  #007a99;   /* muted accent */
  --text:        #eef4ff;   /* ice-white primary */
  --text-dim:    #9db3cc;   /* frost-grey secondary */
  --text-muted:  #7d90af;   /* deep-frost tertiary */
  --safe:        #2ed573;   /* clear ice */
  --warn:        #ffa502;   /* rime warning */
  --danger:      #ff4757;   /* glaze alarm */
  --danger-glow: rgba(255,71,87,0.25);
  --font-mono:   "SF Mono", "Menlo", "Consolas", monospace;
  --font-ui:     "PingFang SC", -apple-system, "Helvetica Neue", sans-serif;

  /* ── 结构/装饰变量（主题切换时连同颜色一起覆盖） ── */
  --radius:        1px;                  /* crystalline: sharp edges */
  --panel-shadow:  0 2px 12px rgba(0,0,0,0.4),
                   inset 0 0.5px 0 rgba(255,255,255,0.03);
  --tile-shadow:   0 1px 6px rgba(0,0,0,0.3);
  --grid-line:     rgba(0,212,255,0.03);  /* ambient grid */
  --row-line:      rgba(255,255,255,0.04);/* list separator */
  --fill-dark:     rgba(0,0,0,0.2);       /* recessed fill */
  --fill-dark-2:   rgba(0,0,0,0.25);      /* deeper recessed fill */
  --accent-wash:   rgba(0,212,255,0.06);  /* accent tinted fill */
  --accent-bd:     rgba(0,212,255,0.3);
  --btn-bg:        rgba(0,120,212,0.15);  /* ghost button fill */
  --btn-bd:        rgba(0,120,212,0.4);
  --sc-normal-bg:  linear-gradient(170deg, #0d1a1a, #111640);
  --sc-warning-bg: linear-gradient(170deg, #1a160d, #111640);
  --sc-danger-bg:  linear-gradient(170deg, #1a0d0f, #111640);
  --sc-bar-track:  rgba(255,255,255,0.06);
  --badge-safe-bg:   rgba(46,213,115,0.12);
  --badge-warn-bg:   rgba(255,165,2,0.12);
  --badge-danger-bg: rgba(255,71,87,0.12);
  --badge-safe-bd:   rgba(46,213,115,0.25);
  --badge-warn-bd:   rgba(255,165,2,0.25);
  --badge-danger-bd: rgba(255,71,87,0.25);
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--text);
  background: var(--bg-deep);
}

/* ── Ambient grid texture (CSS-only) ── */
.page::after {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--grid-line) 0.5px, transparent 0.5px);
  background-size: 24px 24px;
}

/* ── Utility ── */
.flex-row    { display: flex; flex-direction: row; align-items: center; }
.flex-col    { display: flex; flex-direction: column; }
.flex-between{ display: flex; justify-content: space-between; align-items: center; }
.flex-1      { flex: 1; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-20 { margin-top: 10px; }
.mt-30 { margin-top: 15px; }
.mb-20 { margin-bottom: 10px; }

/* ── Frost Panel (replaces .card) ── */
.panel {
  position: relative; z-index: 1;
  margin: 10px;
  padding: 15px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}
.panel::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--accent-dim) 20%, var(--accent) 50%,
    var(--accent-dim) 80%, transparent 100%);
  opacity: 0.5;
}

.panel-title {
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

/* ── Metric rows（统一骨架：指标名左对齐 — 数值+单位右对齐，行级分割线）
   两主题共用同一布局，差异只在颜色变量（Gemini 锐评采纳：
   弃用“拆成小黑框”的碎片化卡片） ── */
.metric-grid {
  display: block;
  position: relative; z-index: 1;
  margin: 0 10px;
  padding: 4px 13px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}
.metric-tile {
  display: flex; flex-direction: row; align-items: center;
  padding: 12px 2px;
  background: transparent; border: none; box-shadow: none;
  border-radius: 0;
  border-bottom: 0.5px solid var(--row-line);
}
.metric-tile:last-child { border-bottom: none; }
.metric-label {
  flex: 1; margin: 0;
  font-size: 14px; font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.metric-value {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 20px; font-weight: 700;
  color: var(--text);
}
.metric-unit {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-dim);
  margin-left: 3px;
}

/* ── Section header ── */
.section-header {
  position: relative; z-index: 1;
  padding: 15px 10px 5px;
  font-size: 14px; font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
}
.sh-arrow { margin-right: 2px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 1px;
  border-radius: var(--radius);
}
.badge-normal {
  background: var(--badge-safe-bg);
  color: var(--safe);
  border: 0.5px solid var(--badge-safe-bd);
}
.badge-warning {
  background: var(--badge-warn-bg);
  color: var(--warn);
  border: 0.5px solid var(--badge-warn-bd);
}
.badge-danger {
  background: var(--badge-danger-bg);
  color: var(--danger);
  border: 0.5px solid var(--badge-danger-bd);
  animation: pulse-danger 2s ease-in-out infinite;
}

/* ── Status-color value classes (代替 wxml 内联硬编码色值) ── */
.val-safe   { color: var(--safe); }
.val-warn   { color: var(--warn); }
.val-danger { color: var(--danger); }
.val-cold   { color: var(--accent-dim); }  /* 低温蓝 */
.val-hot    { color: var(--warn); }        /* 高温橙 */

/* ── Animations ── */
@keyframes pulse-danger {
  0%, 100% { box-shadow: 0 0 0 rgba(255,71,87,0); }
  50%      { box-shadow: 0 0 6px var(--danger-glow); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glow-steady {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

.stagger-in {
  animation: fadeInUp 0.4s ease-out both;
}

/* ── Status dot ── */
.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}
.status-dot.online  { background: var(--safe); box-shadow: 0 0 4px var(--safe);
                      animation: glow-steady 1.6s ease-in-out infinite; }
.status-dot.offline { background: var(--text-muted); }  /* 灰色=未连接，红色只留给告警语义 */

/* ═══════════════════════════════════════════
   AURORA ICE — 全新浅色主题（极光冰面）
   ═══════════════════════════════════════════ */
.theme-aurora {
  /* 颜色 */
  --bg-deep:     #eef4fa;   /* ice field */
  --bg-panel:    #ffffff;
  --bg-elevated: #f3f8fc;
  --border:      #d9e6f2;
  --border-glow: rgba(10,123,192,0.10);
  --accent:      #0a7bc0;   /* glacial lake blue */
  --accent-dim:  #57a3d4;
  --text:        #12283f;
  --text-dim:    #5c7188;
  --text-muted:  #8ba1b5;
  --safe:        #0b7a45;
  --warn:        #b36300;
  --danger:      #b3261e;
  --danger-glow: rgba(179,38,30,0.15);
  /* 结构/装饰 */
  --radius:        8px;   /* 圆润冰面 */
  --panel-shadow:  0 4px 16px rgba(18,40,63,0.07),
                   inset 0 0.5px 0 rgba(255,255,255,0.7);
  --tile-shadow:   0 2px 8px rgba(18,40,63,0.05);
  --grid-line:     rgba(10,123,192,0.04);
  --row-line:      rgba(18,40,63,0.06);
  --fill-dark:     rgba(18,40,63,0.04);
  --fill-dark-2:   rgba(18,40,63,0.05);
  --accent-wash:   rgba(10,123,192,0.08);
  --accent-bd:     rgba(10,123,192,0.3);
  --btn-bg:        rgba(10,123,192,0.08);
  --btn-bd:        rgba(10,123,192,0.25);
  --sc-normal-bg:  linear-gradient(170deg, #e6f4ec, #ffffff);
  --sc-warning-bg: linear-gradient(170deg, #fdf1dc, #ffffff);
  --sc-danger-bg:  linear-gradient(170deg, #fde9e7, #ffffff);
  --sc-bar-track:  rgba(18,40,63,0.08);
  --badge-safe-bg:   rgba(15,157,88,0.10);
  --badge-warn-bg:   rgba(217,122,6,0.10);
  --badge-danger-bg: rgba(217,48,37,0.08);
  --badge-safe-bd:   rgba(15,157,88,0.25);
  --badge-warn-bd:   rgba(217,122,6,0.25);
  --badge-danger-bd: rgba(217,48,37,0.25);
  /* 页面底色（page 背景是静态深色，浅色主题由根节点铺底） */
  background: var(--bg-deep);
  min-height: 100vh;
}

/* 极光主题下的排版气质：标题改重、收紧字距（中文不适合宽字距） */
.theme-aurora .panel-title { color: var(--text); letter-spacing: 0.5px; font-weight: 700; }
.theme-aurora .section-header { color: var(--text); letter-spacing: 0.5px; }
.theme-aurora .panel::before { opacity: 0.35; }
.theme-aurora .metric-label { letter-spacing: 0.5px; }

/* ── AURORA 排版重构：header 居中 ── */
.theme-aurora .idx-head {
  flex-direction: column; align-items: center; text-align: center;
  padding: 22px 10px 17px;
  border-bottom: none;
  background: linear-gradient(180deg, rgba(10,123,192,0.06) 0%, transparent 100%);
}
/* 去字符 logo（廉价感来源），改用色条装饰 + 排版本身撑起 header */
.theme-aurora .idx-logo { display: none; }
.theme-aurora .idx-head::before {
  content: "";
  width: 32px; height: 3px; border-radius: 1.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
  margin-bottom: 11px;
}
.theme-aurora .idx-title { font-size: 24px; font-weight: 800; letter-spacing: 1px; margin-top: 0; }
.theme-aurora .idx-sub { font-size: 12px; margin-top: 6px; letter-spacing: 0.5px; }
.theme-aurora .idx-head .flex-row { margin-top: 7px; }
.theme-aurora .idx-clock { font-size: 12px; color: var(--text-muted); margin-left: 0; }

/* 行式数据列表已全局化（两主题共用骨架），此处只保留 aurora 的标题间距 */
.theme-aurora .panel-title { margin-bottom: 14px; }

/* ── AURORA 排版重构：区块标题加左侧色条 ── */
.theme-aurora .section-header {
  position: relative;
  padding: 15px 14px 7px;
  font-size: 15px; font-weight: 700;
}
.theme-aurora .sh-arrow { display: none; }  /* 色条替代 ▸ 前缀 */
.theme-aurora .section-header::before {
  content: "";
  position: absolute; left: 4px; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 15px;
  background: var(--accent);
  border-radius: 2px;
}

/* ════════ 来源: miniprogram/components/status-card/status-card.wxss ════════ */
.sc {
  position: relative; z-index: 1;
  margin: 10px; padding: 16px 15px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
/* ── Level variants ── */
.sc.normal  { background: var(--sc-normal-bg);
              border-color: var(--badge-safe-bd); }
.sc.warning { background: var(--sc-warning-bg);
              border-color: var(--badge-warn-bd); }
.sc.danger  { background: var(--sc-danger-bg);
              border-color: var(--badge-danger-bd);
              animation: sc-pulse 2s ease-in-out infinite; }

@keyframes sc-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,71,87,0); }
  50%      { box-shadow: 0 0 10px rgba(255,71,87,0.15), 0 0 20px rgba(255,71,87,0.05); }
}

/* accent corner */
.sc::after {
  content: ""; position: absolute;
  top: -1px; right: -1px;
  width: 16px; height: 16px;
  border-left: 1px solid;
}
.sc.normal::after  { border-color: var(--safe); }
.sc.warning::after { border-color: var(--warn); }
.sc.danger::after  { border-color: var(--danger); }

.sc-top { margin-bottom: 8px; }
.sc-label {
  font-size: 13px; font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 3px;
}
.sc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  font-size: 13px; font-weight:700;
  letter-spacing: 1px;
  border-radius: var(--radius);
}
.badge-normal  { background: var(--badge-safe-bg); color: var(--safe);
                 border: 0.5px solid var(--badge-safe-bd); }
.badge-warning { background: var(--badge-warn-bg);  color: var(--warn);
                 border: 0.5px solid var(--badge-warn-bd); }
.badge-danger  { background: var(--badge-danger-bg);  color: var(--danger);
                 border: 0.5px solid var(--badge-danger-bd); }

.sc-dot {
  width: 5px; height: 5px; border-radius: 50%;
}
.badge-normal .sc-dot  { background: var(--safe); }
.badge-warning .sc-dot { background: var(--warn); box-shadow: 0 0 3px var(--warn); }
.badge-danger .sc-dot  { background: var(--danger); box-shadow: 0 0 4px var(--danger);
                          animation: glow-steady 1s ease-in-out infinite; }

.sc-body { margin: 4px 0 8px; }
.sc-value {
  font-family: var(--font-mono);
  font-size: 48px; font-weight: 800;
  line-height: 1; letter-spacing: -1px;
}
.sc.normal .sc-value  { color: var(--safe); }
.sc.warning .sc-value { color: var(--warn); }
.sc.danger .sc-value  { color: var(--danger); }
.sc-unit {
  font-family: var(--font-mono);
  font-size: 16px; color: var(--text-dim);
  margin-left: 4px;
}

/* severity bar */
.sc-bar {
  height: 2px; background: var(--sc-bar-track);
  border-radius: var(--radius); margin-bottom: 10px;
  overflow: hidden;
}
.sc-bar-fill {
  height: 100%; border-radius: 1px;
  transition: width 0.6s ease;
}
.sc.normal .sc-bar-fill  { background: linear-gradient(90deg, var(--safe), var(--accent-dim)); }
.sc.warning .sc-bar-fill { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.sc.danger .sc-bar-fill  { background: linear-gradient(90deg, var(--danger), #ff6b7a); }

.sc-footer {
  border-top: 0.5px solid rgba(255,255,255,0.05);
  padding-top: 8px;
}
.sc-time, .sc-time-val {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-muted);
  letter-spacing: 1px;
}

/* ════════ 来源: miniprogram/components/gauge/gauge.wxss ════════ */
.g-wrap {
  display: flex; flex-direction: column; align-items: center;
}
.g-ring {
  position: relative;
  width: 80px; height: 80px;
}
/* outer track */
.g-track {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 6px solid var(--sc-bar-track);
}
/* filled arc (clipped by conic-gradient) */
.g-fill {
  position: absolute; inset: 0;
  border-radius: 50%;
  mask: radial-gradient(transparent 58%, black 62%);
  -webkit-mask: radial-gradient(transparent 58%, black 62%);
}
/* centre circle */
.g-cover {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.g-num {
  font-family: var(--font-mono);
  font-size: 18px; font-weight: 800;
  color: var(--text);
  display: block;
  line-height: 1;
}
.g-ctext {
  font-family: var(--font-ui);
  font-size: 16px; font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1;
}
.g-unit {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-dim);
  display: block; margin-top: 1px;
}
.g-label {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 5px;
}

/* ════════ 来源: miniprogram/pages/index/index.wxss ════════ */
/* ── Header ── */
.idx-head {
  padding: 10px 15px 12px;
  background: linear-gradient(180deg,
    rgba(0,212,255,0.06) 0%,
    rgba(0,212,255,0.01) 70%,
    transparent 100%);
  border-bottom: 0.5px solid rgba(0,212,255,0.08);
}
.idx-logo  { font-size: 20px; color: var(--accent); }
.idx-title {
  font-size: 19px; font-weight: 800;
  color: var(--text);
  letter-spacing: 3px;
  margin-top: 4px;
}
.idx-sub {
  font-family: var(--font-mono);
  font-size: 13px; color: var(--text-dim);
  letter-spacing: 1.5px; margin-top: 1px;
}
.idx-clock {
  font-family: var(--font-mono);
  font-size: 14px; color: var(--text-dim);
  letter-spacing: 1px;
  margin-left: 6px;
}
.idx-conn-text {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-muted);
  letter-spacing: 0.5px;
  margin: 0 6px 0 3px;
}

/* ── Offline banner ── */
.offline-banner {
  margin: 0 10px 10px;
  padding: 7px 10px;
  background: rgba(255,71,87,0.08);
  border: 0.5px solid rgba(255,71,87,0.2);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 14px; color: var(--danger);
  display: flex; align-items: center; gap: 5px;
  animation: fadeInUp 0.3s ease-out;
}
.offline-dot { animation: glow-steady 1.2s ease-in-out infinite; }

/* ── Photo entry ── */
.idx-cam-icon { font-size: 22px; color: var(--accent-dim); }
.idx-cam-sub  { font-size: 14px; color: var(--text-dim); margin-top: 1px; }
.idx-cam-arrow{ font-size: 16px; color: var(--accent-dim); }

/* ── 一键更新全部数据（与照片页按钮同款样式） ── */
.idx-refresh-btn {
  width: 100%; margin: 12px 0 4px;
  background: var(--btn-bg); color: var(--accent);
  border: 0.5px solid var(--btn-bd); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 2px;
  line-height: 2.6;
}
.idx-refresh-btn[disabled] { opacity: 0.5; }

/* AURORA 主题下与照片页按钮保持一致 */
.theme-aurora .idx-refresh-btn { border-radius: 499.5px; letter-spacing: 1px; line-height: 2.4; }

/* ════════ 来源: miniprogram/pages/history/history.wxss ════════ */
/* ── Tab row ── */
.tab-row {
  display: flex; gap: 4px;
  margin: 10px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}
.tab-item {
  flex: 1; text-align: center;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 1px;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.tab-active {
  background: var(--accent-wash);
  color: var(--accent);
  border: 0.5px solid var(--accent-bd);
}

/* ── Chart cards ── */
.chart-card {
  position: relative; z-index: 1;
  margin: 10px;
  padding: 12px 6px 8px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
}
.chart-title {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  margin-left: 6px;
  margin-bottom: 6px;
}

/* ── Placeholder ── */
.placeholder-text { font-family: var(--font-mono); font-size: 15px;
                    color: var(--text-dim); display: block; margin-top: 30px; }
.placeholder-hint { font-family: var(--font-mono); font-size: 14px;
                    color: var(--text-muted); display: block; margin-top: 6px; margin-bottom: 30px; }

/* ── AURORA 排版：胶囊 tab + 图表卡圆角 ── */
.theme-aurora .tab-row { border-radius: 499.5px; padding: 4px; }
.theme-aurora .tab-item { border-radius: 499.5px; letter-spacing: 0.5px; }
.theme-aurora .chart-card { border-radius: 10px; }
.theme-aurora .chart-title { letter-spacing: 0.5px; color: var(--text); }

/* ════════ 来源: miniprogram/pages/photo/photo.wxss ════════ */
.ph-loading { font-family: var(--font-mono); font-size: 15px;
              color: var(--text-dim); display: block; padding: 20px 0; }

.ph-img-box {
  margin: 10px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  background: #000;
  min-height: 250px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph-img { width: 100%; min-height: 250px; }

.ph-noimg { text-align: center; padding: 50px 0; }
.ph-noimg-icon  { font-size: 40px; color: var(--text-muted); display: block; }
.ph-noimg-text  { font-family: var(--font-mono); font-size: 16px;
                  color: var(--text-dim); display: block; margin-top: 12px; letter-spacing: 2px; }
.ph-noimg-hint  { font-family: var(--font-mono); font-size: 14px;
                  color: var(--text-muted); display: block; margin-top: 6px; }

/* Result rows */
.ph-row { padding: 8px 0; border-bottom: 0.5px solid var(--row-line); }
.ph-label { font-family: var(--font-mono); font-size: 14px;
            color: var(--text-dim); letter-spacing: 1px; }
.ph-val   { font-family: var(--font-mono); font-size: 21px; font-weight: 700; }
.ph-val.normal  { color: var(--safe); }
.ph-val.warning { color: var(--warn); }
.ph-val.danger  { color: var(--danger); }
.ph-val-sm { font-family: var(--font-mono); font-size: 15px; color: var(--text); }

/* YOLO */
.ph-yolo {
  display: flex; flex-direction: column; align-items: center;
  padding: 20px 0; background: var(--fill-dark); border-radius: var(--radius);
}
.ph-yolo-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 8px; }
.ph-yolo-text { font-family: var(--font-mono); font-size: 15px;
                color: var(--text-dim); letter-spacing: 0.5px; }

/* Manual capture button */
.ph-capture-btn {
  width: 100%; margin: 12px 0 4px;
  background: var(--btn-bg); color: var(--accent);
  border: 0.5px solid var(--btn-bd); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 15px; letter-spacing: 2px;
  line-height: 2.6;
}
.ph-capture-btn[disabled] { opacity: 0.5; }
.ph-upload-btn { margin-top: 0; }

/* ── AURORA 排版：照片页疏朗行式 + 胶囊按钮 ── */
.theme-aurora .ph-img-box { border-radius: 10px; }
.theme-aurora .ph-row { padding: 11px 0; }
.theme-aurora .ph-label { font-size: 14px; letter-spacing: 0.5px; }
.theme-aurora .ph-val { font-size: 22px; }
.theme-aurora .ph-val-sm { font-size: 16px; }
.theme-aurora .ph-capture-btn { border-radius: 499.5px; letter-spacing: 1px; line-height: 2.4; }
.theme-aurora .ph-yolo { border-radius: 8px; }

/* ════════ 网页端补充 ════════ */
html, body { background: var(--bg-deep); }
body { font-family: var(--font-ui); color: var(--text); }

/* 小程序 tabBar 配色（来自 miniprogram/utils/theme.js 的 THEMES 表） */
:root {
  --tab-color:    #5a6a8a;
  --tab-selected: #00d4ff;
  --tab-bg:       #0a0e27;
  --tab-border:   rgba(255,255,255,0.08);
}
.theme-aurora {
  --tab-color:    #8ba1b5;
  --tab-selected: #0a7bc0;
  --tab-bg:       #ffffff;
  --tab-border:   rgba(18,40,63,0.10);
}

/* 网页端把整站约束成手机宽度居中，桌面浏览器看是「手机预览」 */
.page {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-deep);
}

/* 底部 tabBar（对应小程序 app.json 的 tabBar 配置） */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  display: flex;
  background: var(--tab-bg);
  border-top: 1px solid var(--tab-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 100;
}
.tabbar-item {
  flex: 1;
  text-align: center;
  padding: 14px 0 12px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--tab-color);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}
.tabbar-item.active { color: var(--tab-selected); font-weight: 600; }

.view { display: none; }
.view.active { display: block; }

/* 历史图表 canvas（小程序里由 <canvas canvas-id> 自带尺寸，网页要显式给） */
.chart-canvas { width: 100%; height: 200px; display: block; }

/* 主题切换按钮（小程序在调试页，网页版收进 header 右上角） */
.theme-toggle {
  background: var(--btn-bg);
  color: var(--accent);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 10px;
  margin-left: 10px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* 加载/空态 + 轻提示 */
.toast {
  position: fixed; left: 50%; bottom: 88px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.82); color: #fff;
  font-size: 13px; padding: 9px 18px; border-radius: 6px;
  z-index: 200; opacity: 0; transition: opacity 0.25s;
  pointer-events: none; max-width: 80%;
}
.toast.show { opacity: 1; }

/* 备案信息（工信部要求网站首页底部可见） */
.site-footer {
  text-align: center;
  padding: 18px 0 6px;
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

