@media (max-width: 600px) {
  li {
    margin-bottom: 8px;
    line-height: 1.2;
  }
  .feature-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: auto;
    min-height: 0;
    max-height: 3.2em;
    line-height: 1.6;
    margin-bottom: 0;
  }
}
@media (max-width: 600px) {
  li {
    margin-bottom: 8px;
    line-height: 1.2;
  }
}
@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    height: 100%;
    width: 100%;
    position: relative;
  }

  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    z-index: 9999 !important;
    background: #F5F0EC !important;
    box-shadow: 0 14px 32px rgba(18, 54, 75, 0.08) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    transition: background-color 0.28s ease, box-shadow 0.28s ease !important;
    transform: none !important;
    margin-top: 0 !important;
    padding-top: env(safe-area-inset-top) !important;
  }

  header::before {
    opacity: 0.5;
  }

  header::after {
    opacity: 0.12;
  }

  header.scrolled {
    position: fixed !important;
    top: 0 !important;
    background: #F5F0EC !important;
    box-shadow: 0 16px 34px rgba(18, 54, 75, 0.1) !important;
    transform: none !important;
  }

  body {
    padding-top: 0;
  }

  .hero {
    margin-top: 96px !important;
  }

  header .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "logo toggle actions"
      "nav nav nav";
    align-items: center;
    gap: 10px;
    padding: 10px 14px 12px;
    width: 100%;
    max-width: 100%;
  }

  header .logo {
    grid-area: logo;
    min-height: 0;
  }

  header nav {
    grid-area: nav;
    width: 100%;
    margin: 0;
    display: none !important;
    justify-content: flex-start;
  }

  header.nav-open nav {
    display: flex !important;
  }

  .header-actions {
    grid-area: actions;
    justify-self: end;
    gap: 8px;
    align-items: center;
  }

  .logo-img {
    width: clamp(96px, 28vw, 126px);
  }

  .nav-toggle {
    grid-area: toggle;
    display: inline-flex !important;
  }

  nav ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 20px;
    background: #F5F0EC;
    border: 1px solid rgba(18, 54, 75, 0.08);
    box-shadow: 0 16px 30px rgba(18, 54, 75, 0.08);
  }

  nav ul li {
    margin-left: 0;
    width: 100%;
  }

  nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 0.96rem;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .language-select .selected-lang {
    width: 42px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
    overflow: visible;
  }

  .language-select .lang-icon {
    width: 22px;
    height: 22px;
  }

  header .search-box {
    width: auto;
    max-width: none;
    justify-self: auto;
  }

  .search-trigger {
    width: 40px;
    height: 40px;
    box-shadow: none;
  }

  .consultation-trigger {
    gap: 8px;
    height: 40px;
    padding: 0 12px 0 8px;
    box-shadow: none;
  }

  .consultation-trigger-icon {
    width: 24px;
    height: 24px;
  }

  .consultation-trigger-text {
    font-size: 0.82rem;
  }

  .search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(300px, calc(100vw - 24px));
    padding: 14px;
  }

  .search-panel-header p {
    font-size: 0.86rem;
  }

  .search-panel-form {
    gap: 8px;
  }

  .search-panel-form input {
    font-size: 16px;
    height: 42px;
  }

  .search-panel-submit {
    width: 48px;
    height: 42px;
    box-shadow: none;
  }

  .search-panel-close-text {
    margin-top: 10px;
    font-size: 0.88rem;
  }

  .search-panel-submit {
    border-radius: 8px;
  }

  .consultation-drawer {
    width: 100vw;
    padding: 0;
  }

  .consultation-drawer-shell {
    border-radius: 28px 0 0 28px;
    padding: calc(env(safe-area-inset-top) + 22px) 18px calc(env(safe-area-inset-bottom) + 20px);
  }

  .consultation-drawer-header {
    margin-bottom: 22px;
    padding: 20px 18px;
    border-radius: 24px;
  }

  .consultation-drawer-header h2 {
    font-size: 1.4rem;
    line-height: 1.02;
  }

  .consultation-drawer-header p {
    font-size: 0.94rem;
  }

  .consultation-header-highlights {
    gap: 8px;
    margin-top: 14px;
  }

  .consultation-highlight-pill {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .consultation-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .consultation-card {
    padding: 18px;
    border-radius: 20px;
  }

  .consultation-card-primary,
  .consultation-card-dark {
    min-height: 0;
  }

  .consultation-card-qr {
    grid-column: auto;
  }

  .consultation-qr-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .consultation-qr-image {
    width: min(176px, 50vw);
    height: min(176px, 50vw);
  }

  .consultation-action {
    padding: 14px 16px;
  }

  .consultation-address {
    max-width: none;
  }

  .hero-content {
    padding: 16px 14px;
  }

  /* Hero visual frame: stack badges + image vertically on mobile */
  .hero-visual-frame {
    flex-direction: column !important;
    align-items: center !important;
    gap: 14px;
    padding: 16px 0 8px;
    min-height: auto !important;
  }

  .hero-visual-badge {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .hero-visual-badge-top {
    order: 1;
  }

  .hero-image {
    order: 2;
  }

  .hero-visual-badge-bottom {
    order: 3;
  }

  .hero-bg-wrapper::before {
    opacity: 0.66;
  }

  .hero-bg-wrapper::after {
    opacity: 0.22;
  }

  /* Homepage: white main + hero; beats rules above (mobile-fix loads after styles.min.css) */
  main.page-content {
    background: #ffffff !important;
  }

  main.page-content .hero {
    background: #ffffff !important;
  }

  main.page-content .hero-bg-wrapper::before,
  main.page-content .hero-bg-wrapper::after {
    background: none !important;
    opacity: 0 !important;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    gap: 10px;
  }

  .hero .btn {
    padding: 8px 14px;
    font-size: 0.9rem;
    border-radius: 24px;
  }

  .hero .btn-outline {
    border-width: 1.5px;
  }

  .sidebar {
    display: flex;
    right: 8px;
    bottom: calc(max(env(safe-area-inset-bottom, 0px), 16px) + 190px);
    width: 52px;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    width: 200px;
  }

  .sidebar-item {
    padding: 12px;
  }

  .sidebar-item i {
    font-size: 18px;
    min-width: 28px;
  }

  section {
    padding: 44px 0;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .service-card {
    background: rgba(255, 255, 255, 0.78);
    border-radius: 16px;
    padding: 22px 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: auto;
  }

  .service-card:nth-child(-n + 4) {
    background: linear-gradient(180deg, rgba(244, 249, 252, 0.9) 0%, rgba(255, 255, 255, 0.84) 100%);
  }

  .service-card:nth-child(n + 5) {
    background: linear-gradient(180deg, rgba(252, 247, 241, 0.9) 0%, rgba(255, 255, 255, 0.84) 100%);
  }

  .service-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 4px;
    background: #EC5517;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(236, 85, 23, 0.28);
  }

  .service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    color: #111827;
    font-family: 'Roboto', 'Noto Sans SC', sans-serif;
    letter-spacing: 0.2px;
    width: 100%;
    text-align: center;
  }

  .service-card p {
    font-size: 0.85rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    max-height: 3.2em;
    color: rgba(17, 24, 39, 0.72);
  }

  .features-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .feature-item {
    padding: 0;
    box-shadow: none;
    background: transparent;
  }

  .feature-content h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .feature-content p {
    font-size: 0.9rem;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .news-card {
    box-shadow: none;
    border: 1px solid #eee;
    min-height: 0 !important;
  }

  .news-image {
    height: 110px;
    overflow: hidden;
  }

  .news-image a {
    display: block;
    height: 100%;
  }

  .news-image img {
    width: 100%;
    height: 110px !important;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .news-content {
    padding: 12px;
  }

  .news-card-desc {
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
  }

  .news-content h3 {
    font-size: 0.95rem;
    margin-bottom: 6px;
  }

  .news-meta {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .news-content p {
    font-size: 0.85rem;
    margin-bottom: 12px;
    -webkit-line-clamp: 2;
  }

  /* Override inline padding on about section */
  #about {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 32px;
  }

  .about-visual {
    order: -1;
    min-height: auto;
    padding: 0 0 0 0;
  }

  .about-text {
    gap: 14px;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
    max-width: 100%;
  }

  .about-text .about-paragraph {
    max-width: 100% !important;
    padding: 20px 18px 22px;
    border-radius: 22px;
    margin-bottom: 0;
    align-self: stretch !important;
  }

  .about-card-kicker {
    margin-bottom: 12px;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .about-text .about-line {
    font-size: 0.95rem;
    line-height: 1.72;
    margin-bottom: 0;
    font-weight: 400;
  }

  .about-visual::before,
  .about-visual::after {
    display: none;
  }

  .about-image {
    width: 100%;
    border-radius: 26px;
    box-shadow: 0 20px 44px rgba(38, 56, 77, 0.12);
  }

  .about-image img {
    aspect-ratio: 1.04;
  }

  .about-visual-chip {
    position: static;
    width: 100%;
    margin-bottom: 14px;
    padding: 16px 16px 18px;
    border-radius: 18px;
  }

  .about-visual-chip-label,
  .about-visual-note-label {
    margin-bottom: 8px;
    font-size: 0.72rem;
  }

  .about-visual-chip p,
  .about-visual-note p {
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .about-visual-notes {
    position: static;
    margin-top: 14px;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .about-visual-note {
    min-height: 0;
    padding: 16px 16px 18px;
    border-radius: 18px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
  }

  .stat-item {
    padding: 12px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .contact {
    padding: 84px 0 92px;
  }

  .contact::before {
    background-size: 28px 28px;
  }

  .contact-scenarios-header h2 {
    font-size: 2rem;
  }

  .contact-scenarios-header p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .business-scene-pills {
    margin-top: 28px;
    gap: 10px;
  }

  .business-scene-pill {
    min-height: 48px;
    padding: 0 16px;
    font-size: 0.92rem;
  }

  .business-scene-cta-card {
    margin-top: 40px;
    padding: 24px 20px;
    border-radius: 22px;
    flex-direction: column;
    align-items: flex-start;
  }

  .business-scene-cta-card h3 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    white-space: normal;
  }

  .business-scene-cta-card p {
    font-size: 0.95rem;
    line-height: 1.75;
  }

  .business-scene-cta-button {
    width: 100%;
    min-width: 0;
    height: 52px;
  }

  .qrcode-section {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    justify-items: center;
    align-items: start;
    margin-left: 0 !important;
  }

  .qrcode-item {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px 8px !important;
  }

  .qrcode-item:first-child,
  .qrcode-item:last-child {
    margin: 0 !important;
  }

  .qrcode-image {
    width: clamp(120px, 38vw, 160px) !important;
    height: clamp(120px, 38vw, 160px) !important;
    margin: 0 auto 12px !important;
  }

  /* Fix footer negative margins from inline styles；移动端并排显示 */
  .footer-links,
  .footer-services {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 1;
    min-width: 0;
  }

  .footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-content > .footer-logo {
    width: 100%;
    flex: 0 0 100%;
  }

  .footer-content > .footer-links,
  .footer-content > .footer-services {
    flex: 1 1 calc(50% - 16px);
    min-width: 120px;
  }

  footer {
    padding: 40px 0 20px;
  }

  .footer-logo-container img {
    height: 32px;
  }

  .footer-qr-launchers {
    margin-top: 18px;
    gap: 12px;
  }

  .footer-qr-trigger {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.25rem;
  }

  .footer-qr-popup {
    bottom: calc(100% + 12px);
    width: min(188px, calc(100vw - 48px));
    padding: 12px;
  }

  .footer-email-popup {
    width: min(228px, calc(100vw - 32px));
    padding: 0;
  }

  .footer-qr-popup img {
    width: min(156px, calc(100vw - 80px));
    height: min(156px, calc(100vw - 80px));
  }

  .footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .footer-links ul li {
    margin-bottom: 8px;
  }

  .footer-links ul li a {
    font-size: 0.9rem;
  }

  .footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Dropdown Menu Fixes */
  header nav li.dropdown {
    position: static;
  }
  
  header nav li.dropdown::before {
    display: none;
  }

  header nav li.dropdown .dropdown-content {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: 10px;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    box-shadow: none;
    max-height: min(60vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
    display: none;
    box-sizing: border-box;
  }

  header nav li.dropdown.open {
    grid-column: 1 / -1;
  }

  header nav li.dropdown.open .dropdown-content {
    display: block;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  header nav li.dropdown > a.nav-link[data-lang-key="services"],
  header nav li.dropdown > a.nav-link[data-lang-key="services"]:visited,
  header nav li.dropdown > a.nav-link[data-lang-key="services"]:hover,
  header nav li.dropdown > a.nav-link[data-lang-key="services"]:focus,
  header nav li.dropdown > a.nav-link[data-lang-key="services"]:focus-visible,
  header nav li.dropdown > a.nav-link[data-lang-key="services"]:active,
  header nav li.dropdown.open > a.nav-link[data-lang-key="services"] {
    color: #000000 !important;
    font-weight: 700 !important;
  }

  /* Dropdown content typography fix */
  .dropdown-column h3 {
    font-size: 0.9rem !important; /* Smaller title */
    margin-bottom: 4px !important;
    margin-top: 6px !important;
    font-weight: 700 !important;
    color: #333 !important;
    border-bottom: 1px solid #eee;
    padding-bottom: 2px;
  }
  
  .dropdown-column ul {
    padding-left: 0 !important;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
  }

  .dropdown-column ul li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    min-height: 0 !important; /* Ensure no min-height */
  }

  .dropdown-column ul li a {
    font-size: 0.85rem !important; /* Smaller link text */
    padding: 2px 0 !important; /* Minimal padding */
    color: #666 !important;
    line-height: 1.1 !important; /* Tighter line height */
    display: block; /* Ensure padding works correctly */
    margin: 0 !important;
  }
  
  /* Fix divider to be a thin line instead of taking up space */
  .dropdown-column ul li.divider {
    height: 1px !important;
    background-color: #eee !important;
    margin: 3px 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
  }
  
  /* Remove any pseudo-elements that might cause spacing issues */
  .dropdown-column ul li a::after,
  .dropdown-column ul li a::before {
    display: none !important;
  }
  
  .dropdown-container {
    padding: 0 4px;
  }

  .services-dropdown .dropdown-content {
    padding: 16px 14px !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 38px rgba(17, 24, 39, 0.14) !important;
  }

  .services-dropdown .dropdown-content::before {
    height: 3px !important;
  }

  .services-dropdown .dropdown-container {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 !important;
  }

  .services-dropdown .dropdown-column {
    padding: 14px 14px 12px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08) !important;
  }

  .services-dropdown .dropdown-column::before {
    display: inline-flex !important;
    align-self: flex-start !important;
    margin: 0 0 10px !important;
    padding: 5px 9px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.14em !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(32, 58, 75, 0.08) !important;
    border-radius: 999px !important;
  }

  .services-dropdown .dropdown-column h3 {
    font-size: 1rem !important;
    margin: 0 0 6px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    color: #203646 !important;
  }

  .services-dropdown .dropdown-column-intro {
    display: block !important;
    margin: 0 0 10px !important;
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
    color: #6a7781 !important;
  }

  .services-dropdown .dropdown-column ul {
    gap: 8px !important;
    margin-bottom: 0 !important;
  }

  .services-dropdown .dropdown-column ul li a {
    min-height: 0 !important;
    padding: 10px 30px 10px 12px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    border: 1px solid rgba(17, 24, 39, 0.05) !important;
    box-shadow: 0 8px 16px rgba(17, 24, 39, 0.04) !important;
    color: #223744 !important;
    font-size: 0.9rem !important;
    line-height: 1.35 !important;
  }

  .services-dropdown .dropdown-column ul li.divider {
    display: none !important;
  }

  .services-dropdown .dropdown-column ul li a::before {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    width: 7px !important;
    height: 7px !important;
    border-top: 2px solid rgba(111, 130, 144, 0.85) !important;
    border-right: 2px solid rgba(111, 130, 144, 0.85) !important;
    transform: translateY(-50%) rotate(45deg) !important;
  }

  .software-dropdown .dropdown-content {
    padding: 14px !important;
    border-radius: 18px !important;
    min-height: 0 !important;
  }

  .software-dropdown .dropdown-content::after {
    left: 14px !important;
    right: 14px !important;
  }

  .software-dropdown-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .software-item {
    min-height: 0 !important;
    padding: 14px 14px 12px !important;
    border-radius: 18px !important;
  }

  .software-item-title-wrap {
    margin-top: 12px !important;
    width: 100% !important;
  }

  .software-item-title {
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
  }

  .software-item-subtitle {
    margin-top: 6px !important;
    font-size: 0.68rem !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }

  .software-item-visual {
    width: 65px !important;
    height: 65px !important;
    margin-top: 14px !important;
    border-radius: 16px !important;
  }

  .software-item-img {
    width: 50px !important;
    height: 50px !important;
  }

  .software-item-kicker,
  .software-item-state,
  .software-item-link-hint,
  .software-item-index {
    font-size: 0.68rem !important;
  }

  .software-item-meta {
    margin-top: 14px !important;
  }
}

@media (max-width: 360px) {
  header .container {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "logo search lang"
      "nav nav nav";
    padding: 0 12px;
  }

  .logo-img {
    width: clamp(86px, 26vw, 110px);
  }

  nav ul {
    gap: 8px 10px;
  }

  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .qrcode-section {
    gap: 10px;
  }

  .qrcode-image {
    width: clamp(110px, 40vw, 140px);
    height: clamp(110px, 40vw, 140px);
  }
}

@media (max-width: 340px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}
