/* 独立监控页样式：iOS 27 风格（2026-11-17 用户定：从老版 iOS 升级到 iOS 27。iOS 27 Liquid Glass 第二代：
   底更实（tinted）、边缘加深、顶部高光更亮、层与层分隔更强。只为手机浏览器设计。
   设计语言：iOS 分组底色 + 玻璃卡片 + iOS 系统色 + SF 系统字体。
   注意：iOS 分组布局左右留 16px 边距，之前“框贴紧左右边缘”的做法随这次重构换掉。
   玻璃配方（2026-11-17 21:4x 用户：玻璃效果看不出来——根因是卡片没用 backdrop-filter，且底色是纯色、磨砂无物可采）：
   卡片用真磨砂 backdrop-filter blur(20px) saturate(180%) + 半透明底 + 更亮的高光边 + 深色内边 + 柔和阴影；
   页面底改微光渐变（仍贴近 iOS 分组底色），给磨砂一点可采的颜色，否则纯色底上玻璃隐形。
   注：页面已无 sticky 元素（原生折叠组件不吸顶），卡片可安全用 backdrop-filter。 */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7; --bg-ambient: radial-gradient(120% 50% at 50% 0%, rgba(0, 122, 255, 0.07), transparent 60%), radial-gradient(90% 40% at 85% 100%, rgba(255, 149, 0, 0.05), transparent 60%), #f2f2f7; --surface: rgba(255, 255, 255, 0.85); --surface-solid: #ffffff; --surface-alt: rgba(120, 120, 128, 0.16);
  --text: #000000; --dim: #6b6b70; --tertiary: rgba(60, 60, 67, 0.3); --border: rgba(60, 60, 67, 0.29);
  --primary: #007aff; --primary-fg: #ffffff;
  --accent: #34c759; --accent-soft: rgba(52, 199, 89, 0.12);
  --warn: #ff9500; --warn-soft: rgba(255, 149, 0, 0.12);
  --bad: #ff3b30; --bad-soft: rgba(255, 59, 48, 0.10);
  --route-divider: #ff9500; --orange: #ff9500; --series2: #007aff;
  --expand: #007aff; --expand-soft: rgba(0, 122, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-edge: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25));
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  --seg-bg: rgba(120, 120, 128, 0.16); --seg-sel: #ffffff;
  --radius: 20px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg-ambient: radial-gradient(120% 50% at 50% 0%, rgba(10, 132, 255, 0.14), transparent 60%), radial-gradient(90% 40% at 85% 100%, rgba(48, 209, 88, 0.09), transparent 60%), #000000; --surface: rgba(28, 28, 30, 0.85); --surface-solid: #1c1c1e; --surface-alt: rgba(120, 120, 128, 0.22);
    --text: #ffffff; --dim: rgba(235, 235, 245, 0.6); --tertiary: rgba(235, 235, 245, 0.3); --border: rgba(84, 84, 88, 0.6);
    --primary: #0a84ff; --primary-fg: #ffffff;
    --accent: #30d158; --accent-soft: rgba(48, 209, 88, 0.14);
    --warn: #ff9f0a; --warn-soft: rgba(255, 159, 10, 0.14);
    --bad: #ff453a; --bad-soft: rgba(255, 69, 58, 0.12);
    --route-divider: #ff9f0a; --orange: #ff9f0a; --series2: #0a84ff;
    --expand: #0a84ff; --expand-soft: rgba(10, 132, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-edge: linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.08));
    --glass-rim: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    --seg-bg: rgba(120, 120, 128, 0.24); --seg-sel: #636366;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-ambient); touch-action: manipulation; }
