:root {
  --paper: #f3f5f4;
  --paper-deep: #e4e9e6;
  --ink: #17201d;
  --muted: #6f746d;
  --pine: #1d4439;
  --pine-dark: #122e27;
  --coral: #d85d45;
  --coral-text: #b44735;
  --sky: #597d89;
  --sky-text: #486b76;
  --line: rgba(23, 32, 29, 0.18);
  --white: #ffffff;
  --sans: "Noto Sans SC", sans-serif;
  --serif: "Noto Serif SC", serif;
  --script: "Pinyon Script", "Noto Serif SC", serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 72px);
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-date {
  font-size: 13px;
  font-weight: 600;
}

.install-button,
.export-menu summary,
.admin-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 253, 248, 0.7);
  border-radius: 4px;
  background: rgba(18, 46, 39, 0.2);
  color: var(--white);
  cursor: pointer;
  padding: 8px 15px;
  font-size: 13px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.install-button:hover,
.export-menu summary:hover,
.admin-link:hover {
  background: var(--white);
  color: var(--pine-dark);
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
}

.connection-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #91c7a4;
  content: "";
}

.connection-status.is-offline::before {
  background: var(--coral);
}

.export-menu {
  position: relative;
}

.export-menu summary {
  list-style: none;
}

.export-menu summary::-webkit-details-marker {
  display: none;
}

.export-menu[open] summary {
  background: var(--white);
  color: var(--pine-dark);
}

.export-menu > div {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 178px;
  padding: 7px;
  border: 1px solid rgba(23, 32, 29, 0.16);
  border-radius: 4px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(18, 46, 39, 0.2);
}

.export-menu a,
.export-menu button {
  display: flex;
  min-height: 40px;
  align-items: center;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
}

.export-menu a:hover,
.export-menu button:hover {
  background: var(--paper-deep);
}

.hero {
  position: relative;
  display: grid;
  min-height: 620px;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  opacity: 0;
  object-fit: cover;
  object-position: center 58%;
  transform: scale(1.025);
  transition: opacity 420ms ease;
  animation: settle-image 1200ms ease-out forwards;
}

.hero-image.is-loaded {
  opacity: 1;
}

.hero-shade {
  background: rgba(13, 27, 23, 0.42);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto 126px;
  animation: rise-in 700ms 120ms ease-out both;
}

.eyebrow,
.section-label {
  margin: 0 0 14px;
  color: var(--coral-text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero .eyebrow,
.route-map-section .section-label {
  color: var(--coral);
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 900;
  line-height: 1.12;
  text-wrap: balance;
}

.hero-description {
  max-width: 520px;
  margin: 20px 0 0;
  font-size: 17px;
  line-height: 1.7;
}

.trip-facts {
  position: absolute;
  z-index: 2;
  right: max(20px, calc((100vw - 1120px) / 2));
  bottom: 0;
  left: max(20px, calc((100vw - 1120px) / 2));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(255, 253, 248, 0.5);
}

.trip-facts div {
  min-width: 0;
  padding: 20px 18px 24px;
  border-right: 1px solid rgba(255, 253, 248, 0.28);
}

.trip-facts div:last-child {
  border-right: 0;
}

.trip-facts dt {
  color: rgba(255, 253, 248, 0.72);
  font-size: 11px;
}

.trip-facts dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.journey-command {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(390px, 1fr) auto;
  gap: 50px;
  width: min(1120px, calc(100% - 40px));
  align-items: center;
  margin: 0 auto;
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.journey-command h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.25;
}

.journey-command > div > p:last-child {
  max-width: 520px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.journey-command-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.journey-command-facts div {
  min-width: 0;
  padding: 12px;
}

.journey-command-facts div + div {
  border-left: 1px solid var(--line);
}

.journey-command-facts dt {
  color: var(--muted);
  font-size: 9px;
}

.journey-command-facts dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.primary-command {
  min-height: 44px;
  border: 1px solid var(--pine);
  border-radius: 3px;
  background: var(--pine);
  color: var(--white);
  cursor: pointer;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 700;
}

.route-map-section {
  scroll-margin-top: 72px;
  padding: 78px max(20px, calc((100vw - 1120px) / 2)) 84px;
  background: var(--pine-dark);
  color: var(--white);
}

.route-map-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 72px;
  align-items: end;
  margin-bottom: 30px;
}

.route-map-heading h2 {
  max-width: 600px;
  margin: 0;
  font-family: var(--serif);
  font-size: 43px;
  line-height: 1.25;
}

.route-map-heading > p {
  margin: 0 0 4px;
  color: rgba(255, 253, 248, 0.68);
  font-size: 13px;
}

.map-segment-controls {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 253, 248, 0.28);
}

.map-segment-button {
  min-height: 42px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 253, 248, 0.72);
  cursor: pointer;
  padding: 8px 17px 10px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.map-segment-button:hover,
.map-segment-button.is-active {
  border-bottom-color: var(--coral);
  background: transparent;
  color: var(--white);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
  min-width: 0;
  border-top: 1px solid rgba(255, 253, 248, 0.34);
  border-bottom: 1px solid rgba(255, 253, 248, 0.34);
}

.map-frame {
  position: relative;
  min-width: 0;
  border-right: 1px solid rgba(255, 253, 248, 0.34);
}

.route-source {
  position: absolute;
  z-index: 401;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 9px;
  border-radius: 2px;
  background: rgba(18, 46, 39, 0.9);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
}

#trip-map {
  width: 100%;
  height: 610px;
  background: #dfe3dc;
  font-family: var(--sans);
}

