/* ========================================
   Site Chrome
   ヘッダー・フッター・追従UI
======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z_header);
  background: var(--color_bg);
  box-shadow: 0 1px 0 var(--color_border_light);
}

.header_h1 {
  width: 100%;
  box-sizing: border-box;
  padding: 3px clamp(16px, 3vw, 48px) 0;
}

.header_h1 h1,
.header_h1 .header_site_title {
  margin: 0;
  font-size: 0.8em;
  font-weight: normal;
  line-height: 1.4;
}

.header_site_title a {
  color: var(--color_text);
  text-decoration: none;
}

.header_main {
  position: relative;
  background: var(--color_bg);
  overflow: visible;
}

.header_main_inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding-left: clamp(16px, 3vw, 48px);
  padding-right: calc(58px + clamp(12px, 2vw, 24px));
  min-height: var(--header_main_height);
  position: relative;
  overflow: visible;
}

.header_logo {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}

.header_logo img {
  width: min(185px, 36vw);
  height: auto;
  margin: 0;
}

.header .global_menu,
.header .header_actions {
  display: none;
}

.header .sp_dnav_btn {
  display: block;
}

.global_menu {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.global_menu > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global_menu > ul > li {
  position: relative;
}

.global_menu > ul > li > a {
  display: block;
  padding: 8px clamp(10px, 1.2vw, 18px);
  color: var(--color_text);
  font-weight: 500;
  font-size: var(--fz_sm);
  white-space: nowrap;
}

.global_menu > ul > li.menu > a,
.global_menu > ul > li.menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.global_menu > ul > li.menu > a::after,
.global_menu > ul > li.menu-item-has-children > a::after {
  content: "+";
  font-size: 1.1em;
  font-weight: 400;
  line-height: 1;
  opacity: 0.85;
}

.global_menu > ul > li.menu:hover > a::after,
.global_menu > ul > li.menu-item-has-children:hover > a::after {
  content: "−";
}

.global_menu > ul > li > a:hover,
.global_menu > ul > li.active > a {
  color: var(--color_accent);
  text-decoration: none;
}

.header_actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header_tel a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius_sm);
  background: var(--color_btn);
  color: var(--color_text_inverse);
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--transition_base);
}

.header_tel a:hover {
  background: var(--color_btn_hover);
  color: var(--color_text_inverse);
  text-decoration: none;
}

.header_tel img {
  flex: 0 0 auto;
  width: 22px;
  height: auto;
}

.header_tel_body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.header_tel_body strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color_text_inverse);
  background: none;
  line-height: 1.1;
}

.header_tel_body small {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  opacity: 0.95;
}

@media (max-width: 767px) {
  .header_main_inner {
    min-height: 58px;
  }
}

.sp_dnav_btn {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: 58px;
  height: 100%;
  margin: 0;
  background-color: var(--color_btn);
}

.sp_dnav_btn .inn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: var(--header_main_height);
}

.sp_dnav_btn .ct {
  position: relative;
  top: auto;
  left: auto;
  width: 24px;
  transform: none;
}

.sp_dnav_btn .ct .line i {
  display: block;
  width: 100%;
  height: 2px;
  margin-bottom: 8px;
  background-color: var(--color_text_inverse);
}

.drawer_overlay {
  display: none;
  position: fixed;
  z-index: var(--z_drawer_overlay);
  top: calc(var(--header_h1_height) + var(--header_main_height));
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100% - var(--header_h1_height) - var(--header_main_height));
  background-color: rgba(0, 0, 0, 0.5);
}

.drawer_nav {
  position: absolute;
  z-index: var(--z_drawer);
  top: 0;
  right: 0;
  overflow-y: auto;
  width: min(400px, 85vw);
  max-width: 100%;
  height: 100%;
  transition: all 0.5s;
  background-color: var(--color_bg);
  -webkit-overflow-scrolling: touch;
}

.drawer_menu {
  padding-bottom: 30px;
  border-top: 1px solid var(--color_border_light);
}

.drawer_menu li a,
.drawer_menu li p {
  font-size: 94%;
  display: block;
  padding: 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--color_border_light);
  background-color: var(--color_surface_muted);
}

.drawer_menu li a {
  background-image: url(../img/common/sp_common_dnav_ico_02.png);
  background-repeat: no-repeat;
  background-position: center right 10px;
  background-size: 7px 11px;
}

.drawer_menu li p {
  background-image: url(../img/common/sp_common_dnav_ico_01.png);
  background-repeat: no-repeat;
  background-position: center right 10px;
  background-size: 11px 11px;
  color: var(--color_accent);
}

.drawer_menu li p.is_open {
  background-image: url(../img/common/sp_common_dnav_ico_03.png);
  background-size: 10px 2px;
}

.drawer_menu li ol {
  display: none;
}

.drawer_menu li ol li a,
.drawer_menu li ol li p {
  background-color: var(--color_bg);
}

.drawer_menu li ol li a img {
  position: relative;
  top: -1px;
  width: 9px;
  margin-right: 6px;
  vertical-align: middle;
}

.drawer_menu li ol ul {
  display: none;
}

.drawer_nav .cv_tel,
.drawer_nav .drawer_cv_tel {
  text-align: center;
  line-height: 1;
  margin-bottom: 1.5em;
}

@media (min-width: 1280px) {
  .drawer_nav .drawer_cv_tel {
    display: none;
  }
}

.drawer_nav .cv_tel span {
  display: block;
}

.drawer_nav .btn.btn_main,
.drawer_nav .btn.btn_sub {
  margin: 0.5em 0 0;
}

.drawer_nav .sns_link {
  padding: 10px 0 150px;
  font-size: 2em;
}

.drawer_nav .sns_link ul {
  justify-content: center;
}

.drawer_nav .sns_link ul li:last-of-type {
  padding-right: 0;
}

.drawer_nav .sns_link a,
.drawer_nav .cv_tel a {
  color: var(--color_text);
}

@media (min-width: 1280px) {
  .header .global_menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    overflow: visible;
  }

  .header .header_actions {
    display: flex;
  }

  .header .sp_dnav_btn {
    display: none;
  }

  .global_menu > ul > li.menu > .child_menu,
  .global_menu .menu-item-has-children > .sub-menu {
    position: absolute;
    top: 100%;
    margin: 0;
    padding: 16px 0;
    list-style: none;
    background: var(--color_surface_muted);
    visibility: hidden;
    opacity: 0;
    z-index: var(--z_modal);
    box-sizing: border-box;
    transition: visibility 0.2s, opacity 0.2s;
  }

  .global_menu > ul > li.menu > .child_menu,
  .global_menu .menu-item-has-children > .sub-menu {
    left: 50%;
    width: max-content;
    min-width: 220px;
    max-width: min(90vw, 360px);
    transform: translateX(-50%);
  }

  .global_menu > ul > li.menu_mega,
  .global_menu .menu-item-has-children.mega-menu {
    position: static;
  }

  .global_menu > ul > li.menu_mega > .child_menu,
  .global_menu .menu-item-has-children.mega-menu > .sub-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    padding: 24px 30px;
  }

  .global_menu > ul > li.menu:hover > .child_menu,
  .global_menu > ul > li.menu:focus-within > .child_menu,
  .global_menu .menu-item-has-children:hover > .sub-menu,
  .global_menu .menu-item-has-children:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
  }

  .child_menu > li > a,
  .global_menu .sub-menu a {
    font-size: 0.9em;
  }

  .child_menu > li > a:hover,
  .global_menu .sub-menu a:hover {
    background: var(--color_bg);
  }

  .child_menu a,
  .global_menu .sub-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--color_text);
  }

  .child_menu a:hover,
  .global_menu .sub-menu a:hover {
    opacity: 0.75;
    text-decoration: none;
  }

  .child_menu div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2%;
    width: 100%;
  }

  .child_menu div li {
    text-align: left;
    font-size: 14px;
    width: 30%;
  }

  .child_menu li i {
    padding-left: 7px;
  }

  .global_menu > ul > li.menu:hover > a,
  .global_menu .menu-item-has-children:hover > a {
    color: var(--color_accent);
  }

  .global_menu .sub-menu .sub-menu {
    position: static;
    transform: none;
    visibility: visible;
    opacity: 1;
    width: auto;
    padding: 0;
    background: transparent;
  }
}

.sns_link ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sns_link ul li {
  padding-right: 0.7em;
}

.sns_link ul a:hover {
  opacity: 0.7;
  transition: opacity var(--transition_base);
}

.header_sns.sns_link {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5em;
}

.header_sns.sns_link ul a,
.header_sns.sns_link ul a:hover {
  color: var(--color_text);
}

.btn_gotop {
  position: fixed;
  bottom: 70px;
  right: 2vw;
  z-index: var(--z_pagetop);
  font-size: 0.75em;
}

/* 見た目とクリック領域はaタグに持たせる（ボタン全体がタップ可能） */
.btn_gotop a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--color_surface_muted);
  border-radius: 50%;
  transition: background var(--transition_base);
}

