* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.5 "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif; color: #334155; background: #fff; }
[hidden] { display: none !important; }
button { font-family: inherit; }

/* ── 搜索页：白底 中间一块圆角色块 ── */
.search { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 16vh 16px 40px; }
.search-card {
  width: 100%; max-width: 880px; min-height: 540px; padding: 110px 24px 40px; border-radius: 24px;
  background: #2d5b9a; text-align: center;
}
.search-card h1 { margin: 0 0 44px; color: #fff; font-size: 50px; font-weight: 400; letter-spacing: 1px; }
.search-bar {
  display: flex; max-width: 654px; margin: 0 auto; padding: 4px; background: #fff; border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
#code {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 0; outline: none; background: transparent;
  font-size: 22px; letter-spacing: 6px; color: #1e293b;
}
.search-bar button {
  flex: none; width: 100px; height: 46px; border: 0; border-radius: 3px; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; background: #3a8ee6;
}
.search-bar button:hover { background: #2f7fd6; }
.search-bar button:disabled { opacity: .7; cursor: default; }
.cap { display: flex; justify-content: center; align-items: center; gap: 10px; max-width: 654px; margin: 18px auto 0; }
.cap input {
  width: 160px; height: 40px; padding: 0 12px; border: 0; border-radius: 3px; outline: none;
  font-size: 18px; letter-spacing: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.cap span { display: inline-flex; height: 40px; cursor: pointer; background: #fff; border-radius: 3px; overflow: hidden; }

/* ── 线路页：浅底 每种线路一块 白色标题栏＋色块区里一格一格 ── */
body.on-lines { background: #e8eef6; }
.lines { max-width: 1200px; margin: 0 auto; padding: 28px 16px 40px; }
.lines-name { margin: 0 0 28px; font-size: 34px; font-weight: 700; color: #2d5b9a; }
.group { margin-bottom: 30px; border-radius: 4px; overflow: hidden; }
.group-title { margin: 0; height: 50px; line-height: 50px; padding: 0 20px; background: #fff; color: #2d5b9a; font-size: 17px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 30px 20px; background: #4a78b8; }
.tile {
  display: flex; align-items: center; height: 50px; padding: 0 5px 0 20px; border-radius: 4px;
  background: #e9f0f9; color: #475569; text-decoration: none; transition: opacity .15s;
}
.tile:hover { opacity: .85; }
.tile .name { width: 96px; flex: none; }
.tile .speed { flex: 1; font-variant-numeric: tabular-nums; }
.tile .speed.fast { color: #15803d; }
.tile .speed.mid { color: #b45309; }
.tile .speed.slow { color: #dc2626; }
.tile .go { flex: none; width: 60px; height: 30px; line-height: 30px; text-align: center; border-radius: 4px; background: #3a8ee6; color: #fff; }
.empty { padding: 40px 0; text-align: center; color: #64748b; }

@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .search { padding-top: 10vh; }
  .search-card { min-height: 0; padding: 60px 16px 70px; border-radius: 16px; }
  .search-card h1 { font-size: 36px; margin-bottom: 30px; }
  .search-bar button { width: 64px; }
  .lines { padding: 20px 12px 30px; }
  .lines-name { font-size: 26px; margin-bottom: 18px; }
  .group { margin-bottom: 18px; }
  .tiles { grid-template-columns: 1fr; gap: 12px; padding: 16px 12px; }
}
