/* FrpDeck 1.0 —— 各页面 */

/* ---------- 登录 ---------- */
.auth { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 32px 24px; }
/* 登录页：左边功能演示，右边登录框；窄屏时登录框在上 */
.auth-wrap { width: min(1060px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px 72px; align-items: center; }
.auth-main { min-width: 0; }
.auth-card { width: min(420px, 100%); margin: 0 auto; padding: 36px 34px 30px; border-radius: 26px; animation: pop .7s var(--sp-out) both;
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -40px rgba(0, 0, 0, .75); }
.auth-card > * { animation: fadeUp .6s var(--sp-out) both; }
.auth-card > :nth-child(2) { animation-delay: .05s; } .auth-card > :nth-child(3) { animation-delay: .09s; }
.auth-card > :nth-child(4) { animation-delay: .13s; } .auth-card > :nth-child(5) { animation-delay: .17s; }
.auth-card > :nth-child(6) { animation-delay: .21s; } .auth-card > :nth-child(n+7) { animation-delay: .25s; }
.auth-logo { width: 176px; margin: 4px auto 24px; }
.ifield { position: relative; }
.ifield > svg.i { position: absolute; left: 13px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--faint); pointer-events: none; transition: color .2s var(--std); }
.ifield > input { height: 44px; padding-left: 40px; border-radius: 12px; }
.ifield:focus-within > svg.i { color: var(--pri); }
.auth-go { height: 46px; margin-top: 6px; font-size: 15px; border-radius: 13px; }
.auth-logo .fd-logo { width: 100%; height: auto; }
.auth-card h2 { font-size: 20px; font-weight: 800; text-align: center; }
.auth-card .desc { text-align: center; margin: 6px auto 20px; }
.auth-foot { position: relative; z-index: 1; margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--faint); }
/* 登录页演示（showcase.js）：卡片尺寸、圆角和各层内容由时间算出 */
.auth-show { order: -1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.sc-stage { position: relative; width: min(440px, 100%); height: 300px; }
/* 卡组：主卡片后面两张，尺寸用更慢的弹簧跟随，变形时层层错开 */
.sc-ghost { position: absolute; left: 50%; top: 50%; width: 320px; height: 178px; border-radius: 22px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2); }
.sc-ghost.g1 { opacity: .55; transform: translate(-50%, calc(-50% - 13px)) scale(.94); }
.sc-ghost.g2 { opacity: .25; transform: translate(-50%, calc(-50% - 25px)) scale(.88); }
.sc-card { position: absolute; left: 50%; top: 50%; width: 320px; height: 178px; border-radius: 22px; transform: translate(-50%, -50%); overflow: hidden;
  background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .05), 0 40px 80px -36px rgba(0, 0, 0, .8); }