.btn_gotop a:hover {
  background: var(--color_accent);
  color: var(--color_text_inverse);
  text-decoration: none;
}

.footer {
  margin-bottom: 0;
}

.footer .wrap {
  padding: 0;
  flex-wrap: wrap;
}

.footer .wrap p {
  padding: 8px 0;
}

.footer_inner {
  background-color: var(--color_brand_strong);
  color: var(--color_text_inverse);
}

.footer_inner .wrap {
  display: flex;
  justify-content: center;
  padding: 50px 0;
}

.footer_inner .fnav {
  padding: 0;
  width: 80%;
  margin: 1em auto 2em;
}

.fnav .fnav_blk,
.fnav .fnav_blk a,
.footer_bottom ul li a {
  color: var(--color_text_inverse);
  transition: opacity var(--transition_base);
  width: 100%;
}

.fnav .fnav_blk h4,
.fnav .fnav_blk .fnav_sp_blk li {
  padding: 0;
  border-bottom: 1px solid var(--color_accent_hover);
  margin-bottom: 0;
  font-weight: bold;
}

.fnav .fnav_blk li {
  margin-bottom: 3px;
  font-size: 14px;
}

.fnav .fnav_blk h4 a,
.fnav .fnav_blk .fnav_sp_blk a {
  padding: 1.2em 0;
  display: block;
  position: relative;
}

