/* Retained language switcher */
.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
  margin-left: 12px;
  padding-left: 14px;
}
.language-switcher--mobile-inline {
  display: none;
}
.language-switcher::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 24px;
  background: rgba(63, 58, 50, 0.16);
  transform: translateY(-50%);
}
.language-switcher__button {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 9px 0 10px;
  border: 1px solid rgba(79, 120, 207, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 9px 24px rgba(49, 95, 184, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: #285aa8;
  font-family: var(--font-sans);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
  appearance: none;
}
.language-switcher__button:hover,
.language-switcher.is-open .language-switcher__button {
  border-color: rgba(79, 120, 207, 0.42);
  box-shadow:
    0 12px 30px rgba(49, 95, 184, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  color: var(--main-color);
  opacity: 1;
}
.language-switcher__button:focus-visible {
  outline: 2px solid rgba(49, 95, 184, 0.22);
  outline-offset: 3px;
}
.language-switcher__current,
.language-switcher__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.language-switcher__current {
  gap: 5px;
}
.language-switcher__code {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
}
.language-switcher__chevron {
  color: rgba(63, 58, 50, 0.46);
  transition: transform 0.18s ease;
}
.language-switcher.is-open .language-switcher__chevron {
  transform: rotate(180deg);
}
.language-switcher__flag {
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(63, 58, 50, 0.12),
    0 1px 2px rgba(20, 36, 70, 0.12);
}
.language-switcher__flag--jp {
  background-image: url("../img/common/flag-jp.jpg");
}
.language-switcher__flag--cn {
  background-image: url("../img/common/flag-cn.jpg");
}
.language-switcher__flag--mm {
  background-image: url("../img/common/flag-mm.jpg");
}
.language-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 300;
  min-width: 214px;
  padding: 8px;
  border: 1px solid rgba(79, 120, 207, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 48px rgba(25, 45, 88, 0.18),
    0 2px 8px rgba(25, 45, 88, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity 0.16s ease,
    visibility 0.16s ease,
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.language-switcher.is-open .language-switcher__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.language-switcher__menu-title {
  margin: 3px 9px 6px;
  color: rgba(63, 58, 50, 0.5);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.language-switcher .bogo-language-switcher {
  display: grid;
  position: static;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.language-switcher .bogo-language-switcher::before,
.language-switcher .bogo-language-switcher li:not(:last-of-type)::after {
  display: none;
}
.language-switcher .bogo-language-switcher li {
  display: block;
  width: 100%;
}
.language-switcher .bogo-language-switcher li > span {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 11px;
  background: transparent !important;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}
.language-switcher .bogo-language-switcher li > span > a {
  display: flex;
  align-items: center;
  width: 100%;
  height: auto;
  background: transparent !important;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.language-switcher .bogo-language-switcher li > span::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 24px;
  height: 16px;
  border-radius: 3px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow:
    inset 0 0 0 1px rgba(63, 58, 50, 0.12),
    0 1px 2px rgba(20, 36, 70, 0.12);
}
.language-switcher .bogo-language-switcher li.ja > span::before {
  background-image: url("../img/common/flag-jp.jpg");
}
.language-switcher .bogo-language-switcher li.zh_CN > span::before,
.language-switcher .bogo-language-switcher li.zh-CN > span::before,
.language-switcher .bogo-language-switcher li.zh > span::before {
  background-image: url("../img/common/flag-cn.jpg");
}
.language-switcher .bogo-language-switcher li.current > span,
.language-switcher .bogo-language-switcher li > span:hover,
.language-switcher__item:hover,
.language-switcher__item.is-current {
  background: #f1f5ff !important;
  color: #2558ad;
  opacity: 1;
}
.language-switcher .bogo-language-switcher li.current > span::after,
.language-switcher__item.is-current::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  width: 7px;
  height: 12px;
  margin-left: auto;
  border-right: 2px solid var(--main-color);
  border-bottom: 2px solid var(--main-color);
  transform: rotate(45deg);
}
.language-switcher__item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 11px;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.language-switcher__item-text {
  display: grid;
  gap: 2px;
}
.language-switcher__item-name,
.language-switcher__item-note {
  display: block;
}
.language-switcher__item-note {
  color: rgba(63, 58, 50, 0.46);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.language-switcher__item:hover .language-switcher__item-note,
.language-switcher__item.is-current .language-switcher__item-note {
  color: rgba(37, 88, 173, 0.66);
}

/* Retained fixed-header language safety boundary */
@media screen and (min-width: 1081px) {
  header.fixed .header_nav {
    right: 396px;
  }
}
@media screen and (min-width: 1081px) and (max-width: 1580px) {
  header.fixed .header_nav {
    right: 332px;
  }
}

/* Retained hamburger SVG compatibility */
@media screen and (max-width: 1080px) {
  .hamburger {
    border: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
  }
  .hamburger .hamburger__icon {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin-top: 0;
    background-color: transparent !important;
    transform: none;
    transition: none;
  }
  .hamburger .hamburger__icon::before,
  .hamburger .hamburger__icon::after {
    content: none;
    display: none;
  }
  .hamburger .hamburger__icon svg {
    display: block;
    width: 40px;
    height: 40px;
    overflow: visible;
  }
  .hamburger .hamburger__icon path {
    fill: none;
    stroke: #fff;
    stroke-width: 4;
    stroke-linecap: square;
    vector-effect: non-scaling-stroke;
  }
  .hamburger .hamburger__icon-close {
    display: none;
  }
  .hamburger.active .hamburger__icon-open {
    display: none;
  }
  .hamburger.active .hamburger__icon-close {
    display: inline;
  }
}
@media screen and (min-width: 1081px) {
  .hamburger {
    display: none;
  }
}

/* Retained page-top state */
.pagetop {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 10003;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--main-color);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease,
    box-shadow 0.18s ease;
}
.pagetop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.pagetop:focus,
.pagetop:focus-visible {
  background: var(--main-color);
  color: #fff;
  outline: 2px solid rgba(30, 75, 143, 0.25);
  outline-offset: 3px;
}
.pagetop:active {
  background: var(--main-color);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  transform: translateY(1px);
}
@media (hover: hover) and (pointer: fine) {
  .pagetop:hover {
    background: #163f79;
    color: #fff;
  }
}
.pagetop svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* Retained case presentation */
body.home,
body.post-type-archive-case,
body.tax-case_category,
body.single-case {
  --brand-blue: var(--main-color, #315fb8);
  --brand-blue-soft: #eef4ff;
  --line-soft: rgba(49, 95, 184, 0.18);
  --surface-soft: #f8fbfd;
  --text-strong: #375168;
  --text-body: #4b535b;
  --hamille-blue-ink: #15345f;
  --font-ja: var(--font-sans);
}
.case {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  box-shadow: 0 14px 32px rgba(55, 81, 104, 0.08);
  color: var(--text-body);
}
.case_head {
  display: grid;
  background: var(--surface-soft);
  text-align: center;
}
.case_num {
  margin: 0;
  padding: 8px 14px;
  background: var(--brand-blue);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-align: center;
}
.case_cate,
.case .case_cate {
  margin: 0;
  padding: clamp(18px, 2.3vw, 28px) clamp(18px, 3vw, 32px)
    clamp(18px, 2.5vw, 30px);
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--text-strong) !important;
  font-size: clamp(2.1rem, 2vw, 2.6rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-align: center;
}
.case_inner {
  width: auto;
  margin: 0;
  padding: 0 clamp(20px, 3vw, 32px) clamp(22px, 3vw, 34px);
  background: var(--surface-soft);
}
.case_media {
  position: static;
  top: auto;
  width: 100%;
  margin: 0 0 24px;
}
.case--card .case_media.one_img img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 750 / 563;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}
.case_media.flex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 0;
  align-items: center;
}
.before_img,
.after_img {
  display: grid;
  grid-template-rows: 1fr auto;
  position: relative;
  width: auto;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  text-align: left;
}
.before_img img,
.after_img img {
  display: block;
  width: 100%;
  height: clamp(160px, 14vw, 210px);
  object-fit: cover;
}
.case_media .before_img h3,
.case_media .after_img h3 {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip-path: none;
  padding: 7px 10px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.25;
  white-space: normal;
}
.case_media .before_img h3 {
  background: #59636d;
}
.case_media .after_img h3 {
  background: var(--brand-blue);
}
.before_img::after,
.after_img::after {
  content: none;
}
.case_arrow {
  display: grid;
  place-items: center;
  width: auto;
  text-align: center;
}
.case_arrow img,
.case_arrow_mark {
  width: 18px;
  height: auto;
}
.case_guideline {
  display: grid;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
}
.case_guideline_row {
  display: grid;
  grid-template-columns: minmax(9.2em, 28%) minmax(0, 1fr);
  border-top: 1px solid var(--line-soft);
}
.case_guideline_row:first-child {
  border-top: 0;
}
.case_guideline dt,
.case_guideline dd {
  margin: 0;
  font-family: var(--font-ja);
  letter-spacing: 0.01em;
}
.case_guideline dt {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--brand-blue-soft);
  color: var(--hamille-blue-ink);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.55;
}
.case_guideline dd {
  padding: 14px 16px;
  color: var(--text-body);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.78;
  border-left: 1px solid var(--line-soft);
}
.case_guideline dd :where(p, ul, ol) {
  margin: 0;
}
.case_guideline dd :where(p, ul, ol) + :where(p, ul, ol) {
  margin-top: 0.65em;
}
.case_card_more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--brand-blue);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}
.case_card_more::after {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.case--detail {
  margin-top: 28px;
}
.case--detail .case_head {
  gap: clamp(10px, 1.2vw, 16px);
  padding-bottom: clamp(22px, 2.8vw, 34px);
}
.case_single_title {
  margin-bottom: 12px !important;
  color: var(--text-strong) !important;
  font-size: clamp(2.6rem, 2.8vw, 3.4rem) !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0.02em !important;
}
.case_single_summary {
  margin: 0 0 26px;
  padding: 18px 20px;
  background: var(--surface-soft);
  border-left: 3px solid var(--brand-blue);
  color: var(--text-body);
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.01em;
}
.case--detail .case_cate {
  width: auto;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
  background: transparent;
  border-radius: 0;
  color: var(--brand-blue) !important;
  font-size: clamp(2.2rem, 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1.45;
}
.case--detail .case_inner {
  padding: 0 clamp(24px, 4vw, 40px) clamp(28px, 4vw, 44px);
}
.case--detail .case_media {
  margin-bottom: 30px;
}
.case--detail .before_img img,
.case--detail .after_img img {
  height: clamp(190px, 18vw, 260px);
}
.case--detail .case_guideline dt {
  font-size: 1.45rem;
}
.case--detail .case_guideline dd {
  font-size: 1.55rem;
  line-height: 1.85;
}

/* Case archive compatibility for the retained card DOM. */
.archive_wrap .archive_list,
body.home .archive_list {
  align-items: stretch;
}
body.post-type-archive-case .archive_wrap,
body.tax-case_category .archive_wrap {
  width: 1280px;
  max-width: calc(100% - 80px);
}
.case_list_child {
  display: flex;
  color: inherit;
  text-decoration: none;
}
.case_list_child .case {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
body.home .case_list_child .case_inner,
body.post-type-archive-case .case_list_child .case_inner,
body.tax-case_category .case_list_child .case_inner {
  display: flex;
  flex: 1;
  flex-direction: column;
}
body.post-type-archive-case .case_list_child,
body.tax-case_category .case_list_child {
  padding: 0;
}

@media screen and (max-width: 750px) {
  .case_list_child {
    width: 100%;
  }
  body.post-type-archive-case .archive_wrap,
  body.tax-case_category .archive_wrap {
    width: calc(100% - 40px);
    max-width: calc(100% - 40px);
  }
}

@media screen and (max-width: 750px) {
  .case {
    border-radius: 5px;
    box-shadow: 0 10px 24px rgba(55, 81, 104, 0.08);
  }
  .case_num {
    font-size: 1.15rem;
  }
  .case_cate {
    font-size: clamp(1.9rem, 5.8vw, 2.25rem);
    line-height: 1.48;
  }
  .case_single_title {
    font-size: clamp(2.2rem, 6.2vw, 2.6rem) !important;
  }
  .case_single_summary {
    margin-bottom: 22px;
    padding: 15px 16px;
    font-size: 1.45rem;
    line-height: 1.82;
  }
  .case_inner,
  .case--detail .case_inner {
    padding: 0 16px 22px;
  }
  .case_media.flex {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .before_img img,
  .after_img img,
  .case--detail .before_img img,
  .case--detail .after_img img {
    height: clamp(190px, 56vw, 254px);
  }
  .case_arrow {
    height: 20px;
  }
  .case_arrow img,
  .case_arrow_mark {
    transform: rotate(90deg);
  }
  .case_guideline_row {
    grid-template-columns: 1fr;
  }
  .case_guideline dt {
    padding: 11px 13px 7px;
    font-size: 1.3rem;
  }
  .case_guideline dd {
    padding: 0 13px 12px;
    border-left: 0;
    font-size: 1.42rem;
    line-height: 1.76;
  }
}

/* Retained mobile placement */
@media screen and (max-width: 1080px) {
  body.no-scroll .pagetop {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .pagetop {
    right: 16px;
    bottom: 76px;
    width: 50px;
    height: 50px;
  }
  .pagetop svg {
    width: 21px;
    height: 21px;
  }
  .header_inner > .language-switcher--mobile-inline {
    display: flex;
    position: absolute;
    top: 53px;
    right: 78px;
    z-index: 2;
    margin-left: 0;
    padding-left: 0;
  }
  .header_inner > .language-switcher--mobile-inline::before {
    display: none;
  }
  .header_inner > .language-switcher--mobile-inline .language-switcher__button {
    height: 36px;
    padding-right: 9px;
    padding-left: 9px;
  }
  .header_inner > .language-switcher--mobile-inline .language-switcher__menu {
    top: 45px;
    right: 0;
  }
  .fat-nav_header .language-switcher {
    position: absolute;
    top: 53px;
    right: 78px;
    margin-left: 0;
    padding-left: 0;
  }
  .fat-nav_header .language-switcher::before {
    display: none;
  }
  .fat-nav_header .language-switcher__button {
    height: 36px;
    padding-right: 9px;
    padding-left: 9px;
  }
  .fat-nav_header .language-switcher__menu {
    top: 45px;
    right: 0;
  }
}
@media screen and (max-width: 414px) {
  .header_inner > .language-switcher--mobile-inline,
  .fat-nav_header .language-switcher {
    right: 74px;
  }
  .language-switcher__menu {
    min-width: 204px;
  }
}

/* Retained footer clinic network presentation */
.clinic-network {
  display: block;
}
.clinic-network__section + .clinic-network__section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef1f5;
}
.clinic-network__label {
  margin: 0 0 5px;
  color: var(--main-color, #315fb8);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
}
.clinic-network__note {
  margin: 0 0 8px;
  color: #555;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0;
}
.clinic-network__note strong {
  color: var(--text-color);
  font-size: 14px;
  font-weight: 700;
}
.clinic-network__links {
  display: grid;
  gap: 6px;
}
.clinic-network a {
  display: block;
  color: var(--text-color);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* Retained footer image sizing */
.f_banner_03 ul li img {
  width: auto;
  max-width: 100%;
}

/* Rebuild retained presentation over the 2026-04-29 home.css baseline. */
.payment img {
  width: 597px;
  height: 120px;
  box-sizing: border-box;
}
.feature_before picture,
.feature_after picture {
  display: block;
  width: 100%;
}
.reason_link a img,
.reason_list_child img {
  height: auto;
  display: block;
}
#kireirepo .wrap a img {
  height: auto;
}

@media screen and (max-width: 1250px) {
  .payment img {
    width: 100%;
    height: auto;
    box-sizing: border-box;
  }
}

@media screen and (max-width: 750px) {
  /* Preserve the visible circle-to-payment breathing room from the TB mobile layout. */
  .mv_circle {
    margin-bottom: 20px;
  }
  .payment img {
    height: 120px;
  }
}

@media screen and (max-width: 1080px) {
  .doctor_02 {
    background: url("../img/home/sp_doctor_bg_02.webp") no-repeat center
      center / 100% 100%;
  }
}

@media screen and (max-width: 750px) {
  .price_link {
    background-image: url("../img/home/sp_price_bg.webp");
  }
  .recruit_link {
    background-image: url("../img/home/sp_recruit_bg.webp");
  }
}

@media screen and (min-width: 1251px) {
  html[lang^="zh"] .payment h4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding-top: 0;
    padding-bottom: 0;
  }
}
