:root {
  --fluid-basis-sp: (100vw - 320px) / (585 - 320);
}

button.drawer-sub__toggle:focus,
button.drawer-sub__toggle--sm:focus,
button.sp-header__menu:focus {
  outline: 0;
}

/* ===== ヘッダー ===== */
.sp-header {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1000;
  background: #f3f3f3;
  height: 60px;
}

.sp-header__inner {
  width: 100%;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 15px 19px;
}

.sp-header__logo {
  width: 130px;
}

.sp-header__logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sp-header__menu {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1578C1;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  height: 100%;
}

.sp-header__menu-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;

}

.sp-header__menu-text::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 8.5px solid transparent;
  border-right: 8.5px solid transparent;
  border-top: 8px solid #0e6fb3;
  transition: transform .2s ease;
}

.sp-header__menu[aria-expanded="true"] .sp-header__menu-text::after {
  transform: rotate(180deg);
}

.sub-header-spacer {
  height: 60px;
}

/* ===== ドロワー ===== */
.drawer.drawer--sub {
  position: fixed;
  inset: 0;
  top: 60px;
  z-index: 999;
  pointer-events: none;
}

.drawer--sub .drawer__body {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 30px 20px;
}

/* ドロワー状態 */
.drawer--sub.is-open {
  pointer-events: auto;
}

.drawer--sub.is-open .drawer__body {
  transform: none;
  opacity: 1;
}

/* スクロール固定 */
html.is-lock,
body.is-lock {
  overflow: hidden;
}

/* ===== メニュー本体 ===== */


/* トグルボタン - 第1階層 */
.drawer--sub .drawer-sub__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 20px + 10 * var(--fluid-basis-sp), 30px) clamp(16px, 16px + 4 * var(--fluid-basis-sp), 20px);
  border: 0;
  color: #666;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: clamp(13px, 13px + 7 * var(--fluid-basis-sp), 20px);
  font-weight: 700;
}


/* トグルボタン - 第2階層 */
.drawer--sub .drawer-sub__toggle--sm {
  background: #F1F9FF;
  color: #1578C1;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: clamp(12px, 12px + 6 * var(--fluid-basis-sp), 18px);
  font-weight: 700;
  padding: clamp(16px, 16px + 10 * var(--fluid-basis-sp), 26px) clamp(16px, 16px + 4 * var(--fluid-basis-sp), 20px);
  border: 0;
  width: 100%;
  transition: background-color .2s ease, color .2s ease;
}

/* 開いているトグルの強調表示 */
.drawer--sub .drawer-sub__toggle[aria-expanded="true"],
.drawer--sub .drawer-sub__toggle--sm[aria-expanded="true"] {
  background: #1578C1;
  color: #fff;
  transition: none;
  transition-delay: 0s;
}

/* リンクグループ */
.drawer--sub .drawer-sub__group .drawer-sub__links {
  position: relative;
  border-bottom: solid 1px #1578C1;
  background: #B5D9F3;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.drawer--sub .drawer-sub__links {
  background: #B5D9F3;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-bottom: 1px;
}

.drawer--sub .drawer-sub__group .drawer-sub__links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(10px, 10px + 10 * var(--fluid-basis-sp), 20px);
  height: 100%;
  background-color: #1578C1;
  z-index: 1;
}

/* リンクスタイル */
.drawer--sub .drawer-sub__link-alone {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr max-content;
  gap: 5px;
  padding: clamp(20px, 20px + 10 * var(--fluid-basis-sp), 30px) clamp(16px, 16px + 4 * var(--fluid-basis-sp), 20px);
  color: #666;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: clamp(13px, 13px + 7 * var(--fluid-basis-sp), 20px);
  font-weight: 700;
}

.drawer--sub .drawer-sub__link-alone {
  -webkit-tap-highlight-color: transparent;
}

.drawer--sub .drawer-sub__link-alone:focus {
  outline: none;
}

.drawer--sub .drawer-sub__link-alone--top {
  color: #1578C1;
}

.drawer--sub .drawer-sub__link-alone:active {
  background: #1578C1;
  color: #fff;
}