#trip-map.is-unavailable {
  display: none;
}

.map-unavailable {
  min-height: 360px;
  margin: 0;
  padding: 80px 30px;
  color: var(--pine-dark);
  background: var(--paper-deep);
  text-align: center;
}

.journey-brief {
  padding: 34px 28px;
  border-left: 1px solid rgba(255, 253, 248, 0.34);
}

.brief-label {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.journey-brief h3 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}

.journey-brief dl {
  margin: 0;
}

.journey-brief dl div {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 253, 248, 0.16);
}

.journey-brief dt {
  color: rgba(255, 253, 248, 0.56);
  font-size: 10px;
}

.journey-brief dd {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.journey-warning {
  margin: 26px 0 34px;
  padding-left: 13px;
  border-left: 2px solid var(--coral);
  color: rgba(255, 253, 248, 0.74);
  font-size: 12px;
}

.map-legend {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: rgba(255, 253, 248, 0.7);
  font-size: 11px;
  list-style: none;
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-line {
  display: block;
  width: 32px;
  height: 3px;
}

.legend-line.outbound {
  background: var(--coral);
}

.legend-line.cross-border {
  background: repeating-linear-gradient(90deg, var(--sky) 0 6px, transparent 6px 10px);
}

.legend-line.return {
  background: #4f8a76;
}

.journey-map-marker-wrap {
  background: transparent;
  border: 0;
  transition: opacity 240ms ease;
}

.journey-route-line {
  transition: stroke 240ms ease, stroke-width 240ms ease, stroke-opacity 240ms ease;
}

.journey-map-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--pine-dark);
  box-shadow: 0 2px 10px rgba(18, 46, 39, 0.24);
  color: var(--white);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.leaflet-popup-content {
  min-width: 150px;
  margin: 15px 17px;
  font-family: var(--sans);
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(18, 46, 39, 0.35) !important;
  border-radius: 2px;
  box-shadow: 0 5px 14px rgba(18, 46, 39, 0.14) !important;
}

.leaflet-control-zoom a {
  width: 30px !important;
  height: 30px !important;
  border-bottom-color: rgba(18, 46, 39, 0.18) !important;
  background: rgba(255, 253, 248, 0.92) !important;
  color: var(--pine-dark) !important;
  line-height: 28px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--coral) !important;
  color: var(--white) !important;
}

.leaflet-control-attribution {
  border-top: 1px solid rgba(18, 46, 39, 0.2);
  background: rgba(18, 46, 39, 0.84) !important;
  color: rgba(255, 253, 248, 0.72) !important;
}

.leaflet-control-attribution a {
  color: var(--white) !important;
}

.map-popup > span {
  color: var(--coral-text);
  font-size: 10px;
  font-weight: 700;
}

.map-popup h3 {
  margin: 2px 0 5px;
  font-family: var(--serif);
  font-size: 17px;
}

.map-popup p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.map-popup button {
  min-height: 34px;
  border: 0;
  border-radius: 3px;
  background: var(--pine);
  color: var(--white);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 11px;
}

.leaflet-control-attribution {
  font-family: var(--sans);
  font-size: 9px;
}

.route-strip {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 48px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 50px;
  border-bottom: 1px solid var(--line);
}

.section-kicker span {
  color: var(--coral-text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.section-kicker h2 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 22px;
}

.route-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 38px 34px;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.route-chapter {
  --chapter-accent: var(--pine);
  min-width: 0;
  padding-top: 14px;
  border-top: 2px solid var(--chapter-accent);
}

.route-chapter[data-chapter="coast"] {
  --chapter-accent: var(--coral-text);
}

.route-chapter[data-chapter="border"] {
  --chapter-accent: var(--sky-text);
}

.route-chapter[data-chapter="jiangxi"] {
  --chapter-accent: var(--pine-dark);
}

.route-chapter > header {
  margin-bottom: 18px;
}

.route-chapter > header p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 2px;
  color: var(--chapter-accent);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.route-chapter > header time {
  color: var(--muted);
  font-weight: 500;
}

.route-chapter > header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
}

.route-track-window {
  position: relative;
  min-width: 0;
}

