/* "万里路": route-scoped immersive Tencent map and photo journey. */
html.shayu-travel-route #App-Container .main-grid:has(.shayu-travel-page) {
  grid-template-columns: minmax(0, 1fr) !important;
  width: 100% !important;
}

html.shayu-travel-route
  #App-Container
  .main-grid:has(.shayu-travel-page)
  > div:first-child {
  width: 100% !important;
  max-width: none !important;
}

html.shayu-travel-route
  #App-Container
  .main-grid:has(.shayu-travel-page)
  > div:last-child {
  display: none !important;
}

html.shayu-travel-route .post-html:has(> .shayu-travel-page) {
  width: 100% !important;
  max-width: none !important;
  margin-top: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.shayu-travel-page {
  --shayu-travel-accent: #d18465;
  --shayu-travel-accent-soft: rgba(209, 132, 101, 0.18);
  width: 100%;
  color: var(--shayu-xiaowo-text);
}

.shayu-travel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 1.5rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.4rem 0.25rem 0.85rem;
  border-bottom: 1px solid var(--shayu-xiaowo-line-soft);
}

.shayu-travel-heading > div {
  min-width: 0;
}

.shayu-travel-heading p,
.shayu-travel-cities > header > p,
.shayu-travel-lightbox-panel > header > p {
  margin: 0 !important;
  color: var(--shayu-travel-accent) !important;
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.shayu-travel-heading h2 {
  margin: 0.3rem 0 0 !important;
  color: var(--shayu-xiaowo-text-strong) !important;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  line-height: 1.38;
}

.shayu-travel-heading > span {
  grid-column: 1;
  color: var(--shayu-xiaowo-text-secondary);
  line-height: 1.7;
}

.shayu-travel-heading > strong {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 999px;
  color: var(--shayu-travel-accent) !important;
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 76%, transparent);
  font-size: 0.76rem;
  white-space: nowrap;
  -webkit-text-fill-color: var(--shayu-travel-accent) !important;
  backdrop-filter: blur(8px);
}

.shayu-travel-map-panel,
.shayu-travel-cities {
  overflow: hidden;
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 72%, transparent);
  box-shadow: 0 18px 42px -32px var(--shayu-xiaowo-panel-shadow);
  backdrop-filter: blur(8px);
}

.shayu-travel-map-panel {
  position: relative;
  min-height: 38rem;
  height: clamp(38rem, 72vh, 54rem);
  isolation: isolate;
}

.shayu-travel-map {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 60% 30%, var(--shayu-travel-accent-soft), transparent 32%),
    color-mix(in srgb, var(--shayu-xiaowo-panel) 70%, transparent);
}

.shayu-travel-map-status {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: min(82%, 25rem);
  padding: 0.85rem 1rem;
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 12px;
  color: var(--shayu-xiaowo-text-secondary);
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 91%, transparent);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(10px);
}

.shayu-travel-map-status[data-status="error"] {
  border-color: var(--shayu-travel-accent);
}

.shayu-travel-map-credit {
  position: absolute;
  z-index: 2;
  right: 0.65rem;
  bottom: 0.55rem;
  max-width: calc(100% - 1.3rem);
  margin: 0 !important;
  padding: 0.25rem 0.45rem;
  border-radius: 6px;
  color: var(--shayu-xiaowo-text-muted) !important;
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 82%, transparent);
  font-size: 0.62rem;
}

.shayu-travel-map-marker {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: grid;
  width: 5rem;
  justify-items: center;
  gap: 0.22rem;
  padding: 0.28rem 0.28rem 0.34rem;
  border: 1px solid rgba(255, 247, 237, 0.92);
  border-radius: 13px;
  color: #663c31;
  background: rgba(255, 248, 237, 0.9);
  box-shadow:
    0 13px 28px rgba(91, 52, 38, 0.2),
    0 0 0 5px rgba(218, 132, 94, 0.12);
  cursor: pointer;
  isolation: isolate;
  transform-origin: 50% 100%;
  transition: box-shadow 180ms ease, scale 180ms ease;
  backdrop-filter: blur(7px);
}

.shayu-travel-map-marker-connector {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: -1;
  width: 1px;
  height: var(--shayu-marker-line-length, 12px);
  background: linear-gradient(var(--shayu-travel-accent), rgba(209, 132, 101, 0.2));
  box-shadow: 0 0 5px rgba(209, 132, 101, 0.35);
  pointer-events: none;
  transform: rotate(var(--shayu-marker-line-angle, 0deg));
  transform-origin: 50% 0;
}

