#routeJournal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  color: #f2eee2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

#routeJournal *,
#routeJournal *::before,
#routeJournal *::after {
  box-sizing: border-box;
}

#routeJournal button,
#routeJournal summary {
  font: inherit;
}

#routeJournal button:focus-visible,
#routeJournal a:focus-visible,
#routeJournal summary:focus-visible {
  outline: 2px solid #f1b75d;
  outline-offset: 3px;
}

#openJournal {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(236, 230, 213, .32);
  border-radius: 999px;
  background: #173f43;
  box-shadow: 0 5px 22px rgba(0, 0, 0, .28);
  color: #f2eee2;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

#openJournal[hidden] {
  display: none;
}

#openJournal:hover {
  background: #205257;
  border-color: rgba(241, 183, 93, .75);
}

.route-journal-launcher-icon {
  color: #f1b75d;
  font-size: 20px;
  line-height: 1;
}

.route-journal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  overflow: auto;
  background: rgba(5, 19, 21, .76);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  overscroll-behavior: contain;
}

.route-journal-overlay[hidden],
.route-journal-profile-wrap[hidden],
.route-journal-sources[hidden] {
  display: none;
}

.route-journal-card {
  width: min(100%, 760px);
  max-height: min(94dvh, 940px);
  padding: clamp(15px, 3.5vw, 28px);
  overflow: auto;
  border: 1px solid rgba(218, 221, 207, .18);
  border-radius: 22px;
  background: #14383c;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .46);
  scrollbar-color: #58797a #173f43;
}

.route-journal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.route-journal-kicker {
  margin: 0 0 5px;
  color: #a7c1bb;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .18em;
}

#routeJournalTitle {
  margin: 0;
  color: #f2eee2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.route-journal-close {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid rgba(236, 230, 213, .24);
  border-radius: 50%;
  background: rgba(241, 246, 233, .04);
  color: #f2eee2;
  font-size: 26px !important;
  line-height: 1;
  cursor: pointer;
}

.route-journal-close:hover {
  border-color: #f1b75d;
  color: #f1b75d;
}

.route-journal-progress-wrap {
  margin-bottom: 16px;
}

.route-journal-progress-copy,
.route-journal-profile-heading,
.route-journal-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.route-journal-progress-label,
.route-journal-profile-heading,
.route-journal-section-heading h2 {
  color: #b4c8c1;
  font-size: 12px;
  font-weight: 620;
}

.route-journal-distance {
  color: #f2eee2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.route-journal-progress {
  height: 5px;
  margin: 8px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(224, 229, 213, .15);
}

.route-journal-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #e4aa59;
  transition: width 220ms ease-out;
}

.route-journal-next {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-height: 20px;
  color: #f2eee2;
  font-size: 13px;
}

.route-journal-next-label {
  color: #a7c1bb;
}

.route-journal-next-name {
  font-weight: 680;
}

.route-journal-map-frame {
  overflow: hidden;
  border: 1px solid rgba(217, 226, 208, .15);
  border-radius: 15px;
  background-color: #1a4548;
  background-image: radial-gradient(ellipse at 22% 72%, rgba(167, 193, 178, .13), transparent 38%), radial-gradient(ellipse at 77% 25%, rgba(210, 224, 208, .11), transparent 33%);
}

.route-journal-map {
  display: block;
  width: 100%;
  height: auto;
  max-height: 39vh;
  min-height: 175px;
}

.route-journal-map-grid,
.route-journal-profile-grid {
  fill: none;
  stroke: rgba(226, 233, 216, .085);
  stroke-width: 1;
}

.route-journal-route-shadow {
  fill: none;
  stroke: rgba(8, 22, 23, .38);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
}

.route-journal-route-line {
  fill: none;
  stroke: #d5d9c8;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.route-journal-marker circle {
  fill: #315d5c;
  stroke: #a9c0b6;
  stroke-width: 2;
}

.route-journal-marker.is-locked circle {
  fill: #385653;
  stroke: #809791;
  stroke-dasharray: 2 2;
  opacity: .72;
}

.route-journal-marker.is-unlocked circle {
  fill: #f1b75d;
  stroke: #153b3e;
}

.route-journal-current-halo {
  fill: rgba(241, 183, 93, .16);
  stroke: #f1b75d;
  stroke-width: 2;
}

.route-journal-current-dot {
  fill: #f1b75d;
  stroke: #fff4d5;
  stroke-width: 2;
}

.route-journal-current text {
  fill: #fff1cc;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
  paint-order: stroke;
  stroke: #14383c;
  stroke-width: 3px;
}

.route-journal-north text {
  fill: #ebecdc;
  font-size: 12px;
  font-weight: 750;
  text-anchor: middle;
}

.route-journal-north path {
  fill: none;
  stroke: #ebecdc;
  stroke-linecap: round;
  stroke-width: 2;
}

.route-journal-profile-wrap {
  margin-top: 14px;
  padding: 10px 12px 4px;
  border: 1px solid rgba(217, 226, 208, .12);
  border-radius: 13px;
  background: rgba(6, 25, 26, .16);
}

.route-journal-profile-heading {
  font-size: 11px;
}

.route-journal-elevation-range {
  font-variant-numeric: tabular-nums;
}

.route-journal-profile {
  display: block;
  width: 100%;
  height: 78px;
}

.route-journal-profile-fill {
  fill: rgba(226, 170, 89, .12);
  stroke: none;
}

.route-journal-profile-line {
  fill: none;
  stroke: #e4aa59;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.route-journal-stops {
  margin-top: 20px;
}

.route-journal-section-heading {
  margin-bottom: 9px;
}

.route-journal-section-heading h2 {
  margin: 0;
  color: #e7e7d8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.route-journal-lock-note {
  color: #91aaa4;
  font-size: 10px;
}

