:root {
  --bg-1: #e5f6ec;
  --bg-2: #f4fbf7;
  --panel: #ffffff;
  --line: #dcefe4;
  --line-soft: #ecf6f0;
  --text: #0f3128;
  --text-2: #567567;
  --text-3: #8aa79a;
  --ok: #12b886;
  --ok-deep: #0e9c72;
  --accent: #12b886;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 60%, #eefaf3 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.glow {
  position: fixed;
  inset: -20% 0 auto 0;
  height: 60vh;
  background: radial-gradient(50% 55% at 50% 0%, rgba(18, 184, 134, .10), transparent 70%);
  pointer-events: none;
}

.shell {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 22px;
}

.panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  min-width: 0;
  background: var(--panel);
  border: 1px solid #e3f2ea;
  border-radius: 26px;
  padding-bottom: 30px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 1px 2px rgba(9, 77, 53, .04),
    0 34px 60px -34px rgba(9, 77, 53, .28);
}

/* ---------- 顶部两行 ---------- */
.hero {
  padding: 34px 34px 26px;
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #eefaf3 0%, #f8fdfa 62%, #ffffff 100%);
}

.hero-title {
  margin: 0;
  font-size: 27px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0b2b23;
}

.hero-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-3);
}

/* ---------- 列表标题 ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 34px 12px;
  border-top: 1px solid var(--line);
}

.bar-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 9px;
}

.count {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  color: #4f7a68;
  background: #ecf8f1;
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.7;
}

.recheck {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.recheck svg { width: 14px; height: 14px; }
.recheck:hover:not(:disabled) { color: var(--ok-deep); background: #eef9f3; }
.recheck:disabled { opacity: .5; cursor: default; }
.recheck.spin svg { animation: spin .9s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 进度 ---------- */
.track {
  display: none;
  height: 2px;
  margin: 0 34px;
  background: #eaf6ef;
  border-radius: 2px;
  overflow: hidden;
}

.track.on { display: block; }

.track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(18, 184, 134, .35), var(--accent));
  transition: width .4s cubic-bezier(.3, .8, .3, 1);
}

/* ---------- 线路行 ---------- */
.routes { margin-top: 6px; animation: rise .34s ease both; }

.row {
  display: grid;
  grid-template-columns: 10px 1fr auto 12px;
  align-items: center;
  gap: 14px;
  padding: 20px 34px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid var(--line-soft);
  transition: background .16s ease;
}

.routes .row:first-child { border-top: 0; }
a.row:hover { background: #f5fcf8; }
a.row:focus-visible { outline: 2px solid rgba(18, 184, 134, .5); outline-offset: -2px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cfe3d8;
  transition: background .2s ease, box-shadow .2s ease;
}

.row.ready .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 184, 134, .14); }
.row.down .dot { background: transparent; border: 1.5px solid #cfe3d8; }

.row.pending .dot {
  background: var(--accent);
  animation: breathe 1.1s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

.meta { min-width: 0; }

.name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}

.row.down .name { color: #517064; }

.tag {
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ok-deep);
  background: #e9f9f1;
  border-radius: 5px;
  padding: 0 5px;
  letter-spacing: .03em;
}

.desc {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lat {
  font-family: var(--mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
}

.lat b { font-weight: 600; }
.lat i { font-style: normal; font-size: 10.5px; color: var(--text-3); margin-left: 1px; }
.lat.fast b { color: var(--ok-deep); }
.lat.mid b { color: #c98a09; }
.lat.slow b { color: #d9553c; }
.lat.none { color: #b4cec2; }

.chev {
  color: #c3dacf;
  font-size: 17px;
  line-height: 1;
  transition: transform .16s ease, color .16s ease;
}

a.row:hover .chev { color: var(--ok-deep); transform: translateX(2px); }

/* 骨架 */
.skeleton {
  height: 74px;
  background: linear-gradient(90deg, #f4fbf7 25%, #eaf7f0 50%, #f4fbf7 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -60% 0; }
}

.empty {
  padding: 40px 34px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}

/* ---------- 主按钮 ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  margin: 20px 34px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #1fc48f, var(--ok-deep));
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 12px 24px -14px rgba(14, 156, 114, .85);
  transition: transform .16s ease, box-shadow .2s ease, filter .2s ease;
}

.cta svg { width: 16px; height: 16px; }

.cta:hover { transform: translateY(-1px); filter: saturate(1.05); box-shadow: 0 16px 28px -14px rgba(14, 156, 114, .9); }
.cta:active { transform: translateY(0); }

.cta.is-off {
  background: #eef6f1;
  color: #a8c3b7;
  box-shadow: none;
  pointer-events: none;
}

.err {
  margin: 16px 34px 0;
  font-size: 13px;
  color: #d9553c;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .shell { padding: 26px 14px; }
  .panel { border-radius: 20px; padding-bottom: 22px; }
  .hero { padding: 26px 22px 20px; }
  .hero-title { font-size: 23px; }
  .hero-sub { font-size: 13px; margin-top: 8px; }
  .bar { padding: 16px 22px 10px; }
  .row { padding: 17px 22px; gap: 12px; }
  .track { margin: 0 22px; }
  .cta { margin: 16px 22px 0; height: 48px; }
  .err { margin: 14px 22px 0; }
  .desc { white-space: normal; }
  .skeleton { height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
