:root {
  color-scheme: light;
  --bg: #edf2f7;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #2563eb;
  --ok: #16a34a;
  --slow: #d97706;
  --fail: #dc2626;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body {
  background:
    radial-gradient(1000px 420px at 8% -8%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(800px 360px at 100% 0%, rgba(14,165,233,.10), transparent 55%),
    var(--bg);
}

#app { min-height: 100vh; }
.page {
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 36px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff; font-weight: 800;
  box-shadow: 0 10px 24px rgba(37,99,235,.28);
}
.brand-text { min-width: 0; }
.title { font-size: 17px; font-weight: 800; line-height: 1.2; }
.sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.top-actions { display: flex; gap: 8px; flex-shrink: 0; }

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 14px;
  margin-bottom: 14px;
}
.kicker {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.ip-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.ip {
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  line-height: 1.1;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.loc-line {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 4px;
}
.loc-pin { flex-shrink: 0; }
.addr-line {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 8px;
}
.tip-alert { margin-top: 8px; }
.tip-alert .el-alert__title { font-size: 12px; line-height: 1.5; }

.hero-meta {
  display: grid;
  gap: 8px;
  align-content: start;
}
.meta-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
}
.meta-l { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.meta-v { font-size: 13px; font-weight: 700; line-height: 1.4; word-break: break-word; }
.meta-s { margin-top: 2px; font-size: 12px; color: var(--muted); word-break: break-word; }

.query-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.speed-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.speed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.sp-l { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sp-n {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 2px;
}
.sp-n.ok { color: var(--ok); }
.sp-n.slow { color: var(--slow); }
.sp-n.fail { color: var(--fail); }
.sp-d { font-size: 12px; color: var(--muted); }

.main-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 12px;
  align-items: start;
}
.col { display: grid; gap: 12px; }

.panel {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  background: var(--card) !important;
}
.panel .el-card__header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.panel .el-card__body { padding: 12px 14px 14px; }
.panel-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
}

.desc .el-descriptions__label {
  width: 96px;
  color: #64748b !important;
  background: #f8fafc !important;
}
.desc .el-descriptions__content { word-break: break-word; }

.vote-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.vote-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.vote-list { display: grid; gap: 8px; }
.vote-item {
  display: grid;
  grid-template-columns: 72px 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.vote-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-score { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.street-box { margin-bottom: 4px; }
.street-main {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0f9ff, #f8fafc);
  border: 1px solid #dbeafe;
}

.cmp-list { display: grid; gap: 8px; margin-bottom: 10px; }
.cmp-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafcff;
}
.cmp-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cmp-w, .cmp-ms { font-size: 12px; color: var(--muted); }
.cmp-ms { margin-left: auto; font-variant-numeric: tabular-nums; }
.cmp-sum { font-size: 12px; color: #334155; line-height: 1.45; word-break: break-word; }

.src-list { display: grid; gap: 6px; }
.src-list.compact {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.src {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12px;
}
.src-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-ms { color: var(--muted); font-variant-numeric: tabular-nums; }

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}
.ua {
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  color: #334155;
}
.muted { color: var(--muted); }

.foot {
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  padding: 16px 0 8px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .hero-grid,
  .main-grid { grid-template-columns: 1fr; }
  .speed-strip { grid-template-columns: 1fr; }
  .src-list.compact { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page { width: calc(100% - 16px); padding-top: 10px; }
  .top { align-items: flex-start; }
  .title { font-size: 15px; }
  .query-row { grid-template-columns: 1fr 1fr; }
  .query-row .el-input { grid-column: 1 / -1; }
  .desc .el-descriptions__label { width: 84px !important; }
  .vote-item { grid-template-columns: 64px 1fr 36px; }
  .sp-n { font-size: 22px; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .speed-strip { grid-template-columns: repeat(3, 1fr); }
}
