:root {
  --blue: #1f6f8b;
  --blue-dark: #174f65;
  --mint: #55c6b6;
  --coral: #ff7c67;
  --ink: #24343b;
  --muted: #738087;
  --paper: #f4f7f8;
  --card: #fff;
  --line: #dfe7e9;
  --shadow: 0 10px 30px rgba(29, 66, 79, 0.1);
  --max: 1420px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: var(--max);
  margin: auto;
  padding: 28px 30px 24px;
}
.header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}
.date-range {
  margin: 7px 0 0;
  color: var(--muted);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.weather {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
}
.weather > span {
  font-size: 28px;
}
.weather div {
  display: grid;
}
.weather strong {
  font-size: 14px;
}
.weather small {
  color: var(--muted);
}
.desktop-days,
.mobile-days {
  display: flex;
  gap: 6px;
}
.mobile-trip-overview {
  display: none;
}
.day-button {
  min-width: 76px;
  min-height: 48px;
  padding: 6px 12px;
  color: var(--muted);
  background: #e7edef;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}
.day-button small {
  display: block;
  font-size: 10px;
}
.day-button.is-active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 7px 18px rgba(31, 111, 139, 0.23);
}
.switch-version {
  min-height: 44px;
  padding: 10px 14px;
  color: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}
.mobile-days {
  display: none;
}
.planner {
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(520px, 1.14fr);
  max-width: var(--max);
  min-height: 710px;
  margin: 0 auto 28px;
  overflow: hidden;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.map-panel {
  position: relative;
  min-width: 0;
  background: #dce8e9;
}
#classic-map {
  height: 100%;
  min-height: 710px;
}
.map-summary {
  position: absolute;
  z-index: 500;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  color: #fff;
  background: rgba(23, 79, 101, 0.9);
  border-radius: 13px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}
.map-summary span {
  font-size: 12px;
}
.map-summary strong {
  font-size: 13px;
}
.classic-marker-wrap {
  background: transparent;
  border: 0;
}
.classic-marker-wrap span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--coral);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 5px;
  box-shadow: 0 5px 14px rgba(20, 63, 78, 0.35);
  font-size: 12px;
  font-weight: 850;
  transform: rotate(-45deg);
}
.classic-marker-wrap span b {
  display: block;
  transform: rotate(45deg);
}
.leaflet-popup-content-wrapper {
  border-radius: 14px;
}
.leaflet-popup-content {
  font-family: inherit;
}
.leaflet-popup-content strong {
  font-size: 15px;
}
.leaflet-popup-content p {
  margin: 4px 0 10px;
  color: var(--muted);
}
.leaflet-popup-content a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}
.schedule-panel {
  padding: 30px;
  overflow: auto;
}
.schedule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.schedule-head h2 {
  margin: 0;
  font-size: 26px;
}
.train-link {
  padding: 8px 12px;
  color: var(--blue);
  background: #e7f1f4;
  border-radius: 10px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}