.shayu-travel-map-marker img,
.shayu-travel-map-marker-placeholder {
  display: block;
  width: 4.4rem;
  height: 3.35rem;
  border-radius: 9px;
  object-fit: cover;
  background:
    radial-gradient(circle at 65% 28%, rgba(255, 246, 218, 0.95), transparent 28%),
    linear-gradient(145deg, #efb58f, #ca8068);
}

.shayu-travel-map-marker strong {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 0.76rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shayu-travel-map-marker:hover,
.shayu-travel-map-marker:focus-visible {
  z-index: 30 !important;
  outline: 2px solid rgba(209, 132, 101, 0.72);
  outline-offset: 3px;
  box-shadow:
    0 18px 36px rgba(91, 52, 38, 0.28),
    0 0 0 8px rgba(218, 132, 94, 0.16);
  scale: 1.08;
}

.shayu-travel-cities {
  margin-top: 1rem;
  padding: 1.05rem 1.05rem 1.2rem;
}

.shayu-travel-cities > header {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  padding: 0 0.25rem 0.85rem;
}

.shayu-travel-cities > header h2 {
  margin: 0 !important;
  color: var(--shayu-xiaowo-text-strong) !important;
  font-size: 1.25rem;
}

.shayu-travel-cities > header > span {
  margin-left: auto;
  color: var(--shayu-xiaowo-text-muted);
  font-size: 0.72rem;
}

.shayu-travel-city-track {
  display: grid;
  grid-auto-columns: clamp(16rem, 25vw, 20rem);
  grid-auto-flow: column;
  gap: 0.85rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0.15rem 0.2rem 0.7rem;
  scroll-snap-type: inline mandatory;
  scrollbar-color: var(--shayu-travel-accent-soft) transparent;
}

.shayu-travel-city-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--shayu-xiaowo-line-soft);
  border-radius: 15px;
  color: var(--shayu-xiaowo-text);
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 68%, transparent);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.shayu-travel-city-card:hover,
.shayu-travel-city-card:focus-visible {
  border-color: color-mix(in srgb, var(--shayu-travel-accent) 62%, transparent);
  outline: none;
  box-shadow: 0 14px 28px -22px var(--shayu-xiaowo-panel-shadow);
  transform: translateY(-2px);
}

.shayu-travel-city-cover,
.shayu-travel-city-cover img,
.shayu-travel-card-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.shayu-travel-city-cover {
  overflow: hidden;
  background: var(--shayu-travel-accent-soft);
}

.shayu-travel-city-cover img {
  object-fit: cover;
  transition: transform 360ms ease;
}

.shayu-travel-city-card:hover .shayu-travel-city-cover img,
.shayu-travel-city-card:focus-visible .shayu-travel-city-cover img {
  transform: scale(1.035);
}

.shayu-travel-card-placeholder {
  background:
    radial-gradient(circle at 68% 30%, rgba(255, 244, 209, 0.74), transparent 25%),
    linear-gradient(145deg, var(--shayu-travel-accent-soft), transparent);
}

.shayu-travel-city-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.55rem;
  padding: 0.8rem 0.9rem 0.95rem;
}

.shayu-travel-city-index {
  grid-row: 1 / 3;
  color: var(--shayu-travel-accent);
  font: 0.68rem/1.65 "JetBrains Mono", "Cascadia Code", Consolas, monospace;
}

.shayu-travel-city-copy strong {
  color: var(--shayu-xiaowo-text-strong);
  font-size: 1rem;
}

.shayu-travel-city-copy small {
  color: var(--shayu-xiaowo-text-muted);
  font-size: 0.7rem;
}

.shayu-travel-city-summary {
  display: -webkit-box;
  grid-column: 1 / -1;
  margin-top: 0.42rem;
  overflow: hidden;
  color: var(--shayu-xiaowo-text-secondary);
  font-size: 0.78rem;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shayu-travel-empty {
  grid-column: 1 / -1;
  padding: 2.5rem 0.5rem;
  color: var(--shayu-xiaowo-text-secondary);
  text-align: center;
}

.shayu-travel-empty strong {
  color: var(--shayu-xiaowo-text-strong);
}

.shayu-travel-empty p {
  margin: 0.65rem 0 0 !important;
  color: var(--shayu-xiaowo-text-muted) !important;
  font-size: 0.78rem;
  line-height: 1.8;
}

.shayu-travel-lightbox {
  position: fixed;
  z-index: 10030;
  inset: 0;
  display: grid;
  visibility: hidden;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, visibility 0ms linear 200ms;
}

.shayu-travel-lightbox[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0ms;
}

.shayu-travel-lightbox-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(11, 13, 17, 0.58);
  backdrop-filter: blur(5px);
}