.route-track-window::after {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 38px;
  height: 100%;
  background: linear-gradient(90deg, rgba(243, 240, 232, 0), var(--paper));
  content: "";
  pointer-events: none;
}

.route-chapter-track {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  margin: 0;
  padding: 0 38px 11px 0;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--chapter-accent, var(--pine)) transparent;
  scrollbar-width: thin;
  list-style: none;
}

.route-chapter-track li {
  position: relative;
  width: 94px;
  flex: 0 0 94px;
  padding: 0 12px 0 20px;
  scroll-snap-align: start;
}

.route-chapter-track li::before {
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 8px;
  border: 2px solid var(--chapter-accent, var(--pine));
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.route-chapter-track li::after {
  position: absolute;
  top: 14px;
  right: calc(100% - 2px);
  width: 20px;
  height: 1px;
  background: var(--chapter-accent, var(--pine));
  content: "";
}

.route-chapter-track li:first-child::after {
  display: none;
}

.route-chapter-track button {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.route-chapter-track button:hover strong {
  color: var(--chapter-accent, var(--pine));
}

.route-chapter-track span,
.route-chapter-track strong {
  display: block;
}

.route-chapter-track span {
  color: var(--muted);
  font-size: 10px;
}

.route-chapter-track strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.route-track-fallback {
  grid-column: 1 / -1;
  --chapter-accent: var(--pine);
}

.view-tabs {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.96);
  backdrop-filter: blur(12px);
}

.view-tab {
  min-width: 148px;
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.view-tab span {
  margin-left: 6px;
  color: currentColor;
  font-size: 11px;
}

.view-tab.is-active {
  background: var(--pine);
  color: var(--white);
}

.plan-view {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 110px;
  scroll-margin-top: 68px;
}

.plan-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 64px;
  align-items: end;
  margin-bottom: 58px;
}

.plan-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.2;
}

.plan-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.itinerary-layout {
  display: grid;
  grid-template-columns: 196px minmax(0, 760px);
  gap: 80px;
  align-items: start;
}

.day-index {
  position: sticky;
  top: 90px;
  min-width: 0;
}

.day-index > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.day-index-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 100%;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.day-index button {
  display: flex;
  min-width: 0;
  height: 55px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  transition: background 150ms ease, color 150ms ease;
}

.day-index button:hover,
.day-index button.is-active {
  background: var(--pine);
  color: var(--white);
}

.day-index button[data-chapter="coast"] {
  box-shadow: inset 0 2px 0 var(--coral-text);
}

.day-index button[data-chapter="border"] {
  box-shadow: inset 0 2px 0 var(--sky-text);
}

.day-index button[data-chapter="jiangxi"] {
  box-shadow: inset 0 2px 0 var(--pine-dark);
}

.day-index button span {
  font-weight: 700;
}

.day-index button small {
  color: currentColor;
  opacity: 0.65;
}

.day-list {
  min-width: 0;
}

.itinerary-chapter {
  --chapter-accent: var(--pine);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.itinerary-chapter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.itinerary-chapter[data-chapter="coast"] {
  --chapter-accent: var(--coral-text);
}

.itinerary-chapter[data-chapter="border"] {
  --chapter-accent: var(--sky-text);
}

.itinerary-chapter[data-chapter="jiangxi"] {
  --chapter-accent: var(--pine-dark);
}

.itinerary-chapter + .itinerary-chapter {
  margin-top: 94px;
}

.chapter-heading {
  margin: 0 0 44px;
  padding: 18px 0 22px;
  border-top: 3px solid var(--chapter-accent);
  border-bottom: 1px solid var(--line);
}

.chapter-heading > p:first-child {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 3px;
  color: var(--chapter-accent);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.chapter-heading time {
  color: var(--muted);
  font-weight: 500;
}

.chapter-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.25;
}

.chapter-route {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.day-entry {
  scroll-margin-top: 92px;
  padding: 0 0 72px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 72px;
}

.day-entry:last-child {
  margin-bottom: 0;
}

.day-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.day-number {
  display: grid;
  width: 64px;
  height: 74px;
  place-content: center;
  border: 1px solid var(--pine);
  color: var(--pine);
  text-align: center;
}

.day-number span {
  font-size: 9px;
  font-weight: 700;
}

.day-number strong {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
}

.day-title-wrap p {
  margin: 1px 0 5px;
  color: var(--coral-text);
  font-size: 12px;
  font-weight: 700;
}

.day-visual {
  margin: 30px 0 25px;
}

.day-visual-frame {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: var(--paper-deep);
}

.travel-visual {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 420ms ease;
}

.travel-visual.is-loaded {
  opacity: 1;
}

.city-stamp {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: grid;
  gap: 1px;
  max-width: calc(100% - 28px);
  padding: 8px 11px 7px;
  border-left: 3px solid var(--coral);
  background: rgba(18, 46, 39, 0.88);
  color: var(--white);
}

.city-stamp strong {
  font-family: var(--serif);
  font-size: 13px;
}

.city-stamp span {
  overflow-wrap: anywhere;
  font-size: 8px;
  font-weight: 600;
}

.day-visual figcaption {
  margin-top: 7px;
  color: var(--sky-text);
  font-size: 10px;
  text-align: right;
}

.day-title-wrap h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  line-height: 1.35;
}

.day-summary {
  max-width: 610px;
  margin: 28px 0 16px 88px;
  color: #4f5651;
}

.day-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 34px 88px;
}