body { color: var(--text); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.5; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button { font-family: inherit; }
#app { min-height: 100vh; min-height: 100dvh; background: transparent; }
/* 键盘焦点环（2026-11-17 设计技能审计：Vercel + ui-ux-pro-max P1） */
:focus-visible { outline: 2px solid var(--expand); outline-offset: 2px; }
/* 减弱动效（2026-11-17 设计技能审计：Vercel + ui-ux-pro-max P7） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}
/* iOS 分组布局：左右 16px 边距，卡片 inset；safe-area 同样补刘海/手势条留白。 */
.page { width: 100%; padding: calc(8px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .page { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }

/* 卡片：Liquid Glass 第二代（iOS 27）——更实的底 + 更亮的高光边 + 深色内边 + 柔和阴影，圆角 20px。 */
.foldcard { border-radius: var(--radius); border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); }
#cards { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.card-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px; }
.card-title { flex-shrink: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.card-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; color: var(--dim); }
.card-body { border-top: 1px solid var(--border); }
.card-body:not(.flush) { padding: 8px 16px; }
.card-body.flush { padding: 0; }
.sep { margin: 0; font-size: 9px; }
.whitespace-nowrap { white-space: nowrap; }

/* 折叠指示：原生 iOS 风格（Apple HIG disclosure button）——裸 chevron，无圆底、无填充，
   第三级标签灰；收起朝下、展开旋转 180° 朝上。展开态不再另设蓝字/吸顶头，方向 + 内容即信号。 */
.chev { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chev svg { width: 14px; height: 14px; color: var(--tertiary); transition: transform .2s; }
.chev.open svg { transform: rotate(180deg); }

/* 服务摘要：玻璃卡片（渐变折射边）。底用实色面（2026-11-17 用户：顶部卡片比下面几张暗、几乎融进黑底，改实色与下面一致） */
#summary { border-radius: var(--radius); border: 1px solid transparent; background: linear-gradient(var(--surface-solid), var(--surface-solid)) padding-box, var(--glass-edge) border-box; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); padding: 8px 16px; }
.verdict-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.verdict-left { min-width: 0; }
.verdict-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 2px; }
.verdict-text { font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -0.025em; }
.verdict-text.green { color: var(--accent); }
.verdict-text.red { color: var(--bad); }
.verdict-text.yellow { color: var(--warn); }
.verdict-text.gray { color: var(--dim); }
.verdict-uptime { white-space: nowrap; font-size: 12px; line-height: 16px; color: var(--dim); }
.verdict-stale { white-space: nowrap; font-size: 12px; line-height: 16px; color: var(--warn); }
.verdict-sub { margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--warn); }
.verdict-sub:empty { display: none; }
.verdict-time { flex-shrink: 0; padding-top: 2px; text-align: right; font-size: 12px; line-height: 1.625; color: var(--dim); }
#issueChips { display: none; margin-top: 6px; flex-wrap: wrap; column-gap: 6px; row-gap: 4px; border-top: 1px solid var(--border); padding-top: 6px; }
#issueChips.has-chips { display: flex; }
.chip { cursor: pointer; border: none; border-radius: 999px; padding: 4px 12px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--bad); background: var(--bad-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.warn-banner { margin-top: 8px; padding: 8px 16px; border: 1px solid var(--warn); border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: 14px; line-height: 20px; }
.drift-note { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; font-size: 13px; line-height: 1.625; }
.drift-note .drift-title { color: var(--warn); font-weight: 500; }
.drift-note .drift-line { margin-top: 4px; color: var(--text); }

/* 磁贴网格：1 / 2 / 3 / 4 列 */
.tiles-wrap { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.tile-grid { display: grid; grid-template-columns: 1fr; column-gap: 8px; row-gap: 8px; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1536px) { .tile-grid { grid-template-columns: repeat(4, 1fr); } }
/* 服务摘要磁贴：没点开不显示底色，点开才显示玻璃底（2026-11-17 用户） */
.tile-slot { border: 1px solid var(--border); border-radius: 16px; }
.tile-slot.expanded { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); }
.tile-slot.expanded { grid-column: 1 / -1; }
@media (min-width: 640px) { .tile-slot.expanded { grid-column: span 2; } }
@media (min-width: 1280px) { .tile-slot.expanded { grid-column: span 3; } }
@media (min-width: 1536px) { .tile-slot.expanded { grid-column: span 4; } }
.tile-face { display: block; width: 100%; cursor: pointer; border: none; border-radius: 12px; background: none; padding: 6px 12px; text-align: left; transition: background-color .15s; }
.tile-face:hover { background: var(--surface-alt); }
.tile-face:active { opacity: .7; }
/* 异常磁贴展开时磨砂底改红（吸顶磨砂本身见上面统一规则）。 */
.tile-face.expanded.bad { background: var(--bad-soft); }
.tile-inner { display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.dot.bad { background: var(--bad); }
.dot.gray { background: var(--dim); }
.dot.warn { background: var(--warn); }
.tile-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.tile-status { flex-shrink: 0; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--accent); }
.tile-status.bad { color: var(--bad); }
.tile-status.gray { color: var(--dim); }
.tile-detail { padding: 0 12px 6px; }
.tile-note { padding: 0 12px 6px 34px; font-size: 12px; line-height: 20px; color: var(--dim); }
.member-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.member-head .mname { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--text); }
.member-status { font-size: 12px; line-height: 16px; font-weight: 500; flex-shrink: 0; }
.member-status.green { color: var(--accent); }
.member-status.red { color: var(--bad); }
.member-status.gray { color: var(--dim); }
.member-sep { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 6px; }
.member-sep:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* 详情行：标签 56px 宽 12px、值 mono 13px 行高 20px，一行一个 */
.dl { display: grid; grid-template-columns: 1fr; row-gap: 4px; }
.drow { display: flex; align-items: baseline; gap: 12px; }
.drow .k { width: 56px; flex-shrink: 0; font-size: 12px; line-height: 20px; color: var(--dim); }
.drow .v { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 0; flex: 1; overflow-wrap: break-word; word-break: keep-all; font-size: 13px; line-height: 20px; color: var(--text); }
.drow .v.hot { color: var(--bad); }
.drow .v.warn { color: var(--warn); font-weight: 500; }
.drow .v .arrow { color: var(--warn); font-weight: 600; }
.drow .v.plain { font-family: inherit; }
/* DetailLine（站点展开详情用）：标签 12px，值右对齐 mono 13px */
.dline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2px 0; }
.dline .k { flex-shrink: 0; font-size: 12px; line-height: 16px; color: var(--dim); }
.dline .v { min-width: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; overflow-wrap: break-word; word-break: break-all; font-size: 13px; line-height: 20px; color: var(--text); }
.hr { border: none; border-top: 1px solid var(--border); margin: 8px 0; }