.fnav .fnav_blk h4 a i,
.fnav .fnav_blk .fnav_sp_blk a i {
  display: inline-block;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.footer_inner_cv .sns_link {
  margin: 20px 0;
}

.footer_inner_cv .sns_link ul {
  font-size: 2.5em;
  justify-content: center;
}

.footer_inner_cv .sns_link ul li {
  padding: 0 0.5em;
}

.footer_inner_cv .sns_link ul a,
.footer_inner_cv .sns_link ul a:hover {
  color: #fff;
}

.footer_inner_cv_btn {
  text-align: center;
}

.footer_inner_cv_btn .btn {
  margin: 10px 0;
}

.pay_blk {
  width: 65%;
  background: #fff;
  margin: 0 auto 2em;
  padding: 1.5em;
  color: var(--color_text);
}

.pay_blk dt {
  font-weight: bold;
}

.footer_bottom {
  padding: 50px 0 0;
  position: relative;
}

.footer_bottom::before,
.footer_bottom::after {
  display: block;
  content: "";
  position: absolute;
  top: 0;
  border-style: solid;
}

.footer_bottom::before {
  left: 0;
  border-width: 45px 50vw 0 0;
  border-color: var(--color_brand_strong) transparent transparent transparent;
}

.footer_bottom::after {
  right: 0;
  border-width: 0 50vw 45px 0;
  border-color: transparent var(--color_brand_strong) transparent transparent;
}

.sp_foot_btns {
  position: fixed;
  z-index: var(--z_sp_footer);
  bottom: 0;
  left: 0;
  width: 100%;
}

.sp_foot_btns ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp_foot_btns ul li {
  width: 50%;
}

.sp_foot_btns ul li a {
  display: block;
  height: 65px;
  border: 2px solid var(--color_bg);
  text-decoration: none;
}

.sp_foot_btns ul li:nth-of-type(1) a {
  background-color: var(--color_accent);
}

.sp_foot_btns ul li:nth-of-type(2) a {
  background-color: var(--color_btn);
}

.sp_foot_btns ul li:nth-of-type(3) a {
  background-color: var(--color_btn_sub);
}

.sp_foot_btns ul li a span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color_text_inverse);
  font-size: 80%;
  font-weight: 500;
}

