* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;

  overflow-x: hidden;
  overflow-y: auto;

  background-color: #ffffff;
}

/*
 * スライドショー全体
 */
.slideshow {
  display: flex;
  flex-direction: column;

  width: 100%;

  gap: 16px;
  background-color: #ffffff;
}

/*
 * 各スライド
 */
.slide {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

/* 全ページを白背景に統一 */
.slide:first-child {
  background-color: #ffffff;
}

/* 2枚目以降は白背景 */
.slide:not(:first-child) {
  background-color: #ffffff;
}

/* スマートフォン専用の分割ページはPCでは非表示 */
.mobile-slide {
  display: none;
}

/*
 * スライド画像
 */
.slide picture {
  display: block;

  width: 100vw;
  height: 100vh;
}

.slide img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;

  pointer-events: none;
}

.slide > img {
  width: 100vw;
  height: 100vh;
}

/* 6ページ目：支給SVGパーツを元レイアウトの座標で配置 */
.final-slide {
  display: block;

  width: 100vw;
  height: 100vh;
}

.final-slide a:focus-visible {
  outline: none;
}

.final-slide a,
.final-slide a image {
  cursor: pointer;
  pointer-events: bounding-box;
}

.mobile-contact-composition {
  position: relative;
}

.mobile-inline-contact {
  display: block;
  position: absolute;
  left: 26.88%;
  top: 87.89%;

  width: 44.29%;
  height: auto;
  aspect-ratio: 351 / 79;

  border-radius: 999px;
  box-shadow: 0 5px 9px rgba(0, 0, 0, 0.22);
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.mobile-inline-contact:hover {
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.26);
  transform: translateY(-3px) scale(1.015);
}

.mobile-inline-contact:active {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transform: translateY(1px) scale(0.98);
}

.mobile-inline-contact:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.7);
  outline-offset: 4px;
}

/* 右下のページ番号上に置く概要テキストボタン */
.floating-textinfo {
  position: fixed;

  right: 24px;
  bottom: 20px;

  z-index: 100;

  display: block;

  width: 50px;
  height: auto;
  padding: 0;

  border: 0;
  background: transparent;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.floating-textinfo:hover {
  opacity: 0.82;
  transform: translateY(-4px);
}

.floating-textinfo:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.7);
  outline-offset: 5px;
}

.floating-textinfo img {
  display: block;

  width: 100%;
  height: auto;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* 概要テキストウィンドウ */
body.text-info-open {
  overflow: hidden;
}

.text-info-modal {
  position: fixed;
  inset: 0;

  z-index: 300;
}

.text-info-backdrop {
  position: absolute;
  inset: 0;

  background-color: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.text-info-window {
  position: absolute;

  left: 50%;
  top: 50%;

  width: min(760px, calc(100vw - 48px));
  max-height: min(76vh, 720px);
  padding: 42px 48px 44px;

  overflow-y: auto;

  border-radius: 2px;
  background-color: #ffffff;
  color: #1d1d1d;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.24);

  transform: translate(-50%, -50%);
}

.text-info-close {
  position: absolute;

  right: 18px;
  top: 14px;

  width: 40px;
  height: 40px;
  padding: 0;

  border: 0;
  background: transparent;
  color: #1d1d1d;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
}

.text-info-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.text-info-article h1,
.text-info-article h2,
.text-info-article h3 {
  margin: 0 0 22px;

  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.text-info-article h3 {
  margin-top: 30px;
  margin-bottom: 10px;

  font-size: 19px;
  line-height: 1.65;
}

.text-info-lead,
.text-info-step {
  font-weight: 700;
}

.text-info-step {
  margin-top: 34px !important;

  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0.12em !important;
}

.text-info-voice {
  margin-top: 28px;
  padding-top: 2px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
}

.text-info-voice blockquote {
  margin: 0;

  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-size: 15px;
  line-height: 1.9;
}

.text-info-article a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.text-info-article p {
  margin: 0;

  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    sans-serif;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.03em;
}

.text-info-article p + p {
  margin-top: 14px;
}

/* 右上のフローティングコンタクトボタン */
.floating-contact {
  position: fixed;

  right: 24px;
  top: 24px;

  z-index: 100;

  display: block;

  width: 150px;
  height: auto;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);

  transition:
    transform 0.25s ease,
    opacity 0.4s ease,
    visibility 0s linear 0.4s;
}

/* 2ページ目以降でふわっと表示 */
.floating-contact.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);

  transition:
    transform 0.4s ease,
    opacity 0.4s ease,
    visibility 0s linear 0s;
}

