html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  overflow-x: hidden;
}

html.inquiry-lock,
body.inquiry-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

@media (max-width: 980px) {
  .hero-panel {
    order: 2;
  }

  .hero-slideshow {
    order: 1;
  }
}

@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
  }

  body::before {
    display: none;
  }

  .site-shell {
    width: auto;
    max-width: 100%;
    margin: 0 6px;
    padding: 6px 0 108px;
    overflow-x: clip;
  }

  .topbar {
    position: sticky;
    top: 6px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 14px;
    max-width: 100%;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  }

  .brand {
    width: auto;
    min-width: 0;
    justify-content: flex-start;
    align-self: center;
  }

  .brand-logo img {
    width: 72px;
    filter: none;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .nav a {
    width: 100%;
    min-width: 0;
    padding: 8px 4px;
    font-size: 0.78rem;
    line-height: 1.05;
    border-radius: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    padding: 18px 0 14px;
    gap: 16px;
  }

  .slideshow-stage {
    min-height: 320px;
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  }

  .slide {
    transition: opacity 280ms ease;
    transform: none;
  }

  .slide.is-active {
    transform: none;
  }

  .slide-bg {
    transform: none;
    filter: none;
    opacity: 0.58;
  }

  .slide img {
    padding: 10px;
    filter: none;
  }

  .slide-caption {
    right: 8px;
    bottom: 8px;
    left: 8px;
    padding: 12px;
    border-radius: 16px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .slide-caption h2 {
    font-size: clamp(1.1rem, 6.4vw, 1.45rem);
    line-height: 1.12;
  }

  .slide-caption .eyebrow {
    margin-bottom: 6px;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
  }

  .slide-dots {
    justify-content: center;
  }

  .slideshow-footer {
    justify-items: stretch;
  }

  .hero-actions,
  .page-hero-centered .hero-actions,
  .service-detail-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .button,
  .page-hero-centered .hero-actions .button,
  .service-detail-actions .button {
    width: 100%;
  }

  .button-gold-pulse,
  .button-gold-pulse::after {
    animation: none;
  }

  .signal-card,
  .contact-form-shell,
  .service-card,
  .market-card,
  .process-list article,
  .trust-grid article,
  .stats article,
  .cta-panel,
  .service-detail-panel {
    padding: 18px;
    border-radius: 20px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
  }

  .signal-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .signal-card h2,
  .section-heading h2,
  .page-title {
    line-height: 1.05;
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .stats,
  .service-grid,
  .market-grid,
  .trust-grid,
  .process-list {
    gap: 12px;
  }

  .section {
    padding-top: 40px;
  }

  .page-hero {
    padding-top: 28px;
  }

  .inquiry-widget {
    overflow-x: clip;
  }

  .inquiry-tab {
    right: 10px;
    bottom: 10px;
    left: auto;
    width: min(168px, calc(100vw - 20px));
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  }

  .inquiry-tab span {
    font-size: 0.94rem;
    line-height: 1.1;
  }

  .inquiry-tab small {
    margin-top: 3px;
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .inquiry-panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(420px, calc(100vw - 20px));
    max-height: min(78vh, calc(100vh - 28px));
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 22px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, calc(-50% + 18px)) scale(0.98);
    transform-origin: center;
  }

  .inquiry-widget.is-open .inquiry-panel {
    transform: translate(-50%, -50%) scale(1);
  }

  .inquiry-header {
    align-items: flex-start;
  }

  .inquiry-header h3 {
    font-size: 1.08rem;
    line-height: 1.2;
  }

  .inquiry-form {
    gap: 14px;
  }

  .inquiry-form input,
  .inquiry-form select,
  .inquiry-form textarea {
    padding: 13px 14px;
    border-radius: 14px;
  }

  .inquiry-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .inquiry-footer .button {
    width: 100%;
  }

  .lightbox-frame {
    width: min(96vw, 1220px);
    height: min(72vh, 860px);
    padding: 10px;
    border-radius: 18px;
  }

  .lightbox-nav,
  .lightbox-close,
  .service-detail-close {
    width: 40px;
    height: 40px;
  }

  .lightbox-image,
  .lightbox-image-bg {
    filter: none;
  }

  .lightbox-image {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .site-shell {
    margin: 0 4px;
  }

  .topbar {
    top: 4px;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 13px;
  }

  .brand-logo img {
    width: 64px;
  }

  .page-title {
    font-size: clamp(1.9rem, 10vw, 2.6rem);
  }

  .section-heading h2,
  .signal-card h2 {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
  }

  .eyebrow {
    font-size: 0.88rem;
    letter-spacing: 0.14em;
  }

  .nav a {
    font-size: 0.72rem;
    padding: 7px 3px;
  }

  .slideshow-stage {
    min-height: 280px;
  }

  .signal-card,
  .contact-form-shell,
  .service-card,
  .market-card,
  .process-list article,
  .trust-grid article,
  .stats article,
  .cta-panel,
  .service-detail-panel,
  .inquiry-panel {
    padding: 16px;
  }

  .inquiry-tab {
    right: 8px;
    bottom: 8px;
    width: min(154px, calc(100vw - 16px));
    padding: 9px 11px;
  }

  .inquiry-panel {
    width: min(400px, calc(100vw - 16px));
    max-height: min(76vh, calc(100vh - 20px));
  }
}
