:root {
  color-scheme: dark;
  --bg: #101110;
  --panel: #191b19;
  --ink: #f4f1e8;
  --muted: #abaea3;
  --gold: #d8c895;
  --yellow: #f8de56;
  --line: rgba(218, 201, 147, .2);
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #171916; color: var(--ink); font-size: 15px; line-height: 1.7; }
main {
  max-width: 620px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 24px calc(30px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  box-shadow: 0 0 90px #0006;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.brand { display: flex; width: fit-content; align-items: center; gap: 12px; min-height: 44px; color: var(--gold); font-weight: 600; }
.brand img { display: block; border-radius: 12px; }
h1 { margin: 28px 0 12px; font-family: "Noto Serif SC", "Songti SC", SimSun, serif; font-size: clamp(26px, 6vw, 34px); line-height: 1.45; color: #eee5cc; font-weight: 600; }
h2 { margin: 0 0 12px; color: var(--gold); font-size: 18px; font-weight: 600; }
.intro { margin: 0; color: var(--muted); font-size: 14px; }
.sync-notice { margin: 24px 0; padding: 19px 20px; border: 1px solid #d8c89545; border-radius: 16px; background: linear-gradient(135deg, #25261f, #171913); }
.sync-notice strong { color: var(--gold); font-size: 15px; font-weight: 500; }
.sync-notice p { margin: 10px 0 0; color: #b8b8a9; font-size: 13px; }
.data-notice { margin: 24px 0; padding: 22px 20px; border: 1px solid #d8c89545; border-radius: 16px; background: var(--panel); }
.data-notice h2 { margin: 0 0 20px; color: var(--gold); font-size: clamp(18px, 4.8vw, 21px); line-height: 1.5; }
.data-notice-section + .data-notice-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.data-notice h3 { margin: 0 0 8px; color: var(--ink); font-size: 15px; font-weight: 600; }
.data-notice p { margin: 0; color: #c5c4b8; font-size: 15px; line-height: 1.85; overflow-wrap: break-word; }
.data-notice p + p { margin-top: 10px; }
.data-notice strong { color: #eee5cc; font-weight: 600; }
.data-notice .backup-reminder { margin-top: 14px; padding: 14px 15px; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; background: #d8c89512; color: #d8ceb0; }
.route-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.route-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.route-info { min-width: 0; }
.route-info h2 { margin: 0 0 3px; font-family: inherit; font-size: 16px; color: var(--ink); }
.preferred-label { display: inline-block; margin-left: 8px; padding: 0 7px; border: 1px solid #d8c89555; border-radius: 6px; color: var(--gold); font-size: 11px; font-weight: 400; vertical-align: middle; }
.route-card[data-preferred="true"] { border-color: #d8c89580; }
.domain { display: block; color: var(--gold); font-size: 14px; overflow-wrap: anywhere; }
.probe-status { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.probe-status::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--muted); }
.navigation-status { grid-column: 1 / -1; margin: 0; color: var(--gold); font-size: 13px; line-height: 1.6; }
[data-state="checking"] .probe-status::before { background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
[data-state="ready"] .probe-status { color: #a9c6a0; }
[data-state="ready"] .probe-status::before { background: #a9c6a0; }
[data-state="failed"] .probe-status { color: #d8a897; }
[data-state="failed"] .probe-status::before { background: #d8a897; }
.enter, .primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; text-align: center; }
.enter, .primary-action { background: var(--yellow); border: 1px solid var(--yellow); color: #171810; }
.secondary-action { background: transparent; border: 1px solid #d8c89555; color: var(--gold); }
@media (hover: hover) and (pointer: fine) { a:hover, button:hover { filter: brightness(1.1); } }
button:disabled { cursor: wait; opacity: .65; }
.retry { width: 100%; margin-top: 20px; }
.footnote { color: var(--muted); font-size: 12px; margin: 20px 0 0; }
.download-actions { display: grid; gap: 12px; }
.install-guide { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.install-guide ol { margin: 0; padding-left: 22px; color: #c5c4b8; font-size: 14px; }
.install-guide li { padding-left: 4px; margin-bottom: 12px; }
.install-guide li::marker { color: var(--gold); }
.browser-hint, .download-notice { margin: 18px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--gold); font-size: 13px; background: var(--panel); }
.download-notice p { margin: 8px 0 0; color: #c5c4b8; }
[hidden] { display: none !important; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 380px) {
  main { padding-left: 18px; padding-right: 18px; }
  .route-card { padding: 16px; gap: 8px; }
  .enter { padding: 10px 12px; font-size: 13px; }
  .domain { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { [data-state="checking"] .probe-status::before { animation: none; } }
