/* Route history. Local records only; no account and no server storage. */
.history-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(30px, 5vw, 64px) 5% 84px;
}

.history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.history-kicker {
  font-size: 10px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #a35152;
}

.history-heading h1 {
  margin: 10px 0 0;
  font: 500 clamp(34px, 4.4vw, 58px)/1.08 'Playfair Display', Georgia, 'Songti SC', serif;
  letter-spacing: -0.035em;
  color: #22382e;
}

.history-heading p {
  max-width: 520px;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: #63726b;
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 0;
  border-top: 1px solid #dde3dc;
  border-bottom: 1px solid #dde3dc;
  color: #63726b;
  font-size: 12px;
}

.history-toolbar strong {
  color: #294d3c;
  font-weight: 650;
}

.history-clear {
  border: 1px solid #d8e0d6;
  background: transparent;
  color: #8b4b45;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.history-clear:hover {
  background: #f8f2ef;
  border-color: #cbb4ac;
}

.history-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.history-card {
  background: #fffefa;
  border: 1px solid #dde3dc;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 8px 26px rgba(34, 56, 46, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.history-card:hover {
  border-color: #c6d2c6;
  box-shadow: 0 14px 34px rgba(34, 56, 46, 0.08);
}

.history-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
}

.history-date {
  display: block;
  color: #8b968e;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.history-route {
  margin: 8px 0 7px;
  font: 500 clamp(22px, 2.4vw, 30px)/1.2 'Playfair Display', Georgia, 'Songti SC', serif;
  letter-spacing: -0.02em;
  color: #22382e;
}

.history-route span {
  color: #b76758;
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #7b8a80;
  font-size: 12px;
}

.history-teaser {
  margin: 11px 0 0;
  max-width: 820px;
  color: #6d7c71;
  font-size: 12px;
  line-height: 1.7;
}

.history-teaser b {
  color: #43594b;
  font-weight: 600;
}

.history-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.history-actions button,
.history-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #f1f4ee;
  color: #2f4a3a;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.history-actions button:hover,
.history-actions a:hover {
  background: #e6ede4;
}

.history-actions .is-primary {
  background: #294d3c;
  color: #fffdf5;
}

.history-actions .is-primary:hover {
  background: #3c6951;
}

.history-actions .is-danger {
  background: transparent;
  color: #9b4b45;
  padding-left: 4px;
}

.history-detail {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #e4eae2;
}

.history-detail[hidden] {
  display: none;
}

.history-day h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: #253a30;
  font-size: 14px;
  line-height: 1.5;
}

.history-day h3 span {
  flex: none;
  border-radius: 6px;
  background: #eef3ea;
  color: #4f6d58;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 700;
}

.history-day p {
  margin: 5px 0 0;
  color: #5f7266;
  font-size: 12px;
  line-height: 1.75;
}

.history-places {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.history-places span {
  border: 1px solid #e5ebe2;
  border-radius: 20px;
  background: #f4f6f1;
  color: #53695b;
  padding: 4px 8px;
  font-size: 10px;
}

.history-empty {
  margin-top: 22px;
  border: 1px dashed #c9d5c9;
  border-radius: 16px;
  background: #faf9f3;
  padding: 44px 24px;
  text-align: center;
  color: #6d7c71;
}

.history-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #294d3c;
  font: 500 24px/1.3 'Playfair Display', Georgia, 'Songti SC', serif;
}

.history-empty p {
  margin: 0 auto 16px;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.7;
}

.history-empty a {
  display: inline-flex;
  border-radius: 9px;
  background: #294d3c;
  color: #fffdf5;
  padding: 11px 15px;
  font-size: 12px;
  font-weight: 600;
}

.history-note {
  margin: 20px 0 0;
  color: #8b968e;
  font-size: 11px;
  line-height: 1.7;
}

.history-status {
  margin: 12px 0 0;
  min-height: 16px;
  color: #4f6d58;
  font-size: 12px;
}

@media (max-width: 700px) {
  .history-wrap {
    padding-top: 28px;
    padding-bottom: 60px;
  }

  .history-heading {
    gap: 10px;
    margin-bottom: 18px;
  }

  .history-card {
    padding: 16px;
  }

  .history-card-top {
    display: block;
  }

  .history-actions button,
  .history-actions a {
    flex: 1 1 auto;
  }

  .history-actions .is-danger {
    flex: 0 0 auto;
  }
}