.route-journal-checkpoints {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.route-journal-landmarks {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(223, 229, 214, .14);
}

.route-journal-landmarks-note {
  margin: 8px 0 12px;
  color: #a9beb5;
  font-size: 11px;
  line-height: 1.45;
}

.route-journal-landmark-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.route-journal-landmark {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(223, 229, 214, .14);
  border-radius: 12px;
  background: rgba(9, 29, 31, .22);
}

.route-journal-landmark.is-nearby {
  border-color: rgba(241, 183, 93, .64);
  background: rgba(241, 183, 93, .07);
}

.route-journal-landmark-kind,
.route-journal-landmark-status {
  color: #91aaa4;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.route-journal-landmark-status {
  color: #efbb70;
  letter-spacing: .02em;
}

.route-journal-landmark h3,
.route-journal-landmark p,
.route-journal-landmark a {
  grid-column: 1 / -1;
  margin: 0;
}

.route-journal-landmark h3 {
  color: #f2eee2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 500;
}

.route-journal-landmark p {
  color: #b6c6bd;
  font-size: 11px;
  line-height: 1.46;
}

.route-journal-landmark a {
  width: fit-content;
  color: #f1c47f;
  font-size: 10px;
  text-decoration-color: rgba(241, 196, 127, .48);
  text-underline-offset: 2px;
}

.route-landmark-card {
  position: fixed;
  z-index: 16;
  top: max(74px, env(safe-area-inset-top) + 58px);
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  gap: 5px;
  width: min(320px, calc(100vw - 32px));
  max-height: min(48vh, 360px);
  overflow-y: auto;
  padding: 13px 15px;
  border: 1px solid rgba(222, 230, 214, .24);
  border-radius: 13px;
  background: rgba(13, 34, 36, .92);
  color: #f2eee2;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .28);
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.route-landmark-card[hidden] {
  display: none;
}

.route-landmark-kind {
  color: #e9b966;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.route-landmark-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.route-landmark-copy {
  margin: 0;
  color: #c3d0c8;
  font-size: 11px;
  line-height: 1.46;
}

.route-landmark-source {
  width: fit-content;
  color: #f1c47f;
  font-size: 10px;
  text-underline-offset: 2px;
}

.route-landmark-disclaimer {
  color: #94aaa1;
  font-size: 9px;
  line-height: 1.35;
}

.route-journal-checkpoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(223, 229, 214, .16);
  border-radius: 12px;
  background: rgba(9, 29, 31, .24);
  color: #e9e8dc;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.route-journal-checkpoint:not(:disabled):hover {
  border-color: rgba(241, 183, 93, .7);
  background: rgba(241, 183, 93, .08);
}

.route-journal-checkpoint:disabled {
  color: #9caca4;
  cursor: not-allowed;
  opacity: .57;
}

.route-journal-checkpoint[aria-current="location"] {
  border-color: rgba(241, 183, 93, .62);
  background: rgba(241, 183, 93, .075);
}

.route-journal-checkpoint-name {
  overflow: hidden;
  color: #f2eee2;
  font-size: 12px;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-journal-checkpoint-description {
  grid-column: 1 / -1;
  display: -webkit-box;
  overflow: hidden;
  color: #a9beb5;
  font-size: 11px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.route-journal-checkpoint-status {
  align-self: start;
  color: #efbb70;
  font-size: 10px;
  white-space: nowrap;
}

.route-journal-checkpoint:disabled .route-journal-checkpoint-status {
  color: #a3b1aa;
}

.route-journal-note {
  margin: 15px 0 0;
  color: #b6c6bd;
  font-size: 11px;
  line-height: 1.5;
}

.route-journal-sources {
  margin-top: 10px;
  border-top: 1px solid rgba(223, 229, 214, .14);
  color: #b6c6bd;
  font-size: 11px;
}

.route-journal-sources summary {
  width: fit-content;
  padding: 10px 0 4px;
  color: #d7ddd0;
  cursor: pointer;
}

.route-journal-sources ul {
  display: grid;
  gap: 9px;
  margin: 8px 0 4px;
  padding: 0;
  list-style: none;
}

.route-journal-sources li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(6, 25, 26, .22);
}

.route-journal-source-title {
  color: #f2eee2;
  font-weight: 620;
}

.route-journal-sources a {
  color: #f1c47f;
  text-decoration-color: rgba(241, 196, 127, .48);
  text-underline-offset: 2px;
}

.route-journal-source-note {
  grid-column: 1 / -1;
  color: #a9beb5;
  line-height: 1.45;
}

@media (max-width: 480px) {
  #openJournal {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    min-width: 44px;
    min-height: 44px;
    padding: 0 13px;
  }

  .route-journal-overlay {
    place-items: end center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .route-journal-card {
    width: 100%;
    max-height: 96dvh;
    padding: 16px 14px max(16px, env(safe-area-inset-bottom));
    border-radius: 20px;
  }

  .route-journal-header {
    margin-bottom: 15px;
  }

  .route-journal-map {
    min-height: 150px;
    max-height: 31vh;
  }

  .route-journal-profile-wrap {
    margin-top: 10px;
  }

  .route-journal-checkpoints {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .route-journal-landmark-list {
    grid-template-columns: 1fr;
  }

  .route-landmark-card {
    top: max(74px, env(safe-area-inset-top) + 58px);
    right: max(8px, env(safe-area-inset-right));
    width: min(290px, calc(100vw - 20px));
    max-height: 38vh;
  }

  .route-journal-checkpoint {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 10px;
  }

  .route-journal-checkpoint-description {
    -webkit-line-clamp: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #routeJournal *,
  #routeJournal *::before,
  #routeJournal *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
