@charset "utf-8";
/*
  Version: 1.14.0
  Date: 2026-03-22
  Description: [レイアウト最適化] 404 ページのレイアウトを Figma の Inspect 数値に合わせて最適化。
  Note: 静的版（/404/css/style.css）からの取り込み。
        Laravel 移植にあたり画像参照を /assets/error/img/ に変更。
*/

:root {
  --yh-navy: #112240;
  --yh-yellow: #F8E133;
  --yh-soft-yellow: #EABF4B;
  --yh-profile-bg: #F1E2B0;
  --yh-beige: #e8daaa;
  --yh-black: #000000;
}

#page_404 .u-sp_hidden {
  display: none;
}

#page_404 .u-pc_hidden {
  display: block;
}

@media (min-width: 768px) {
  #page_404 .u-sp_hidden {
    display: block;
  }

  #page_404 .u-pc_hidden {
    display: none;
  }
}

/* p-error_hero (メインエリア)
--------------------------------------------------*/
#page_404 .p-error_hero {
  position: relative;
  background-color: #EABF4B;
  padding: 11.1vw 0 11.8vw;
  text-align: center;
  aspect-ratio: 1440 / 804;
}

#page_404 .p-error_hero .l-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 10;
  /* テキスト層は必ず波より上に */
}

/* --- 背景SVG用コンテナ --- */
#page_404 .p-error_hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#page_404 .p-error_hero__bg svg {
  position: absolute;
  display: block;
}

#page_404 .p-error_hero__bg .bg-sp {
  display: none;
}

/* 共通設定：すべての背景図形に適用 */
#page_404 [class^="bg-"] {
  position: absolute;
  height: auto;
}

/* --- PC: Default Styles --- */
#page_404 .bg-blob-top-right {
  top: -5vw;
  right: 7.89vw;
  width: 24.13vw;
  z-index: 1;
}

#page_404 .bg-wave-top-yellow {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 2;
}

#page_404 .bg-shape-green {
  bottom: 7vw;
  left: 0;
  width: 8.19vw;
  z-index: 2;
}

#page_404 .bg-shape-yellow {
  bottom: -11.04vw;
  left: -17.63vw;
  width: 59.59vw;
  z-index: 1;
  transform: rotate(4.62deg);
}

#page_404 .bg-wave-bottom {
  bottom: -3vw;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 4;
}

/* キャラクター画像 */
#page_404 .p-error_hero__deco {
  position: absolute;
  bottom: 4.73vw;
  left: 7.63vw;
  z-index: 1;
  width: 8.85vw;
}

#page_404 .p-error_hero__deco img {
  width: 100%;
  height: auto;
}

/* --- Tablet: max-width: 960px --- */
@media (max-width: 768px) {
  #page_404 .p-error_hero {
    padding: 24.53vw 0 47.73vw;
    aspect-ratio: 375 / 718;
  }
  #page_404 .p-error_hero__bg .bg-pc {
    display: none;
  }
  #page_404 .p-error_hero__bg .bg-sp {
    display: block;
  }
  #page_404 .bg-blob-top-right {
    top: -2.46vw;
    right: 6vw;
    width: 33.69vw;
    transform: rotate(-6.85deg);
  }

  #page_404 .bg-shape-green {
    width: 20.8vw;
    bottom: 15.13vw;
  }

  #page_404 .bg-shape-yellow {
    width: 41.57vw;
    bottom: 9vw;
    left: -8.8vw;
  }

  #page_404 .bg-wave-bottom {
    width: 101vw;
  }

  #page_404 .p-error_hero__deco {
    bottom: 14.88vw;
    left: 2.4vw;
    width: 22.24vw;
  }
}

/* テキスト */
#page_404 .p-error_hero__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #000000;
}

#page_404 .p-error_hero__num {
  font-size: 96px;
  font-weight: 700;
  line-height: 1;
}

#page_404 .p-error_hero__text {
  font-size: 48px;
  font-weight: 700;
}

#page_404 .p-error_hero__desc {
  font-size: 20px;
  font-weight: 700;
  line-height: 2;
  color: #000000;
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#page_404 .p-error_hero__desc .u-sp_hidden {
  display: inline-block;
}