.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(125deg, var(--blue-dark), var(--blue));
  border-radius: 16px;
}
.next-card div {
  display: grid;
}
.next-card span {
  color: #9ee3d9;
  font-size: 11px;
  font-weight: 800;
}
.next-card strong {
  font-size: 19px;
}
.next-card small {
  color: rgba(255, 255, 255, 0.68);
}
.next-card b {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--blue-dark);
  background: #9ee3d9;
  border-radius: 99px;
  font-size: 11px;
}
.timeline {
  display: grid;
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: start;
  min-height: 76px;
  padding: 14px 12px 14px 18px;
  background: #fff;
  border-left: 3px solid var(--line);
  cursor: pointer;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 9px;
  height: 9px;
  background: #fff;
  border: 2px solid var(--blue);
  border-radius: 50%;
}
.timeline-item.is-highlight {
  background: #fff8f4;
  border-left-color: var(--coral);
  border-radius: 0 12px 12px 0;
}
.timeline-item.is-highlight::before {
  background: var(--coral);
  border-color: var(--coral);
}
.timeline-item time {
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.timeline-item h3 {
  margin: 0;
  font-size: 15px;
}
.timeline-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.timeline-item > a,
.route-node > a {
  align-self: center;
  padding: 7px 10px;
  color: var(--blue);
  background: #e8f2f4;
  border-radius: 9px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 850;
}
.item-tag {
  margin-left: 7px;
  padding: 3px 6px;
  color: #fff;
  background: var(--mint);
  border-radius: 99px;
  font-size: 9px;
  vertical-align: 2px;
}
.route-node {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 3px 0 7px 23px;
  padding: 10px 12px;
  color: #496068;
  background: #eef4f5;
  border-radius: 10px;
}
.route-node > span {
  font-size: 11px;
  font-weight: 850;
}
.route-node div {
  display: grid;
}
.route-node strong {
  font-size: 11px;
}
.route-node small {
  color: var(--muted);
  font-size: 10px;
}
.gallery-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 35px 30px 42px;
}
.gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.gallery-head h2 {
  margin: 0;
}
.gallery-head button {
  width: 42px;
  height: 42px;
  margin-left: 5px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  font-size: 20px;
}
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar {
  display: none;
}
.gallery article {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #ccd9dc;
  border-radius: 18px;
  scroll-snap-align: start;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery article::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(transparent, rgba(6, 28, 36, 0.86));
}
.gallery article div {
  position: absolute;
  z-index: 1;
  left: 17px;
  right: 17px;
  bottom: 15px;
  color: #fff;
}
.gallery span {
  padding: 4px 7px;
  background: var(--coral);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
}
.gallery h3 {
  margin: 7px 0 0;
}
.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 42px max(30px, calc((100% - var(--max)) / 2));
  color: #fff;
  background: #173f50;
}
.footer article {
  padding: 25px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 17px;
}
.footer h2 {
  margin: 0 0 15px;
  font-size: 19px;
}
.footer ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}
.footer dl {
  display: grid;
  gap: 9px;
  margin: 0;
}
.footer dl div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer dt {
  color: rgba(255, 255, 255, 0.65);
}
.footer dd {
  margin: 0;
  color: #9ee3d9;
  font-weight: 800;
}
@media (max-width: 900px) {
  .header {
    align-items: flex-start;
  }
  .weather {
    display: none;
  }
  .planner {
    grid-template-columns: 1fr;
    margin-inline: 18px;
  }
  .map-panel {
    position: sticky;
    z-index: 20;
    top: 60px;
    height: 280px;
  }
  .map-panel #classic-map {
    height: 280px;
    min-height: 0;
  }
  .schedule-panel {
    overflow: visible;
  }
  .gallery-section {
    padding-inline: 18px;
  }
  .footer {
    padding-inline: 18px;
  }
}
@media (max-width: 600px) {
  body {
    padding-top: 122px;
  }
  .mobile-days {
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 7px 14px;
    background: rgba(244, 247, 248, 0.96);
    box-shadow: 0 4px 16px rgba(32, 58, 67, 0.09);
    backdrop-filter: blur(12px);
  }
  .mobile-days .day-button {
    min-height: 46px;
  }
  .mobile-trip-overview {
    position: fixed;
    z-index: 999;
    top: 60px;
    left: 0;
    right: 0;
    display: block;
    padding: 0 14px 8px;
    background: rgba(244, 247, 248, 0.96);
    backdrop-filter: blur(12px);
  }
  .mobile-trip-overview button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 8px 12px;
    color: #fff;
    text-align: left;
    background: linear-gradient(125deg, var(--blue-dark), var(--blue));
    border: 0;
    border-radius: 13px;
    box-shadow: 0 7px 20px rgba(23, 79, 101, 0.22);
    cursor: pointer;
  }
  .mobile-trip-overview span {
    display: grid;
    min-width: 0;
  }
  .mobile-trip-overview small {
    color: #9ee3d9;
    font-size: 10px;
    font-weight: 800;
  }
  .mobile-trip-overview strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-trip-overview em {
    max-width: 105px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 10px;
    font-style: normal;
    text-align: right;
  }
  .desktop-days {
    display: none;
  }
  .header {
    padding: 22px 18px 18px;
  }
  .header h1 {
    font-size: 28px;
  }
  .header-actions {
    align-self: center;
  }
  .switch-version {
    padding: 8px 10px;
    font-size: 11px;
  }
  .date-range {
    font-size: 12px;
  }
  .planner {
    display: block;
    margin: 0 14px 20px;
    border-radius: 17px;
  }
  .map-panel {
    position: relative;
    top: auto;
    height: 235px;
  }
  .map-panel #classic-map {
    height: 235px;
  }
  .map-summary {
    left: 9px;
    right: 9px;
    bottom: 9px;
    padding: 9px 11px;
  }
  .schedule-panel {
    padding: 20px 16px;
    scroll-margin-top: 130px;
  }
  .schedule-head h2 {
    font-size: 21px;
  }
  .next-card {
    align-items: flex-start;
    padding: 15px;
  }
  .next-card strong {
    font-size: 16px;
  }
  .next-card b {
    max-width: 92px;
    text-align: center;
  }
  .timeline-item {
    grid-template-columns: 58px 1fr auto;
    gap: 8px;
    padding-inline: 12px 7px;
  }
  .timeline-item h3 {
    font-size: 14px;
  }
  .timeline-item > a {
    padding: 7px;
    font-size: 10px;
  }
  .route-node {
    grid-template-columns: 42px 1fr auto;
    margin-left: 17px;
    padding: 9px;
  }
  .route-node > a {
    padding: 7px;
    font-size: 10px;
  }
  .gallery-section {
    padding: 28px 14px;
  }
  .gallery {
    grid-auto-columns: 82%;
  }
  .gallery article {
    height: 210px;
  }
  .footer {
    grid-template-columns: 1fr;
    padding: 28px 14px 90px;
  }
  .footer ul {
    grid-template-columns: 1fr 1fr;
  }
  .leaflet-control-attribution {
    font-size: 8px;
  }
}