.drawer--sub .drawer-sub__link-alone:active .drawer-sub__link-alone-arrow {
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

.drawer--sub .drawer-sub__link-alone-arrow {
  display: inline-block;
  width: clamp(8px, 8px + 1 * var(--fluid-basis-sp), 9px);
  height: clamp(8px, 8px + 1 * var(--fluid-basis-sp), 9px);
  border-top: 2px solid #999;
  border-right: 2px solid #999;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: left;
  transition: .2s ease;
}

.drawer--sub .drawer-sub__link-item .drawer-sub__link,
.drawer--sub .drawer-sub__link {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr max-content;
  gap: 5px;
  padding: clamp(16px, 16px + 10 * var(--fluid-basis-sp), 26px) clamp(16px, 16px + 4 * var(--fluid-basis-sp), 20px);
  color: #1578C1;
  font-family: "Noto Sans JP", Meiryo, sans-serif;
  font-size: clamp(12px, 12px + 6 * var(--fluid-basis-sp), 18px);
  font-weight: 700;
  background: #F1F9FF;
}



.drawer--sub .drawer-sub__link-item .drawer-sub__link:active {
  background: #1578C1;
  color: #fff;
}

.drawer--sub .drawer-sub__link-item .drawer-sub__link:active .drawer-sub__link-alone-arrow {
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}


/* アコーディオンパネル */
.drawer--sub .drawer-sub__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height .2s ease;
}

.drawer--sub .drawer-sub__section {
  border-bottom: 1px solid #E9E9E9;
}

.drawer--sub .drawer-sub__inner {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #B5D9F3;
  padding-bottom: 1px;
}

.drawer--sub .drawer-sub__panel.is-open {
  max-height: 1200px;
  transition: max-height .7s ease;
}

.drawer--sub .drawer-sub__group .drawer-sub__panel.is-open {
  max-height: 400px;
}

/* アイコン（＋／－） */
.drawer--sub .drawer-sub__icon {
  width: clamp(12px, 12px + 2 * var(--fluid-basis-sp), 14px);
  height: 1px;
  background: #1578C1;
  position: relative;
  transition: background .2s ease;
}

.drawer--sub .drawer-sub__icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: clamp(12px, 12px + 2 * var(--fluid-basis-sp), 14px);
  background: #1578C1;
  transform-origin: top;
  transition: background .2s ease, transform .2s ease, rotate .2s ease;
}

.drawer--sub .drawer-sub__toggle[aria-expanded="true"] .drawer-sub__icon {
  background: #fff;
}

.drawer--sub .drawer-sub__toggle[aria-expanded="true"] .drawer-sub__icon::before,
.drawer--sub .drawer-sub__toggle--sm[aria-expanded="true"] .drawer-sub__icon::before {
  rotate: 90deg;
  background: #fff;
}

.drawer--sub .drawer-sub__panel.is-open .drawer-sub__links {
  padding-bottom: 0;
}

/* フローティングボタン */
.footer-floating-btn {
  position: fixed;
  bottom: 10px;
  left: 50%;
  translate: -50% 0;
  z-index: 100;
  width: 100%;
}

.footer-floating-btn-link {
  display: block;
  width: 90%;
  margin: 0 auto;
  background: #ffc300;
  box-shadow: 0 1.6666666667vw 3vw rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #192166;
  font-size: clamp(20px, 20px + 14 * var(--fluid-basis-sp), 34px);
  font-weight: bold;
  border-radius: 5px;
  position: relative;
  overflow: hidden;
  z-index: 2;
  padding-block: 13px;
}

.footer-floating-btn-link::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 3.3333333333vw;
  width: 0;
  height: 0;
  border-style: solid;
  border-top: 1.6666666667vw solid transparent;
  border-bottom: 1.6666666667vw solid transparent;
  border-left: 2.2666666667vw solid #192166;
  border-right: 0;
}

.footer-floating-btn-link::before {
  width: 200%;
  height: 100%;
  background-image: linear-gradient(to right, #ffc300, #ffdc6c 38%, #fff3ce 57%, #ffe07d 74%, #ffc300);
  z-index: 0;
  animation: bggradient 2.5s ease infinite;
  transition: all 0.2s ease;
  content: "";
  display: block;
  position: absolute;
  z-index: -1;
}

@keyframes bggradient {
  0% {
    left: -200%;
  }

  100% {
    left: 100%;
  }
}

/* ===============================================
# ヘッダーナビゲーションのスクロール表示/非表示
=============================================== */

@media (max-width: 767px) {
  #header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10005;
    background: #fff;
  }

  .row-2 {
    position: fixed;
    top: 66px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 99;
    background: #fff;
    transition: transform 0.3s ease-in-out !important;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    padding: 1px 10px;
  }

  .row-2.js-header-row-2.header-row-2-hidden {
    transform: translateY(-100%) !important;
  }

  .header-spacer.header-spacer--sp {
    height: calc(66px + 14vw);
  }
}