#page_404 .p-error_hero__btn {
  margin-top: 64px;
}

@media (max-width:1100px) and (min-width: 769px) {
  #page_404 .p-error_hero__num {
    font-size: 6.66vw;
  }

  #page_404 .p-error_hero__text {
    font-size: 3.33vw;
  }

  #page_404 .p-error_hero__desc {
    margin-top: 4.44vw;
    font-size: clamp(16px, 1.25vw, 20px);
  }

  #page_404 .p-error_hero__btn {
    margin-top: 4.44vw;
  }
}

@media (max-width: 768px) {
  #page_404 .p-error_hero__num {
    font-size: 96px;
  }

  #page_404 .p-error_hero__text {
    font-size: 36px;
    margin-top: 0;
  }

  #page_404 .p-error_hero__desc {
    font-size: 18px;
    margin-top: 32px;
    line-height: 1.8;
    display: flex;
    gap: 16px;
  }

  #page_404 .p-error_hero__btn {
    margin-top: 48px;
  }

}

/* ボタン共通化 (矢印付き)
--------------------------------------------------*/
#page_404 .c-btn_primary {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 280px;
  padding: 15px 20px;
  max-width: 100%;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: opacity 0.3s ease;
  background-color: transparent;
  border: 4px solid var(--yh-navy);
  color: var(--yh-navy);
  line-height: 1.375;
  transition: all 0.3s ease;
}

#page_404 .c-btn_primary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--yh-navy);
  border-right: 2px solid var(--yh-navy);
  transition: all 0.3s ease;
}

#page_404 .c-btn_primary:hover {
  background-color: var(--yh-navy);
  color: var(--yh-yellow);
}

#page_404 .c-btn_primary:hover::after {
  border-top: 2px solid var(--yh-yellow);
  border-right: 2px solid var(--yh-yellow);
}



/* footer調整
--------------------------------------------------*/
footer {
  z-index: 2;
}

@media (max-width: 768px) {
  footer {
    margin-top: -26px;
  }
}


/*
===== Customization ===========================*/
#company_message .p-message_hero_text p {
  font-weight: 500;
  opacity: 1;
}

#company_message .p-message_profile_bg {
  background: #F1E2B0;
}

#company_message .p-message_books h2 {
  font-weight: 700;
}

#company_message .p-message_gallery_item img {
  border-radius: 10px;
}

#company_message .p-message_books_text h3 span {
  display: inline;
  font-weight: 500;
}

@media (max-width: 768px) {
  #company_message .p-message_hero_text p {
    font-size: 14px;
    font-weight: 500;
    opacity: 1;
    line-height: 1.6;
  }

  #company_message .p-message_gallery_item img {
    border-radius: 6px;
  }
}


/*
===== Customization ===========================*/
#page_404 .p-error_hero {
  background:
    url(/assets/error/img/bg_01.png) no-repeat 50% 0,
    url(/assets/error/img/bg_02.png) no-repeat 50% 100%;
  background-color: #EABF4B;
  background-size: 100% auto, 100% auto;
}

#page_404 .p-error_hero__title {
  padding-top: calc((188 / 1440) * 100%);
}

#page_404 .c-nav_03 {
  margin-top: 64px;
  padding-bottom: calc((170 / 1440) * 100%);
}

#page_404 footer {
  padding-top: calc((48 / 1440) * 100%);
  background-color: #F1E2B0;
}

@media (max-width: 768px) {
  #page_404 .p-error_hero {
    padding: 0 !important;
    background:
      url(/assets/error/img/bg_01_sp.png) no-repeat 50% 0,
      url(/assets/error/img/bg_02_sp.png) no-repeat 50% 100%;
    background-color: #EABF4B;
    background-size: 100% auto, 100% auto;
  }

  #page_404 .p-error_hero__title {
    padding-top: calc((104 / 375) * 100%);
  }

  #page_404 .c-nav_03 {
    margin-top: 48px;
    padding-bottom: calc((180 / 375) * 100%);
  }

  #page_404 footer {
    padding-top: calc((12 / 375) * 100%);
  }
}
