/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  /* ハイフン付きの正確なプロパティ名に修正 */
}

/* ==========================================
   全体の基本設定
========================================== */
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  /* overflow: hidden; ← これを削除（画面のスクロールを許可） */
}

/* ==========================================
   オープニング画面
========================================== */
#opening {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 1s ease,
    visibility 1s ease;
}

/* ==========================================
   ロゴ全体
========================================== */
.logo_container {
  position: relative;
  width: 30rem;
  height: 30rem;
  animation: bounce 0.8s ease-in-out infinite alternate;
  transition:
    transform 1s ease,
    opacity 1s ease;
}

.logo_image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 2;
  opacity: 0.85;
}

/* =========================================================
   中央の緑のリンゴ：瞬きする目
======================================================== */
.blink_eye_left,
.blink_eye_right {
  position: absolute;
  width: 2rem;
  height: 2rem;
  background-color: #1ca63d;
  border-radius: 50%;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-origin: center;
  animation: animeBlink_center 3.5s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.blink_eye_left::after,
.blink_eye_right::after {
  content: "";
  display: block;
  width: 1.2rem;
  height: 0.5rem;
  border-top: 0.35rem solid #ffffff;
  border-radius: 0.2rem;
}

.blink_eye_left {
  top: 21.6rem;
  left: 12.5rem;
}

.blink_eye_right {
  top: 21.6rem;
  left: 14.6rem;
}

@keyframes animeBlink_center {

  0%,
  25%,
  65%,
  100% {
    opacity: 0;
    transform: scaleY(0);
  }

  30% {
    opacity: 1;
    transform: scaleY(1.2);
  }

  35% {
    opacity: 0;
    transform: scaleY(0);
  }
}

/* ==========================================
   リンゴの周りを回転するツール群
========================================== */
.orbit_container {
  position: absolute;
  top: -7rem;
  left: -1.5rem;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  animation: spin 12s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.tool_item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10rem;
  height: 10rem;
  margin-top: -1.75rem;
  margin-left: -1.75rem;
}

.tool_item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: counterSpin 12s linear infinite;
}

@keyframes counterSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

/* ツールの円の大きさ。translate(300px)←数字の微調整。 */
.tool_item.t1 {
  transform: rotate(0deg) translate(300px) rotate(0deg);
}

.tool_item.t2 {
  transform: rotate(45deg) translate(300px) rotate(-45deg);
}

.tool_item.t3 {
  transform: rotate(90deg) translate(300px) rotate(-90deg);
}

.tool_item.t4 {
  transform: rotate(135deg) translate(300px) rotate(-135deg);
}

.tool_item.t5 {
  transform: rotate(180deg) translate(300px) rotate(-180deg);
}

.tool_item.t6 {
  transform: rotate(225deg) translate(300px) rotate(-225deg);
}

.tool_item.t7 {
  transform: rotate(270deg) translate(300px) rotate(-270deg);
}

.tool_item.t8 {
  transform: rotate(315deg) translate(300px) rotate(-315deg);
}

/* =========================================================
   バウンドアニメーション
========================================================= */
@keyframes bounce {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-20px);
  }
}

/* =========================================================
   プログレスバー ＆ 歩くテキスト
========================================================= */
.progress_area {
  position: relative;
  width: 20rem;
  margin-top: 4rem;
  z-index: 10;
  font-family: "M PLUS Rounded 1c", sans-serif;
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  opacity: 0.85;
}

.walking_text_wrapper {
  position: absolute;
  top: -2.6rem;
  left: 0%;
  transform: translateX(-100%);
  display: flex;
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.03s linear;
}

.walk_char {
  font-size: 1.6rem;
  font-weight: 900;
  color: #1ca63d;
  display: inline-block;
  animation: walkBounce 0.4s ease-in-out infinite alternate;
}

.walk_char.c1 {
  animation-delay: 0s;
}

.walk_char.c2 {
  animation-delay: 0.1s;
}