/* ===============================================
# トップページリニューアル：2026/02
=============================================== */

/* fv */
.FV--renewal .FV__inner {
  background: url(/images/sp/FV/FV-bg.webp) no-repeat center 7% / cover;
  position: relative;
  height: 100%;
  padding: 20px 20px 0 20px;
}

.sp-fv-section {
  position: relative;
  width: 100%;
  background-image: url("https://www.mizu-tech.co.jp/images/pc/FV/fv.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 20px 20px 0 20px;
  display: flex;
  flex-direction: column;
}

.sp-fv-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.sp-fv-title {
  color: #1976d2;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 20px;
}

.FV .FV__top .sp-fv-title .highlight {
  color: #1976d2;
  display: inline;
  margin-inline: 0;
}

.sp-fv-satisfaction {
  width: 100%;
  max-width: 340px;
  margin-bottom: 10px;
}

.sp-fv-satisfaction img {
  width: 100%;
  height: auto;
  display: block;
}

.sp-fv-subtitle {
  color: #000;
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 20px;
}

.sp-fv-content-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.sp-fv-buttons {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2;
  position: relative;
  padding-right: 20px;
  margin-bottom: 16px;
}

.sp-fv-btn {
  width: 75%;
  text-decoration: none;
  display: block;
}

.sp-fv-btn img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.sp-fv-btn:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.sp-fv-character {
  position: absolute;
  right: -36px;
  bottom: 0;
  width: 162px;
  z-index: 1;
}

.sp-fv-character img {
  width: 100%;
  height: auto;
  display: block;
}

/* カテゴリヘッダー */

.sp-category-header {
  text-align: center;
  padding: 20px 15px 30px 15px;
  background: #ffffff;
}

.sp-category-header-title {
  color: #000;
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.sp-category-header-title .highlight {
  font-size: 36px;
  color: #f88435;
  font-weight: 900;
}

.sp-category-header-description {
  color: #000;
  text-align: center;
  font-family: "Noto Sans JP";
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  margin-top: 20px;
}

/* ===============================================
# グローバルメニュー（SP）
=============================================== */
@media screen and (max-width: 767px) {
  nav.pnav {
    padding: 0 16px;
  }

  nav.pnav .pnav-group {
    position: relative;
    border-top: 2px solid #0374D2;
    padding: 22px 0 10px;
    margin-top: 18px;
  }
  nav.pnav .pnav-group:first-child {
    margin-top: 22px;
  }

  nav.pnav .pnav-group-title {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0 16px;
    background: #FFFFFF;
    color: #0374D2;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.448;
    white-space: nowrap;
  }

  nav.pnav .pnav-group ul.pnav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 14px 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  nav.pnav .pnav-group ul.pnav-list::before,
  nav.pnav .pnav-group ul.pnav-list::after {
    content: none;
    display: none;
  }

  nav.pnav .pnav-group ul.pnav-list li {
    width: 25%;
    margin: 0;
    padding: 0;
    border: none;
    list-style: none;
  }
  nav.pnav .pnav-group ul.pnav-list li::before {
    content: none;
  }

  nav.pnav .pnav-group ul.pnav-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    color: #000;
    padding: 0;
    font-size: 9.5px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-decoration: none;
  }

  nav.pnav .pnav-group ul.pnav-list li a img {
    display: block;
    width: 80px;
    height: 50px;
    margin: 0 auto 4px;
    object-fit: contain;
  }

  nav.pnav .pnav-group:has(ul.pnav-list > li:nth-child(5)) ul.pnav-list li {
    width: 20%;
  }
  nav.pnav .pnav-group:has(ul.pnav-list > li:nth-child(5)) ul.pnav-list li a img {
    width: 60px;
    height: 43px;
  }
}

