:root {
  --bg: #f5f4ef;
  --ink: #17191d;
  --muted: #6f756f;
  --line: rgba(23, 25, 29, 0.14);
  --red: #c93232;
  --blue: #2478b8;
  --green: #2f8d67;
  --gold: #c7922b;
  --paper: #fffdf7;
  --shadow: 0 22px 60px rgba(28, 28, 28, 0.14);
}

* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(23,25,29,0.04) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(23,25,29,0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--bg);
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.topbar, main, .footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
  background: rgba(245,244,239,0.86);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-size: 24px; font-weight: 900; }
.brand::before { content: ""; width: 42px; height: 42px; border-radius: 50%; background: conic-gradient(var(--red), var(--gold), var(--blue), var(--green), var(--red)); }
.nav { display: flex; justify-content: center; gap: 8px; min-width: 0; overflow: hidden; }
.nav a, .nav-btn {
  border: 1px solid var(--line);
  background: rgba(255,253,247,0.82);
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 800;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.nav-btn { display: inline-flex; justify-content: center; align-items: center; min-height: 42px; }
.nav a:hover, .nav a.active, .nav-btn:hover { transform: translateY(-2px); border-color: var(--red); background: #fff; }
.nav-btn.solid { color: white; background: var(--red); border-color: var(--red); }

h1, h2, h3, p, span, strong, small { overflow-wrap: anywhere; }
.hero-map {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 24px;
  align-items: stretch;
  min-width: 0;
  padding: 38px 0 18px;
}
.hero-copy, .station-hero, .hot-panel, .guide-grid article, .detail-copy, .detail-info article, .detail-info aside {
  border: 1px solid var(--line);
  background: rgba(255,253,247,.82);
  box-shadow: var(--shadow);
}
.hero-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 30px; }
.eyebrow, .section-head p { margin: 0 0 10px; color: var(--red); font-size: 13px; font-weight: 900; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(48px, 7vw, 96px); line-height: .95; }
.lead { margin: 18px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.keyword-line, .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.keyword-line span, .tags span, .score-pill {
  border: 1px solid var(--line);
  background: #fff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}
.station-hero { min-width: 0; overflow: hidden; }
.station-card { position: relative; display: grid; min-height: 480px; overflow: hidden; align-items: end; }
.station-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.station-card:hover img { transform: scale(1.05); }
.station-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 5%, rgba(0,0,0,.18) 42%, rgba(0,0,0,.78)); }
.station-card > span { position: relative; z-index: 1; padding: 24px; color: white; }
.station-card h2 { margin: 0; font-size: clamp(34px, 5vw, 68px); line-height: 1.05; }
.station-card p { max-width: 720px; line-height: 1.7; }

.section { padding-top: 48px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; min-width: 0; margin-bottom: 16px; }
.section-head.mini { display: block; }
.section-head h2 { margin: 0; font-size: clamp(28px, 4vw, 46px); }
.route-board { display: grid; gap: 14px; min-width: 0; }
.route-line {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255,253,247,.72);
  padding: 14px;
}
.route-line h3 { margin: 0; font-size: 18px; }
.route-line > div { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.route-0 { border-left: 8px solid var(--red); }
.route-1 { border-left: 8px solid var(--blue); }
.route-2 { border-left: 8px solid var(--green); }
.route-3 { border-left: 8px solid var(--gold); }
.small-ticket {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px dashed var(--line);
  background: #fff;
  padding: 8px;
  transition: transform .22s ease, border-color .22s ease;
}
.small-ticket:hover, .selected-card:hover, .hot-row:hover, .ticket-row:hover { transform: translateY(-4px); border-color: var(--red); }
.small-ticket span { aspect-ratio: 2 / 3; overflow: hidden; background: #ddd; }
.small-ticket img, .selected-card img, .ticket-poster img, .detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.small-ticket b, .small-ticket em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.small-ticket em { color: var(--red); font-style: normal; font-weight: 900; }

.split-zone { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .36fr); gap: 20px; min-width: 0; }
.selected-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.selected-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  transition: transform .22s ease, border-color .22s ease;
}
.selected-card img { aspect-ratio: 2 / 3; overflow: hidden; }
.selected-card b, .selected-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-card small { margin-top: 8px; color: var(--muted); }
.hot-panel { min-width: 0; padding: 16px; }
.hot-list { display: grid; gap: 8px; }
.hot-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  transition: transform .22s ease, border-color .22s ease;
}
.hot-row b { color: var(--red); font-size: 22px; }
.hot-row strong, .hot-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-row small { color: var(--muted); }
.hot-row em { color: var(--red); font-style: normal; font-weight: 900; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-width: 0; }
.guide-grid article { min-width: 0; padding: 20px; box-shadow: none; }
.guide-grid h2 { margin: 0 0 10px; color: var(--red); }
.guide-grid p, .footer p { color: var(--muted); line-height: 1.7; }
.footer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 22px; margin-top: 54px; padding: 28px 0 36px; border-top: 1px solid var(--line); }

