:root {
  --bg: #eef6f7;
  --surface: #ffffff;
  --surface-soft: #f5faf9;
  --ink: #101b24;
  --muted: #637483;
  --line: #d9e8eb;
  --accent: #007ca3;
  --accent-strong: #005f80;
  --lime: #a8ff00;
  --gold: #ffc86d;
  --danger: #d94a36;
  --shadow: 0 18px 50px rgba(19, 48, 58, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.appShell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  background: #f7fbfb;
  box-shadow: 0 0 0 1px rgba(16, 27, 36, 0.04);
}

.appShell.hasBottomTabs {
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

.tabPage {
  min-height: calc(100vh - 70px);
}

.loadingView {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.loadingMark {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.topBar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: max(8px, env(safe-area-inset-top)) 16px 8px;
  background: rgba(247, 251, 251, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 232, 235, 0.48);
}

.brandBlock {
  display: grid;
  place-items: center;
  text-align: center;
}

.brandBlock strong {
  font-size: 17px;
  line-height: 1.1;
  font-weight: 950;
}

.iconButton,
.textButton {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-strong);
  font-weight: 800;
  padding: 0 14px;
}

.textButton.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero {
  position: relative;
  --hero-media-height: min(50vh, 420px);
  --hero-media-height: clamp(380px, 50svh, 420px);
  display: grid;
  grid-template-rows: var(--hero-media-height) auto;
  padding: 0;
  overflow: hidden;
  background: #06262a;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--hero-media-height);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 24, 28, 0) 0%, rgba(3, 24, 28, 0.1) 62%, rgba(3, 24, 28, 0.62) 100%);
}

.heroMedia {
  position: relative;
  z-index: 0;
  display: block;
  height: var(--hero-media-height);
}

.heroMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.heroContent {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  color: #fff;
  align-self: start;
  margin-top: -72px;
  padding: 72px 18px 24px;
  background: linear-gradient(180deg, rgba(6, 38, 42, 0) 0%, #06262a 58px, #06262a 100%);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(31, 58, 61, 0.78);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1,
.detailHero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: 0;
}

.detailHero h1 {
  max-width: 12ch;
  font-size: clamp(36px, 10vw, 48px);
}

.hero p,
.detailHero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  line-height: 1.7;
}

.heroMeta,
.routeMeta,
.pillRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.pill.light {
  background: var(--surface-soft);
  color: var(--muted);
}

.pill.gold {
  background: #fff1ce;
  color: #8c5a00;
}

.heroAction,
.stickyActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primaryButton,
.secondaryButton,
.ghostButton {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 900;
}

.primaryButton {
  background: var(--lime);
  color: var(--ink);
}

.secondaryButton {
  background: var(--accent);
  color: #fff;
}

.ghostButton {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.section {
  padding: 24px 18px 0;
  scroll-margin-top: 76px;
}

.compactSection {
  padding-top: 12px;
}

.tabIntro {
  padding: 22px 18px 2px;
}

.tabIntro h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.12;
}

.tabIntro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sectionHead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.sectionHead h2,
.section h2 {
  margin: 0;
  font-size: 24px;
}

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

.filterRail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.filterRail::-webkit-scrollbar {
  display: none;
}

.filterChip {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.filterChip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.routeList {
  display: grid;
  gap: 14px;
}

.routeCard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(19, 48, 58, 0.08);
}

.routeImageWrap {
  position: relative;
  overflow: hidden;
  background: #dfeaec;
}

.routeCardCover {
  display: block;
  width: 100%;
  aspect-ratio: 2.35 / 1;
  object-fit: cover;
}

.routeImageBadge {
  position: absolute;
  left: 0;
  top: 0;
  max-width: 74%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 0 0 18px 0;
  background: rgba(16, 23, 29, 0.46);
  color: #fff;
  padding: 0 14px;
  font-size: 15px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.routeCardBody {
  display: grid;
  gap: 8px;
  padding: 13px 16px 14px;
}

.routeTitleLine,
.routeInfoLine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.routeTitleLine h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.routeInfoLine p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.routeStatusButton {
  min-height: 34px;
  min-width: 76px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #3c2a07;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 900;
}

.priceLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  color: var(--danger);
  font-size: 18px;
  font-weight: 950;
}

.price small {
  font-size: 12px;
  color: var(--danger);
}

.noticeBand,
.emptyState {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.noticeBand strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}

.contactBand {
  margin-top: 12px;
}

.storyGrid {
  display: grid;
  gap: 10px;
}

.storyItem {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 15px 16px;
  box-shadow: 0 10px 24px rgba(19, 48, 58, 0.06);
}

.storyItem strong {
  font-size: 17px;
}

.storyItem span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.detailHero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  padding: 150px 18px 24px;
  background: #0d1b20;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.pageBackButton {
  position: fixed;
  left: max(14px, calc((100vw - 520px) / 2 + 14px));
  top: calc(12px + env(safe-area-inset-top));
  z-index: 60;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(6, 24, 28, 0.54);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(14px);
}

.pageBackButton.darkText {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid var(--line);
}

.detailHero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(13, 27, 32, 0.02) 0%, rgba(13, 27, 32, 0.18) 38%, rgba(13, 27, 32, 0.82) 74%, rgba(13, 27, 32, 0.96) 100%),
    linear-gradient(90deg, rgba(4, 33, 36, 0.58) 0%, rgba(4, 33, 36, 0.16) 58%, rgba(4, 33, 36, 0.36) 100%);
}