/* 收起 footer（方案 C） */
.collapse-footer { border-top: 1px solid var(--border); }
.collapse-footer button { display: flex; width: 100%; cursor: pointer; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 10px; background: none; padding: 6px 12px; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--expand); transition: background-color .15s; }
.collapse-footer button:hover { background: var(--expand-soft); }
.collapse-footer button:active { opacity: .7; }

/* 定时器区 */
#timersWrap { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
#timersWrap:empty { display: none; }
.timer-groups { display: grid; grid-template-columns: 1fr; row-gap: 4px; }
/* 定时器成员行（空间 TimerGroupTile）：行头 gap-3（12px）、状态字 text-[13px]；
   共用的 .member-head/.member-status 是服务成员的 gap-2（8px）/ text-xs（12px）。 */
#timersWrap .member-head { gap: 12px; }
#timersWrap .member-status { font-size: 13px; line-height: 20px; }

/* 实时路由 */
.hy2-vals { display: flex; flex-shrink: 0; gap: 12px; font-size: 12px; line-height: 16px; color: var(--dim); }
.hy2-vals .ok { color: var(--accent); }
.hy2-vals .bad { color: var(--bad); }
.hy2-vals .mono { font-family: var(--mono); }
/* 实时路由：每个在线客户端（协议 + IP + 跳）自己占一个玻璃框，像 4 个图表一样；断开的全部共用一个框（2026-11-17 用户） */
#routeBody { padding: 8px 12px; }
#routeBody > :last-child { margin-bottom: 0; }
.route-block { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; border-radius: 16px; box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); padding: 4px 0; margin-bottom: 8px; }
.route-disc-group { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; border-radius: 16px; box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); padding: 4px 0; margin-bottom: 8px; }
.route-disc-group .route-block { border: none; background: none; box-shadow: none; border-radius: 0; padding: 0; margin-bottom: 0; }
.route-disc-group .route-block + .route-block { border-top: 1px solid var(--border); }
.route-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px; font-size: 12px; line-height: 16px; color: var(--dim); }
.route-head .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-head .rtt { font-family: var(--mono); }
.route-head .right { display: flex; flex-shrink: 0; align-items: center; gap: 8px; }
.route-head .upd { font-family: var(--mono); }
.route-live { font-weight: 500; color: var(--accent); }
.route-disc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; padding: 4px 12px; font-size: 14px; line-height: 20px; }
.route-disc .lbl { color: var(--text); }
.route-disc .problem { font-weight: 500; color: var(--bad); }
.route-disc .lastseen { color: var(--dim); }
.route-disc .sep { font-size: 9px; color: var(--dim); }
/* 跳行是折叠按钮：没点开不显示底色，点开才显示；按钮 + 展开内容一起框住（2026-11-17 用户），框内不再画分隔线 */
.hop-wrap { border: 1px solid var(--border); border-radius: 12px; margin: 4px 12px; }
.hop-wrap.expanded { background: var(--surface-alt); }
.hop-detail { padding: 2px 12px 6px; border-top: 1px solid var(--border); }
.hop-detail-line { display: flex; align-items: baseline; gap: 6px; font-size: 12px; line-height: 20px; color: var(--dim); }
.hop-detail-line .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.hop { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px; border: none; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.hop .left { display: flex; min-width: 0; align-items: baseline; gap: 6px; font-size: 14px; line-height: 20px; }
.hop .n { font-family: var(--mono); width: 20px; flex-shrink: 0; font-size: 12px; line-height: 16px; color: var(--dim); }
.hop .geo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 16px; color: var(--dim); }
.hop .right { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.hop .ms { font-family: var(--mono); font-size: 14px; line-height: 20px; color: var(--text); min-width: 7ch; text-align: right; }
/* 沿用的上一次好值（误报时不显示“—”）：灰色，与新测值区分，方便与前一个结果对比（2026-11-18 用户定）。 */
.hop .ms.stale { color: var(--tertiary); }
.hop .latpair { display: inline-flex; align-items: baseline; gap: 8px; }
.hop .base { font-family: var(--mono); font-size: 14px; line-height: 20px; color: var(--dim); min-width: 6ch; text-align: right; }
.hop .base.temp { color: var(--tertiary); }
.hop .base.missing { color: var(--tertiary); }
.hop .anom { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex-shrink: 0; }
.empty { color: var(--dim); font-size: 14px; line-height: 20px; padding: 4px 12px; }

/* 使用率曲线 */
#chartsGrid { display: grid; grid-template-columns: 1fr; align-items: start; column-gap: 12px; row-gap: 6px; }
@media (min-width: 1024px) { #chartsGrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1536px) { #chartsGrid { grid-template-columns: repeat(4, 1fr); } }
/* 使用率曲线：每张图是独立玻璃卡片，圆角 16px */
.chart { position: relative; border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; border-radius: 16px; box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); padding: 8px 12px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* 时间菜单打开时抬高层级：菜单要盖住下方的图和下一张卡（2026-11-17 bug1）。 */
.chart.menu-open { z-index: 30; }
.foldcard.menu-open { position: relative; z-index: 40; }
.chart-top { display: flex; flex-wrap: nowrap; align-items: baseline; justify-content: space-between; gap: 8px; white-space: nowrap; }
.chart-title { flex-shrink: 0; font-size: 12px; line-height: 16px; color: var(--dim); }
.range-wrap, .filter-wrap { position: relative; display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.range-btn { display: flex; cursor: pointer; align-items: center; gap: 2px; border: none; border-radius: 8px; background: none; padding: 2px 4px; font-size: 12px; line-height: 16px; color: var(--dim); transition: background-color .15s, color .15s; }
.range-chev { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
.range-btn:hover { background: var(--surface-alt); color: var(--text); }
.range-btn.open { background: var(--expand-soft); }
.range-menu { position: absolute; left: 0; top: 100%; z-index: 20; margin-top: 4px; min-width: 112px; display: none; border-radius: 14px; border: 1px solid var(--glass-border); background: var(--surface); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); padding: 4px 0; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); }
/* 磁盘筛选菜单（蓝本 App.tsx:2580）：右对齐、min-w-24 = 96px */
.filter-wrap .range-menu { right: 0; left: auto; min-width: 96px; }
.range-menu.open { display: block; animation: menu-pop .18s ease-out; }
@keyframes menu-pop { from { opacity: 0; transform: scale(0.96) translateY(-2px); } }
.range-menu button { display: flex; width: 100%; cursor: pointer; align-items: center; justify-content: space-between; gap: 12px; border: none; background: none; padding: 4px 12px; text-align: left; font-size: 12px; line-height: 16px; color: var(--dim); transition: background-color .15s; }
.range-menu button:hover { background: var(--surface-alt); }
.range-menu button.sel { font-weight: 600; color: var(--text); }
.range-menu button .tick { color: var(--accent); font-weight: 700; }
.chart-reads { display: flex; align-items: baseline; gap: 4px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; line-height: 16px; color: var(--dim); margin-left: auto; white-space: nowrap; flex-shrink: 0; }
.chart-reads b { font-weight: 600; color: var(--text); }
.chart-reads .sep { margin: 0; font-size: 9px; }
.chart-reads .warn-label { color: var(--orange); }
.chart-wrap { position: relative; height: 180px; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.tip { position: absolute; display: none; pointer-events: none; background: var(--surface); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--glass-border); border-radius: 10px; padding: 4px 8px; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12px; line-height: 16px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1); z-index: 5; white-space: nowrap; }
.tip .tt-time, .tip .tt-dim { color: var(--dim); }
.tip b { font-weight: 600; color: var(--text); }
.tip .tt-sep { font-size: 9px; color: var(--dim); }
.chart-foot { margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--bad); min-height: 16px; }
/* 足注空时收起（2026-11-17 用户：日期下方空白太大）：没超限信息就不占 16px。 */
.chart-foot:empty { display: none; }
.chart-note { margin: 4px 0 0; font-size: 12px; line-height: 16px; color: var(--orange); }
.chart-note:empty { display: none; }
.series-legend { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; align-self: center; font-size: 12px; line-height: 16px; color: var(--dim); }
.series-legend span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.series-legend .sw { display: inline-block; height: 3px; width: 14px; flex-shrink: 0; border-radius: 999px; }

