:root {
  color-scheme: light;
  --page: #f7f9fe;
  --paper: #ffffff;
  --ink: #202a3d;
  --muted: #40506a;
  --accent: #345cdb;
  --soft: #edf2ff;
  --line: #cbd4e3;
  --green: #1f603d;
  --red: #a44745;
  --amber: #88601d;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
h1, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.site-header { display: flex; align-items: center; width: min(1120px, 100%); margin: 0 auto; padding: 28px 32px; }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark { display: block; width: 60px; height: 60px; flex-shrink: 0; }
.brand-word { display: flex; flex-direction: column; gap: 3px; }
.site-name { font-size: 28px; line-height: 1.25; font-weight: 750; letter-spacing: .06em; }
.brand-alias { font-size: 16px; line-height: 1.3; letter-spacing: .035em; color: var(--muted); }
.main { width: min(680px, calc(100% - 48px)); margin: clamp(20px, 4vh, 42px) auto 28px; }
.intro { text-align: center; margin-bottom: 29px; }
.intro h1 { font-size: 36px; line-height: 1.5; letter-spacing: -.02em; font-weight: 650; text-wrap: balance; }
.intro p { color: var(--muted); margin-top: 10px; line-height: 1.8; }
.list-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 16px; color: var(--muted); font-size: 16px; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.status[data-state="loading"]::before { background: var(--accent); }
.status[data-state="error"]::before { background: var(--red); }
.status[data-state="paused"]::before { background: var(--amber); }
.route-list { display: flex; flex-direction: column; gap: 14px; }
.route { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 112px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); text-decoration: none; transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.route:hover { background: #f1f5ff; border-color: #a7b8ef; }
.route.is-fastest { background: var(--soft); border-color: #adbef4; }
.route-left { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.route-name { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; font-weight: 650; }
.fastest { font-size: 16px; font-weight: 500; background: var(--paper); color: var(--accent); border-radius: 5px; padding: 1px 8px; }
.domain { color: var(--muted); font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.route-right { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.measure { text-align: right; }
.time { color: var(--green); font-size: 24px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time small { font-size: 16px; font-weight: 400; margin-left: 4px; }
.route[data-state="pending"] .time { color: var(--muted); font-size: 18px; }
.route[data-state="failed"] .time { color: var(--red); font-size: 18px; }
.route[data-state="paused"] .time { color: var(--muted); font-size: 18px; }
.route[data-slow="true"] .time { color: var(--amber); }
.retry-note { display: block; color: var(--muted); font-size: 16px; }
.enter { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 52px; padding: 10px 16px; border-radius: 8px; white-space: nowrap; color: #ffffff; background: var(--accent); font-size: 18px; font-weight: 600; }
.enter svg { width: 18px; height: 18px; }
.actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font-size: 18px; }
.action:hover { color: var(--accent); }
.action svg { width: 20px; height: 20px; }
.action-divider { display: none; }
.hint { color: var(--muted); font-size: 16px; text-align: center; margin-top: 16px; text-wrap: pretty; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); line-height: 1.9; overflow-wrap: anywhere; }
.reload-button { min-height: 56px; margin-top: 18px; padding: 12px 22px; color: var(--accent); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.site-footer { margin-top: auto; padding: 28px 20px max(28px, env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 16px; }
.site-footer p + p { margin-top: 8px; font-size: 16px; }
::selection { background: #dbe5ff; color: var(--ink); }
@media (max-width: 580px) {
  .site-header { padding: max(22px, env(safe-area-inset-top)) 20px 14px; }
  .brand-mark { width: 52px; height: 52px; }
  .site-name { font-size: 26px; }
  .main { width: calc(100% - 32px); margin-top: 25px; }
  .intro { margin-bottom: 25px; }
  .intro h1 { font-size: 30px; }
  .intro p { font-size: 18px; }
  .list-heading { align-items: flex-start; }
  .route { display: grid; grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 14px; }
  .route-name { font-size: 20px; gap: 8px; }
  .domain { font-size: 18px; }
  .route-right { justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .measure { text-align: left; }
  .time { font-size: 24px; }
  .enter { font-size: 18px; min-height: 52px; padding: 10px 14px; }
  .actions { gap: 12px; margin-top: 18px; }
  .action { flex: 1; padding-inline: 10px; white-space: nowrap; }
  .site-footer { padding-top: 21px; }
}
@media (prefers-reduced-motion: reduce) { .route { transition: none; } }