.walk_char.c3 {
  animation-delay: 0.2s;
}

.walk_char.c4 {
  animation-delay: 0.3s;
}

@keyframes walkBounce {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-5px);
  }
}

.progress_bar_outer {
  width: 100%;
  height: 1rem;
  background-color: #e8f7ed;
  border-radius: 1rem;
  overflow: hidden;
}

.progress_bar_inner {
  height: 100%;
  width: 0%;
  background-color: #1ca63d;
  border-radius: 1rem;
  transition: width 0.03s linear;
}

/* =========================================================
   画面いっぱいに広がって消えるアニメーション
========================================== */
@keyframes suckUp {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  40% {
    opacity: 0.3;
  }

  100% {
    transform: scale(3.5);
    opacity: 0;
  }
}

.logo_container.suck_up {
  animation: suckUp 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.orbit_container.suck_up {
  animation: suckUp 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.progress_area.fade_out {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* オープニング終了時の非表示処理 */
#opening.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* 透明な膜がクリックを邪魔しないようにする */
  display: none;
  /* 完全要素消去 */
}

/* ===== 中央：ヘッダーカード ===== */
.l_header {
  padding-top: 2.4rem;
  font-family: "M PLUS Rounded 1c", sans-serif;
}

.l_header_inner {
  max-width: 52.6rem;

  margin: 0 auto;

  position: relative;
  z-index: 10;
  /* 画像より前 */
}

.header_card {
  position: relative;
  background-color: #fff;
  border-radius: 4rem 4rem 0 0;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.08);
  padding: 5rem 1.8rem 6rem;
}

.header_card_row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.header_access {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  color: #7a6a5c;
  text-decoration: none;
  /* margin-top: 2rem; */
}

.header_access_icon {
  display: flex;
  color: #7a6a5c;
}

/*  アイコン（SVGピンマーク）を大きくする */
.header_access_icon svg {
  width: 4.5rem;
  /* 元は20px */
  height: 4.5rem;
  /* 元は20px */
}

.header_access_text {
  /* margin-top: 0.2rem; */
  font-size: 1.8rem;
  letter-spacing: 0.05em;
}

.header_title {
  flex: 1.5;
  text-align: center;
  /* padding: 0 0.8rem; */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.header_title_jp {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7a6a5c;
  white-space: nowrap;
  text-align: center;
}

.header_title_logo {
  width: 100%;
  height: auto;
}

.header_menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #7a6a5c;
}

.header_menu_icon {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  /* margin-top: 2.4rem; */
}

.header_menu_icon span {
  display: block;
  width: 3.2rem;
  height: 0.2rem;
  background-color: #7a6a5c;
  margin-top: 0.5rem;
}

/* 2本目の棒（アイコン）を短く指定 */
.header_menu_icon span:last-child {
  width: 2.4rem;
  /* 1本目(22px)より短く指定 */
  margin-left: auto;
  /* 右揃えに */
}

.header_menu_text {
  margin-top: 1.7rem;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}

.header_card_logo {
  position: absolute;
  left: 50%;
  bottom: -3rem;
  transform: translateX(-50%);
  width: 13rem;
  height: auto;
  z-index: 2;
}

/* ============================================
   白い半円＋リンゴロゴ
============================================ */

.header_card::after {
  content: "";
  position: absolute;

  left: 50%;
  bottom: -6rem;

  transform: translateX(-50%);

  width: 15rem;
  height: 7.6rem;

  background-color: #fff;

  border-radius: 0 0 7.5rem 7.5rem;

  z-index: 1;
}

.header_card_logo {
  position: absolute;

  left: 50%;
  bottom: -4.5rem;

  transform: translateX(-50%);

  width: 8.8rem;
  height: auto;

  z-index: 2;
}

/* =========================
   ハンバーガーメニュー
========================= */

.l_nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background-color: #ffca83;
  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  padding: 2.4rem 0;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;

  overflow: hidden;
}