.shayu-travel-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(58rem, 94vw);
  max-height: 90dvh;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 20px;
  color: var(--shayu-xiaowo-text);
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 96%, transparent);
  box-shadow: 0 28px 80px rgba(8, 10, 14, 0.32);
  backdrop-filter: blur(18px);
  transform: translateY(12px) scale(0.985);
  transition: transform 220ms ease;
}

.shayu-travel-lightbox[aria-hidden="false"] .shayu-travel-lightbox-panel {
  transform: translateY(0) scale(1);
}

.shayu-travel-lightbox-close {
  float: right;
  padding: 0.38rem 0.82rem;
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 999px;
  color: var(--shayu-xiaowo-text-secondary);
  background: transparent;
  cursor: pointer;
}

.shayu-travel-lightbox-panel > header h2 {
  margin: 0.35rem 0 !important;
  color: var(--shayu-xiaowo-text-strong) !important;
  font-size: clamp(1.55rem, 4vw, 2.4rem);
}

.shayu-travel-lightbox-panel > header > span {
  color: var(--shayu-xiaowo-text-secondary);
}

.shayu-travel-photo-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.shayu-travel-photo-stage > button {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 1px solid var(--shayu-xiaowo-line);
  border-radius: 50%;
  color: var(--shayu-xiaowo-text-strong);
  background: var(--shayu-travel-accent-soft);
  font-size: 1.5rem;
  cursor: pointer;
}

.shayu-travel-photo-stage figure {
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: color-mix(in srgb, var(--shayu-xiaowo-panel) 86%, #111);
}

.shayu-travel-photo-stage img {
  display: block;
  width: 100%;
  max-height: 58dvh;
  object-fit: contain;
}

.shayu-travel-photo-stage figcaption {
  padding: 0.65rem 0.85rem;
  color: var(--shayu-xiaowo-text-muted);
  font-size: 0.76rem;
  text-align: center;
}

.shayu-travel-thumbnails {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.8rem;
  overflow-x: auto;
  padding: 0.15rem;
}

.shayu-travel-thumbnail {
  flex: 0 0 4.4rem;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  opacity: 0.68;
}

.shayu-travel-thumbnail[aria-current="true"] {
  border-color: var(--shayu-travel-accent);
  opacity: 1;
}

.shayu-travel-thumbnail img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.shayu-travel-no-photo {
  margin: 1.25rem 0 0 !important;
  padding: 3rem 1rem;
  border: 1px dashed var(--shayu-xiaowo-line);
  border-radius: 13px;
  color: var(--shayu-xiaowo-text-muted) !important;
  text-align: center;
}

.shayu-travel-lightbox-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .shayu-travel-heading {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.25rem 0 0.75rem;
  }

  .shayu-travel-heading h2 {
    display: block !important;
    width: auto !important;
    max-width: 100%;
    min-width: 0 !important;
    font-size: clamp(1.35rem, 6vw, 1.55rem);
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: normal !important;
  }

  .shayu-travel-heading > span,
  .shayu-travel-heading > strong {
    grid-column: 1;
    grid-row: auto;
  }

  .shayu-travel-heading > strong {
    justify-self: start;
    margin-top: 0.25rem;
  }

  .shayu-travel-map-panel,
  .shayu-travel-cities {
    border-radius: 15px;
  }

  .shayu-travel-map-panel {
    min-height: 27rem;
    height: clamp(27rem, 58dvh, 38rem);
  }

  .shayu-travel-map-marker {
    width: 3.65rem;
    border-radius: 11px;
  }

  .shayu-travel-map-marker img,
  .shayu-travel-map-marker-placeholder {
    width: 3.05rem;
    height: 2.3rem;
    border-radius: 7px;
  }

  .shayu-travel-map-marker strong {
    font-size: 0.68rem;
  }

  .shayu-travel-cities {
    padding: 0.9rem 0.75rem 1rem;
  }

  .shayu-travel-cities > header > span {
    display: none;
  }

  .shayu-travel-city-track {
    grid-auto-columns: min(80vw, 19rem);
  }

  .shayu-travel-lightbox {
    align-items: end;
    padding: 0;
  }

  .shayu-travel-lightbox-panel {
    width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
  }

  .shayu-travel-photo-stage {
    grid-template-columns: 2.2rem minmax(0, 1fr) 2.2rem;
    gap: 0.4rem;
  }

  .shayu-travel-photo-stage > button {
    width: 2.2rem;
    height: 2.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shayu-travel-map-marker,
  .shayu-travel-city-card,
  .shayu-travel-city-cover img,
  .shayu-travel-lightbox,
  .shayu-travel-lightbox-panel {
    transition: none !important;
  }
}