/* 流量详情：无标题无折叠的静态玻璃卡；三段 px/py 与空间一致，中间以 border-t 分隔 */
#trafficCard { border-radius: var(--radius); border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--glass-edge) border-box; -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: var(--glass-rim), 0 8px 24px rgba(0,0,0,0.08); }
#trafficCard .section-body { min-height: 20px; }
.tsec-a { padding: 6px 16px; }
.tsec-b { border-top: 1px solid var(--border); padding: 6px 16px; }
.tsec-c { border-top: 1px solid var(--border); padding: 6px 16px; }
/* 用量区（站点流量）：没点开不显示底色，点开才显示（2026-11-17 用户） */
.usage-wrap { border: 1px solid var(--border); border-radius: 12px; }
.usage-wrap.expanded { background: var(--surface-alt); }
.usage-wrap > div { padding: 0 12px 4px; }
.usage-btn { display: flex; width: 100%; margin: 0; cursor: pointer; align-items: center; justify-content: space-between; gap: 12px; border: none; border-radius: 12px; background: none; padding: 4px 12px; text-align: left; transition: color .15s, background-color .15s; }
.usage-btn:hover { color: var(--text); }
.usage-title { flex-shrink: 0; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text); }
.usage-right { display: flex; min-width: 0; align-items: center; gap: 12px; }
.usage-figs { white-space: nowrap; text-align: right; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text); }
/* 每日行：日期 4rem、进度条自适应（最小 2.5rem）、出/入各 6rem；入列左 pad 20px */
/* 每日流量行（2026-11-17 用户）：日期固定 3.75rem（最宽“12月12日”5 字），进度条紧挨日期、
   出入流量整块靠右：出XXX.XXGB·入XXX.XXGB，数值按最大 999.99GB 定宽，进度条最大化。 */