.l_nav.is_open {
  opacity: 1;
  visibility: visible;
}

.l_nav_inner {
  position: relative;
  width: 100%;
  max-width: 52.6rem;
  height: 100%;
  max-height: 100vh;

  background-color: #ffffff;
  /* 白色のカード背景 */
  padding: 6rem 2.4rem 4rem;
  /* 上下に適切な余白を作る */
  margin: 0 auto;

  padding: 7rem 3rem 3rem;
  overflow-y: auto;
  border-radius: 4rem;

  /* overflow-y: auto; */
}

/* 閉じるボタン */
.l_nav_close {
  position: absolute;
  top: 5rem;
  right: 3rem;

  width: 4.8rem;
  height: 4.8rem;

  padding: 0;
  border: 0;
  background: none;

  cursor: pointer;
}

.l_nav_close span {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 4rem;
  height: 0.1rem;

  background-color: #4a4a4a;
}

.l_nav_close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.l_nav_close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* 6行メニュー */
.l_nav_list {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;

  list-style: none;
}

.l_nav_item {
  width: 100%;
  /* border-bottom: 1px solid #ddd; */

  /* <a>タグがない要素も中央配置にする */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  padding: 0 2rem;

  min-height: 0;
  /* 高さが小さくなっても固定高さを無理に保持しない */
}

/* .l_nav_item:first-child {
  border-top: 1px solid #ddd;
} */

.l_nav_item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  /* min-height: 80px; */

  padding: 1.5rem 1rem;

  color: #4a4a4a;
  text-decoration: none;
}

.l_nav_jp {
  font-size: 2.4rem;
  font-weight: bold;
  color: #777;
  font-family: "M PLUS Rounded 1c", sans-serif;
}

.l_nav_imge {
  width: 28.3rem;
  height: 4.9rem;
  margin-top: 1.5rem;
}

.l_nav_item a:hover {
  background-color: #fce0c4;
}

/* ナビ開閉時に背景のスクロールを止める */
body.is_nav_open {
  overflow: hidden;

  height: 100vh;
  touch-action: none;
}

@media screen and (max-width: 526px) {
  .l_header_inner {
    max-width: 100%;
    width: 100%;

    box-sizing: border-box;
  }

  .l_header {
    padding-top: 0;
  }

  .header_card {
    border-radius: 0;
    padding: 4rem 1.2rem 3rem;
    /* カード内の左右パディングを少し狭く調整 */
  }

  /* 左右の要素（アクセス、ロゴ、メニュー）のバランス調整 */
  .header_title {
    gap: 3.5rem;
    /* gapが30pxだと広すぎるため狭くする */
    padding: 0 0.4rem;
  }

  /* キャッチコピーの文字サイズ調整 */
  .header_title_jp {
    white-space: nowrap;
  }

  /* ロゴ画像の幅を可変にしてはみ出しを防ぐ */
  .header_title_logo {
    width: 100%;
    max-width: 35rem;
    /* 526px時より最大幅を少し小さく調整 */
    height: auto;
  }

  /* アクセスボタンやメニューボタンの文字・余白調整 */
  .header_access_text {
    font-size: 1.6rem;
  }

  .header_menu_text {
    font-size: 1.6rem;
    /* margin-left: 2rem; */
  }

  .header_menu_icon {
    /* margin-left: 2rem; */
  }

  .l_nav {
    padding: 0;
    background-color: #ffffff;
  }

  .l_nav_inner {
    border-radius: 0;
    max-width: 100%;
    height: auto;
  }
}

/* さらに画面が狭い（400px以下など）場合の追加調整 */
@media screen and (max-width: 400px) {
  .header_title {
    gap: 0.6rem;
    justify-content: space-between;
  }

  .header_title_logo {
    max-width: 20rem;
    /* 画面が狭いときはさらにロゴを縮小 */
  }

  /* .header_access_icon svg {
    width: 2.6rem;
    height: 2.6rem;
  } */
}