:root {
  --h5-shell-bg: linear-gradient(180deg, #f6f7f3 0%, #eef3ea 100%);
  --h5-surface: rgba(255, 255, 255, 0.92);
  --h5-surface-strong: #ffffff;
  --h5-text: #203126;
  --h5-text-muted: #667565;
  --h5-border: rgba(45, 90, 39, 0.1);
  --h5-primary: #2d5a27;
  --h5-primary-strong: #4a8c42;
  --h5-accent: #d08d3c;
  --h5-shadow-sm: 0 8px 24px rgba(18, 34, 20, 0.08);
  --h5-shadow-md: 0 18px 40px rgba(18, 34, 20, 0.12);
  --h5-header-height: 58px;
  --h5-bottom-height: 64px;
  --h5-radius-card: 20px;
  --h5-radius-pill: 999px;
  --h5-content-width: min(100% - 24px, 760px);
}

html.h5-shell,
html.h5-shell body {
  min-height: 100%;
}

body.h5-shell {
  background: var(--h5-shell-bg);
  color: var(--h5-text);
  -webkit-tap-highlight-color: transparent;
}

body.h5-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(118, 166, 99, 0.12), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(208, 141, 60, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 30%);
  z-index: -1;
}

body.h5-shell main#main-content {
  isolation: isolate;
}

.page-header {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  color: #fff;
  margin-bottom: 6px;
}

.page-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 72px;
  background: linear-gradient(180deg, rgba(246, 247, 243, 0), rgba(246, 247, 243, 0.96));
}

.page-header-content {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 760px);
  padding: 0 20px;
}

.page-header-content h1 {
  font-size: clamp(1.8rem, 7vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.page-header-content p {
  margin-top: 12px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
  text-wrap: balance;
}

.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: var(--h5-radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.95);
}

.h5-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  box-shadow: 0 8px 24px rgba(16, 28, 17, 0.04);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

.h5-header.is-compact {
  box-shadow: 0 12px 28px rgba(16, 28, 17, 0.08);
  border-bottom-color: var(--h5-border);
  background: rgba(255, 255, 255, 0.92);
}

.h5-header.is-hidden {
  transform: translateY(-100%);
}

.h5-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--h5-header-height);
  width: var(--h5-content-width);
  margin: 0 auto;
  padding: 10px 0 calc(10px + env(safe-area-inset-top, 0px));
}

.h5-header-back,
.h5-header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 14px;
  color: var(--h5-text);
}

.h5-header-back {
  gap: 6px;
  padding: 0 12px;
  background: rgba(45, 90, 39, 0.08);
  font-size: 0.9rem;
  font-weight: 600;
}

.h5-header-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--h5-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h5-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(45, 90, 39, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 36px rgba(17, 30, 19, 0.14);
}