.detailHeroImage {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.detailHero .heroContent {
  z-index: 2;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.detailHero .eyebrow {
  background: rgba(31, 70, 72, 0.82);
}

.infoGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.infoBox {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 8px;
}

.infoBox span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.infoBox strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.2;
}

.departureList,
.priceTierList,
.reviewList,
.galleryGrid {
  display: grid;
  gap: 12px;
}

.departureRail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 18px 8px 0;
  margin-right: -18px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.departureRail::-webkit-scrollbar {
  display: none;
}

.departureMiniCard {
  flex: 0 0 132px;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #c9dde2;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px;
  text-align: center;
  scroll-snap-align: start;
}

.departureMiniCard span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.departureMiniCard b {
  font-size: 15px;
}

.departureMiniCard small {
  color: var(--danger);
  font-size: 13px;
  font-weight: 900;
}

.departureCard,
.tierCard,
.reviewCard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.departureCard {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.departureCard h3,
.tierCard h3,
.reviewCard h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.departureCard p,
.tierCard p,
.reviewCard p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.richBlock {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
  color: #22313b;
  line-height: 1.8;
}

.compactRich {
  padding: 14px;
}

.feeTabs {
  display: grid;
  gap: 12px;
}

.feePanel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.richBlock h2,
.richBlock h3 {
  margin: 0 0 10px;
}

.richBlock p {
  margin: 0 0 12px;
}

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

.galleryGrid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.bookingPanel {
  min-height: 100vh;
  padding: 18px;
  background: #f7fbfb;
}

.bookingPanel > .textButton {
  margin-bottom: 14px;
}

.bookingCard {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
}

.bookingSummary {
  display: grid;
  gap: 10px;
  min-height: 160px;
  align-content: end;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(4, 33, 36, 0.05) 0%, rgba(4, 33, 36, 0.82) 100%),
    var(--booking-cover),
    #0d2e32;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 18px;
}

.bookingSummary h1 {
  margin: 0;
  font-size: 26px;
}

.bookingSummary p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.formGrid {
  display: grid;
  gap: 14px;
}

.formGrid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.formGrid input,
.formGrid select,
.formGrid textarea {
  width: 100%;
  border: 1px solid #c9dde2;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
  outline: 0;
}

.idCardMeta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.formGrid textarea {
  min-height: 92px;
  resize: vertical;
}

.formNotice {
  display: grid;
  gap: 6px;
  border: 1px solid #c9dde2;
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
}

.formNotice strong {
  font-size: 16px;
}

.formNotice span {
  color: var(--muted);
  line-height: 1.6;
}

.formGrid input:focus,
.formGrid select:focus,
.formGrid textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 124, 163, 0.12);
}

.stickyActions {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(247, 251, 251, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.bottomTabs {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  transform: translateX(-50%);
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  background: rgba(247, 251, 251, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.bottomTabs button {
  min-width: 0;
  min-height: 50px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.bottomTabs button:focus-visible,
.bottomTabs button:hover {
  outline: 0;
  background: var(--surface);
  color: var(--accent-strong);
}

.bottomTabs button.active {
  background: var(--ink);
  color: #fff;
}

.bottomTabs span {
  font-size: 17px;
  line-height: 1;
}

.pageTail {
  height: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 100;
  transform: translateX(-50%);
  width: min(86vw, 420px);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  text-align: center;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

.successView {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 24px 18px;
}

.successCard {
  border-radius: 28px;
  background: var(--surface);
  padding: 26px;
  box-shadow: var(--shadow);
}

.successCard h1 {
  margin: 0 0 12px;
  font-size: 30px;
}

.successCard p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .appShell {
    border-radius: 28px;
    overflow: hidden;
  }

  .heroMedia img {
    object-position: center top;
  }

  .bottomTabs {
    bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 0 0 28px 28px;
  }
}

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

  .loadingMark {
    animation: none;
  }
}
