/* 全球历史地震目录地图 · 专题样式
   基于 _shared/thematic/thematic.css。
   配色取「档案 / 岩层」调：深墨底 + 琥珀 accent；震级用蓝→黄→橙→红的独立色阶，两者不打架。 */

:root {
  --accent: #f0a95c;
  --accent-light: #ffd7a4;
  --accent-dark: #cf7f2c;
  --accent-soft: rgba(240, 169, 92, 0.14);
  --panel-solid: rgba(9, 14, 24, 0.95);
}

html, body, #map { background: #05080f; }

/* 波形 / 震波图标 */
.ic-qh {
  width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%;
  border: 1.6px solid currentColor; opacity: .85;
  background: radial-gradient(circle, currentColor 0 26%, transparent 28%);
}

/* 4 项统计一行放下 */
.facts { grid-template-columns: repeat(4, 1fr); }
.facts > span + span { padding-left: 8px; }
.facts .v { font-size: 12px; }
.facts em { font-size: 16px; }
.facts small { font-size: 10.5px; }

.hint-n { font-size: 10.5px; color: var(--dim); font-weight: 400; font-variant-numeric: tabular-nums; }

/* ── 时间轴 ─────────────────────────────────────────────── */
.tl-block { margin-bottom: 18px; }
.tl {
  position: relative; height: 76px; border-radius: 9px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
  border: 1px solid var(--line); overflow: hidden; cursor: ew-resize;
}
#tlBars { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tlBars .tbar { fill: rgba(148, 178, 214, 0.42); transition: fill .12s; }
#tlBars .tbar.is-cur { fill: var(--accent); }
#tlBars .tbar:hover { fill: rgba(200, 220, 245, .8); }

.tl-cursor {
  position: absolute; top: 0; bottom: 0; width: 1px; left: 100%;
  background: var(--accent); box-shadow: 0 0 9px 1px rgba(240,169,92,.7);
  pointer-events: none; transition: left .08s linear;
}
.tl-cursor::after {
  content: ''; position: absolute; top: 0; left: -3px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
  border-top: 5px solid var(--accent);
}

#tlRange {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none;
  background: transparent;
}
#tlRange::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 100%; }

.tl-axis {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--dim); margin: 4px 0 9px;
  font-variant-numeric: tabular-nums;
}

.tl-foot { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

.btn-play {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: #2b1704; background: var(--accent); border: 0; border-radius: 7px;
  padding: 6px 12px; transition: background .16s, transform .12s;
  white-space: nowrap;
}
.btn-play:hover { background: var(--accent-light); }
.btn-play:active { transform: scale(.97); }
.btn-play i { font-style: normal; font-size: 10px; letter-spacing: .06em; }
.btn-play.is-playing { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.seg-mode { flex: 1 1 auto; display: flex; gap: 3px; padding: 2px; border-radius: 7px; background: rgba(255,255,255,.05); }
.seg-mode button {
  flex: 1 1 0; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer;
  background: transparent; border: 0; border-radius: 5px; padding: 5px 4px;
  transition: background .16s, color .16s;
}
.seg-mode button:hover { color: var(--text); }
.seg-mode button.active { background: var(--accent); color: #2b1704; font-weight: 700; }

/* ── 震级门槛 chips ─────────────────────────────────────── */
.chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button {
  flex: 1 1 0; font: inherit; font-size: 11.5px; color: var(--muted); cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 8px;
  transition: background .16s, color .16s, border-color .16s;
  font-variant-numeric: tabular-nums;
}
.chips button:hover { color: var(--text); }
.chips button.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* ── 巨震档案列表 ───────────────────────────────────────── */
.qlist { display: flex; flex-direction: column; gap: 2px; max-height: 250px; overflow-y: auto; margin-bottom: 6px; }
.qrow {
  display: flex; align-items: center; gap: 9px; width: 100%;
  font: inherit; text-align: left; color: inherit; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 6px 8px; transition: background .16s, border-color .16s;
}
.qrow:hover { background: rgba(255,255,255,.05); }
.qrow:hover .mbadge { transform: scale(1.06); }
.mbadge {
  flex: 0 0 auto; min-width: 32px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 12px; font-weight: 700; color: #1a0b04;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 10px -2px currentColor;
  transition: transform .16s;
}
.qmeta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qplace { font-size: 12.5px; color: #d8e4f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qtime { font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* 详情卡顶部色条随选中震中切换 */
.detail { border-top: 3px solid var(--rc, var(--accent)); }
.detail > header small { color: var(--rc, var(--accent)); }
.detail > footer a { color: #ffd7a4; text-decoration: none; border-bottom: 1px dotted rgba(255,215,164,.5); }

/* ── 图例 ─────────────────────────────────────────────────── */
.legend { gap: 5px 13px; max-width: 300px; }
.legend .lg-cap { font-size: 10px; color: var(--dim); letter-spacing: .04em; width: 100%; margin-bottom: 1px; }
.legend .lg-row { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.legend .lg-row i { width: 11px; height: 11px; border-radius: 50%; display: block; flex: 0 0 auto; box-shadow: 0 0 8px -1px currentColor; }
.legend .lg-line i {
  width: 16px; height: 0; border-radius: 0; box-shadow: none;
  border-top: 1.5px dashed rgba(159, 179, 205, .8);
}

/* 移动端 */
@media (max-width: 900px) {
  .facts em { font-size: 14px; }
  .tl { height: 62px; }
  .panel .row { padding: 9px 0; }
  .qlist { max-height: 210px; }
  .legend { max-width: none; }
}