.footer_bottom .wrap {
  padding: 2em 0 1em;
  text-align: center;
}

.footer_bottom p img {
  height: 75px;
}

.footer_bottom p.footer_copy {
  text-align: center;
  padding: 20px 10px;
  font-size: 80%;
  line-height: 1.4;
  margin: 0 auto;
}

.footer_copy {
  margin-top: 0.5em;
}

@media (min-width: 768px) {
  .footer {
    margin-bottom: 0;
  }

  .footer_inner .fnav {
    display: flex;
    justify-content: space-between;
    width: calc(100% - 40%);
  }

  .fnav .fnav_blk .fnav_sp_blk {
    display: none;
  }

  .fnav .fnav_blk ul {
    display: block;
  }

  .fnav .fnav_blk h4 {
    padding: 10px 0;
  }

  .fnav .fnav_blk h4,
  .fnav .fnav_blk .fnav_sp_blk li {
    border-bottom: none;
  }

  .fnav .fnav_blk h4 a,
  .fnav .fnav_blk .fnav_sp_blk a {
    padding: 0;
    display: inline-block;
    width: auto;
  }

  .fnav .fnav_blk h4 a i,
  .fnav .fnav_blk .fnav_sp_blk a i {
    display: none;
  }

  .footer_inner_cv {
    width: 30%;
  }

  .pay_blk {
    width: auto;
    margin-bottom: 2em;
  }
}

/* ========================================
   All-K：ヘッダー / フッター上書き
======================================== */

.header {
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header_main_inner {
  gap: clamp(12px, 1.5vw, 28px);
  padding-left: clamp(16px, 2vw, 28px);
  padding-right: calc(58px + clamp(12px, 2vw, 24px));
  min-height: var(--header_main_height);
}

.header_logo_blk {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--color_text);
}

.header_logo_blk:hover {
  text-decoration: none;
  opacity: 0.9;
}

.header_logo {
  display: block;
  line-height: 0;
}

.header_logo img,
.header_logo .custom-logo {
  width: 132px;
  max-width: 28vw;
  height: auto;
}

.header_brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.25;
}

.header_brand_ja {
  font-size: clamp(14px, 1.4vw, 24px);
  font-weight: 900;
  color: var(--color_text);
}

.header_brand_en {
  font-size: clamp(11px, 1vw, 16px);
  font-weight: 500;
  color: var(--color_text);
}

.header .header_actions {
  display: none;
}

.header .header_actions .btn_pill {
  /* width: 251px; */
  width: 220px;
}

.header .header_actions .btn_pill a {
  width: 100%;
  box-sizing: border-box;
  font-size: 18px;
}

/* body_wrap のヘッダーオフセットは 03_layout の --header_height に依存 */

.sp_dnav_btn {
  background-color: var(--color_btn);
}

.drawer_overlay {
  top: var(--header_main_height);
  height: calc(100% - var(--header_main_height));
}

.drawer_cv {
  padding: 20px;
}

.drawer_cv .btn_pill {
  width: 100%;
}