.day-tags span {
  border-bottom: 2px solid var(--sky);
  color: var(--sky-text);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 0;
}

.day-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 26px 88px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.day-metrics div {
  min-width: 0;
  padding: 14px 14px 15px 0;
}

.day-metrics div + div {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.day-metrics dt {
  color: var(--muted);
  font-size: 9px;
}

.day-metrics dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.energy-note {
  margin: 0 0 28px 88px;
  padding: 13px 15px;
  border-left: 3px solid var(--pine);
  background: rgba(29, 68, 57, 0.07);
  color: #4f5651;
  font-size: 12px;
}

.energy-note span {
  margin-right: 10px;
  color: var(--pine);
  font-weight: 700;
}

.schedule-list {
  margin: 0 0 26px 88px;
  padding: 0;
  list-style: none;
}

.schedule-list li {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.schedule-list time {
  color: var(--pine);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.schedule-list h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.schedule-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.schedule-kind {
  flex: 0 0 auto;
  color: var(--sky-text);
  font-size: 9px;
  font-weight: 700;
}

.schedule-list li.is-confirmed {
  border-top-color: rgba(216, 93, 69, 0.5);
}

.schedule-list li.is-confirmed .schedule-kind {
  color: var(--coral-text);
}

.schedule-list li.is-energy .schedule-kind {
  color: var(--pine);
}

.schedule-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.day-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 0 88px;
}

.overnight {
  display: flex;
  gap: 12px;
  margin: 0;
  color: var(--pine);
  font-size: 13px;
  font-weight: 600;
}

.overnight span {
  color: var(--coral-text);
}

.day-actions {
  display: flex;
  gap: 8px;
}

.day-actions button,
.day-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--pine);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.day-actions button:hover,
.day-actions a:hover {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--white);
}

.roadbook {
  margin: 34px 0 30px 88px;
  padding: 24px 0;
  border-top: 2px solid var(--pine);
  border-bottom: 1px solid var(--line);
}

.roadbook > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.roadbook > header span,
.roadbook-targets span,
.energy-stops span,
.live-data-note {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.roadbook h4 {
  margin: 2px 0 3px;
  font-family: var(--serif);
  font-size: 21px;
}

.roadbook > header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.navigation-link {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--coral-text);
  color: var(--white);
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.roadbook-targets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.roadbook-targets p {
  display: grid;
  gap: 3px;
  min-width: 0;
  margin: 0;
  padding: 12px 12px 13px 0;
  font-size: 11px;
  font-weight: 600;
}

.roadbook-targets p + p {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.energy-stops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  background: var(--line);
  list-style: none;
}

.energy-stops li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 12px;
  min-width: 0;
  padding: 13px;
  background: var(--paper);
}

.energy-stops li > div {
  display: grid;
  gap: 2px;
}

.energy-stops strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.energy-stops p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.energy-stops a {
  align-self: start;
  color: var(--pine);
  font-size: 10px;
  font-weight: 700;
}

.live-data-note {
  margin: 15px 0 0;
  font-weight: 500;
}

.today-dashboard {
  display: grid;
  grid-template-columns: 220px minmax(300px, 0.8fr) minmax(360px, 1.2fr);
  gap: 46px;
  align-items: start;
}

.countdown-panel {
  padding: 5px 0 30px;
  border-bottom: 3px solid var(--coral);
}

.countdown-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.countdown-panel strong {
  display: block;
  margin: 8px 0 -12px;
  color: var(--pine);
  font-family: var(--serif);
  font-size: 104px;
  line-height: 1;
}

.countdown-panel p {
  margin: 0;
  color: var(--coral-text);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  text-align: right;
}

.today-priority,
.first-day-preview,
.active-day,
.trip-complete {
  min-width: 0;
}

.today-priority > header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--pine);
  color: var(--pine);
  font-size: 11px;
}

.today-priority ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-priority li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.today-priority li span {
  grid-column: 1 / -1;
  color: var(--coral-text);
  font-size: 9px;
  font-weight: 700;
}

.today-priority li strong {
  font-size: 12px;
}

.today-priority button,
.first-day-preview > button,
.today-actions button,
.trip-complete button {
  align-self: center;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--pine);
  cursor: pointer;
  padding: 2px 0;
  font-size: 10px;
  font-weight: 700;
}

.first-day-preview > span,
.active-day > header span,
.trip-complete > span {
  color: var(--coral-text);
  font-size: 10px;
  font-weight: 700;
}