/*
 * マウスを乗せたとき
 */
.floating-contact.is-visible:hover {
  opacity: 0.82;

  transform: translateY(-4px);
}

/*
 * キーボード操作時
 */
.floating-contact:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.7);
  outline-offset: 5px;
}

/*
 * コンタクトボタン画像
 */
.floating-contact img {
  display: block;

  width: 100%;
  height: auto;

  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* 1ページ目とPC版6ページ目に表示するお問い合わせボタン */
.floating-page-contact {
  position: fixed;
  left: 24px;
  bottom: 24px;

  z-index: 100;

  display: block;
  width: 161.28px;
  height: auto;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.2));
  transform: translateY(8px);

  transition:
    filter 0.2s ease,
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0.3s;
}

body.is-first-page .floating-page-contact {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);

  transition:
    filter 0.2s ease,
    opacity 0.3s ease,
    transform 0.3s ease,
    visibility 0s linear 0s;
}

body.is-first-page .floating-page-contact:hover,
body.is-last-page .floating-page-contact:hover {
  filter: drop-shadow(0 7px 9px rgba(0, 0, 0, 0.24));
  transform: translateY(-4px) scale(1.015);
}

body.is-first-page .floating-page-contact:active,
body.is-last-page .floating-page-contact:active {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
  transform: translateY(1px) scale(0.98);
}

.floating-page-contact:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.7);
  outline-offset: 5px;
}

.floating-page-contact img,
.mobile-inline-contact img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.final-content-slide {
  position: relative;
}

.site-copyright {
  position: absolute;
  left: 50%;
  bottom: 8px;

  z-index: 5;

  margin: 0;
  color: #999999;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;

  transform: translateX(-50%);
}

@media (min-width: 768px) {
  body.is-first-page .floating-page-contact {
    width: 161.28px;
  }

  body.is-last-page .floating-page-contact {
    width: 161.28px;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);

    transition:
      filter 0.2s ease,
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0s linear 0s;
  }
}

/*
 * 縦長のスマートフォン
 */
@media
  (max-width: 767px)
  and (orientation: portrait) {

  .slideshow {
    gap: 0;
  }

  .slide picture {
    width: 100vw;
    height: 100svh;
  }

  .desktop-slide {
    display: none;
  }

  .mobile-slide {
    display: flex;
  }

  .mobile-contact-composition {
    width: min(100vw, calc(100svh * 1585 / 2701));
    height: auto;
    aspect-ratio: 1585 / 2701;
  }

  .mobile-contact-composition > img {
    width: 100%;
    height: 100%;
  }

  .slide > img,
  .final-slide-mobile {
    width: 100vw;
    height: 100svh;
  }

  /* 高さを半分にした最終ページは、支給データの縦横比で表示 */
  .mobile-slide-short {
    min-height: 0;
    height: auto;
  }

  .mobile-slide-short .final-slide-mobile {
    width: 100vw;
    height: auto;
    aspect-ratio: 1585 / 1351;
  }

  .floating-contact {
    right: 14px;
    top: 14px;

    width: 120px;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .floating-textinfo {
    right: 16px;
    bottom: 14px;

    width: 50px;
    height: auto;
  }

  .floating-page-contact {
    left: 14px;
    bottom: 14px;

    width: 150px;
  }

  .site-copyright {
    bottom: 8px;
    font-size: 9px;
  }

  .text-info-window {
    width: calc(100vw - 28px);
    max-height: calc(100svh - 56px);
    padding: 36px 24px 30px;
  }

  .text-info-close {
    right: 10px;
    top: 9px;
  }

  .text-info-article p {
    font-size: 15px;
    line-height: 1.85;
  }

}

/*
 * 小さめのスマートフォン
 */
@media
  (max-width: 400px)
  and (orientation: portrait) {

  .floating-contact {
    width: 105px;
  }
}

/*
 * アニメーションを減らす設定の端末
 */
@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  body {
    background-color: #ffffff;
  }

  .floating-contact {
    transition: none;
  }

  .floating-textinfo {
    transition: none;
  }

  .floating-page-contact,
  .mobile-inline-contact {
    transition: none;
  }
}