.drawer_cv .btn_pill a {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1280px) {
  .header_main_inner {
    padding-right: clamp(16px, 2vw, 28px);
  }

  .header .global_menu {
    display: flex;
    justify-content: flex-end;
  }

  .header .header_actions {
    display: flex;
  }

  .header .sp_dnav_btn {
    display: none;
  }

  .global_menu > ul {
    justify-content: flex-end;
    gap: 0;
  }

  .global_menu > ul > li > a {
    padding: 8px clamp(10px, 1vw, 16px);
    font-size: 18px;
    font-weight: 700;
    color: var(--color_text);
  }

  /* All-K：hoverメガメニュー（通常＋／hover −） */
  .global_menu > ul > li.menu > a,
  .global_menu > ul > li.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
  }

  .global_menu > ul > li.menu > a::after,
  .global_menu > ul > li.menu-item-has-children > a::after {
    content: "+";
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1;
    opacity: 0.85;
  }

  .global_menu > ul > li.menu:hover > a::after,
  .global_menu > ul > li.menu:focus-within > a::after,
  .global_menu > ul > li.menu-item-has-children:hover > a::after,
  .global_menu > ul > li.menu-item-has-children:focus-within > a::after {
    content: "−";
  }

  .global_menu > ul > li.menu > .child_menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    max-width: min(90vw, 360px);
    width: max-content;
    margin: 0;
    padding: 12px 0;
    list-style: none;
    background: var(--color_bg);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(13, 40, 86, 0.14);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: var(--z_modal);
    transition: opacity var(--transition_base), visibility var(--transition_base);
  }

  /* ホバー切れ防止の当たり判定 */
  .global_menu > ul > li.menu > .child_menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
  }

  .global_menu > ul > li.menu:hover > .child_menu,
  .global_menu > ul > li.menu:focus-within > .child_menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .global_menu > ul > li.menu:hover > a,
  .global_menu > ul > li.menu:focus-within > a {
    color: var(--color_btn);
  }

  .child_menu > li > a {
    display: block;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color_text);
    white-space: nowrap;
  }

  .child_menu > li > a:hover {
    background: var(--color_surface_muted);
    color: var(--color_btn);
    text-decoration: none;
    opacity: 1;
  }
}

@media (max-width: 1279px) {
  .header_main_inner {
    min-height: var(--header_height_sp);
  }

  .header_logo img,
  .header_logo .custom-logo {
    width: 85px;
  }

  .header_brand_ja {
    font-size: 14px;
  }

  .header_brand_en {
    font-size: 11px;
  }
}

/* Footer — 相談窓口Figma準拠（下線＋矢印） */
.footer {
  margin-bottom: 0;
  background: var(--color_brand_strong);
  color: var(--color_text_inverse);
}

.footer_inner {
  background: transparent;
  padding: clamp(48px, 6vw, 72px) 0 clamp(24px, 3vw, 40px);
}

.footer_inner .wrap,
.footer_grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(32px, 4vw, 64px);
  padding: 0;
  width: min(var(--container), calc(100% - clamp(32px, 8vw, 96px)));
  margin: 0 auto;
}

.footer_info {
  flex: 1 1 320px;
  max-width: 420px;
}

.footer_brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.footer_logo {
  display: block;
  line-height: 0;
}

.footer_logo img {
  width: 132px;
  height: auto;
}

.footer_company {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.5;
  color: var(--color_text_inverse);
}

.footer_address {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--color_text_inverse);
}

.footer_contact_btn {
  width: 245px;
  max-width: 100%;
}

.footer_contact_btn a {
  font-size: 16px;
  min-height: 57px;
}

.footer .fnav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 56px);
  width: auto;
  margin: 0;
  padding: 0;
}

.fnav_col {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 220px;
}

.fnav_col > li + li {
  margin-top: clamp(20px, 2.5vw, 28px);
}

.fnav_col a {
  display: inline-block;
  color: var(--color_text_inverse);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  transition: opacity var(--transition_base);
}

.fnav_col a:hover {
  opacity: 0.8;
  text-decoration: none;
  color: var(--color_text_inverse);
}

.fnav_child {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.fnav_child li + li {
  margin-top: 6px;
}

.fnav_child a {
  padding-left: 1.2em;
  font-weight: 500;
  font-size: 15px;
}

.fnav_child a::before {
  content: "—";
  margin-right: 0.4em;
  margin-left: -1.2em;
}

.footer_bottom {
  padding: 16px 0 32px;
  text-align: center;
  background: transparent;
}

.footer_copy {
  margin: 0;
  font-size: 14px;
  color: var(--color_text_inverse);
}

@media (max-width: 767px) {
  .footer {
    margin-bottom: 65px;
  }

  .footer_grid {
    flex-direction: column;
  }

  .footer_brand {
    flex-wrap: wrap;
  }

  .footer_logo img {
    width: 110px;
  }

  .footer .fnav {
    width: 100%;
    flex-direction: column;
    gap: clamp(20px, 4vw, 28px);
  }

  .fnav_col {
    width: 100%;
    min-width: 0;
  }
}

.sp_foot_btns {
  background: var(--color_brand_strong);
}

.sp_foot_btns a {
  background: var(--color_btn);
}