.first-day-preview > h3,
.active-day > header h3,
.trip-complete h3 {
  margin: 5px 0 8px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.3;
}

.first-day-preview > p,
.active-day > header p,
.trip-complete p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.first-day-preview .day-visual {
  margin: 18px 0 16px;
}

.active-day > header,
.active-day > .day-visual {
  grid-column: 1 / -1;
}

.active-day > .day-visual {
  margin: 0;
}

.first-day-preview .roadbook,
.active-day .roadbook {
  margin: 23px 0 18px;
}

.active-day .roadbook {
  margin: 0;
}

.active-day {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(380px, 1.15fr);
  gap: 46px;
}

.active-day .schedule-list {
  margin: 0;
}

.active-day.without-roadbook .schedule-list {
  grid-column: 1 / -1;
  width: min(760px, 100%);
}

.today-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
}

.trip-complete {
  grid-column: 1 / -1;
  max-width: 660px;
  padding: 28px 0;
  border-top: 2px solid var(--pine);
  border-bottom: 1px solid var(--line);
}

.readiness-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(260px, 1fr);
  gap: 26px;
  align-items: center;
  margin-bottom: 48px;
  padding: 25px 0;
  border-top: 2px solid var(--pine);
  border-bottom: 1px solid var(--line);
}

.readiness-meter {
  height: 8px;
  overflow: hidden;
  background: var(--paper-deep);
}

.readiness-meter span {
  display: block;
  width: var(--progress);
  height: 100%;
  background: var(--coral);
  transition: width 260ms ease;
}

.readiness-summary strong {
  color: var(--pine);
  font-family: var(--serif);
  font-size: 28px;
}

.readiness-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 74px;
}

.booking-item {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--coral);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.52);
}

.booking-item.is-done {
  border-top-color: var(--pine);
}

.booking-item header,
.booking-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.booking-item header span,
.booking-item header strong {
  color: var(--coral-text);
  font-size: 9px;
}

.booking-item.is-done header strong {
  color: var(--pine);
}

.booking-date {
  margin: 20px 0 3px !important;
  color: var(--pine) !important;
  font-size: 10px !important;
  font-weight: 700;
}

.booking-item h3 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.35;
}

.booking-item > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
}

.booking-item > div {
  margin-top: auto;
}

.booking-item a,
.booking-item button {
  border: 0;
  background: transparent;
  color: var(--pine);
  cursor: pointer;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  text-decoration: underline;
}

.booking-item button:disabled {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.subsection-heading {
  margin-bottom: 22px;
}

.subsection-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
}

.toast {
  position: fixed;
  z-index: 1000;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100% - 44px));
  padding: 12px 16px;
  border-radius: 3px;
  background: var(--pine-dark);
  box-shadow: 0 12px 30px rgba(18, 46, 39, 0.24);
  color: var(--white);
  font-size: 12px;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 64px;
}

.checklist-group {
  padding: 32px 0 38px;
  border-top: 1px solid var(--line);
}

.checklist-group header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.checklist-group header > span {
  color: var(--coral-text);
  font-family: var(--serif);
  font-weight: 700;
}

.checklist-group h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.checklist-group header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.checklist-group ul {
  margin: 0 0 0 52px;
  padding: 0;
  list-style: none;
}

.checklist-group li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid rgba(23, 32, 29, 0.1);
}

.checklist-group input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--pine);
}

.checklist-group label {
  cursor: pointer;
  font-size: 14px;
}

.checklist-group input:checked + label {
  color: var(--muted);
  text-decoration: line-through;
}

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 230px;
  padding: 52px max(20px, calc((100vw - 1120px) / 2));
  background: var(--pine-dark);
  color: var(--white);
}

.site-footer > div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer p {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
}

.site-footer a {
  color: var(--white);
  font-size: 13px;
}

.loading-state {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--pine);
  font-family: var(--serif);
  font-size: 18px;
}