.day-row { display: grid; grid-template-columns: 3.75rem minmax(2rem, 1fr) auto; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); padding: 2px 0; }
.day-row:last-child { border-bottom: none; }
.day-date { white-space: nowrap; font-size: 12px; line-height: 16px; color: var(--dim); }
.bar { height: 8px; width: 100%; overflow: hidden; border-radius: 999px; background: var(--surface-alt); }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.day-vals { display: flex; align-items: baseline; gap: 0; white-space: nowrap; justify-self: end; font-size: 12px; line-height: 16px; }
.day-out { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; color: var(--text); }
.day-out .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; display: inline-block; width: 8ch; text-align: right; }
.day-in { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; color: var(--dim); }
.day-in .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; display: inline-block; width: 8ch; text-align: right; }
.day-sep { color: var(--dim); }

/* 节点速度：两框并排，等分，4px 间距；框只留边框、无底色 */
.ns-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ns-box { border-radius: 12px; border: 1px solid var(--border); padding: 4px 8px; }
.ns-row { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
.ns-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.ns-rate { font-family: var(--mono); flex-shrink: 0; font-size: 16px; line-height: 20px; font-weight: 600; color: var(--text); }
.ns-rate .unit { font-size: 11px; font-weight: 500; color: var(--dim); }
.ns-trans { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 16px; color: var(--dim); }

/* 站点流量：页签 2 列 chip；表头与行共用 minmax(0,1.8fr) + 4×minmax(4rem,1fr) 网格；行高 50px 两行 */
/* 长列表渲染优化（2026-11-17 设计技能审计：Vercel 性能，>50 行）：视口外的行跳过渲染，滚动到才画。 */
/* 站点流量每行：没点开不显示底色，点开才显示（2026-11-17 用户） */
.site-row { content-visibility: auto; contain-intrinsic-size: auto 50px; border: 1px solid var(--border); border-radius: 12px; }
.site-row.expanded { background: var(--surface-alt); }
/* 站点流量：iOS 分段控制器——灰底槽 + 选中段白片（深色灰片）带阴影，不再是蓝底。 */
.site-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 4px; background: var(--seg-bg); border-radius: 9px; padding: 2px; }
.site-tabs button { border-radius: 7px; border: none; background: transparent; padding: 4px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--dim); cursor: pointer; white-space: nowrap; text-align: center; transition: background-color .15s, color .15s, box-shadow .15s; }
.site-tabs button.sel { background: var(--seg-sel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.site-tabs button:not(.sel):hover { color: var(--text); }
.site-head { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 3.4rem); align-items: center; column-gap: 4px; padding: 0 13px; border-bottom: 1px solid var(--border); }
.site-head button { white-space: nowrap; border: none; background: none; padding: 4px 0; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--dim); cursor: pointer; text-align: left; }
.site-head button.num { text-align: right; }
.site-head button.sel { font-weight: 600; color: var(--text); }
.site-row + .site-row { margin-top: 6px; }
.site-face { display: flex; width: 100%; height: 50px; cursor: pointer; flex-direction: column; justify-content: center; border: none; background: none; padding: 0 12px; text-align: left; transition: background-color .15s; }
.site-face:hover { background: var(--surface-alt); }
.site-rowplain { display: flex; width: 100%; height: 50px; flex-direction: column; justify-content: center; padding: 0 12px; text-align: left; }
.site-line1 { display: grid; height: 24px; width: 100%; grid-template-columns: minmax(0, 1fr) repeat(4, 3.4rem); align-items: center; column-gap: 4px; overflow: hidden; }
.site-line1 .site-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 24px; color: var(--text); }
.site-line1 .mono { font-family: var(--mono); white-space: nowrap; text-align: right; font-size: 12px; line-height: 24px; color: var(--text); }
.site-line2 { display: flex; height: 18px; width: 100%; align-items: center; gap: 8px; overflow: hidden; white-space: nowrap; }
.site-line2 .site-ip { font-family: var(--mono); min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; color: var(--dim); }
.site-line2 .site-disc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--warn); }
.site-line2 .site-conn { font-family: var(--mono); flex-shrink: 0; font-size: 12px; line-height: 18px; color: var(--dim); }
.site-detail { padding: 2px 12px 4px; }
