/* Added departure cards and overseas support use the site's current controls. */
#ice-departure img { object-position: center; }
#xinjiang-departure img { object-position: center 49%; }

.rail-contact {
  padding: 22px 24px;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  background: #f4f8f7;
  color: #263a3b;
}
.rail-contact h2, .rail-contact h3, .rail-contact strong {
  color: #173c3e;
}
.rail-contact h2, .rail-contact h3 {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 27px);
}
.rail-contact p {
  margin-block: 0;
}
.bingxue-page .yungui-intro img { object-position: center; }
.bingxue-page .yungui-intro h1 .yungui-heading-route { white-space: normal; }

@media (max-width: 800px) {
  .rail-contact { padding: 18px; }
  .bingxue-page h1 wbr { display: none; }
}

.rail-day-photos {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  max-width: 780px;
}
.rail-day-photos-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rail-day-photos figure, .rail-contact .rail-person { margin: 0; }
.rail-day-photos img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
}
.rail-day-photos figcaption {
  margin-top: 4px;
  color: #525f60;
  font-size: .875rem;
}
.rail-itinerary-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-block: 0 20px;
}
.rail-itinerary-gallery figure {
  margin: 0;
  min-width: 0;
}
.rail-itinerary-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}
.rail-itinerary-gallery figcaption {
  margin-top: 5px;
  color: #485d5c;
  font-size: .9rem;
  overflow-wrap: anywhere;
}
.rail-photo-credit {
  display: block;
  font-size: .75rem;
  line-height: 1.5;
}
.rail-photo-credit a { color: #14656b; }
.rail-contact .rail-person {
  float: right;
  width: clamp(86px, 18vw, 154px);
  margin: 0 0 12px 16px;
}
.rail-person img { display: block; width: 100%; height: auto; border-radius: 8px; }
.rail-contact::after { content: ""; display: block; clear: both; }
.rail-contact .os-actions, .rail-download .os-actions { margin-block: 12px; }
.rail-contact .wechat img { width: 22px; height: 22px; }
.rail-contact .wechat { display: inline-flex; align-items: center; gap: 6px; }
.rail-contract-note {
  margin-top: 14px;
  color: #485d5c;
}
.rail-download { margin: 8px 0 16px; }
.rail-departure-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.rail-departure-dates time {
  padding: 6px 10px;
  border: 1px solid #ccdcd8;
  border-radius: 6px;
  color: #173c3e;
  background: white;
  font-weight: 700;
}
.rail-notice, .rail-route-notices {
  border-inline-start: 3px solid #14666d;
  padding-inline-start: 14px;
}
.rail-route-notices details { padding: 5px 0 10px; }
.rail-route-notices summary { color: #174849; font-weight: 700; cursor: pointer; }
.rail-route-notices p { margin-block: 5px 0; }
.rail-xj-crosslinks { margin: 20px auto; }
#overseas-contact { scroll-margin-top: 100px; }
.news-row:not([data-href]) { cursor: default; }

.china-trains-entry { margin: 0 auto 26px; }
.site-nav > .china-primary-nav,
.mobile-nav > .china-primary-nav { color: #14656b; }
.china-trains-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 54px);
  align-items: center;
  padding-block: 16px 42px;
}
.china-trains-hero h1 {
  margin: 0 0 12px;
  color: #173c3e;
  font-size: clamp(34px, 5vw, 55px);
  line-height: 1.17;
}
.china-trains-hero p {
  max-width: 40em;
  color: #485d5c;
  font-size: 1.12rem;
  line-height: 1.75;
}
.china-contact-picker { position: relative; }
.china-contact-picker > summary {
  gap: 9px;
  list-style: none;
  cursor: pointer;
}
.china-contact-picker > summary::-webkit-details-marker { display: none; }
.china-contact-picker > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
}
.china-contact-picker[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.china-contact-picker > summary:focus-visible,
.china-contact-options a:focus-visible { outline: 2px solid #14656b; outline-offset: 2px; }
.china-contact-options {
  position: absolute;
  z-index: 4;
  inset: calc(100% + 8px) 0 auto auto;
  min-width: max(100%, 156px);
  margin: 0;
  padding: 5px;
  list-style: none;
  border: 1px solid #dce7e4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(14, 53, 55, .17);
}
.china-contact-options a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 5px;
  color: #173c3e;
  font-weight: 700;
}
.china-contact-options a:hover,
.china-contact-options a:focus-visible { background: #edf6f3; }
.china-contact-options a > * { pointer-events: none; }
.china-contact-options a > img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.china-trains-hero figure, .china-train-card figure {
  margin: 0;
  min-width: 0;
}
.china-trains-hero img, .china-train-card img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.china-trains-hero img { border-radius: 10px; height: auto; }
.china-trains figcaption {
  margin-top: 6px;
  color: #485d5c;
  font-size: .81rem;
}
.china-trains-list { background: #f4f8f7; }
.china-trains-list .os-section-heading { margin-bottom: 8px; }
.china-trains-note { margin-block: 0 20px; color: #485d5c; }
.china-train-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.china-train-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  border: 1px solid #dce7e4;
  border-radius: 10px;
  background: #fff;
}
.china-train-card img { border-radius: 0; }
.china-train-card > figure img { height: auto; aspect-ratio: 18 / 11; }
.china-train-card figcaption { padding-inline: 17px; }
.china-train-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 10px 0;
}
.china-train-gallery figure:first-child { grid-column: 1 / -1; }
.china-photo-open { display: block; }
.china-photo-open:focus-visible { outline: 2px solid #14656b; outline-offset: 3px; }
.china-train-gallery img {
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
}
.china-train-gallery figcaption { padding: 0 2px; margin-top: 4px; }
.china-train-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 0 17px 18px;
}
.china-train-copy h3, .china-train-copy p { margin: 0; }
.china-train-copy h3 { color: #173c3e; font-size: 1.24rem; }
.china-train-copy p { line-height: 1.65; }
.china-train-area, .china-train-example { color: #426361; font-size: .88rem; }
.china-train-copy .os-actions { margin-top: auto; padding-top: 4px; }
.china-photo-sources {
  margin-top: 18px;
  color: #485d5c;
  font-size: .82rem;
  overflow-wrap: anywhere;
}
.china-photo-sources summary { width: fit-content; cursor: pointer; }
.china-photo-sources li + li { margin-top: 4px; }
@media (max-width: 980px) {
  .china-train-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .china-trains-hero { grid-template-columns: 1fr; padding-block: 12px 28px; }
}
@media (max-width: 540px) {
  .china-train-grid { grid-template-columns: 1fr; }
}

/* The poster has its own image area so the original buttons and the QR artwork stay clear. */
.official-hero .hero-slide-poster {
  object-fit: contain;
  transform: none;
}
.official-hero .hero-poster-open { display: none; }
.official-hero.shows-booking-poster {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  background: linear-gradient(180deg, #0757a2, #0877bf 35%, #902435 74%, #331a25);
}
.official-hero.shows-booking-poster::after {
  background: linear-gradient(0deg, rgba(23, 19, 28, .86), transparent 154px);
}
.shows-booking-poster .official-hero-slides { position: relative; }
.shows-booking-poster .official-hero-content { margin-block: 0; padding: 18px 18px 66px; }
.shows-booking-poster .official-hero-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 26px;
  max-width: none;
}
.shows-booking-poster .official-hero-kicker,
.shows-booking-poster .official-hero-lead,
.shows-booking-poster .hero-proof-line { display: none; }
.shows-booking-poster h1,
html[lang="en"] .shows-booking-poster h1 .hero-brand-name::after { font-size: clamp(24px, 3vw, 34px); }
.shows-booking-poster h1 .hero-product-line { margin-top: 5px; font-size: 16px; }
.shows-booking-poster .official-hero-actions { margin-top: 0; }
.shows-booking-poster .official-hero-actions .btn {
  min-width: 0;
  min-height: 44px;
  line-height: 1.3;
  text-align: center;
}
.shows-booking-poster .hero-poster-open {
  display: inline-flex;
  border-color: rgba(255, 255, 255, .64);
  background: rgba(24, 23, 35, .45);
  color: #fff;
}
@media (max-width: 1040px) {
  .shows-booking-poster .official-hero-copy { display: block; }
  .shows-booking-poster .official-hero-actions { margin-top: 16px; }
}
@media (max-width: 600px) {
  .official-hero .hero-slide-poster {
    inset-inline-start: -18.4%;
    width: 148%;
    max-width: none;
    object-position: center top;
  }
  .official-hero.shows-booking-poster {
    height: auto;
    grid-template-rows: auto 1fr;
  }
  .shows-booking-poster .official-hero-slides { aspect-ratio: 100 / 55; }
  .shows-booking-poster .official-hero-content { padding-block: 24px 68px; }
  .shows-booking-poster .official-hero-lead { display: block; margin-top: 14px; }
  .shows-booking-poster .official-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .shows-booking-poster .official-hero-actions .btn { width: 100%; }
  .shows-booking-poster .hero-poster-open { grid-column: 1 / -1; }
}

/* Use the same floating contact treatment with every translated label and page. */
html body > :is(.float[aria-label], .site-float-icons) {
  --rail-float-size: 56px;
  display: flex !important;
  gap: 12px !important;
}
html body > :is(.float[aria-label], .site-float-icons) > :is(a, button, .site-float-btn) {
  box-sizing: border-box;
  width: var(--rail-float-size) !important;
  height: var(--rail-float-size) !important;
  min-width: var(--rail-float-size) !important;
  min-height: var(--rail-float-size) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 2px solid rgba(255, 255, 255, .95) !important;
  border-radius: 50% !important;
  box-shadow: 0 5px 16px rgba(14, 53, 55, .2) !important;
  animation: railContactPulse 2.6s ease-in-out infinite !important;
}
html body > :is(.float[aria-label], .site-float-icons) > :is(a, button, .site-float-btn) > img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
html body > :is(.float[aria-label], .site-float-icons) > .line { animation-delay: .18s !important; }
html body > :is(.float[aria-label], .site-float-icons) > .wechat { animation-delay: .36s !important; }
@keyframes railContactPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  html body > :is(.float[aria-label], .site-float-icons) > :is(a, button, .site-float-btn) {
    animation: none !important;
  }
}
@media (max-width: 1220px) {
  html body > :is(.float[aria-label], .site-float-icons) { --rail-float-size: 48px; }
}
@media (max-width: 800px) {
  html body > :is(.float[aria-label], .site-float-icons) { display: none !important; }
}

@media (max-width: 540px) {
  .rail-itinerary-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-itinerary-gallery figure:first-child { grid-column: 1 / -1; }
  .rail-day-photos-2 { grid-template-columns: 1fr; }
  .rail-contact .os-actions { display: flex; flex-wrap: wrap; }
  .rail-contact .rail-person { width: 86px; }
}