.library-top { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 20px; align-items: end; min-width: 0; padding: 42px 0 24px; }
.library-top h1 { font-size: clamp(42px, 6vw, 76px); }
.count-badge { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--red); background: #fff; }
.count-badge b { color: var(--red); font-size: 54px; }
.count-badge span { color: var(--muted); }
.filter-row {
  position: sticky;
  top: 76px;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(160px, 220px);
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(245,244,239,.92);
  backdrop-filter: blur(12px);
}
.filter-row label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 13px; font-weight: 900; }
.filter-row input, .filter-row select { width: 100%; min-width: 0; height: 42px; border: 1px solid var(--line); background: white; padding: 0 10px; }
.ticket-list { display: grid; gap: 10px; min-width: 0; padding-top: 16px; }
.ticket-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1.2fr) minmax(120px, .35fr) minmax(160px, .45fr) 70px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.ticket-row:hover { box-shadow: var(--shadow); }
.ticket-poster { aspect-ratio: 2 / 3; overflow: hidden; background: #ddd; }
.ticket-main strong, .ticket-main small, .ticket-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-main small { color: var(--muted); margin-top: 5px; }
.ticket-row em { color: var(--red); font-style: normal; font-weight: 900; }

.detail-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; min-width: 0; padding-top: 44px; }
.detail-poster { aspect-ratio: 2 / 3; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.detail-copy { min-width: 0; padding: 28px; }
.detail-copy h1 { font-size: clamp(42px, 6vw, 82px); }
.detail-copy p { color: var(--muted); line-height: 1.8; }
.detail-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .34fr); gap: 18px; min-width: 0; padding-top: 24px; }
.detail-info article, .detail-info aside { min-width: 0; padding: 20px; box-shadow: none; }
.detail-info h2 { margin: 0 0 12px; color: var(--red); }
.detail-info p { color: var(--muted); line-height: 1.8; }
.detail-info dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px 12px; margin: 0; }
.detail-info dt { color: var(--muted); }
.detail-info dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .topbar, .hero-map, .route-line, .split-zone, .library-top, .detail-hero, .detail-info, .footer { grid-template-columns: 1fr; }
  .nav { justify-content: start; overflow-x: auto; }
  .route-line > div, .selected-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row { position: static; grid-template-columns: 1fr; }
  .ticket-row { grid-template-columns: 58px minmax(0, 1fr); }
  .ticket-row > span:not(.ticket-poster):not(.ticket-main), .ticket-row em { grid-column: 2; }
}
@media (max-width: 620px) {
  .topbar, main, .footer { width: min(100% - 24px, 1180px); }
  .nav-btn { display: none; }
  .station-card { min-height: 420px; }
  .route-line > div, .selected-grid, .guide-grid { grid-template-columns: 1fr; }
}


/* stable responsive guards */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; }
h1, h2, h3, h4, p, a, span, strong, small, b, em, li { min-width: 0; overflow-wrap: anywhere; }
main, header, footer, section, article, aside, nav, div { min-width: 0; }
.poster-grid, .feature-grid, .movie-grid, .library-grid, .library-list, .related-grid, .content-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