.sc-l { position: absolute; left: 0; top: 0; height: 100%; opacity: 0; visibility: hidden; }
.sc-l:first-child { opacity: 1; visibility: visible; }
.sc-h { position: absolute; left: 18px; right: 18px; top: 16px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.sc-h .sc-pill, .sc-h .sc-sub { margin-left: auto; }
.sc-sub { font-size: 12px; font-weight: 600; color: var(--faint); }
.sc-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.sc-pill .dot { width: 6px; height: 6px; }
.sc-sel { position: absolute; left: 12px; right: 12px; top: 52px; height: 46px; border-radius: 14px; border: 1.5px solid #38BDF8; background: var(--hover); }
.sc-row { position: absolute; left: 12px; right: 12px; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 14px; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.sc-use { font-size: 11px; font-weight: 700; color: var(--pri); padding: 2px 7px; border-radius: 99px; background: color-mix(in srgb, var(--pri) 14%, transparent); }
.sc-ms { margin-left: auto; font: 600 12px var(--mono); color: var(--muted); }
.sc-svc { position: absolute; left: 18px; right: 18px; height: 44px; display: flex; align-items: center; gap: 11px; }
.sc-av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800; flex: none; }
.sc-nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-nm b { font-size: 13.5px; }
.sc-nm i { font: 500 11.5px var(--mono); color: var(--faint); opacity: 0; }
.sc-sw { position: relative; margin-left: auto; width: 36px; height: 21px; border-radius: 99px; background: var(--line-2); flex: none; }
.sc-sw .sc-tr { position: absolute; inset: 0; border-radius: inherit; background: var(--btn); opacity: 0; }
.sc-sw .sc-kn { position: absolute; top: 3px; bottom: 3px; left: 3px; right: 18px; border-radius: 99px; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); }
.sc-g { position: absolute; top: 56px; width: 56px; text-align: center; }
.sc-g svg { display: block; width: 56px; height: 56px; transform: rotate(-90deg); }
.sc-g .tr { fill: none; stroke: var(--line); stroke-width: 6; }
.sc-g .pg { fill: none; stroke: url(#ringGrad); stroke-width: 6; stroke-linecap: round; }
.sc-g b { position: absolute; left: 0; right: 0; top: 19px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-g span { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.sc-speed { position: absolute; left: 166px; right: 18px; top: 54px; display: flex; flex-direction: column; }
.sc-speed b { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sc-speed span { font-size: 11.5px; color: var(--muted); }
.sc-speed svg { width: 100%; height: 44px; margin-top: 10px; overflow: visible; }
.sc-speed path { fill: none; stroke: #38BDF8; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sc-bars { position: absolute; left: 22px; right: 22px; bottom: 18px; height: 116px; display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.sc-bars i { width: 22px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; transform-origin: bottom; }
.sc-bars s { display: block; flex-basis: 0; }
.sc-bars s + s { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .3); }
.sc-avg { position: absolute; left: 0; right: 0; bottom: 64%; border-top: 1.5px dashed color-mix(in srgb, var(--pri) 60%, transparent); opacity: 0; }
.sc-avg span { position: absolute; left: 0; bottom: 4px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 650; color: var(--pri); background: color-mix(in srgb, var(--surface-solid) 85%, transparent); }
.sc-note { position: absolute; inset: 0; display: flex; align-items: center; gap: 12px; padding: 0 18px 0 14px; }
.sc-bell { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--on-pri); background: var(--btn); flex: none; transform-origin: 50% 15%; }
.sc-nt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-nt b { font-size: 13.5px; white-space: nowrap; }
.sc-nt i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.sc-cap { width: 100%; max-width: 420px; margin-top: 6px; text-align: center; }
.sc-txt { min-height: 60px; }
.sc-txt b { font-size: 18px; font-weight: 800; }
.sc-txt p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.sc-prog { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.sc-prog i { width: 34px; height: 3px; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.sc-prog b { display: block; width: 0; height: 100%; background: var(--pri); }
@media (max-width: 920px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); max-width: 440px; gap: 36px; }
  .auth-show { order: 0; }
}
@media (max-width: 480px) {
  .auth { padding: 24px 16px; }
  .auth-card { padding: 30px 22px 24px; }
}
@media (min-width: 921px) { .sc-stage { zoom: 1.12; } }
@media (max-width: 400px) { .sc-stage { zoom: .84; } }
.countdown { display: flex; align-items: center; justify-content: center; gap: 10px; margin: -6px 0 16px; font-size: 13px; color: var(--muted); }
.countdown svg { width: 34px; height: 34px; transform: rotate(-90deg); }
.countdown .tr { fill: none; stroke: var(--line-2); stroke-width: 3; }
.countdown .pg { fill: none; stroke: var(--pri); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.countdown b { font: 700 14px var(--mono); color: var(--text); }

/* ---------- 总览 ---------- */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center; padding: 26px 28px; margin-bottom: 16px; overflow: hidden; }
.hero .verdict { font-size: 24px; font-weight: 800; letter-spacing: .2px; display: flex; align-items: center; gap: 12px; }
.hero .verdict .vdot { width: 12px; height: 12px; border-radius: 50%; background: var(--good); color: var(--good); animation: ping 2.4s var(--std) infinite; flex: none; }
.hero .verdict .vdot.warn { background: var(--warn); color: var(--warn); }
.hero .verdict .vdot.crit { background: var(--crit); color: var(--crit); }
.hero .vsub { color: var(--muted); margin-top: 8px; }
.hero .qs { display: flex; gap: 28px; margin-top: 18px; flex-wrap: wrap; }
.hero .q .n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hero .q .n small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.hero .q .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .tr { fill: none; stroke: var(--line); stroke-width: 10; }
.ring .pg { fill: none; stroke: url(#ringGrad); stroke-width: 10; stroke-linecap: round; transition: stroke .4s var(--std); } /* 弧长由 main.js 的弹簧驱动 */
.ring .c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .c b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring .c span { font-size: 11.5px; color: var(--muted); }
.ring.sm { width: 64px; height: 64px; }
.ring.sm .tr, .ring.sm .pg { stroke-width: 8; }
.ring.sm .c b { font-size: 14px; }

.switcher { padding: 20px 22px; margin-bottom: 16px; }
.sw-lines { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.sw-btn {
  position: relative; flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 0; border-radius: 14px; text-align: left;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); transition: transform .25s var(--spring), box-shadow .25s, background .25s;
}
.sw-btn:hover { transform: translateY(-2px); background: var(--hover); }
.sw-btn.on { box-shadow: inset 0 0 0 1.5px var(--rail, var(--pri)), 0 10px 30px -18px var(--rail, var(--pri)); background: color-mix(in srgb, var(--rail, var(--pri)) 9%, transparent); }
.sw-btn .nm { font-weight: 750; display: flex; align-items: center; gap: 8px; }
.sw-btn .sb { font-size: 12px; color: var(--muted); }
.sw-btn .on-mark { position: absolute; top: 12px; right: 12px; color: var(--rail, var(--pri)); }
.flowline { height: 28px; margin: 6px 0 0; }
.flowline path { fill: none; stroke: var(--pri); stroke-width: 2; stroke-dasharray: 6 8; animation: flow 1s linear infinite; opacity: .7; }

.lgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
.lcard { padding: 18px 20px; overflow: hidden; }
.lcard::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rail, var(--pri)); }
.lcard .row1 { display: flex; align-items: center; gap: 10px; }
.lcard .lname { font-weight: 750; font-size: 15.5px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lcard .addr { font: 12px var(--mono); color: var(--faint); margin-top: 4px; }
.lcard .mets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.lcard .m .n { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lcard .m .n small { font-size: 12px; color: var(--muted); font-weight: 600; }
.lcard .m .k { font-size: 11.5px; color: var(--muted); }
.lcard .foot { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; align-items: center; }
.lock-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gold); }

.ov2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ov2 > div { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.issues { display: flex; flex-direction: column; gap: 10px; }
.issue { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.issue .fix { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.entry { display: flex; flex-direction: column; gap: 10px; padding: 12px 13px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s var(--spring), background .2s, box-shadow .2s; min-width: 0; }
.entry:hover { transform: translateY(-2px); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); }
.entry .top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.entry .nm { font-weight: 700; min-width: 0; }
.entry .links { display: flex; flex-direction: column; gap: 6px; }
.entry .lk { display: flex; align-items: center; gap: 7px; font: 12px var(--mono); color: var(--muted); min-width: 0; }
.entry .lk a { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry .lk button { margin-left: auto; border: 0; background: none; color: var(--faint); padding: 2px; display: inline-flex; border-radius: 6px; }
.entry .lk button:hover { color: var(--pri); background: var(--hover); }
.av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); color: var(--fg, var(--text)); background: linear-gradient(135deg, var(--a1, var(--hover)), var(--a2, var(--surface-2))); }
html[data-mode="light"] .av { color: var(--fgl, var(--text)); box-shadow: inset 0 0 0 1px rgba(40, 30, 10, .08); }
.av.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 12.5px; }
.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 8px 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 8px; top: 24px; bottom: -8px; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .d { width: 9px; height: 9px; border-radius: 50%; margin: 6px 0 0 4px; background: var(--faint); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); color: var(--faint); }
.tl .d.good { background: var(--good); color: var(--good); } .tl .d.warn { background: var(--warn); color: var(--warn); } .tl .d.crit { background: var(--crit); color: var(--crit); } .tl .d.info { background: var(--pri); color: var(--pri); }
.tl .t { font-size: 13.5px; }
.tl .s { font-size: 12px; color: var(--faint); margin-top: 1px; }
.rank { display: flex; flex-direction: column; gap: 10px; }
.rank .r { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.rank .r .nm { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .r .val { font: 600 12.5px var(--mono); color: var(--muted); white-space: nowrap; }
.rank .r .sub { grid-column: 2 / 4; font-size: 11.5px; color: var(--faint); margin-top: -6px; }
/* 流量去向：线路筛选、按线路着色的明细、容器包含的服务 */
.flow-lines { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -2px 0 14px; }
.flow-lines .fl-t { font-size: 12.5px; color: var(--muted); }
.flow-lines .seg { flex-wrap: wrap; max-width: 100%; }
.rank .r .sub.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 14px; min-width: 0; color: var(--muted); }
.rank .r .fl-u { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: opacity .3s var(--std); }
.rank .r .fl-u.dim { opacity: .45; }
.rank .r .svcs { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); }
.rank .r .av.plain { background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.rank .r .flow-go { display: inline-flex; align-items: center; gap: 2px; margin-left: 12px; padding: 0; border: 0; background: none; font: inherit; color: var(--pri); cursor: pointer; }
.rank .r .flow-go:hover { text-decoration: underline; }
.fd-stack .stk { position: absolute; left: 0; top: 0; bottom: 0; display: flex; border-radius: 99px; overflow: hidden; }
.fd-stack .stk > i { display: block; flex: none; height: 100%; }
.fd-stack .stk > i + i { margin-left: 2px; }
@media (max-width: 480px) {
  .rank .r { grid-template-columns: minmax(80px, 128px) 1fr auto; gap: 10px; }
  .rank .r .sub { grid-column: 1 / 4; padding-left: 15px; }
  .rank .r .sub.chips { padding-left: 36px; }
}

/* ---------- 监控 ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; margin-bottom: 16px; }
/* 单台设备保留正常卡片宽度；多设备仍使用原来的自适应网格。 */
.vgrid > .vcard:only-child { width: 100%; max-width: 480px; justify-self: start; }
.vcard { padding: 20px 22px; }
.vcard .top { display: flex; align-items: center; gap: 10px; }
.vcard .gauges { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.vcard .gauges .ring.sm .c b { font-size: 13.5px; }
.vcard .gl { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 4px; }
.vcard .speed { flex: 1; min-width: 0; }
.vcard .speed .nums { display: flex; gap: 18px; font-size: 11.5px; color: var(--muted); }
.vcard .speed .nums span { display: flex; flex-direction: column; white-space: nowrap; }
.vcard .speed .nums span span { flex-direction: row; align-items: center; gap: 5px; }
.vcard .speed .nums b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.3; }
.spark { display: block; width: 100%; height: 44px; overflow: visible; }
.spark .ln { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .ar { opacity: .16; }
.spark.tiny { height: 18px; width: 64px; }
.quota { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.quota .qt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.quota .qt b { font-size: 16px; font-variant-numeric: tabular-nums; }
.quota .qf { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--faint); margin-top: 8px; flex-wrap: wrap; }
.trend { padding: 20px 22px; margin-bottom: 16px; }
/* 流量趋势（chart.js）：左侧 46px 为刻度栏；柱子细而圆，几条线路的流量叠成一根 */
.bc { position: relative; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.bc-plot { position: relative; height: 200px; margin-top: 8px; }
.bc-gl { position: absolute; left: 46px; right: 0; height: 0; border-top: 1px dashed var(--line); transition: bottom .55s var(--sp-out); }
.bc-gl span { position: absolute; left: -46px; width: 40px; bottom: -6px; text-align: right; font: 600 10.5px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.bc-avg { position: absolute; left: 46px; right: 0; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--pri) 60%, transparent); z-index: 2; pointer-events: none; transition: bottom .55s var(--sp-out); }
.bc-avg span { position: absolute; left: -50px; width: 46px; bottom: -6px; text-align: right; font: 700 10.5px/1 var(--mono); color: var(--pri); white-space: nowrap; }
.legend .lg-avg i { width: 16px; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--pri) 70%, transparent); }
.bc-cols { position: absolute; top: 0; right: 0; bottom: 0; left: 46px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.bc-col { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bc-col::before { content: ''; position: absolute; top: 0; bottom: 0; left: 10%; right: 10%; border-radius: 8px; background: var(--hover); opacity: 0; transition: opacity .2s var(--std); }
.bc-col.on::before { opacity: 1; }
.bc-bar { position: relative; width: min(26px, 64%); display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; transform-origin: bottom;
  animation: growY .9s var(--sp-out) both; animation-delay: calc(var(--c, 0) * 14ms); transition: height .55s var(--sp-out), filter .2s; } /* 从左到右依次长出 */
.bc-bar i { display: block; min-height: 0; flex-basis: 0; }
.bc-bar i + i { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .3); }
.bc-col.on .bc-bar { filter: brightness(1.15); }
.bc-col.today .bc-bar { box-shadow: 0 0 0 2px var(--surface-solid), 0 0 0 3.5px color-mix(in srgb, var(--pri) 65%, transparent); }
.bc-col.est .bc-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .28) 0 3px, transparent 3px 7px); }
.bc-move { transition: transform .5s var(--sp-out); }
.bc-axis { display: flex; padding-left: 46px; margin-top: 7px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.bc-axis span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }
.bc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.bc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.bc-axis span.today { color: var(--pri); font-weight: 650; }
.bc-tip { position: absolute; top: 0; left: 0; z-index: 3; min-width: 140px; max-width: 230px; padding: 9px 12px; border-radius: 12px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 34px -14px rgba(0, 0, 0, .7); font-size: 12px; pointer-events: none; }
.bc-tip .bt-h { color: var(--muted); font-weight: 600; }
.bc-tip .bt-v { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.bc-tip .bt-r { display: flex; align-items: center; gap: 7px; color: var(--muted); line-height: 1.7; }
.bc-tip .bt-r i { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.bc-tip .bt-r b { margin-left: auto; padding-left: 10px; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.bc-tip .bt-n { margin-top: 5px; color: var(--warn); font-size: 11.5px; line-height: 1.5; }
.trend-range { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: -2px 0 10px; font-size: 13px; }
.trend-range label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.trend-range input[type=date] { width: auto; min-width: 0; }
.trend-range .hint { flex-basis: 100%; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 7px; }

/* ---------- 服务 ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; flex-wrap: wrap; }
.search { position: relative; width: 280px; max-width: 100%; }
.search svg.i { position: absolute; left: 12px; top: 12px; color: var(--faint); }
.search input { padding-left: 36px; padding-right: 40px; }
.search .kbd { position: absolute; right: 9px; top: 9px; }
.svc-name { display: flex; align-items: center; gap: 11px; min-width: 170px; }
.svc-name .n { font-weight: 700; font-size: 14.5px; color: var(--text); border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.svc-name .n:hover { color: var(--pri); }
.svc-name .c { font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.svc-name .c svg.i { width: 11px; height: 11px; }
.tfc { display: flex; flex-direction: column; gap: 5px; }
.tfc .t { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.tfc .ls { display: flex; gap: 5px; flex-wrap: nowrap; }
.row-acts { display: flex; gap: 2px; justify-content: flex-end; }
.detail td { background: var(--surface-2) !important; }
.detail .dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 6px 4px 8px; white-space: normal; }
.detail h4 { font-size: 12px; color: var(--faint); letter-spacing: .08em; margin-bottom: 8px; font-weight: 700; }
.detail .urow { display: flex; align-items: center; gap: 8px; font: 12.5px var(--mono); margin-bottom: 6px; }
.hbars { display: flex; align-items: flex-end; gap: 2px; height: 56px; }
.hbars i { flex: 1; border-radius: 2px 2px 1px 1px; background: var(--btn); opacity: .85; min-height: 2px; transform-origin: bottom; animation: growY .7s var(--ease) both; }
.legend-line { margin-top: 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--faint); }
.legend-line > span { display: flex; align-items: center; gap: 7px; }
.mlist { display: none; flex-direction: column; gap: 10px; }
.mcard { padding: 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.mcard .mrow { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.grp-h { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 6px 4px 0; display: flex; align-items: center; gap: 8px; }

/* ---------- 容器 ---------- */
.ctr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.ctr { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ctr.stopped { opacity: .7; }
.ctr .hd { display: flex; align-items: center; gap: 10px; }
.ctr .nm { font-weight: 750; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctr .sub { font-size: 12px; color: var(--faint); }
.ctr .ports { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ctr .ports li { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
.ctr .ports li.open { box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 1px transparent; background-image: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); background-size: 100% 1px; background-repeat: no-repeat; background-position: bottom; }
.ctr .web { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; color: var(--pri); background: color-mix(in srgb, var(--pri) 13%, transparent); }
.lockpage { padding: 40px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lockpage .art { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent), 0 20px 50px -20px color-mix(in srgb, var(--gold) 60%, transparent); }
.lockpage .art svg.i { width: 32px; height: 32px; stroke-width: 1.6; }
.lockpage h2 { font-size: 20px; }
.lockpage ul { text-align: left; color: var(--muted); margin: 0; padding-left: 18px; line-height: 1.9; }

/* ---------- 线路 ---------- */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin-bottom: 16px; }
.srv { padding: 20px 22px; overflow: hidden; }
.srv::before { content: ''; position: absolute; left: 0; top: 20px; bottom: 20px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rail, var(--pri)); }
.srv .top { display: flex; align-items: center; gap: 10px; }
.srv .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 14px; }
.srv .fact { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.srv .fact .n { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.srv .fact .n small { font-size: 12px; font-weight: 600; color: var(--muted); }
.srv .fact .k { font-size: 11.5px; color: var(--muted); }
.srv .foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.srv details.logs { margin-top: 12px; }
.srv details.logs summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
.srv details.logs summary::-webkit-details-marker { display: none; }
.logbox { margin-top: 8px; max-height: 240px; overflow: auto; padding: 10px 12px; border-radius: 10px; font: 11.5px/1.6 var(--code); white-space: pre-wrap; color: var(--muted); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
html[data-mode="dark"] .logbox { background: rgba(0, 0, 0, .28); }
.srv.locked { opacity: .82; }
.old-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.old-row:first-child { border-top: 0; }
.old-row .main { flex: 1; min-width: 260px; }
.old-row .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .st { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 700 12px var(--mono); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.steps li.ok .st { color: var(--on-pri); background: var(--good); box-shadow: none; }
.steps li.fail .st { color: #fff; background: var(--crit); box-shadow: none; }
.steps li.run .st { color: var(--pri); box-shadow: inset 0 0 0 1.5px var(--pri); }
.steps li.warn .st { color: #fff; background: var(--warn); box-shadow: none; }
.steps.chk { gap: 14px; }
.steps.chk.dim { opacity: .55; }
.steps.chk .chk-body { min-width: 0; flex: 1; }
.steps.chk .chk-t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.steps.chk .chk-m { margin-top: 2px; overflow-wrap: anywhere; }
.steps.chk .hint { margin-top: 4px; overflow-wrap: anywhere; }
.steps.chk li.skip .chk-m { color: var(--muted); }
.lnkbtn { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
.lnkbtn:hover { text-decoration-color: currentColor; }
.nt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.nt-row:first-of-type { border-top: 0; }
.nt-main { flex: 1; min-width: 0; }
.nt-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nt-name b { overflow-wrap: anywhere; }
.nt-acts { display: flex; gap: 6px; flex: none; }
.nt-edit { margin: 8px 0 12px; }
.nt-edit .hint { overflow-wrap: anywhere; }
.nt-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 520px) { .nt-row { flex-wrap: wrap; } .nt-acts { width: 100%; justify-content: flex-end; } }
.box-note { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.box-note ol { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.ok-box { padding: 12px 14px; border-radius: 12px; color: var(--good); background: color-mix(in srgb, var(--good) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 30%, transparent); }
.err-box { padding: 12px 14px; border-radius: 12px; color: var(--crit); background: color-mix(in srgb, var(--crit) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 30%, transparent); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.cdot { width: 26px; height: 26px; border-radius: 50%; border: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); transition: transform .2s var(--spring); }
.cdot.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px currentColor; transform: scale(1.08); }
.cdot { position: relative; display: inline-grid; place-items: center; cursor: pointer; }
.cdot:hover { transform: scale(1.08); }
.cdot.custom { overflow: hidden; color: #fff; background: conic-gradient(from 210deg, #F87171, #FBBF24, #34D399, #22D3EE, #818CF8, #E879F9, #F87171); }
.cdot.custom input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.cdot.custom svg.i { width: 14px; height: 14px; stroke-width: 3; pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .45)); }
.line-picks { display: flex; gap: 8px; flex-wrap: wrap; }
.line-picks label { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 11px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 13.5px; }

/* ---------- 帮助 ---------- */
.help-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: start; }
.toc { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 2px; padding: 10px; }
.toc button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.toc button:hover { background: var(--hover); color: var(--text); }
.help-main { display: flex; flex-direction: column; gap: 16px; }
.help-main .card { padding: 22px 24px; scroll-margin-top: calc(var(--top-h) + 16px); }
.help-main h2 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.help-main p { color: var(--muted); }
.help-main p + p { margin-top: 8px; }
.howto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.how { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.how h3 { font-size: 14.5px; margin-bottom: 8px; display: flex; align-items: center; gap: 9px; }
.how h3 .no { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 700 11.5px var(--mono); color: var(--on-pri); background: var(--btn); flex: none; }
.how ol, .how p { margin: 0; color: var(--muted); font-size: 13px; }
.how ol { padding-left: 18px; line-height: 1.75; }
.concepts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.glossary { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; margin: 0; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 0; color: var(--muted); }
.legend-t td { padding: 7px 10px 7px 0; vertical-align: top; color: var(--muted); }
.diagram svg { width: 100%; height: auto; }
.diagram .dg-node { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.5; }
.diagram .dg-t { fill: var(--text); font-size: 15px; font-weight: 700; }
.diagram .dg-s { fill: var(--muted); font-size: 12.5px; }
/* 示意图动画（motion.js）：数据包、到达时的描边高亮、弹出的标记 */
.diagram.mini { max-width: 640px; margin: 14px 0 4px; }
.diagram .dg-pk circle { opacity: 0; }
.diagram .dg-hl { fill: none; stroke: var(--pri); stroke-width: 3; opacity: 0; }
.diagram .dg-dom { font: 600 12.5px var(--mono); }
.diagram .dg-box { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 5 6; }
.diagram .dg-chip { fill: var(--surface-solid); stroke: var(--line-2); stroke-width: 1.5; }
.diagram .dg-t2 { fill: var(--text); font-size: 14px; font-weight: 700; }
.diagram .dg-l { fill: var(--muted); font-size: 12px; }
.diagram .dg-m { font-family: var(--mono); }
.diagram .dg-trk { fill: var(--line); }
.notice-list { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.notice-list div { display: grid; grid-template-columns: 140px 110px 1fr; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.notice-list b { color: var(--text); }

/* ---------- 授权 ---------- */
.lic-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.edition { padding: 26px 28px; overflow: hidden; }
.edition.pro { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent), var(--shadow); }
.edition.pro::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(600px circle at 90% -20%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%); }
.edition .ename { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 12px; }
.edition.pro .ename b { background: linear-gradient(110deg, #FFF1D0, #E6BE7A, #C99A4E); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[data-mode="light"] .edition.pro .ename b { background: linear-gradient(110deg, #C99A4E, #A8792F, #8F6424); -webkit-background-clip: text; background-clip: text; }
.machine { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.machine .code { font: 700 19px/1 var(--code); letter-spacing: .08em; }
.feat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 18px; font-size: 13px; }
.feat-list span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.feat-list span.on { color: var(--text); }
.feat-list span.on svg.i { color: var(--good); }
.feat-list span svg.i { color: var(--faint); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.cmp th, .cmp td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.cmp th:first-child, .cmp td:first-child { text-align: left; color: var(--muted); }
.cmp thead th { font-size: 14px; }
.cmp thead th .p { display: block; font-size: 20px; font-weight: 800; margin-top: 4px; color: var(--text); white-space: nowrap; }
.cmp thead th .hint { white-space: nowrap; }
.cmp thead th .p small { font-size: 12px; color: var(--muted); font-weight: 600; }
.cmp thead th.gold { color: var(--gold); }
.cmp td svg.i.y { color: var(--good); }
.cmp td svg.i.n { color: var(--faint); }
.cmp tr:last-child td { border-bottom: 0; }

@media (max-width: 1100px) {
  .ov2, .lic-top { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero .ring { display: none; }
  .srv-grid, .vgrid, .lgrid, .ctr-grid { grid-template-columns: minmax(0, 1fr); }
  .srv .facts, .lcard .mets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .svc-table { display: none; }
  .mlist { display: flex; }
  .concepts { grid-template-columns: 1fr; }
  .notice-list div { grid-template-columns: 1fr; gap: 2px; }
  .feat-list { grid-template-columns: 1fr; }
  .search { width: 100%; }
}

/* ---------- 1.0 补充：通用小件 ---------- */
code { font: 500 12.5px/1.5 var(--code); padding: 1px 6px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); overflow-wrap: anywhere; }
.vd { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--faint); }
.vd.good { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 18%, transparent); }
.vd.app, .vd.tunnel { background: var(--crit); box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 20%, transparent); }
.vd.pending { background: var(--warn); }
.vd.ext { background: var(--sec); }
.was { text-decoration: line-through; color: var(--faint); font-weight: 600; font-size: 12px; margin-left: 5px; }
.btn.crit { color: #fff; background: var(--crit); box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--crit) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.crit:hover { background: color-mix(in srgb, var(--crit) 86%, #000); }

.form-warn { padding: 10px 12px; border-radius: 11px; font-size: 13px; color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }

html[data-mode="light"] .fast { color: #CA8A04; }

button.tag { font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 99px; cursor: pointer; transition: background .2s, box-shadow .2s, color .2s; }
button.tag:hover { color: var(--text); background: var(--hover); box-shadow: inset 0 0 0 1px var(--line-2); }
button.tag.gold { color: var(--text); background: color-mix(in srgb, var(--pri) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 50%, transparent); }

/* 浮动菜单 */
.pop.float { max-height: min(72vh, 520px); overflow-y: auto; min-width: 230px; }
.pop a.pop-i { color: var(--text); }
.pop a.pop-i:hover { text-decoration: none; }
.pop-i:disabled { opacity: .45; pointer-events: none; }
.pop-i svg.i { color: var(--muted); }
.pop-i.on svg.i, .pop-i svg.i.ck { color: var(--pri); }
.pop-i.danger svg.i { color: var(--crit); }
.pop-i svg.i.lock-i { color: var(--gold); }
label.pop-i { cursor: pointer; }

/* 确认框、专业版说明 */
.overlay.top { z-index: 70; }
.modal.narrow { width: min(460px, 100%); }
.modal > .content.confirm { text-align: center; padding: 30px 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.content.confirm h3 { font-size: 18px; font-weight: 800; }
.content.confirm > p { max-width: 390px; }
.ico-t.lg-ico { width: 54px; height: 54px; border-radius: 17px; margin-bottom: 2px; }
.ico-t.lg-ico svg.i { width: 25px; height: 25px; }
.upsell .lg-ico { box-shadow: 0 16px 40px -14px color-mix(in srgb, var(--gold) 70%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--gold) 35%, transparent); }
.up-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 6px 0 2px; text-align: left; font-size: 13px; width: 100%; }
.up-feats span { display: flex; align-items: center; gap: 7px; }
.up-feats svg.i { color: var(--gold); }
.up-price { display: flex; gap: 10px; width: 100%; margin: 6px 0 2px; }
.up-price > div { flex: 1; padding: 12px 10px; border-radius: 14px; text-align: center; background: color-mix(in srgb, var(--gold) 6%, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }
.up-price b { font-size: 23px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.up-price span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 监控：卡片下方的小数字 */
.minis { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.minis b { color: var(--text); font-weight: 700; margin-right: 5px; font-variant-numeric: tabular-nums; }
.vcard .nas-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.nas-facts > div { display: flex; flex-direction: column; min-width: 0; }
.nas-facts b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nas-facts b small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.nas-facts span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* 服务：手机卡片 */
.msort { display: none; width: auto; height: 38px; }
.mcard.sel { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pri) 55%, transparent), var(--shadow); }
.mcard.bad { box-shadow: inset 3px 0 0 var(--crit), inset 0 0 0 1px var(--line), var(--shadow); }
.mcard.dim .mname, .mcard.dim .mmeta { opacity: .6; }
.mcard .mname { flex: 1; min-width: 0; }
.mcard .mname .n { font-weight: 700; font-size: 15px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .mname .c { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mcard .mmeta { font-size: 12.5px; color: var(--muted); }
.mcard .mt b { color: var(--text); font-variant-numeric: tabular-nums; }
.mcard .mdetail { padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.grp-h { cursor: pointer; user-select: none; }
.grp-h .gchev { transition: transform .25s var(--ease); }
.grp-h.closed .gchev { transform: rotate(-90deg); }

/* 帮助：图示里的隧道在流动 */
.dg-flow { stroke-dasharray: 7 7; }
.about-logo .fd-logo { height: 34px; width: auto; }
.legend-t { width: 100%; border-collapse: collapse; }
.legend-t.third td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.legend-t.third tr:last-child td { border-bottom: 0; }
.legend-t.third td:last-child { color: var(--muted); }

/* 授权：版本对比里标出当前版本 */
.cmp thead th { position: relative; vertical-align: bottom; padding-top: 26px; }
.cmp thead th .hint { display: block; font-weight: 500; margin-top: 3px; }
.cmp thead th.cur { background: color-mix(in srgb, var(--pri) 8%, transparent); border-radius: 12px 12px 0 0; }
.cmp thead th.cur::before { content: '当前版本'; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--pri); white-space: nowrap; }

@media (max-width: 860px) {
  .msort { display: block; flex: 1; min-width: 150px; }
  .up-feats { grid-template-columns: 1fr; }
  .cmp th, .cmp td { padding: 10px 8px; }
}

/* ---------- 安装成应用（PWA） ---------- */
.pwa-card { position: fixed; z-index: 80; right: 20px; bottom: 20px; width: min(410px, calc(100vw - 24px)); display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; padding: 16px; border-radius: 18px; background: var(--surface-solid); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 32%, var(--line-2)), 0 26px 60px -18px rgba(0, 0, 0, .6); }
html[data-mode="light"] .pwa-card { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 32%, var(--line-2)), 0 26px 60px -22px rgba(60, 40, 10, .35); }
.pwa-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: radial-gradient(circle at 22% 12%, rgba(230, 190, 122, .22), transparent 60%), linear-gradient(155deg, #1C150D, #0A0806); box-shadow: inset 0 0 0 1px rgba(230, 190, 122, .3), 0 10px 24px -12px rgba(230, 190, 122, .6); }
.pwa-ico .fd-logo { width: 27px; height: 27px; }
.pwa-ico .lg-m { fill: #E6BE7A; } .pwa-ico .lg-a { fill: #FFF1D0; }
.pwa-txt { padding-right: 18px; }
.pwa-txt b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.pwa-txt span { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.pwa-acts { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.pwa-card .x { position: absolute; top: 10px; right: 10px; border: 0; background: none; color: var(--faint); padding: 4px; border-radius: 8px; display: inline-flex; }
.pwa-card .x:hover { color: var(--text); background: var(--hover); }
.pwa-enter-active, .pwa-leave-active { transition: opacity .35s var(--ease), transform .45s var(--ease); }
.pwa-enter-from, .pwa-leave-to { opacity: 0; transform: translateY(16px) scale(.98); }
/* 装成应用后在苹果手机上全屏显示：顶栏让出状态栏的位置 */
.topbar { padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); }
@media (max-width: 860px) {
  .pwa-card { right: 12px; left: 12px; width: auto; bottom: calc(86px + env(safe-area-inset-bottom)); }
  .brand .ver { display: none; }
  .hero .qs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
}

/* ---------- 账号安全、VPS 安全防护 ---------- */
.banner.warn { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); }
.banner.warn > svg.i { color: var(--warn); }
.banner.good { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 40%, transparent); background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.banner.good > svg.i { color: var(--good); }
.icon-btn.warn { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.vd.lan { background: var(--sec); }
.sec-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.sstat { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sstat .ico-t { width: 40px; height: 40px; border-radius: 12px; }
.sstat .k { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.sstat b { font-size: 16.5px; font-weight: 750; }
.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sec-grid .sec-wide { grid-column: 1 / -1; }
.sec-grid .fields { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sec-grid .fields > .field { flex: 1 1 200px; }
.sec-p { margin: 2px 0 16px; font-size: 13.5px; line-height: 1.75; }
.row-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-acts .grow { flex: 1; min-width: 200px; }
.tfa-step { margin-top: 2px; }
.qr-box { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 16px; }
.qr-box img { width: 176px; height: 176px; flex: none; padding: 8px; border-radius: 14px; background: #fff; image-rendering: pixelated; box-shadow: 0 0 0 1px var(--line); }
.qr-box .steps { margin: 0; padding-left: 20px; list-style: decimal; color: var(--muted); font-size: 13.5px; line-height: 1.9; min-width: 0; }
.qr-box .steps li { padding-left: 2px; }
.qr-box .secret { margin: 6px 0 4px; padding: 8px 11px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: 13.5px; letter-spacing: .05em; word-break: break-all; }
input.otp:not(:placeholder-shown) { font-size: 18px; letter-spacing: .32em; }
.otp-field input:not(:placeholder-shown) { letter-spacing: .18em; }
.rc-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.rc-grid span { padding: 9px 8px; border-radius: 10px; text-align: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; letter-spacing: .04em; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.login-t td { white-space: nowrap; }
.exp-head { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; }
.exp-head .grow { flex: 1; min-width: 0; margin: 0; }
.exp-tbl { margin-bottom: 10px; }
.exp-tbl td .nm { font-weight: 650; margin-right: 8px; }
.exp-tbl tr.extra td { color: var(--muted); }
.exp-tbl tr.extra .nm { font-weight: 550; }
.firewall-modal { min-width: 0; max-width: 100%; }
.firewall-modal > .content { min-width: 0; }
.exp-control { display: flex; align-items: center; gap: 10px; }
.exp-control .hint { max-width: 155px; white-space: normal; }
.fw-command { margin: 12px 0; min-width: 0; }
.fw-command-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fw-command-head .hint { min-width: 0; }
.fw-command pre.code { max-height: 300px; }
.fw-manual { margin-top: 20px; }
.sub-h { margin: 22px 0 10px; font-size: 15px; font-weight: 750; }
pre.code.fw { max-height: 300px; overflow: auto; font-size: 12px; line-height: 1.6; white-space: pre; }
@media (max-width: 860px) {
  .sec-stat, .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .qr-box { flex-direction: column; }
  .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exp-head { flex-direction: column; align-items: stretch; }
  .exp-control { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 600px) {
  .exp-tbl table.t, .exp-tbl tbody { display: block; }
  .exp-tbl thead { display: none; }
  .exp-tbl table.t tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .exp-tbl table.t td { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; }
  .exp-tbl td:nth-child(1) { grid-area: 1 / 1; overflow-wrap: anywhere; }
  .exp-tbl td:nth-child(2) { grid-area: 2 / 1; font-size: 12px; color: var(--muted); }
  .exp-tbl td:nth-child(2)::before { content: 'VPS '; }
  .exp-tbl td:nth-child(3) { grid-area: 3 / 1; }
  .exp-tbl td:nth-child(4) { grid-area: 1 / 2 / 4 / 3; align-self: center; }
  .exp-tbl td:nth-child(4) .hint { white-space: normal; }
  .fw-command-head { align-items: flex-start; flex-wrap: wrap; }
}

/* ---------- 1.0.2 容器页：NAS 容器 / VPS 端口两个来源，卡片和列表两种展示 ---------- */
.src-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.src-tabs button { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 0; border-radius: 16px; text-align: left; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, color .2s, background .2s; cursor: pointer; }
.src-tabs button:hover { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.src-tabs button.on { color: var(--text); background: color-mix(in srgb, var(--pri) 7%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pri) 55%, transparent), 0 10px 30px -18px color-mix(in srgb, var(--pri) 60%, transparent); }
.src-tabs .t { display: flex; flex-direction: column; gap: 3px; font-weight: 750; font-size: 14.5px; min-width: 0; }
.src-tabs .t small { font-weight: 550; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-sel { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 11px; height: 38px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.dk-sel select { border: 0; background: transparent; box-shadow: none; height: 34px; padding: 0 8px 0 2px; font-size: 13px; font-weight: 600; color: var(--text); width: auto; }
.seg.icon-seg button { padding: 6px 10px; }
.dk-list { padding: 4px 0; overflow: hidden; }
.dl-head, .dl-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 96px minmax(240px, 2fr) 92px; gap: 14px; align-items: center; padding: 10px 16px; }
.dl-head { font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .03em; border-bottom: 1px solid var(--line); }
.dl-head span:last-child { text-align: right; }
.dl-grp { display: flex; align-items: center; gap: 8px; padding: 9px 16px 7px; background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; user-select: none; border-bottom: 1px solid var(--line); }
.dl-grp em { font-style: normal; font-weight: 600; color: var(--faint); }
.dl-grp .gchev { transition: transform .25s var(--ease); }
.dl-grp.closed .gchev { transform: rotate(-90deg); }
.dl-row { border-bottom: 1px solid var(--line); transition: background .2s; }
.dl-row:last-child { border-bottom: 0; }
.dl-row:hover { background: var(--hover); }
.dl-row.stopped { opacity: .66; }
.dl-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-name .min { min-width: 0; }
.dl-name .nm { display: flex; align-items: center; gap: 6px; font-weight: 700; min-width: 0; }
.dl-name .sub { font-size: 11.5px; color: var(--faint); }
.dl-ports { display: flex; flex-wrap: wrap; gap: 6px; }
.dp { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 3px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; }
.dp.open { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.dp.inner { opacity: .6; }
.dp .chip { padding: 2px 7px; }
.dp .pill { font-size: 11.5px; padding: 2px 8px; }
.dp { max-width: 100%; min-width: 0; }
.dp > * { white-space: nowrap; flex-shrink: 0; }
.dp > .pill { flex-shrink: 1; min-width: 0; max-width: 100%; }
.dp .pill .ellipsis, .ctr .ports .pill .ellipsis { min-width: 0; }
/* 容器卡片的端口行：放不下时「已加入」「加入反代」换到下一行，靠右；名字太长省略 */
.ctr .ports li { flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.ctr .ports li > * { white-space: nowrap; }
.ctr .ports li > .end { margin-left: auto; }
.ctr .ports li > .pill { min-width: 0; max-width: 100%; }
.dp .web { font-size: 10.5px; font-weight: 700; padding: 2px 5px; border-radius: 5px; color: var(--pri); background: color-mix(in srgb, var(--pri) 13%, transparent); }
.dl-time { font-size: 12px; text-align: right; }
.vp-intro { margin: -2px 2px 14px; }
.vp-card { margin-bottom: 14px; box-shadow: inset 3px 0 0 var(--rail), inset 0 0 0 1px var(--line); }
.vp-card .card-title .ld { background: var(--rail); }
.vp-card .card-title .mini { font-weight: 500; margin-left: 4px; }
.vp-empty { display: flex; align-items: center; gap: 10px; padding: 14px 4px 4px; color: var(--muted); font-size: 13.5px; }
.vp-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.vp-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 10px 9px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.vp-row.open { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
.vp-port { display: flex; align-items: center; gap: 7px; }
.vp-port .chip { font-weight: 700; }
.vp-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vp-what b { font-weight: 700; }
.vp-proto { font: 700 10.5px/1 var(--mono); padding: 4px 6px; border-radius: 6px; color: var(--muted); background: var(--hover); }
.vp-proto.http { color: var(--pri); background: color-mix(in srgb, var(--pri) 13%, transparent); }
.vp-act { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; text-align: right; }
.vp-others { margin-top: 12px; }
.vps-tag { display: inline-flex; align-items: center; gap: 5px; }
.vps-tag svg.i { color: var(--rail, var(--muted)); }
.seg.where { display: flex; }
.seg.where button { flex: 1; justify-content: center; padding: 9px 12px; }
.seg.where button { flex-wrap: wrap; row-gap: 3px; }
.seg.where button em { font: 600 11.5px/1 var(--font); opacity: .75; white-space: nowrap; }
.stat .nasip { font-size: 19px; }
.pager { display: flex; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; font-size: 12.5px; }
.pager .pg { min-width: 30px; justify-content: center; }
.pager .pg.on { color: var(--text); background: color-mix(in srgb, var(--pri) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 45%, transparent); }
.list-pager { justify-content: space-between; margin: 12px 0; gap: 8px; }
.page-count { color: var(--muted); }
.page-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
select.page-size { width: auto; min-width: 0; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 12.5px; }
.page-controls { display: flex; align-items: center; gap: 6px; }
.page-controls select { width: auto; min-width: 86px; }
.page-controls .btn, .page-controls select { min-height: 44px; }
.paged-list, .page-anchor { scroll-margin-top: 90px; }
.page-selection { display: flex; align-items: center; gap: 8px; margin: 12px 0; font-size: 13px; }
.list-help { margin-top: 12px; color: var(--muted); font-size: 13px; }
.list-help summary { cursor: pointer; }
.howto summary { cursor: pointer; color: var(--text); font-weight: 650; font-size: 14px; }
@media (max-width: 480px) {
  .list-pager .page-info { flex-basis: 100%; justify-content: space-between; }
  select.page-size { min-height: 44px; }
  .page-controls { width: 100%; justify-content: space-between; }
}
@media (max-width: 860px) {
  .src-tabs { gap: 8px; }
  .src-tabs button { padding: 11px 12px; gap: 9px; }
  .dl-head { display: none; }
  .dl-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 11px 14px; }
  .dl-ports { grid-column: 1 / -1; }
  .dl-time { display: none; }
  .vp-row { grid-template-columns: auto minmax(0, 1fr); }
  .vp-port { flex-direction: column; align-items: flex-start; gap: 4px; }
  .vp-act { grid-column: 1 / -1; justify-content: flex-start; text-align: left; }
}

/* 很窄的手机：监控卡片的仪表占一行、网速和小数字换到下一行；对比表收紧一点 */
@media (max-width: 860px) { .stat .nasip { font-size: 15px; } }
@media (max-width: 480px) {
  .pager .lbl { display: none; }
  .vcard .gauges { flex-wrap: wrap; }
  .vcard .gauges .speed { flex: 1 1 100%; }
  .cmp th, .cmp td { padding: 10px 8px; }
}
@media (max-width: 400px) { .stat .nasip { font-size: 13.5px; } }

@media(max-width:420px){.machine{flex-wrap:wrap}.machine .code{font-size:16px;overflow-wrap:anywhere;line-height:1.4}.lic-top .card .btn{min-height:44px}}
@media(max-width:360px){
  .topbar{height:auto;min-height:var(--top-h)}
  .topbar-in{height:auto;min-height:var(--top-h);flex-wrap:wrap;padding:8px 12px;gap:8px}
  .top-actions{flex:1 1 100%;justify-content:space-between;gap:4px;margin-left:0}
  .top-actions .icon-btn{width:44px;height:44px}
  .topbar .lic-badge{height:44px;min-width:44px;padding:0 10px}
  .topbar .pop-anchor>.pop{position:fixed;top:100px;right:12px;max-width:calc(100vw - 24px)}
}

/* ---------- 服务页：按线路分列显示访问地址；总览：服务入口目录 ---------- */
.svc-table tr.clickable { cursor: pointer; }
.chev { width: 24px; height: 24px; border: 0; background: none; color: var(--muted); border-radius: 7px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.chev svg.i { transition: transform .22s var(--std); transform: rotate(-90deg); }
.chev.on svg.i { transform: none; }
.chev:hover { background: var(--hover); color: var(--text); }
.svc-name .addr { display: block; font: 11.5px var(--mono); color: var(--faint); margin-top: 3px; white-space: nowrap; }
.addr .arr { margin: 0 5px; opacity: .55; }
.le { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 250px; }
.le-h { display: flex; align-items: center; gap: 5px; font: 12.5px var(--mono); min-width: 0; }
.le-h a, .dir-lk a, .ml a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.le-h a:hover, .dir-lk a:hover, .ml a:hover { color: var(--pri); text-decoration: underline; text-underline-offset: 3px; }
.cp, .dir-lk button { border: 0; background: none; color: var(--faint); padding: 3px; cursor: pointer; border-radius: 6px; display: grid; place-items: center; flex: none; }
.cp:hover, .dir-lk button:hover { color: var(--text); background: var(--hover); }
.le-s { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.le .dot, .ml .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.le.good .dot, .ml.good .dot { background: var(--good); }
.le.good .le-s { color: var(--good); }
.le.warn .dot, .ml.warn .dot { background: var(--warn); }
.le.warn .le-s, .ml.warn .st { color: var(--warn); }
.le.crit .dot, .ml.crit .dot { background: var(--crit); }
.le.crit .le-s, .ml.crit .st { color: var(--crit); }
.le-s .ms { font: 11px var(--mono); color: var(--faint); }
.le-s .fast svg.i { width: 11px; height: 11px; color: var(--gold); }
.le.none { flex-direction: row; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; }
.linkbtn { border: 0; background: none; color: var(--pri); font-size: 12px; font-weight: 650; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }

.dir-card { margin-top: 16px; }
.dir-search { width: 260px; }
.dir-groups { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 14px; }
.dg { height: 28px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 12.5px; font-weight: 650; cursor: pointer; }
.dg em { font-style: normal; color: var(--faint); margin-left: 3px; }
.dg.on { color: var(--text); background: color-mix(in srgb, var(--pri) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pri) 45%, var(--line)); }
.dg.on em { color: inherit; }
.dir-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.dir-hd, .dir-row { display: grid; grid-template-columns: minmax(120px, 1fr) repeat(var(--n), minmax(0, 1.35fr)); gap: 12px; align-items: center; }
.dir-hd { font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 0 6px 8px; border-bottom: 1px solid var(--line); }
.dir-hd > span { display: inline-flex; align-items: center; gap: 6px; }
.dir-g { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 14px 6px 6px; }
.dir-g .ld { width: 8px; height: 8px; border-radius: 3px; }
.dir-g em { font-style: normal; color: var(--faint); font-weight: 500; }
.dir-row { padding: 6px; border-radius: 8px; min-height: 34px; }
.dir-row:hover { background: var(--hover); }
.dir-nm { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text); min-width: 0; }
.dir-lk { display: flex; align-items: center; gap: 3px; font: 12px var(--mono); min-width: 0; }
@media (max-width: 1100px) { .dir-cols { grid-template-columns: minmax(0, 1fr); } .dir-cols .dir-hd:nth-child(2) { display: none; } }
.le-h .pa, .ml .pa { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-lk .ld { display: none; }
.dir-lk .dl-line { display: none; }
.dir-more { display: flex; margin: 12px auto 0; }
/* 手机：服务卡片里每条线路一行 */
.mlinks { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; }
.ml { display: flex; align-items: center; gap: 8px; min-width: 0; font: 12.5px var(--mono); }
.ml a, .ml .pa { flex: 1 1 auto; min-width: 0; }
.ml .st { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 600 11.5px var(--font); color: var(--good); }
.ml .st .ms { font: 11px var(--mono); color: var(--faint); }
.ml.none { font: 12px var(--font); color: var(--faint); }
@media (max-width: 720px) {
  .dir-card .card-head { flex-wrap: wrap; }
  .dir-search { width: 100%; }
  .dir-hd { display: none; }
  /* 手机：一行一个服务，右侧按线路名列出入口，点击打开；完整域名在服务页查看 */
  .dir-row { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 2px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .dir-row:last-child { border-bottom: 0; }
  .dir-nm { flex: 1 1 auto; font-size: 14px; font-weight: 600; }
  .dir-lk { flex: none; max-width: 112px; font: 600 12px/1 var(--font); }
  .dir-lk.nil, .dir-lk button, .dir-lk .dl-host { display: none; }
  .dir-lk a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
  .dir-lk a:hover { text-decoration: none; }
  .dir-lk .dl-line { display: inline; overflow: hidden; text-overflow: ellipsis; }
  .dir-lk > .ld { display: none; }
  .dir-lk a::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--rail); }
}
/* 自动整理分组 */
.ag-list { max-height: min(56vh, 520px); overflow: auto; border-top: 1px solid var(--line); }
.ag-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 110px) 14px minmax(120px, 150px); align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ag-row.off .ag-nm b { color: var(--muted); }
.ag-nm { display: flex; flex-direction: column; min-width: 0; }
.ag-nm b { font-size: 13.5px; color: var(--text); }
.ag-nm small { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-from { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.ag-row select { min-width: 0; height: 32px; font-size: 13px; }
@media (max-width: 560px) {
  .ag-row { grid-template-columns: 20px minmax(0, 1fr) minmax(110px, 130px); }
  .ag-from, .ag-row > svg.i { display: none; }
}
.grp-act { margin-left: 12px; vertical-align: 1px; }

/* ---------- 监控：精确仪表、额度进度、时间曲线、详情页 ---------- */
.vcard.clickable { cursor: pointer; transition: transform .35s var(--sp-out), box-shadow .35s var(--std); }
.vcard.clickable:hover { transform: translateY(-2px); }
.vcard .go { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--faint); transition: color .2s var(--std), background-color .2s var(--std), transform .3s var(--sp-out); }
.vcard.clickable:hover .go { color: var(--text); background: var(--hover); transform: translateX(2px); }
.vcard .gauges { align-items: flex-start; }
.gcell { display: flex; flex-direction: column; align-items: center; flex: none; }
.gcell .gs { font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; margin-top: -2px; }
.gauge { position: relative; width: 92px; height: 78px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .tr { fill: none; stroke: var(--line); stroke-width: 7; stroke-linecap: round; }
.gauge .vl { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke .4s var(--std); }
.gauge .tk { stroke: var(--line-2, var(--line)); stroke-width: 1.2; }
.gauge .tk.mj { stroke: var(--faint); stroke-width: 1.6; }
.gauge .pk { stroke: var(--text); stroke-width: 2; stroke-linecap: round; opacity: .75; }
.gauge .gv { position: absolute; left: 0; right: 0; top: 30px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.gauge .gv b { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }
.gauge .gv b small { font-size: 10px; font-weight: 700; margin-left: 1px; color: var(--muted); }
.gauge .gv span { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.qbar { position: relative; height: 8px; border-radius: 99px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: visible; margin-top: 2px; }
.qbar .qfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--good); transition: width .8s var(--sp-out); }
.qbar.warn .qfill { background: var(--warn); }
.qbar.crit .qfill { background: var(--crit); }
.qbar .qp { position: absolute; top: 1px; bottom: 1px; border-radius: 0 99px 99px 0; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--good) 45%, transparent) 0 3px, transparent 3px 6px); transition: left .8s var(--sp-out), width .8s var(--sp-out); }
.qbar .qp.over { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--crit) 55%, transparent) 0 3px, transparent 3px 6px); }
.qbar .qtick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--text); opacity: .7; transition: left .8s var(--sp-out); }
.qproj-t { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.qproj-t.warn { color: var(--warn); }
.qproj-t .qt-key { width: 2px; height: 11px; border-radius: 2px; background: var(--text); opacity: .7; flex: none; }

.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: var(--h) auto; column-gap: 10px; margin-top: 6px; }
.ch-empty { grid-column: 1 / -1; height: var(--h); display: grid; place-items: center; color: var(--faint); font-size: 13px; border: 1px dashed var(--line); border-radius: 12px; }
.ch-y { position: relative; min-width: 52px; }
.ch-y span { position: absolute; right: 0; transform: translateY(-50%); font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.ch-plot { position: relative; height: var(--h); touch-action: pan-y; }
.ch-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed var(--line); }
.ch-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--sp-out); }
.ch-plot svg.drawn { clip-path: inset(0 0 0 0); }
.ch-l { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ch-l.dash { stroke-dasharray: 4 4; }
.ch-a { opacity: .13; }
.ch-mark { position: absolute; bottom: 0; width: 2px; height: 9px; margin-left: -1px; border-radius: 2px; background: var(--warn); }
.ch-mark.crit { background: var(--crit); }
.ch-hl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text); opacity: .35; pointer-events: none; }
.ch-tip { position: absolute; top: 6px; transform: translateX(12px); min-width: 150px; padding: 9px 11px; border-radius: 10px; background: var(--surface-solid); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-size: 12px; pointer-events: none; z-index: 3; display: flex; flex-direction: column; gap: 4px; }
.ch-tip.r { transform: translateX(calc(-100% - 12px)); }
.ch-tip b { font: 600 11.5px var(--mono); color: var(--muted); }
.ch-tip span { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.ch-tip em { font: normal 650 12px var(--mono); color: var(--text); margin-left: auto; padding-left: 12px; }
.ch-tip .ch-note { color: var(--crit); }
.ch-x { grid-column: 2; position: relative; height: 22px; }
.ch-x span { position: absolute; top: 6px; transform: translateX(-50%); font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.ch-x span:first-child { transform: none; }
.ch-x span:last-child { transform: translateX(-100%); }
@media (prefers-reduced-motion: reduce) { .ch-plot svg, .qbar .qfill, .qbar .qp, .qbar .qtick { transition: none; } }

.mon-range { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 12px; font-size: 13px; }
.mon-range .mr-t { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 650; }
.mon-range label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.mon-range input { height: 32px; padding: 0 8px; font-size: 13px; }
.rank .r.clickable { cursor: pointer; border-radius: 10px; }
.rank .r.clickable:hover { background: var(--hover); }

.mdetail .md-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 14px; margin: 4px 0 16px; }
.md-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.md-name .h1 { margin: 0; font-size: 26px; }
.md-name .ld { width: 10px; height: 10px; }
.md-storage-bar { display: flex; align-items: center; gap: 10px; margin: -2px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12px; color: var(--muted); }
.md-storage-bar > div { flex: 1; min-width: 0; }
.md-storage-bar b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.md-storage-bar small { display: block; margin-top: 3px; color: var(--faint); font-size: 11px; }
.md-storage-bar > .btn { flex: none; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; animation: cardIn .7s var(--sp-out) both; }
.kpi:nth-child(2) { animation-delay: .04s; } .kpi:nth-child(3) { animation-delay: .08s; } .kpi:nth-child(4) { animation-delay: .12s; } .kpi:nth-child(n+5) { animation-delay: .16s; }
.kpi .k { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kpi b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.2; }
.kpi b small { font-size: 12px; font-weight: 650; color: var(--muted); }
.kpi b.warn { color: var(--warn); } .kpi b.crit { color: var(--crit); }
.kpi .s { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.md-grid > .card { animation: cardIn .8s var(--sp-out) both; min-width: 0; }
.md-grid > .card:nth-child(2) { animation-delay: .06s; } .md-grid > .card:nth-child(3) { animation-delay: .1s; } .md-grid > .card:nth-child(n+4) { animation-delay: .14s; }
.md-grid .span2 { grid-column: 1 / -1; }
.md-svcs { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ms-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 76px 58px; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; font-size: 13px; }
.ms-row.clickable { cursor: pointer; }
.ms-row.clickable:hover { background: var(--hover); }
.ms-row .v { font: 12px var(--mono); color: var(--muted); text-align: right; }
.ms-row .ok { font: 650 12px var(--mono); text-align: right; color: var(--muted); }
.ms-row .ok.good { color: var(--good); } .ms-row .ok.warn { color: var(--warn); } .ms-row .ok.crit { color: var(--crit); }
.ms-row.nobar { grid-template-columns: minmax(0, 1fr) 76px 58px; }
.md-links { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: -6px 0 14px; font: 12.5px var(--mono); }
.md-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--text); text-decoration: none; }
.md-links a:hover { color: var(--pri); }
.md-links .ld { background: var(--rail); }
.md-events { margin-top: 14px; }
.ret-use { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.ret-use > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.ret-use span { font-size: 11.5px; color: var(--muted); }
.ret-use b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.ret-use em { font-style: normal; font-size: 11px; color: var(--faint); }
.ret-advice { display: flex; gap: 9px; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.ret-advice.warn { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent); }
.ret-advice > svg { flex: none; margin-top: 2px; }
.ret-advice b, .ret-advice span { display: block; }
.ret-advice b { margin-bottom: 4px; color: var(--text); font-size: 12.5px; }
.ret-advice span + span { margin-top: 4px; color: var(--faint); }
.ret-storage { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ret-storage-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.ret-path { display: block; padding: 9px 10px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.ret-storage > p.hint { margin: 7px 0 10px; font-size: 11px; }
.ret-file { display: grid; grid-template-columns: minmax(0, 1fr) 72px 80px; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.ret-file:last-child { border-bottom: 0; }
.ret-file b { font-weight: 600; }
.ret-file code { display: block; margin-top: 2px; font-size: 10.5px; color: var(--faint); overflow-wrap: anywhere; }
.ret-file > span { text-align: right; color: var(--faint); font-size: 11px; }
.ret-file strong { text-align: right; font: 600 11.5px var(--mono); color: var(--text); }
.retention-modal footer { flex-wrap: wrap; }
.ret-clean { margin-right: auto; }
@media (max-width: 860px) {
  .md-grid { grid-template-columns: minmax(0, 1fr); }
  .md-grid .span2 { grid-column: auto; }
  .ret-use { grid-template-columns: minmax(0, 1fr); }
  .mdetail .md-top .seg { width: 100%; overflow-x: auto; }
  .md-name .h1 { font-size: 22px; }
}
@media (max-width: 480px) {
  .md-storage-bar { flex-wrap: wrap; }
  .md-storage-bar > div { flex-basis: calc(100% - 30px); }
  .md-storage-bar > .btn { margin-left: 24px; }
  .md-storage-size { display: block; margin-top: 3px; }
  .ret-clean { flex-basis: 100%; order: 1; margin-right: 0; }
  .ret-file { grid-template-columns: minmax(0, 1fr) 58px 68px; gap: 7px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 18px; }
  .ms-row { grid-template-columns: minmax(0, 1fr) 70px 52px; }
  .ms-row .fd-bar { display: none; }
  .gauge { width: 80px; height: 68px; }
  .gauge .gv { top: 25px; }
  .vcard .gauges { gap: 8px; }
}
.vcard .nf-row { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }
@media (max-width: 480px) { .vcard .nf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 线路卡片：仪表变宽后，速率数字上下排列 */
.vcard .gauges .speed .nums { flex-direction: column; gap: 3px; }
.vcard .gauges .speed .nums > span { flex-direction: row; align-items: baseline; gap: 8px; }
.vcard .gauges .speed .nums b { font-size: 15px; }

/* ---------- 帮助：部署教程 ---------- */
.dsteps { list-style: none; margin: 18px 0 14px; padding: 0; }
.dsteps > li { position: relative; padding: 0 0 24px 42px; }
.dsteps > li::before { content: ''; position: absolute; left: 13px; top: 34px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.dsteps > li:last-child { padding-bottom: 4px; }
.dsteps > li:last-child::before { display: none; }
.dsteps h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 3px 0 8px; }
.dsteps h3 .no { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--font); color: var(--on-pri); background: var(--btn); }
.dsteps p { margin: 0 0 8px; }
.help-main .dsteps p + p { margin-top: 0; }
.dsteps ol { margin: 0 0 8px; padding-left: 20px; line-height: 1.75; }
.dsteps ol li + li { margin-top: 6px; }
.dsteps .code-wrap { margin: 0 0 8px; }
.dsteps pre.code { padding-right: 84px; }
.dsteps .dfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- 列表上方：手机只显示条数，翻页按钮在列表下方 ---------- */
.list-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-top > .pager { flex: 1 1 auto; }
.pager-mini { font-size: 12.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager-mini:empty { display: none; }

/* ---------- 手机：减少每张卡片的信息量，数字和地址用正文字体 ---------- */
@media (max-width: 860px) {
  :root { --mono: var(--font); }
  body { font-variant-numeric: tabular-nums; }
  .page > .page-head { margin-bottom: 16px; }
  .page > .page-head .desc:not(.keep) { display: none; }
  .help-main .card { padding: 18px 16px; }
  .dsteps > li { padding-left: 38px; }
  .dsteps pre.code { font-size: 12px; }
  /* 服务页：搜索、状态、线路各一行，排序与操作按钮一行 */
  .toolbar { gap: 8px; margin: 0 0 12px; }
  .toolbar .seg { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toolbar .seg::-webkit-scrollbar { display: none; }
  .toolbar .seg button { flex: 1 0 auto; justify-content: center; }
  .toolbar .spacer { display: none; }
  .toolbar .msort { min-width: 0; }
  .list-top { margin: 0 0 10px; }
  .list-top .page-selection { margin: 0; }
  .mcard { padding: 14px 14px 10px; }
  .mcard .mlinks { margin: 0; gap: 8px; }
  .mcard .mfoot { gap: 6px; flex-wrap: nowrap; }
  .mcard .mfoot .pill { flex: none; }
  .mcard .mt { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
  .mcard .mfoot .btn { flex: none; }
  /* 手机：复制按钮放在代码块下方，避免挡住较长的命令 */
  .code-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
  .code-wrap pre.code, .dsteps pre.code { align-self: stretch; padding-right: 16px; }
  .code-wrap .copy { position: static; }
  .mcard .mt b { font-weight: 650; }
  .mcard .mdetail { gap: 10px; }
}
/* 很窄的手机：监控卡片两个仪表平分一行，各自的平均值和最高值写在仪表下方 */
@media (max-width: 480px) {
  .vcard .gauges .gcell { flex: 1 1 0; min-width: 0; }
  .gcell .gs { white-space: normal; text-align: center; font-size: 11px; line-height: 1.45; margin-top: 0; }
  .vcard .gauges .speed { margin-top: 4px; }
}

/* ---------- 实时曲线与实时看板 ---------- */
.lv { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; margin-top: 6px; }
.lv-plot { position: relative; height: calc(var(--h) + 20px); overflow: hidden; touch-action: pan-y; }
.lv-plot .ch-grid { z-index: 0; }
.lv-move { position: absolute; left: 0; top: 0; bottom: 0; will-change: transform; }
.lv-move svg { position: absolute; left: 0; top: 0; width: 100%; height: var(--h); overflow: visible; }
.lv .ch-y { height: var(--h); }
.lv-fail { top: calc(var(--h) - 9px); bottom: auto; }
.lv-x { position: absolute; bottom: 2px; transform: translateX(-50%); font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.lv-empty { position: absolute; inset: 0 0 20px; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
/* 指示点的光圈只改变 transform 和 opacity，由合成器处理，不触发重绘 */
.lv-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.lv-dot.on { background: var(--good); }
.lv-dot.on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: lvPulse 2s ease-out infinite; will-change: transform, opacity; }
@keyframes lvPulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.btn .lv-dot { margin-right: 2px; }
.btn.pri .lv-dot.on { background: currentColor; }
.lv-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lv-state.err { color: var(--warn); }
.lv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: -4px 0 16px; }
.lv-bar label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.lv-cost { flex: 1 1 260px; margin: 0; }
.lv-leg { display: inline-flex; gap: 12px; font-size: 12px; color: var(--muted); }
.lv-leg span { display: inline-flex; align-items: center; gap: 5px; }
.lv-note { margin-top: 14px; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.lb-card { padding: 18px 20px 14px; min-width: 0; animation: cardIn .8s var(--sp-out) both; box-shadow: inset 3px 0 0 var(--rail, transparent), var(--shadow); }
.lb-card.clickable { cursor: pointer; transition: transform .35s var(--sp-out); }
.lb-card.clickable:hover { transform: translateY(-2px); }
.lb-card .go { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--faint); }
.lb-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb-head .card-title { min-width: 0; }
.lb-nums { display: flex; align-items: flex-end; gap: 22px; margin-top: 14px; }
.lb-nums > span { display: flex; flex-direction: column; min-width: 0; }
.lb-nums b { font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-nums em { font-style: normal; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.lb-nums .lb-peak { margin-left: auto; font-size: 12px; color: var(--faint); white-space: nowrap; }
.lb-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.lb-minis.one { grid-template-columns: minmax(0, 1fr); }
.lb-mt { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-mt b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-minis .lv-x { display: none; }
.lb-minis .lv-plot { height: var(--h); }
.lb-minis .ch-y { min-width: 34px; }
.fd-live .bgfx .g { animation-play-state: paused; }
.fd-live .h1 { animation: none; }
/* 全屏时铺满屏幕，卡片更大 */
:fullscreen .topbar, :fullscreen .bnav { display: none; }
:fullscreen .wrap { padding-top: 24px; max-width: none; }
@media (prefers-reduced-motion: reduce) { .lv-dot.on::after { animation: none; display: none; } .lb-card.clickable:hover { transform: none; } }
@media (max-width: 860px) {
  .lv-bar { gap: 8px; }
  .lv-bar label { width: 100%; justify-content: space-between; }
  .lb-card { padding: 16px 14px 12px; }
  .lb-nums { gap: 16px; }
  .lb-nums b { font-size: 20px; }
  .live-board .md-top .btn:not(.md-back) { display: none; }
}
@media (max-width: 480px) {
  .lb-minis { grid-template-columns: minmax(0, 1fr); }
  .lb-nums .lb-peak { display: none; }
}

/* ---------- VPS 探针、实验室 ---------- */
.probe-notes { margin: 0 0 14px; padding-left: 20px; color: var(--muted); line-height: 1.8; font-size: 13px; }
.probe-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.probe-facts b { color: var(--text); font-weight: 650; }
.probe-facts b.good { color: var(--good); } .probe-facts b.warn { color: var(--warn); }
.lab-box { margin: 4px 0 14px; padding: 12px 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 35%, var(--line)); background: color-mix(in srgb, var(--warn) 5%, transparent); }
.lab-t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.ms-row .nm .i { vertical-align: -2px; }

/* ---------- 线路示意与日历热力 ---------- */
.route { margin: 2px 0 14px; padding: 8px 6px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line), var(--shadow);
  background: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--rc) 9%, transparent), transparent 60%), var(--surface); }
.route svg.rt-h { width: 100%; height: auto; display: block; }
.rt-n rect, .rt-app rect { fill: var(--surface-solid, var(--surface-2)); stroke: var(--line-2); stroke-width: 1.5; }
.rt-n.vps rect, .rt-n.nas rect { stroke: var(--rc); stroke-width: 2; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--rc) 22%, transparent)); }
.rt-n text, .rt-app text { fill: var(--text); font-size: 13px; font-weight: 500; }
.rt-n text.l, .rt-app text.l { font-size: 15px; font-weight: 700; }
.rt-app text.l { font-size: 13px; }
.rt-n text.s, .rt-app text.s { fill: var(--muted); font-size: 12px; font-weight: 500; }
.rt-i { color: var(--rc); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rt-l { fill: none; stroke: color-mix(in srgb, var(--rc) 30%, var(--line-2)); stroke-width: 4; stroke-linecap: round; }
.rt-l.tun { stroke: color-mix(in srgb, var(--rc) 45%, var(--line-2)); stroke-width: 8; }
.rt-l.app { opacity: .45; }
.rt-pk { fill: var(--rc); filter: url(#rt-glow); }
.rt-pk.up { fill: var(--sec); }
.route.off .rt-l.tun { stroke: var(--crit); stroke-dasharray: 6 8; opacity: .6; }
.rt-cap rect { fill: var(--surface-solid, var(--surface)); stroke: var(--line-2); stroke-width: 1.2; }
.rt-cap text { text-anchor: middle; }
.rt-cap .v { fill: var(--text); font: 650 12px var(--mono); }
.rt-cap .v.dn { fill: var(--rc); }
.rt-cap .k { fill: var(--muted); font-size: 11.5px; }
.rt-k { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.rt-m { display: none; }
@media (max-width: 600px) {
  .route svg.rt-h { display: none; }
  .rt-m { display: flex; flex-direction: column; gap: 0; padding: 6px 8px; }
  .rt-mrow { position: relative; padding: 10px 0 10px 18px; border-left: 3px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; }
  .rt-mrow.vps, .rt-mrow.nas { border-left-color: var(--rc); }
  .rt-mrow::before { content: ''; position: absolute; left: -7px; top: 14px; width: 11px; height: 11px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 2px var(--rc); }
  .rt-mn b { font-size: 14px; } .rt-mn em { font-style: normal; display: block; font-size: 12px; color: var(--muted); }
  .rt-arrow { font: 600 12px var(--mono); color: var(--rc); }
  .rt-mapps { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 0 2px 18px; font-size: 12px; color: var(--muted); }
  .rt-mapps i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
}
.donut { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; }
.dn-c { position: relative; width: 190px; height: 190px; }
.dn-c svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dn-t { fill: none; stroke: var(--surface-2); stroke-width: 22; }
.dn-s { fill: none; stroke-width: 22; animation: dnIn .9s var(--sp-out) both; transition: stroke-width .2s; }
.dn-s:hover { stroke-width: 26; }
@keyframes dnIn { from { opacity: 0; } }
.dn-m { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dn-m b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dn-m span { font-size: 12px; color: var(--muted); }
.dn-sum { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dn-sum b { color: var(--text); font-weight: 600; }
.dn-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 8px 28px; min-width: 0; }
.dn-r { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 44px; gap: 10px; align-items: center; font-size: 13px; }
.dn-r i { width: 12px; height: 12px; border-radius: 4px; }
.dn-r em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.dn-l.split { grid-template-columns: minmax(0, 1fr); }
.dn-l.split .dn-r { grid-template-columns: 12px minmax(0, 1fr) auto auto 44px; }
.dn-l.split .dn-r em span { display: block; font-size: 11px; line-height: 1.4; text-align: right; }
.dn-r b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .donut { grid-template-columns: minmax(0, 1fr); justify-items: center; } .dn-l { width: 100%; }
  .dn-l.split .dn-r { grid-template-columns: 12px minmax(0, 1fr) auto 40px; grid-template-areas: "c n v p" "c i v p"; row-gap: 2px; }
  .dn-l.split .dn-r > i { grid-area: c; align-self: center; }
  .dn-l.split .dn-r > span { grid-area: n; align-self: end; }
  .dn-l.split .dn-r > em:first-of-type { grid-area: i; }
  .dn-l.split .dn-r > em:nth-of-type(2) { grid-area: v; align-self: center; }
  .dn-l.split .dn-r > b { grid-area: p; align-self: center; } }
.heat { margin-top: 4px; container-type: inline-size; }
.heat-h, .heat-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.heat-h span { font-size: 11px; color: var(--faint); text-align: center; padding-bottom: 6px; }
.hc { position: relative; min-height: 56px; padding: 7px 8px; border-radius: 10px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0;
  background: color-mix(in srgb, var(--hc) calc(var(--a, 0) * 85%), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s var(--sp-out); }
.hc:not(.pad):hover { transform: translateY(-2px); }
.hc.pad { background: none; box-shadow: none; }
.hc.today { box-shadow: inset 0 0 0 2px var(--text); }
.hc b { font-size: 12px; font-weight: 700; color: var(--muted); }
.hc span { font: 600 11.5px var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc.hot b, .hc.hot span { color: #fff; }
.heat-l { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--faint); }
.heat-l i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--hc) calc(var(--a) * 85%), var(--surface-2)); }
.hc span.sm { display: none; }
@media (max-width: 600px) { .hc { min-height: 42px; padding: 5px 1px; } .hc span.lg { display: none; } .hc span.sm { display: block; font-size: 10px; } .heat-h, .heat-g { gap: 4px; } }
@container (max-width: 420px) { .hc { min-height: 42px; padding: 5px 1px; } .hc span.lg { display: none; } .hc span.sm { display: block; font-size: 10px; } .heat-h, .heat-g { gap: 4px; } }

/* ---------- NAS 公网流量：汇总条 + 应用列表 + 识别情况（miuix 风格卡片） ---------- */
.md-nas-summary{display:grid;grid-template-columns:1.25fr 1fr 1fr 1fr;gap:22px;padding:24px 26px;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--card,var(--bg));margin-bottom:16px}
.md-nas-summary .ns-metric{min-width:0}
.md-nas-summary .ns-metric+.ns-metric{border-left:1px solid var(--line);padding-left:22px}
.md-nas-summary .ns-lbl{display:block;font-size:12px;color:var(--muted)}
.md-nas-summary .ns-val{display:block;font-size:26px;font-weight:630;line-height:1.45;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.md-nas-summary .ns-metric:first-child .ns-val{font-size:32px;color:var(--gold);line-height:1.2;padding-top:4px}
.md-nas-summary .ns-val small{font-size:14px;font-weight:450;color:var(--muted);margin-left:4px}
.md-nas-summary .ns-foot{padding:0;display:block;font-size:11px;color:var(--muted);margin-top:2px}
.md-nas-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:16px;align-items:start}
.md-nas-side{display:grid;gap:16px}
.ns-apps{padding:0}
.ns-apps .ns-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:20px 22px 14px}
.ns-apps .ns-head .card-title{font-size:16px}
.ns-apps .ns-head .seg{flex-shrink:0}
.ns-apps .ns-head .seg button{white-space:nowrap}
.ns-apps .ns-head small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.ns-list{padding:0 12px 8px}
.ns-row{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(64px,1fr) 108px 14px;gap:12px;align-items:center;padding:9px 10px;border-radius:12px}
.ns-row.clickable{cursor:pointer}
.ns-chev{color:var(--muted);font-size:15px;line-height:1;transition:transform .2s var(--ease);text-align:center}
.ns-chev.on{transform:rotate(90deg);color:var(--gold)}
.ns-detail{display:flex;gap:18px;flex-wrap:wrap;padding:2px 12px 12px 22px;font-size:12px;color:var(--muted)}
.ns-detail em{font-style:normal;margin-right:5px}
.ns-detail b{color:var(--heading);font-weight:550;font-variant-numeric:tabular-nums}
.ns-row:hover{background:var(--hover)}
.ns-row .ns-nm{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
.ns-row .ns-nm b{max-width:100%;font-weight:550;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ns-row .ns-nm small{color:var(--muted);font-size:11px;white-space:nowrap;margin-left:6px}
.ns-row .ns-ico{display:flex;align-items:center}
.ns-row .ns-bar{height:7px;border-radius:5px;background:var(--line);overflow:hidden}
.ns-row .ns-bar i{display:block;height:100%;border-radius:5px;background:var(--pri)}
.ns-row .ns-v{font-size:13px;text-align:right;font-variant-numeric:tabular-nums}
.ns-row .ns-v small{display:block;color:var(--muted);font-size:11px;white-space:nowrap}
.ns-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 22px 18px;font-size:12px;color:var(--muted)}
.ns-ident{padding:0 22px 20px}
.ns-ident .ns-measure{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;padding-bottom:14px}
.ns-ident .ns-measure b{display:block;font-size:28px;font-weight:600;color:var(--gold);font-variant-numeric:tabular-nums}
.ns-ident .ns-measure small{display:block;color:var(--muted);font-size:12px}
.ns-cov{height:10px;border-radius:6px;overflow:hidden;background:var(--line);display:flex}
.ns-cov i{height:100%;background:var(--gold);transition:width .4s var(--ease)}
.ns-cov-lbl{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin:8px 0 16px}
.ns-unknown{padding:15px 16px;border-radius:14px;background:var(--hover)}
.ns-unknown .ns-unknown-top{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-bottom:6px}
.ns-unknown h3{font-size:13px;margin:0}
.ns-unknown b{font-size:19px;font-weight:550;font-variant-numeric:tabular-nums}
.ns-unknown p{font-size:12px;color:var(--muted);margin:0}
.ns-unknown details{font-size:12px;color:var(--muted);margin-top:10px}
.ns-unknown summary{cursor:pointer;color:var(--gold)}
.ns-trend{padding:0 22px 20px}
.ns-note{margin-top:16px;border:1px solid var(--line);border-radius:14px;padding:12px 16px;font-size:12px;color:var(--muted);display:flex;gap:10px;align-items:flex-start}
.ns-note .ns-info{width:20px;height:20px;flex:none;border-radius:50%;background:var(--hover);color:var(--gold);text-align:center;line-height:20px;font-size:12px}
.ns-note>.btn{flex-shrink:0;white-space:nowrap}
.ns-note details{margin-left:auto;white-space:nowrap}
.ns-note summary{cursor:pointer;color:var(--gold)}
.ns-diag{padding:12px 0 0;font-size:12px;color:var(--muted)}
.ns-diag div{padding:3px 0}
@media (max-width:1080px){.md-nas-grid{grid-template-columns:1fr}.md-nas-summary{grid-template-columns:1fr 1fr;gap:16px}.md-nas-summary .ns-metric:nth-child(3){border-left:0;padding-left:0}}
@media (max-width:640px){.md-nas-summary{grid-template-columns:1fr 1fr;gap:14px 10px;padding:18px}.md-nas-summary .ns-val{font-size:22px}.md-nas-summary .ns-metric:first-child .ns-val{font-size:26px}.ns-row{grid-template-columns:24px minmax(0,1fr) minmax(20px,40px) 92px 12px;gap:8px}.ns-row .ns-nm{flex-wrap:wrap}}

/* ---------- 授权页：卡片式购买 ---------- */
.lic-plans{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:16px 0 4px}
.lic-plan{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--r-lg);padding:18px;background:var(--card,var(--bg));transition:border-color .18s,transform .2s var(--ease)}
.lic-plan:hover{border-color:var(--gold);transform:translateY(-1px)}
.lic-plan-art{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:14px;margin-bottom:16px;background:var(--hover)}
.lic-price{font-size:32px;font-weight:600;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.lic-price span{font-size:17px}
.lic-price del{font-size:13px;color:var(--muted);font-weight:400;margin-left:9px;letter-spacing:0}
.lic-plan>small{color:var(--muted);font-size:12px;margin-top:4px}
.lic-feats{list-style:none;margin:15px 0 16px;padding:0;font-size:13px;flex:1}
.lic-feats li{margin:8px 0;display:flex;gap:8px;align-items:flex-start}
.lic-feats li:before{content:'✓';color:var(--gold);flex:none}
.lic-plan .btn{width:100%}
@media (max-width:820px){.lic-plans{grid-template-columns:1fr;gap:14px}.lic-plan-art{aspect-ratio:16/10}}

.ns-more,.ns-link{color:var(--gold);background:none;border:0;padding:0;font-size:12px}
.ns-more:hover,.ns-link:hover{text-decoration:underline}

.ns-donut{padding:0 0 14px}
.ns-donut .donut,
.ns-donut svg{max-width:100%}

.ns-donut .donut{align-items:center;gap:14px}
.ns-donut .dn-l{font-size:11.5px}
.ns-donut .dn-l .dn-r{gap:6px}
.ns-donut .dn-l .dn-r .ellipsis{max-width:88px}

.ns-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px;margin-bottom:10px}
/* 授权页：商品卡占满整行，避免左空右挤 */
.lic-top{grid-template-columns:minmax(0,1fr)!important}
.lic-top .edition{max-width:none}
.lic-plans{grid-template-columns:1fr 1fr}
@media (max-width:900px){.lic-plans{grid-template-columns:1fr}}

/* 商品卡：左图右文，横向排布填满整行 */
.lic-plan{display:grid!important;grid-template-columns:200px minmax(0,1fr);gap:18px;align-items:start;padding:16px 18px!important}
.lic-plan-art{width:200px!important;height:200px!important;aspect-ratio:auto!important;object-fit:cover;border-radius:14px;margin:0!important;grid-row:1/-1}
.lic-body{display:flex;flex-direction:column;min-width:0}
.lic-body .lic-feats{flex:1;margin:10px 0 12px}
@media (max-width:900px){.lic-plan{grid-template-columns:1fr}.lic-plan-art{width:100%!important;height:170px!important;grid-row:auto}}

/* 手机端：所有弹窗铺满宽度（.modal.wide 的优先级会盖掉 ui.css 里的 100%） */
@media (max-width:820px){
  .modal,.modal.wide,.modal.narrow{width:100%!important;max-width:100%!important}
  .modal .content{padding:16px 16px}
  .modal > header{padding:14px 16px;font-size:15px}
  .modal > footer{padding:12px 16px;flex-wrap:wrap}
  .modal .content pre,.modal .content code{white-space:pre-wrap;word-break:break-all}
}
