/* Same language-menu appearance, now with real language URLs as a fallback. */
.language-dropdown > a {width:100%;padding:8px 10px;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:#ddd;text-align:left;font:400 13px/1.4 "Roboto","Noto Sans JP",sans-serif;cursor:pointer;text-decoration:none}
.language-dropdown > a:is(:hover,:focus-visible,[aria-pressed="true"]) {background:#242424;color:#fff;outline:0}
.language-dropdown > a b {width:24px;font:400 17px/1 "Apple Color Emoji","Segoe UI Emoji",sans-serif}
.mobile-menu-language > a {width:100%;margin:8px 0 0;padding:0!important;display:flex;align-items:center;gap:0;border:0!important;background:none;color:#ddd;text-align:left;font:400 14px/1.6 "Roboto","Noto Sans JP",sans-serif!important;white-space:nowrap;cursor:pointer;text-decoration:none}
.mobile-menu-language > a b {display:inline-block;width:26px;font:400 19px/1 "Apple Color Emoji","Segoe UI Emoji",sans-serif}
.mobile-menu-language > a:first-of-type {margin-top:27px}
.mobile-menu-language > a[aria-pressed="true"] {color:#fff}
@media(max-width:560px){.mobile-menu-language > a[aria-pressed="true"]{display:none}}
@media(min-width:561px) and (max-width:1200px){
  .site-header.is-open .mobile-menu-language {display:block;position:static;order:-1;margin-bottom:24px}
  .mobile-menu-language summary {display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none}
  .mobile-menu-language summary i {width:18px;height:18px;border:3px solid #fff;border-radius:50%;background:#e3001b}
  .mobile-menu-language > a {max-width:220px}
}
@media(min-width:1201px) and (max-width:1320px){
  .site-header .language {display:block;font-size:12px}
  .site-header nav {gap:14px}
}
/* Allow translated copy to wrap inside the approved layout, without altering Japanese. */
html:not([lang="ja"]) body {overflow-wrap:break-word}
html[lang="en"] body {font-family:"Roboto",Arial,sans-serif;letter-spacing:0}
html[lang="zh-Hans"] body {font-family:"Noto Sans SC","PingFang SC","Microsoft YaHei",sans-serif}
html[lang="ko"] body {font-family:"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;word-break:keep-all}
/* note article cards stay Japanese, including typography and line wrapping. */
.page-top .journal-grid {font-family:"Roboto","Noto Sans JP",sans-serif;letter-spacing:.02em;overflow-wrap:normal;word-break:normal}
/* Keep the two-digit process labels on one line, as in the Japanese layout. */
html:not([lang="ja"]) .page-service .process-number {white-space:nowrap;overflow-wrap:normal;word-break:normal}
html:not([lang="ja"]) .site-footer .footer-main p,
html:not([lang="ja"]) .site-footer .footer-links a,
html:not([lang="ja"]) .site-footer .copyright {white-space:normal}
html:not([lang="ja"]) .site-footer .footer-legal {flex-wrap:wrap}
html:not([lang="ja"]) .site-header.is-open .mobile-menu-others > a {white-space:normal}
html:not([lang="ja"]) .page-contact .form-step-title h3 {flex-wrap:wrap}
html:not([lang="ja"]) .consulting-heading h2 span,
html:not([lang="ja"]) .consulting-phase-head h2,
html:not([lang="ja"]) .consulting-statement,
html:not([lang="ja"]) .service-grid small,
html:not([lang="ja"]) .theory-flow-boxes .theory-box h3,
html:not([lang="ja"]) .page-theory .theory-page .theory-explore .subpage-section-title h2,
html:not([lang="ja"]) .page-profile .company-table th,
html:not([lang="ja"]) .page-information-security-policy .policy-group-heading p {white-space:normal}
html[lang="en"] .page-top .hero h1 {font-size:clamp(44px,5.2vw,90px)}
@media(min-width:901px){
  html:not([lang="ja"]) .site-footer .footer-links a {display:flex;align-items:center;line-height:1.5;min-height:calc(var(--footer-unit) * 46 / 17.2);padding:6px 10px 6px 0}
  html:not([lang="ja"]) .site-footer .footer-links a:before {flex-shrink:0}
  html:not([lang="ja"]) .page-top .strength-grid article {height:auto;min-height:680px}
  html:not([lang="ja"]) .page-top .strength-grid article div {position:relative;top:auto;right:auto;margin-left:auto;margin-right:36px;padding-top:24px;padding-bottom:85px;min-height:680px}
}
@media(min-width:901px) and (max-width:1599px){
  html:not([lang="ja"]) .page-top .strength-grid article div {margin-right:4%;padding-top:27.2px}
}
@media(max-width:560px){
  html:not([lang="ja"]) .page-top .service-grid article {height:auto;min-height:111px}
  html:not([lang="ja"]) .page-top .service-grid article div {position:relative;left:auto;right:auto;margin-left:50%;height:auto;min-height:111px;padding-bottom:4px}
}

/* English copy must stay inside its panel without changing Japanese layouts. */
html[lang="en"] .subpage-main .subpage-cta{height:auto}
html[lang="en"] .subpage-cta>div{min-width:0}
html[lang="en"] .subpage-cta>a{flex-shrink:0;max-width:100%;gap:16px}
html[lang="en"] .subpage-cta h2,
html[lang="en"] .subpage-cta p{overflow-wrap:anywhere}
html[lang="en"] .subpage-main .subpage-hero{height:auto;min-height:619px;padding-top:336px;padding-bottom:60px}
html[lang="en"] .subpage-main .subpage-hero-copy{position:relative;top:auto;left:auto;right:auto;max-width:none;margin:0 var(--hero-content-inset)}
html[lang="en"] :is(.page-privacy-policy,.page-site-policy,.page-information-security-policy) .subpage-hero{min-height:665px}
html[lang="en"] .page-works .subpage-hero{min-height:635px}
html[lang="en"] .page-contact .subpage-hero{min-height:760px}
html[lang="en"] .page-theory .theory-article-page .subpage-hero{min-height:829px}
html[lang="en"] .theory-flow-boxes .theory-box h3,
html[lang="en"] .theory-flow-boxes .theory-box small{max-width:100%;overflow-wrap:anywhere}
@media(min-width:561px) and (max-width:900px){
  html[lang="en"] .page-top .strength-grid article{height:auto;min-height:620px}
  html[lang="en"] .page-top .strength-grid article div{position:relative;top:auto;right:auto;max-width:92%;height:auto;min-height:620px;margin-left:auto;margin-right:4%;padding-top:24px;padding-bottom:85px}
  html[lang="en"] .page-top .service-grid article{display:flex;align-items:flex-end;aspect-ratio:auto;min-height:50vw;padding-top:14vw}
  html[lang="en"] .page-top .service-grid article div{position:relative;right:auto;bottom:auto;margin-left:auto;height:auto;min-height:0}
  html[lang="en"] .page-top .service-grid article div>*{flex-shrink:0}
  html[lang="en"] .subpage-main .subpage-hero{min-height:610px;padding-top:270px;padding-bottom:48px}
  html[lang="en"] .subpage-main .subpage-hero-copy{margin:0 24px}
}
@media(max-width:560px){
  html[lang="en"] .subpage-main .subpage-hero{min-height:350px;padding-top:115px;padding-bottom:32px}
  html[lang="en"] .subpage-main .subpage-hero-copy{margin:0 20px}
  html[lang="en"] .page-service .subpage-hero{padding-top:118px}
  html[lang="en"] .page-reviews .review-card,
  html[lang="en"] .page-reviews .featured-card{height:auto;min-height:278px}
  html[lang="en"] .page-reviews .review-card div,
  html[lang="en"] .page-reviews .featured-card div{height:auto;min-height:176px}
  html[lang="en"] .page-qa .qa-jumps a,
  html[lang="en"] :is(.page-privacy-policy,.page-site-policy,.page-information-security-policy) .policy-index a{width:auto;min-width:142px}
}

/* Contact step spacing follows the horizontal inset at each breakpoint. */
html[lang] .page-contact .contact-form>.form-step{
  --contact-step-inset:40px;
  padding:var(--contact-step-inset);
}
@media(max-width:900px){
  html[lang] .page-contact .contact-form>.form-step{--contact-step-inset:20px}
}
@media(max-width:560px){
  html[lang] .page-contact .contact-form>.form-step{--contact-step-inset:18px}
}

/* Service panels follow their actual content, including temporarily hidden fees. */
html[lang] .page-top .service-grid article{display:flex;align-items:flex-end;aspect-ratio:auto;min-height:calc(100vw / 3);padding-top:0}
html[lang] .page-top .service-grid article div{
  --service-copy-pad:clamp(16px,1.25vw,24px);
  position:relative;left:auto;right:auto;bottom:auto;
  height:auto;min-height:0;margin-left:auto;margin-right:0;
  padding:var(--service-copy-pad);
}
html[lang] .page-top .service-grid article div>*{flex-shrink:0;min-width:0}
html[lang] .page-top .service-grid h3,
html[lang] .page-top .service-grid p{overflow-wrap:anywhere}
html[lang] .page-top .service-grid small{
  width:auto;max-width:none;
  margin:16px calc(var(--service-copy-pad) * -1) calc(var(--service-copy-pad) * -1);
  padding:12px var(--service-copy-pad);
}
html[lang] .page-service .service-card-grid{align-items:stretch}
html[lang] .page-service .service-card{height:auto;min-height:0}
html[lang] .page-service .service-card-copy{height:auto;min-height:0;flex:1}
html[lang] .page-service .service-card p{min-height:0;margin-bottom:0}
html[lang] .page-service .service-card-price{margin-top:16px}
@media(min-width:561px){
  html[lang] .page-service .service-card-copy{display:block}
}
@media(min-width:561px) and (max-width:900px){
  html[lang] .page-top .service-grid article{min-height:50vw}
}
@media(max-width:560px){
  html[lang] .page-top .service-grid article{height:auto;min-height:0}
  html[lang] .page-top .service-grid article div{--service-copy-pad:15px}
  html[lang] .page-service .service-card-copy{grid-template-rows:auto auto auto auto}
}
