:root {
  color-scheme: dark;
  --color-background: #050505;
  --color-surface: #0d0d0b;
  --color-surface-hover: #282013;
  --color-text: #f1e6c9;
  --color-muted: #bbae8f;
  --color-accent: #e5c775;
  --color-action-text: #161205;
  --color-border: #645020;
  --color-border-strong: #a98b43;
  --color-divider: #42371f;
  --color-disabled-background: #1b1913;
  --color-disabled-text: #9b9077;
  --color-success: #aaca9c;
  --color-timeout: #e8bf66;
  --color-error: #ef9f91;
  --color-focus: #ffe3a0;
  --action-background: linear-gradient(135deg, #be913b, #f1d78d 48%, #c6a34e);
  --action-background-hover: linear-gradient(135deg, #d4aa53, #ffe8aa 48%, #dec071);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: rgba(229, 199, 117, 0.18); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  z-index: 100;
  padding: 10px 16px;
  transform: translateY(-180%);
  border: 1px solid var(--color-accent);
  border-radius: 6px;
  background: var(--color-surface);
}
.skip-link:focus { transform: translateY(0); }
.muted { color: var(--color-muted); }
.eyebrow { color: var(--color-accent); font-size: 0.75rem; letter-spacing: 0.08em; }

.wechat-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  padding: 10px 16px;
  border: 1px solid #e6c674;
  border-radius: 10px;
  background: var(--action-background);
  color: var(--color-action-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.wechat-id {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.retest-button, .route-link, .navigation-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  color: var(--color-accent);
  background: var(--color-surface);
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.retest-button:hover:not(:disabled), .navigation-link:hover:not([aria-disabled="true"]) {
  border-color: var(--color-accent);
  background: var(--color-surface-hover);
}
.route-link {
  background: var(--action-background);
  border-color: #e6c674;
  color: var(--color-action-text);
  font-size: 0.875rem;
  font-weight: 600;
}
.route-link:hover:not([aria-disabled="true"]) { background: var(--action-background-hover); }
.route-link:active:not([aria-disabled="true"]) { background: #c19a45; }
.retest-button:active:not(:disabled), .navigation-link:active:not([aria-disabled="true"]) {
  background: #3c2e12;
}
.retest-button:disabled, [aria-disabled="true"] {
  background: var(--color-disabled-background);
  border-color: var(--color-divider);
  color: var(--color-disabled-text);
  cursor: not-allowed;
}
.route-name { font-weight: 600; overflow-wrap: anywhere; }
.route-status {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.route-status[data-state="success"] { color: var(--color-success); }
.route-status[data-state="unverified"] { color: var(--color-accent); }
.route-status[data-state="timeout"] { color: var(--color-timeout); }
.route-status[data-state="error"] { color: var(--color-error); }
.test-summary { color: var(--color-muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.noscript-message {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
}
