/* Mezzo 404 + mobile header language switcher global controls */
html body .mezzo-language-switcher-header-mobile {
  display: none;
}

html body .mezzo-error-page {
  background: var(--c-bg, #FFF8F1);
  color: var(--c-body, #5d514d);
}

html body .mezzo-error-hero {
  min-height: 58vh;
  display: grid;
  align-items: center;
  padding: clamp(8rem, 10vw, 14rem) 0;
  background:
    radial-gradient(circle at 12% 30%, rgba(160, 82, 45, 0.12), transparent 34rem),
    linear-gradient(135deg, rgba(255, 248, 241, 0.96), rgba(255, 255, 255, 0.92));
}

html body .mezzo-error-card {
  max-width: 78rem;
  margin: 0 auto;
  text-align: center;
  padding: clamp(3.2rem, 5vw, 6rem);
  border: 1px solid rgba(160, 82, 45, 0.18);
  border-radius: var(--r-lg, 2.4rem);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 2rem 5rem rgba(36, 18, 9, 0.08);
}

html body .mezzo-error-card h1 {
  margin: 1.2rem 0 1.6rem;
  color: var(--c-heading, #241815);
  font-family: var(--font-heading, "Cormorant Garamond", serif);
  font-size: clamp(4.4rem, 7vw, 8.6rem);
  line-height: 0.98;
}

html body .mezzo-error-card p {
  max-width: 56rem;
  margin: 0 auto 2.6rem;
  font-size: clamp(1.6rem, 1.5vw, 1.9rem);
  line-height: 1.75;
}

html body .mezzo-error-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  html body .site-header,
  html body .site-header.scrolled,
  html body .site-header.header-on-hero,
  html body:not(.home):not(.front-page) .site-header,
  html body:not(.home):not(.front-page) .site-header.header-on-hero {
    padding-left: clamp(1rem, 3vw, 1.8rem) !important;
    padding-right: clamp(1rem, 3vw, 1.8rem) !important;
    gap: 0.8rem !important;
  }

  html body .site-header .brand,
  html body .site-header a.brand,
  html body .site-header.header-on-hero .brand,
  html body:not(.home):not(.front-page) .site-header .brand {
    max-width: calc(100% - 13.6rem) !important;
    margin-right: auto !important;
  }

  html body .site-header .mezzo-language-switcher-header-mobile {
    display: inline-flex !important;
    flex: 0 0 auto;
    margin-left: 0 !important;
    padding: 0.55rem 0.75rem;
    font-size: 1.15rem;
    gap: 0.5rem;
  }

  html body .mobile-panel .mezzo-language-switcher-mobile {
    display: none !important;
  }
}

@media (max-width: 760px) {
  html body .site-header,
  html body .site-header.scrolled,
  html body .site-header.header-on-hero,
  html body:not(.home):not(.front-page) .site-header,
  html body:not(.home):not(.front-page) .site-header.header-on-hero {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    gap: 0.6rem !important;
  }

  html body .site-header .brand,
  html body .site-header a.brand {
    max-width: calc(100% - 12rem) !important;
  }

  html body .site-header .brand img,
  html body .site-header .brand .custom-logo,
  html body .site-header .brand-logo,
  html body .site-header img.brand-logo {
    width: clamp(15rem, 48vw, 22rem) !important;
    max-height: 5rem !important;
  }

  html body .site-header .mezzo-language-switcher-header-mobile {
    padding: 0.5rem 0.62rem;
    font-size: 1.05rem;
    gap: 0.42rem;
  }

  html body .site-header .mobile-toggle,
  html body .site-header button.mobile-toggle {
    width: 4.8rem !important;
    height: 4.8rem !important;
    min-width: 4.8rem !important;
    min-height: 4.8rem !important;
    border-radius: 1.2rem !important;
  }

  html body .site-header .mobile-toggle span {
    width: 2.55rem !important;
  }

  html body .mezzo-error-actions .btn {
    width: 100%;
  }
}

@media (max-width: 380px) {
  html body .site-header .brand,
  html body .site-header a.brand {
    max-width: calc(100% - 10.4rem) !important;
  }

  html body .site-header .brand img,
  html body .site-header .brand .custom-logo,
  html body .site-header .brand-logo,
  html body .site-header img.brand-logo {
    width: clamp(13.2rem, 43vw, 17rem) !important;
  }

  html body .site-header .mezzo-language-switcher-header-mobile {
    font-size: 0.95rem;
    padding: 0.45rem 0.5rem;
  }
}


/* Mobile header language switcher: keep EN | 中文 around 16px */
@media (max-width: 1080px) {
  html body .site-header .mezzo-language-switcher-header-mobile,
  html body .site-header .mezzo-language-switcher-header-mobile a,
  html body .site-header .mezzo-language-switcher-header-mobile .mezzo-lang-link,
  html body .site-header .mezzo-language-switcher-header-mobile .mezzo-lang-divider {
    font-size: 1.6rem !important;
  }
}

@media (max-width: 380px) {
  html body .site-header .mezzo-language-switcher-header-mobile,
  html body .site-header .mezzo-language-switcher-header-mobile a,
  html body .site-header .mezzo-language-switcher-header-mobile .mezzo-lang-link,
  html body .site-header .mezzo-language-switcher-header-mobile .mezzo-lang-divider {
    font-size: 1.6rem !important;
  }
}
