/* 我的行程 · 飞行记录 */

.tp-first { margin-top: 10px; }

.tp-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 4px 0 20px; }
.tp-stats div { padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tp-stats div:nth-child(3n) { border-right: 0; }
.tp-stats div:nth-child(n+4) { border-bottom: 0; }
.tp-stats b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tp-stats span { display: block; margin-top: 3px; font-size: 10px; color: var(--ink-3); }

.tp-callout { border-left: 2px solid var(--red); background: var(--paper-2); padding: 11px 14px; margin: 0 0 12px; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }
.tp-callout b { color: var(--ink); }
.tp-intro { margin: 0; font-size: 12px; line-height: 1.85; color: var(--ink-2); }

/* 区块标题 */
.tp-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 9px; }
.tp-head h2 { margin: 0; }
.tp-head > p { max-width: 330px; margin: 0; font-size: 10px; line-height: 1.7; color: var(--ink-3); text-align: right; }
.tp-kicker { margin: 0 0 4px; font-family: var(--sans); font-size: 9px; letter-spacing: .14em; color: var(--red); }

/* 飞行表 */
.tp-flights-head, .tp-flight-row {
  display: grid;
  grid-template-columns: 76px 92px minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: baseline;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.tp-flights-head { border-bottom: 1px solid var(--ink); padding: 6px 4px; font-family: var(--sans); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-3); }
.tp-month { font-family: var(--mono); font-size: 10px; color: var(--red); }
.tp-seq { font-style: normal; font-family: var(--sans); font-size: 9px; color: var(--ink-3); margin-left: 3px; }
.tp-flight-no { font-family: var(--mono); font-size: 11px; color: var(--ink); }
.tp-route { font-family: var(--serif); font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.tp-route i { font-family: var(--sans); font-style: normal; font-size: 9px; letter-spacing: .04em; color: var(--ink-3); }
.tp-route b { font-weight: 400; color: var(--ink-3); padding: 0 2px; }
.tp-km { text-align: right; font-family: var(--mono); font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.tp-year { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 2px; border-top: 1px solid var(--ink); padding-top: 7px; }
.tp-year span { font-family: var(--serif); font-size: 20px; letter-spacing: .04em; }
.tp-year em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.tp-total { margin: 12px 0 0; text-align: right; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

.tp-nothing { border: 1px dashed var(--line); padding: 26px 20px; text-align: center; color: var(--ink-3); font-size: 11px; }

/* 待录入 */
.tp-pending { display: grid; grid-template-columns: 1fr; gap: 18px; }
.tp-pending > div { border: 1px dashed var(--line); padding: 15px 18px; }
.tp-pending h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.tp-pending p { margin: 0; font-size: 10.5px; line-height: 1.8; color: var(--ink-3); }
.tp-pending code { font-family: var(--mono); font-size: 9.5px; color: var(--ink-2); background: var(--paper-2); padding: 1px 4px; }

/* 规则 */
.tp-rules { margin: 0 0 14px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.tp-rules li { border-top: 1px solid var(--line-soft); padding: 9px 0 9px 14px; position: relative; font-size: 11px; line-height: 1.8; color: var(--ink-2); }
.tp-rules li::before { content: "—"; position: absolute; left: 0; color: var(--red); }
.tp-rules li:nth-child(-n+2) { border-top: 0; }
.tp-footnote { margin: 0 !important; font-size: 10.5px !important; color: var(--ink-3) !important; line-height: 1.9 !important; }

@media (max-width: 760px) {
  .tp-stats { grid-template-columns: 1fr 1fr; }
  .tp-stats div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .tp-stats div:nth-child(2n) { border-right: 0; }
  .tp-stats div:nth-child(3), .tp-stats div:nth-child(4) { border-bottom: 1px solid var(--line); }
  .tp-stats div:nth-child(n+5) { border-bottom: 0; }
  .tp-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .tp-head > p { text-align: left; }
  .tp-flights-head { display: none; }
  .tp-flight-row { grid-template-columns: 56px 1fr auto; row-gap: 2px; padding: 10px 4px; }
  .tp-route { grid-column: 1 / -1; grid-row: 2; font-size: 12.5px; }
  .tp-pending { grid-template-columns: 1fr; gap: 10px; }
  .tp-rules { grid-template-columns: 1fr; }
  .tp-rules li:nth-child(2) { border-top: 1px solid var(--line-soft); }
}

/* ---------- 徒步 ---------- */

.tp-hike { border-top: 1px solid var(--ink); padding-top: 16px; margin-bottom: 30px; }
.tp-hike-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.tp-hike h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .03em; }
.tp-hike-meta { margin: 5px 0 0; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.tp-hike-note { margin: 5px 0 0; font-size: 10px; color: var(--ink-3); }
.tp-hike-points { margin: 0; font-family: var(--mono); font-size: 9px; color: var(--ink-3); white-space: nowrap; }
.tp-map-note { margin: 8px 0 0; font-size: 9.5px; color: var(--ink-3); }

.tp-hike-map { height: 520px; border: 1px solid var(--line); background: var(--paper-2); }
.tp-hike-map .leaflet-tile-pane { filter: grayscale(0.92) contrast(0.9) brightness(1.08); opacity: 0.82; }
.tp-hike-map .leaflet-container { background: var(--paper-2); font-family: var(--sans); }

/* 地图与年份切换 */
.tp-year-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.tp-year-tabs button {
  border: 1px solid var(--line); background: transparent;
  padding: 4px 10px; font-family: var(--sans); font-size: 9px; letter-spacing: .06em;
  color: var(--ink-3); cursor: pointer;
}
.tp-year-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.tp-year-tabs button.is-active { border-color: var(--ink); background: var(--paper-2); color: var(--ink); }
.tp-chart { width: 100%; border: 1px solid var(--line); background: var(--paper-2); }
.tp-chart-world { height: 520px; }
.tp-chart-region { height: 420px; }

@media (max-width: 760px) {
  .tp-chart-world { height: 340px; }
  .tp-hike-map { height: 380px; }
  .tp-chart-region { height: 320px; }
  .tp-hike-head { flex-direction: column; gap: 4px; }
}

/* ---------- 旅行年表 ---------- */

.tp-place-year { display: grid; grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 12px; align-items: start; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
.tp-place-year:first-child { border-top: 1px solid var(--ink); }
.tp-place-year > b { font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: .03em; }
.tp-place-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tp-place { border: 1px solid var(--line); padding: 2px 7px; font-size: 10.5px; line-height: 1.6; color: var(--ink-2); white-space: nowrap; }
.tp-place.is-new::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--red); margin-right: 5px; vertical-align: 1px; }
.tp-place-count { text-align: right; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

@media (max-width: 760px) {
  .tp-place-year { grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 8px; }
  .tp-place-year > b { font-size: 15px; }
}