.loading-state.is-error {
  color: #9c2e25;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes settle-image {
  to {
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: 590px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .route-map-heading,
  .route-strip,
  .journey-command {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .journey-command-facts {
    max-width: 640px;
  }

  .primary-command {
    justify-self: start;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  #trip-map {
    height: 520px;
  }

  .journey-brief {
    border-top: 1px solid rgba(255, 253, 248, 0.34);
    border-left: 0;
  }

  .itinerary-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .day-index {
    position: relative;
    top: auto;
  }

  .day-index-list {
    grid-template-columns: repeat(7, 1fr);
  }

  .day-index button {
    height: 54px;
    justify-content: center;
  }

  .day-index button small {
    display: none;
  }

  .today-dashboard {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .first-day-preview {
    grid-column: 1 / -1;
  }

  .active-day {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  }

  .active-day .schedule-list,
  .active-day .roadbook {
    grid-column: 1 / -1;
  }

  .booking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 68px;
    padding: 14px 18px;
  }

  .brand {
    gap: 9px;
    font-size: 11px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }

  .header-date {
    display: none;
  }

  .connection-status,
  .admin-link {
    display: none;
  }

  .install-button,
  .export-menu summary {
    min-height: 36px;
    padding: 6px 11px;
    font-size: 12px;
  }

  .hero {
    min-height: 560px;
  }

  .hero-image {
    object-position: 52% center;
  }

  .hero-copy {
    width: calc(100% - 36px);
    margin-bottom: 174px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.2;
  }

  .hero-description {
    max-width: 310px;
    margin-top: 14px;
    font-size: 14px;
  }

  .trip-facts {
    right: 18px;
    left: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trip-facts div {
    padding: 12px 10px;
    border-right: 1px solid rgba(255, 253, 248, 0.28);
    border-bottom: 1px solid rgba(255, 253, 248, 0.28);
  }

  .trip-facts div:nth-child(2) {
    border-right: 0;
  }

  .trip-facts div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .trip-facts dt {
    font-size: 9px;
  }

  .trip-facts dd {
    font-size: 13px;
  }

  .route-map-section {
    padding: 50px 18px 56px;
  }

  .route-map-heading {
    gap: 16px;
    margin-bottom: 24px;
  }

  .route-map-heading h2 {
    font-size: 31px;
  }

  .map-segment-controls {
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .map-segment-controls::-webkit-scrollbar {
    display: none;
  }

  .map-segment-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 7px 13px;
    font-size: 12px;
  }

  .map-frame {
    border-right: 0;
  }

  #trip-map {
    height: 430px;
  }

  .journey-brief {
    padding: 28px 0 30px;
  }

  .journey-brief dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journey-brief dl div {
    padding: 12px 9px 12px 0;
  }

  .journey-brief dl div + div {
    padding-left: 9px;
    border-left: 1px solid rgba(255, 253, 248, 0.16);
  }

  .journey-brief dd {
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .route-strip,
  .plan-view,
  .journey-command {
    width: calc(100% - 36px);
  }

  .journey-command {
    padding: 34px 0 38px;
  }

  .journey-command h2 {
    font-size: 26px;
  }

  .journey-command-facts {
    grid-template-columns: 1fr;
  }

  .journey-command-facts div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .route-strip {
    padding: 38px 0;
  }

  .route-list {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .route-chapter-track li {
    width: 104px;
    flex-basis: 104px;
  }

  .route-chapter-track {
    padding-right: 58px;
    scrollbar-width: none;
  }

  .route-chapter-track::-webkit-scrollbar {
    display: none;
  }

  .view-tabs {
    justify-content: stretch;
    padding: 9px 18px;
  }

  .view-tab {
    min-width: 0;
    flex: 1;
  }

  .plan-view {
    padding: 54px 0 78px;
  }

  .plan-heading {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 40px;
  }

  .plan-heading h2 {
    font-size: 34px;
  }

  .day-index-list {
    display: flex;
    overflow-x: auto;
    border-left: 0;
    scrollbar-width: none;
  }

  .day-index-list::-webkit-scrollbar {
    display: none;
  }

  .day-index button {
    width: 64px;
    flex: 0 0 64px;
    border-left: 1px solid var(--line);
  }

  .day-entry {
    padding-bottom: 54px;
    margin-bottom: 54px;
  }

  .itinerary-chapter + .itinerary-chapter {
    margin-top: 72px;
  }

  .chapter-heading {
    margin-bottom: 36px;
    padding: 15px 0 18px;
  }

  .chapter-heading h3 {
    font-size: 28px;
  }

  .day-header {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
  }

  .day-number {
    width: 52px;
    height: 64px;
  }

  .day-number strong {
    font-size: 22px;
  }

  .day-title-wrap h3 {
    font-size: 23px;
  }

  .day-visual-frame {
    aspect-ratio: 4 / 3;
  }

  .day-visual {
    margin: 24px 0 21px;
  }

  .city-stamp {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }

  .day-summary,
  .day-tags,
  .schedule-list,
  .day-footer,
  .roadbook {
    margin-left: 68px;
  }

  .day-metrics,
  .energy-note {
    margin-left: 0;
  }

  .day-metrics div {
    padding-right: 8px;
  }

  .day-metrics div + div {
    padding-left: 8px;
  }

  .day-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .day-actions {
    flex-wrap: wrap;
  }

  .roadbook > header {
    flex-direction: column;
  }

  .navigation-link {
    align-self: stretch;
  }

  .roadbook-targets,
  .energy-stops {
    grid-template-columns: 1fr;
  }

  .roadbook-targets p + p {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .today-dashboard,
  .active-day {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .countdown-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: end;
    gap: 10px;
  }

  .countdown-panel span {
    align-self: center;
  }

  .countdown-panel strong {
    margin: 0;
    font-size: 68px;
  }

  .countdown-panel p {
    padding-bottom: 5px;
  }

  .first-day-preview,
  .active-day,
  .active-day .roadbook,
  .trip-complete,
  .today-actions {
    grid-column: auto;
  }

  .first-day-preview .roadbook,
  .active-day .roadbook {
    margin-left: 0;
  }

  .readiness-summary {
    grid-template-columns: 1fr auto;
  }

  .readiness-summary > p:last-child {
    grid-column: 1 / -1;
  }

  .booking-grid {
    grid-template-columns: 1fr;
  }

  .schedule-list li {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
  }

  .checklist-grid {
    grid-template-columns: 1fr;
  }

  .checklist-group ul {
    margin-left: 0;
  }

  .site-footer {
    min-height: 210px;
    align-items: flex-start;
    padding: 42px 18px;
  }

  .site-footer > div {
    align-items: flex-start;
  }

  .site-footer p {
    max-width: 180px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .view-tabs,
  .day-index,
  .site-footer,
  #readiness-view,
  #today-view,
  .journey-command {
    display: none !important;
  }

  .map-segment-controls,
  .leaflet-control-container,
  .day-actions {
    display: none !important;
  }

  .hero {
    min-height: 340px;
  }

  .plan-view {
    width: 100%;
    padding: 36px 0;
  }

  .itinerary-layout {
    display: block;
  }

  .day-entry {
    break-inside: avoid;
  }

  .itinerary-chapter {
    opacity: 1;
    transform: none;
  }
}

/* TripBook catalog and generic trip states */
.catalog-body {
  min-height: 100vh;
  background: var(--paper);
}

.catalog-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--pine-dark);
}

.catalog-header nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.catalog-header .install-button,
.catalog-header .admin-link {
  border-color: var(--line);
  background: transparent;
  color: var(--pine-dark);
}

.catalog-header .install-button:hover,
.catalog-header .admin-link:hover {
  background: var(--pine-dark);
  color: var(--white);
}

.catalog-main {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.catalog-intro {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: min(430px, 52vh);
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.65fr);
  gap: 80px;
  align-items: end;
  padding: 86px 0 58px;
  border-bottom: 1px solid var(--line);
}

.catalog-intro-copy,
.catalog-intro-note {
  position: relative;
  z-index: 1;
}

.catalog-intro h1 {
  margin: 0;
  font-family: var(--script);
  font-size: 132px;
  font-weight: 400;
  line-height: 0.86;
}

.catalog-intro-rule {
  display: flex;
  max-width: 500px;
  justify-content: space-between;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog-intro-note {
  align-self: end;
  max-width: 440px;
  margin: 0 0 8px;
  padding-left: 28px;
}

.catalog-intro-note::before {
  position: absolute;
  top: -30px;
  bottom: -18px;
  left: 0;
  width: 1px;
  background: var(--line);
  content: "";
}

.intro-note-label {
  margin: 0 0 10px;
  color: var(--coral-text);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-intro-note > p:not(.intro-note-label) {
  max-width: 370px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.catalog-intro-route {
  position: relative;
  width: min(360px, 100%);
  height: 44px;
  margin-top: 28px;
}

.catalog-intro-route > span {
  position: absolute;
  top: 21px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.catalog-intro-route i,
.catalog-intro-route b {
  position: absolute;
  top: 15px;
  display: block;
  width: 13px;
  height: 13px;
  border: 2px solid var(--pine);
  border-radius: 50%;
  background: var(--paper);
}

.catalog-intro-route i:nth-of-type(1) {
  left: 8%;
}

.catalog-intro-route i:nth-of-type(2) {
  left: 47%;
  border-color: var(--coral);
}

.catalog-intro-route i:nth-of-type(3) {
  right: 8%;
}

.catalog-intro-route b {
  top: 8px;
  left: 71%;
  width: 27px;
  height: 27px;
  border-width: 1px;
  border-color: var(--coral);
  transform: rotate(45deg);
}

.trip-shelf {
  padding: 66px 0 110px;
}

.shelf-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 42px;
}

.shelf-heading .section-label {
  grid-column: 1 / -1;
  margin-bottom: 6px;
}

.shelf-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
}

.shelf-heading > p:last-child {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

.shelf-group + .shelf-group {
  margin-top: 64px;
}

.shelf-group > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
}

.shelf-group > header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
}

.shelf-group > header span {
  color: var(--coral-text);
  font-size: 11px;
  font-weight: 700;
}

.trip-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.trip-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fbfcfa;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(18, 46, 39, 0.06);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.trip-card:hover {
  border-color: rgba(23, 54, 47, 0.55);
  box-shadow: 6px 7px 0 rgba(18, 46, 39, 0.1);
  transform: translate(-2px, -2px);
}

.trip-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pine-dark);
}

.trip-card.is-featured .trip-card-cover {
  aspect-ratio: 17 / 8;
}

.trip-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.trip-card:hover .trip-card-cover img {
  transform: scale(1.025);
}

.trip-card-placeholder {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #26473f;
  color: var(--white);
}

.trip-card-placeholder::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 253, 248, 0.3);
  content: "";
}

.trip-card-placeholder::after {
  position: absolute;
  top: 22%;
  right: 10%;
  width: 62%;
  height: 48%;
  border-right: 1px solid rgba(216, 93, 69, 0.8);
  border-bottom: 1px solid rgba(216, 93, 69, 0.8);
  content: "";
  transform: skewY(-14deg);
}

.placeholder-title {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  font-family: var(--serif);
  font-size: 58px;
  transform: translate(-50%, -50%);
}

.placeholder-route {
  position: absolute;
  right: 16%;
  bottom: 24%;
  left: 16%;
  height: 1px;
  background: rgba(255, 253, 248, 0.45);
}

.placeholder-route i {
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--white);
  border-radius: 50%;
  background: var(--pine-dark);
}

