:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --panel: #111218;
  --line: #292a32;
  --text: #f5f4f0;
  --muted: #8a8b96;
  --gold: #f7d578;
  --cyan: #74d5b1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(ellipse 650px 450px at 50% 0, #29241a66, transparent 95%), var(--bg); -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.page-shell { width: min(100%, 680px); margin: 0 auto; padding: max(42px, env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom)); }
.hero { margin-bottom: 30px; text-align: center; }
.official-pill { display: inline-flex; align-items: center; gap: 6px; color: #c6b382; font-size: 11px; letter-spacing: .12em; }
.official-pill span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px #e0b94e80; }
.brand-logo { display: block; width: 230px; max-width: 76%; height: 83px; object-fit: contain; margin: 18px auto 19px; }
.hero__summary { position: relative; display: flex; min-height: 68px; align-items: flex-end; justify-content: center; }
.hero__copy { text-align: center; }
.hero h1 { margin: 0; font-size: 27px; line-height: 1.4; font-weight: 750; letter-spacing: .06em; }
.hero__subtitle { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.entry-panel { padding: 24px; border: 1px solid #333029; border-radius: 24px; background: linear-gradient(145deg,#18191f,#111217); box-shadow: 0 22px 65px #0003; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel-heading>div { display: flex; align-items: center; gap: 9px; min-width: 0; }
h2 { margin: 0; font-size: 16px; font-weight: 700; }
#route-count { color: #aaa59b; background: #ffffff07; border: 1px solid #ffffff0a; border-radius: 6px; padding: 3px 6px; font-size: 10px; white-space: nowrap; }
.retry-button { display: inline-flex; align-items: center; gap: 5px; padding: 6px 0 6px 8px; border: 0; background: none; color: #b2afa6; font-size: 11px; white-space: nowrap; }
.retry-button svg { width: 14px; height: 14px; }
.retry-button:hover { color: var(--gold); }
.status-card { display: flex; align-items: center; gap: 6px; margin: 12px 0 19px; color: #92969a; font-size: 11px; line-height: 1.5; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); flex: none; }
.status-card--offline { color: #f09c9c; }
.status-card--offline .status-dot { background: currentColor; }
.route-list { display: grid; gap: 8px; }
.route-section+.route-section { margin-top: 8px; }
.route-groups .section-heading { display: none; }
.route-card { position: relative; display: grid; grid-template-columns: 32px minmax(0,1fr) auto 30px; align-items: center; gap: 10px; min-height: 72px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 14px; background: #ffffff03; transition: border-color .18s, background-color .18s, transform .18s; }
.route-card:hover { background: #ffffff07; border-color: #807255; transform: translateY(-1px); }
.route-card:active { transform: translateY(0); }
.route-card__icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; color: #92939e; background: #ffffff06; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.route-card__copy { min-width: 0; }
.route-card__title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.route-card__title-row strong { font-size: 14px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.route-card__title-row em { padding: 2px 5px; border-radius: 4px; background: #f7d57812; color: #e1c582; font-size: 9px; line-height: 1.3; font-style: normal; }
.route-card__meta { display: block; margin-top: 2px; font-size: 11px; color: #b0aca2; overflow-wrap: anywhere; }
.route-card__signal { display: none; }
.route-card__description { display: block; margin-top: 2px; color: #737783; font-size: 10px; line-height: 1.3; overflow-wrap: anywhere; }
.route-speed { min-width: 70px; color: #92939e; font: 650 15px ui-monospace, "SFMono-Regular", monospace; white-space: nowrap; text-align: right; }
.route-speed::before { display: block; content: '响应耗时'; margin-bottom: 2px; color: #7d808b; font: 400 9px -apple-system,sans-serif; }
.route-speed[data-state="fast"] { color: #8cdbb4; }
.route-speed[data-state="normal"] { color: #e8c775; }
.route-speed[data-state="slow"], .route-speed[data-state="failed"] { color: #c98787; font-size: 12px; }
.route-card__arrow { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #9e9c95; background: #ffffff06; }
.route-card__arrow svg { width: 14px; height: 14px; }
.route-card--fastest { border-color: #ab8a48; background: linear-gradient(110deg,#39302066,#25201633); }
.route-card--fastest:hover { border-color: var(--gold); background-color: #f7d57808; }
.route-card--fastest .route-card__icon { color: #241d0c; background: linear-gradient(135deg,#f6df9c,#d8b764); }
.route-card--fastest .route-card__arrow { color: #1e1b11; background: var(--gold); }
.route-card--fastest .route-speed { color: var(--gold); }
.route-card--fastest .route-speed::before { content: '当前最快'; color: #dbc286; }
.auto-card { position: absolute; right: 0; bottom: 0; display: flex; max-width: 180px; flex-direction: column; align-items: flex-end; gap: 7px; text-align: right; }
.auto-card>div { display: flex; gap: 6px; align-items: center; justify-content: flex-end; min-width: 0; }
.auto-card__icon { color: var(--gold); font-size: 17px; }
.auto-card strong { color: #cbc5b6; font-size: 10px; font-weight: 400; line-height: 1.5; white-space: nowrap; }
#pause-auto { flex: none; padding: 6px 10px; border: 1px solid #49463b; border-radius: 7px; color: #d9cba9; background: #ffffff03; font-size: 10px; white-space: nowrap; }
#pause-auto:hover { border-color: var(--gold); }
#pause-auto[hidden] { display: none; }
.measurement-note { margin: 10px 0 0; font-size: 10px; color: #636773; line-height: 1.6; }
.app-download { display: flex; align-items: center; gap: 12px; margin: 14px 0 12px; padding: 12px 14px; border: 1px solid #5c4d2a; border-radius: 16px; color: var(--text); background: linear-gradient(120deg, #2a2415, #15161d 70%); text-decoration: none; }
.app-download[hidden] { display: none; }
.app-download--unavailable .app-download__button { color: #8a8b96; background: #23242c; font-weight: 600; }
.app-download__icon { width: 44px; height: 44px; flex: none; border-radius: 11px; }
.app-download__copy { flex: 1; min-width: 0; display: grid; gap: 3px; }
.app-download__copy strong { font-size: 14px; font-weight: 700; }
.app-download__copy small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.app-download__button { flex: none; padding: 8px 14px; border-radius: 999px; color: #2a2008; background: linear-gradient(135deg, #ffe39a, #f2b43c); font-size: 13px; font-weight: 800; white-space: nowrap; }
.bookmark-card { display: flex; gap: 10px; align-items: center; padding: 18px 0; margin-top: 11px; }
.bookmark-card__icon { display: grid; color: #8d8572; flex: none; }
.bookmark-card__icon svg { width: 19px; height: 19px; }
.bookmark-card>div { flex: 1; min-width: 0; }
.bookmark-card h2 { font-size: 12px; color: #b8b3a8; font-weight: 500; line-height: 1.6; }
.bookmark-card p { margin: 3px 0 0; color: #686b75; font-size: 10px; line-height: 1.5; }
.copy-button { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 8px 0 8px 8px; border: 0; background: none; color: #c5b17d; font-size: 11px; }
.copy-button svg { width: 13px; height: 13px; }
footer { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 15px; border-top: 1px solid #ffffff06; font-size: 9px; color: #4f525d; line-height: 1.6; }
footer b { font-weight: 400; }
.toast { position: fixed; bottom: max(30px,env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%,12px); z-index: 10; max-width: 90vw; padding: 12px 18px; border: 1px solid #645535; border-radius: 10px; color: #f1dfb9; background: #232019f2; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s,transform .2s; }
.toast--visible { opacity: 1; transform: translate(-50%,0); }
.noscript { position: fixed; inset: auto 0 0; padding: 14px; background: #332a15; text-align: center; font-size: 13px; }
.noscript a { text-decoration: underline; }
@media (max-width: 480px) {
  .page-shell { padding: max(26px,env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom)); }
  .hero { margin-bottom: 24px; }
  .brand-logo { width: 208px; height: 74px; margin-top: 14px; margin-bottom: 16px; }
  .hero__summary { display: block; min-height: 0; }
  .hero h1 { font-size: 23px; }
  .hero__subtitle { font-size: 12px; margin-top: 8px; }
  .auto-card { position: static; max-width: none; align-items: center; margin-top: 12px; text-align: center; }
  .auto-card>div { justify-content: center; }
  .entry-panel { padding: 17px 14px; border-radius: 20px; }
  h2 { font-size: 15px; }
  .panel-heading>div { gap: 7px; }
  .route-card { grid-template-columns: 26px minmax(0,1fr) auto; min-height: 70px; padding: 9px 10px; gap: 9px; }
  .route-card__icon { width: 26px; height: 30px; font-size: 11px; border-radius: 8px; }
  .route-card__arrow { display: none; }
  .route-card__title-row strong { font-size: 13px; }
  .route-card__meta { font-size: 10px; }
  .route-card__description { font-size: 9px; }
  .route-speed { min-width: 57px; font-size: 13px; }
  .route-speed[data-state="failed"] { font-size: 11px; }
  .status-card { margin-bottom: 15px; font-size: 10px; }
  .auto-card { margin-top: 16px; gap: 8px; }
  .auto-card strong { font-size: 10px; }
  .measurement-note { font-size: 9px; }
  .bookmark-card { gap: 8px; }
}
@media (max-width: 360px) {
  .page-shell { padding-right: 12px; padding-left: 12px; }
  .entry-panel { padding-right: 12px; padding-left: 12px; }
  .route-card { gap: 8px; padding-right: 10px; padding-left: 10px; }
  .route-card__title-row strong { font-size: 12px; }
  .route-speed { min-width: 52px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
