.site-language,
html,
body {
  max-width: 100%;
}

html,
body {
  overflow-x: hidden;
}

.header nav {
  order: 1;
  margin-left: auto;
}

.site-language-control {
  position: relative;
  order: 2;
  width: 40px;
  height: 40px;
  margin-left: 20px;
  border: 1px solid #d5e0eb;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #102238;
  box-shadow: 0 6px 18px rgba(17,42,72,.08);
  transition: .2s;
}

.site-language-control:hover,
.site-language-control:focus-within {
  border-color: #0866ff;
  color: #0866ff;
  box-shadow: 0 0 0 3px rgba(8,102,255,.1);
}

.site-language-control svg {
  position: absolute;
  left: 9px;
  top: 9px;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.site-language-control::after {
  content: attr(data-language);
  position: absolute;
  right: -5px;
  bottom: -4px;
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 7px;
  background: #0866ff;
  color: #fff;
  font: 700 8px/1.2 "DM Sans", sans-serif;
  text-align: center;
}

.site-language {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.header .menu {
  order: 3;
}

html[lang="ko"] .hero h1 {
  font-size: clamp(57px, 5.25vw, 78px);
  line-height: 1.04;
}

html[lang="en"] .hero h1 {
  font-size: clamp(40px, 3.6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

html[lang="ja"] .hero h1 {
  font-size: clamp(44px, 4.55vw, 70px);
  line-height: 1.13;
  letter-spacing: -0.055em;
}

html[lang="ja"] .service-hero h1,
html[lang="ja"] .contact-hero h1 {
  font-size: clamp(44px, 4.7vw, 72px);
  line-height: 1.14;
  letter-spacing: -0.05em;
}

html[lang="ja"] .global-partner-banner {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 5vw;
}

html[lang="ja"] .global-partner-banner > div {
  min-width: 0;
}

html[lang="ja"] .global-partner-banner h2 {
  font-size: clamp(36px, 3.8vw, 55px);
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: anywhere;
}

html[lang="ja"] .global-partner-banner p {
  word-break: normal;
  overflow-wrap: anywhere;
}

html[lang="ja"] .global-partner-banner a {
  white-space: nowrap;
  font-size: 14px;
}

.header nav .active {
  color: #0866ff;
}

.footer-links .policy-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(145px, 1fr));
  min-width: 340px;
}

.footer-links .policy-links > strong {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  html[lang="ja"] .global-partner-banner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .site-language-control {
    margin-left: auto;
    margin-right: 10px;
  }
}

@media (max-width: 620px) {
  html[lang="ko"] .hero h1 {
    font-size: 43px;
    line-height: 1.08;
  }

  html[lang="en"] .hero h1 {
    font-size: 31px;
    line-height: 1.12;
  }

  html[lang="ja"] .hero h1,
  html[lang="ja"] .service-hero h1,
  html[lang="ja"] .contact-hero h1 {
    font-size: 39px;
    line-height: 1.18;
  }

  .site-language-control {
    width: 38px;
    height: 38px;
    margin-right: 5px;
  }

  .site-language-control svg {
    left: 8px;
    top: 8px;
  }

  .footer-links .policy-links {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .footer-links .policy-links > strong {
    grid-column: auto;
  }
}