.placeholder-route i:nth-child(1) {
  left: 0;
}

.placeholder-route i:nth-child(2) {
  left: 48%;
  background: var(--coral);
}

.placeholder-route i:nth-child(3) {
  right: 0;
}

.trip-card-placeholder small {
  position: absolute;
  right: 18px;
  bottom: 17px;
  color: rgba(255, 253, 248, 0.68);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.trip-card-placeholder span {
  font-family: var(--serif);
}

.trip-state {
  position: absolute;
  top: 14px;
  left: 14px;
  border: 1px solid rgba(23, 32, 29, 0.16);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
}

.trip-state.is-active {
  background: var(--coral);
  color: var(--white);
}

.trip-state.is-upcoming {
  background: #d7edf4;
  color: #234d5b;
}

.trip-card-copy {
  padding: 26px 28px 27px;
}

.trip-card.is-featured .trip-card-copy {
  background: var(--pine-dark);
  color: var(--white);
}

.trip-card-copy > p:first-child {
  display: flex;
  min-height: 22px;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 10px;
}

.trip-card.is-featured .trip-card-copy > p:first-child,
.trip-card.is-featured .trip-card-copy > p:nth-child(3) {
  color: rgba(255, 253, 248, 0.7);
}

.trip-card-copy h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.35;
}