.h5-bottom-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  padding: 6px 4px;
  border-radius: 18px;
  color: var(--h5-text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  transition: transform 180ms ease, color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.h5-bottom-nav-item.active {
  color: var(--h5-primary);
  background: linear-gradient(135deg, rgba(45, 90, 39, 0.14), rgba(74, 140, 66, 0.08));
  box-shadow: inset 0 0 0 1px rgba(45, 90, 39, 0.08);
}

.h5-nav-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.h5-pressable {
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.h5-pressable.is-pressed {
  transform: scale(0.98);
  opacity: 0.92;
}

.container {
  width: var(--h5-content-width) !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

.section {
  padding: 44px 0 !important;
}

.section-header {
  text-align: center !important;
  margin-bottom: 22px !important;
  padding: 0 !important;
}

.section-tag {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0 14px !important;
  border-radius: var(--h5-radius-pill) !important;
  margin-bottom: 12px !important;
  background: rgba(45, 90, 39, 0.1) !important;
  color: var(--h5-primary) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
}

.section-title {
  margin: 0 0 10px !important;
  font-size: clamp(1.45rem, 6vw, 1.9rem) !important;
  line-height: 1.25 !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  color: var(--h5-text) !important;
  text-wrap: balance;
}

.section-desc {
  max-width: 34rem !important;
  margin: 0 auto !important;
  font-size: 0.95rem !important;
  line-height: 1.75 !important;
  color: var(--h5-text-muted) !important;
  text-wrap: balance;
}

.route-card,
.feature-card,
.testimonial-card,
.info-card,
.faq-item,
.service-nav-card,
.route-option-card,
.activity-card,
.package-card,
.module-card,
.partner-item,
.value-card,
.guarantee-card,
.plan-card,
.tutor-card,
.product-card,
.study-card,
.contact-card,
.news-card,
.gallery-card,
.case-card,
.timeline-content,
.schedule-card,
.section-card,
.floating-card,
.form-section,
.notice-card,
.notice-block,
.process-item,
.service-process,
.cooperation-section,
.curriculum-section,
.intro-text {
  border-radius: var(--h5-radius-card) !important;
  box-shadow: var(--h5-shadow-sm) !important;
}

.route-card,
.feature-card,
.testimonial-card,
.info-card,
.faq-item,
.service-nav-card,
.route-option-card,
.activity-card,
.package-card,
.module-card,
.partner-item,
.value-card,
.guarantee-card,
.plan-card,
.tutor-card,
.product-card,
.study-card,
.contact-card,
.news-card,
.gallery-card,
.case-card,
.timeline-content,
.schedule-card,
.section-card,
.floating-card,
.form-section,
.notice-card,
.notice-block,
.process-item,
.service-process,
.cooperation-section,
.curriculum-section,
.intro-text {
  border: 1px solid rgba(45, 90, 39, 0.08) !important;
}

.btn,
button,
input,
select,
textarea,
.hero-btn,
.category-tab,
.route-tab,
.group-item,
.h5-nav-item,
.social-link,
.modal-close,
.service-nav-card,
.route-nav-item,
.package-option,
.tab-item,
.package-tab-btn {
  touch-action: manipulation;
}

.btn,
.hero-btn,
button[type='button'],
button[type='submit'],
.btn-primary,
.btn-outline,
.btn-book-now,
.btn-submit,
.category-tab,
.route-tab,
.group-item,
.service-nav-card,
.tab-item,
.package-tab-btn {
  min-height: 46px;
}

.btn,
.hero-btn,
.btn-primary,
.btn-outline,
.btn-book-now,
.btn-submit {
  border-radius: 16px !important;
  font-weight: 700 !important;
}

.btn-primary,
.hero-btn-primary,
.btn-book-now,
.btn-submit {
  box-shadow: 0 14px 28px rgba(45, 90, 39, 0.16);
}

input,
select,
textarea,
.form-input {
  min-height: 48px !important;
  border-radius: 16px !important;
}

.modal-content,
.share-modal,
.toast,
.qrcode-wrapper,
.lightbox-content {
  border-radius: 24px !important;
}

.notice-modal {
  z-index: 2200 !important;
}

.customer-service {
  position: fixed !important;
  right: 14px !important;
  bottom: calc(var(--h5-bottom-height) + 28px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 1090 !important;
}

.customer-service .cs-btn {
  min-width: 52px !important;
  min-height: 52px !important;
  padding: 0 14px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, var(--h5-primary), var(--h5-primary-strong)) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(45, 90, 39, 0.24) !important;
}

.customer-service .cs-text {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}

body.h5-shell .back-to-top {
  display: inline-flex !important;
  position: fixed !important;
  right: 14px !important;
  bottom: calc(var(--h5-bottom-height) + 92px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 1088 !important;
  width: 46px !important;
  height: 46px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  border: 1px solid rgba(45, 90, 39, 0.08) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--h5-primary) !important;
  box-shadow: 0 12px 26px rgba(14, 28, 16, 0.14) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(8px) scale(0.96) !important;
  pointer-events: none !important;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease !important;
}

body.h5-shell .back-to-top.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

.h5-nav-row,
.route-tabs-scroll,
.category-tabs,
.package-tabs,
.route-quick-nav,
.activities-list,
.tabs-scroll {
  scrollbar-width: none;
}

.h5-nav-row::-webkit-scrollbar,
.route-tabs-scroll::-webkit-scrollbar,
.category-tabs::-webkit-scrollbar,
.package-tabs::-webkit-scrollbar,
.route-quick-nav::-webkit-scrollbar,
.activities-list::-webkit-scrollbar,
.tabs-scroll::-webkit-scrollbar {
  display: none;
}

@media (max-width: 1023px) {
  .navbar,
  .nav-container,
  .nav-links,
  .nav-toggle,
  .megamenu,
  .top-bar,
  .footer,
  .desktop-only,
  .cookie-banner {
    display: none !important;
  }

  body.h5-shell {
    padding-bottom: calc(var(--h5-bottom-height) + 30px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (min-width: 1024px) {
  .h5-header,
  .h5-bottom-nav {
    display: none !important;
  }

  body.h5-shell {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 767px) {
  .page-header {
    min-height: 190px;
  }

  .page-header-content {
    padding: 0 16px;
  }

  .page-header-content p {
    font-size: 0.92rem;
  }

  .breadcrumb {
    display: none;
  }

  .section {
    padding: 38px 0 !important;
  }

  .h5-header-inner {
    width: min(100% - 18px, 760px);
  }

  .h5-header-back {
    min-width: 34px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .h5-bottom-nav {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
  }

  .h5-bottom-nav-item {
    font-size: 0.64rem;
  }

  .h5-nav-icon {
    font-size: 1.12rem;
  }

  .customer-service {
    right: 12px !important;
  }

  body.h5-shell .back-to-top {
    right: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .h5-header,
  .h5-bottom-nav-item,
  .h5-pressable,
  .back-to-top {
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