.trip-card-copy > p:nth-child(3) {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.trip-card-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 23px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--pine);
  font-size: 11px;
  font-weight: 700;
}

.trip-card.is-featured .trip-card-open {
  border-top-color: rgba(255, 253, 248, 0.28);
  color: var(--white);
}

.trip-card-open b {
  font-size: 20px;
  font-weight: 400;
}

.catalog-empty {
  border-top: 2px solid var(--ink);
  padding: 36px 0;
}

.catalog-empty strong {
  font-family: var(--serif);
  font-size: 24px;
}

.catalog-empty p {
  margin: 6px 0 0;
  color: var(--muted);
}

.catalog-footer {
  display: flex;
  min-height: 170px;
  align-items: center;
  gap: 16px;
  padding: 40px max(22px, calc((100vw - 1180px) / 2));
  background: var(--pine-dark);
  color: var(--white);
}

.catalog-footer p {
  font-family: var(--serif);
}

.hero.without-image {
  background: #24483e;
}

.trip-facts {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.preview-badge {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}

.route-map-section .leaflet-container {
  filter: saturate(0.88) contrast(1.03);
}

@media (max-width: 720px) {
  .catalog-header {
    padding-inline: 18px;
  }

  .catalog-header .connection-status {
    display: none;
  }

  .catalog-main {
    width: calc(100% - 36px);
  }

  .catalog-intro {
    min-height: 360px;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 68px 0 42px;
  }

  .catalog-intro-note {
    margin-bottom: 0;
    padding-left: 0;
  }

  .catalog-intro-note::before {
    display: none;
  }

  .catalog-intro h1 {
    font-size: 76px;
    line-height: 0.92;
  }

  .catalog-intro > p {
    font-size: 14px;
  }

  .catalog-intro-note > p:not(.intro-note-label) {
    font-size: 14px;
  }

  .catalog-intro-route {
    margin-top: 22px;
  }

  .trip-shelf {
    padding-top: 46px;
  }

  .shelf-heading h2 {
    font-size: 31px;
  }

  .trip-card-grid {
    grid-template-columns: 1fr;
  }

  .trip-card-copy {
    padding: 20px;
  }

  .trip-card.is-featured .trip-card-cover {
    aspect-ratio: 16 / 10;
  }

  .route-track-window::before {
    position: absolute;
    z-index: 3;
    right: 4px;
    bottom: 7px;
    display: grid;
    width: 28px;
    height: 22px;
    place-items: center;
    background: var(--paper);
    color: var(--chapter-accent, var(--pine));
    content: "→";
    font-size: 18px;
    pointer-events: none;
  }

  .route-track-window::after {
    width: 54px;
  }
}
