@import url("_reset.css");
@import url("_vars.css");

html {
  width: 100%;
  font-size: 13px;
  scroll-behavior: smooth;
  background-color: #c2ec8b;
}


body {
  font-family: var(--base-font);
  line-height: 1.5;
  color: #231815;
  width: 100%;
  font-feature-settings: "palt";
  word-wrap: break-word;
}

a {
  text-decoration: underline;
  outline: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

img {
  vertical-align: bottom;
  max-width: 100%;
  image-rendering: -webkit-optimize-contrast;
}

p:not(:last-child) {
  margin-bottom: 0.6em;
}



main {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-color);
  padding-bottom: 50px;
  overflow: clip;
}
/* セクションフェードイン */
.fadein {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fadein.show {
  opacity: 1;
  transform: translateY(0);
}

/* オンラインショップ */

.lineup {
  margin-top: 15%;
  padding: 0 5%;
  position: relative;
  .logo {
    width: 55%;
    margin: 0 auto;

    .title02 {
      display: block;
      width: 40%;
      margin: 0 auto;
    }
  }

  .headline {
    font-family: var(--serif-font);
    font-weight: bold;
    text-align: center;
    font-size: 20px;
    position: relative;

    /* margin-bottom: 20px; */
    @media (min-width: 481px) {
      font-size: 24px;
    }

    &::before,
    &::after {
      content: '';
      position: absolute;
      width: 25%;
      top: 50%;
      border-top: 2px dotted #fff;
    }

    &::before {
      left: 0;
    }

    &::after {
      right: 0;
    }
  }

  .headline.online {
    margin-top: 20px;
    &::before,
    &::after {
      content: '';
      position: absolute;
      width: 15%;
      top: 50%;
      border-top: 2px dotted #fff;
    }
  }

  .item {
    border: 3px solid #fff;
    padding: 0 15px 15px;
    position: relative;
    margin-top: 70px;
    &.animation {
      .illust {
        img {
          opacity: 0;
          scale: .7;
        }
      }

 
    }

    .title {
      height: 28px;
      text-align: center;
      transform: translateY(-50%);

      img {
        height: 100%;
      }
    }

  }
}

/*オンラインストア追加分*/
.lineup .item.store {
  margin-top: 15px;
  background-color: #bdffaa;
  display: flex;
  justify-content: space-between;flex-wrap: wrap;
  padding: 15px 15px;
}
.store01,.store02,.store03,.store04,.store05{
  opacity: 0;
  transition: all .8s cubic-bezier(.85, 2.35, .71, 1);
  filter: drop-shadow(3px 3px 3px #aaa);
}
.lineup .store>div{
  width: 49%;
  background: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  margin-bottom: 5px;
}
.store {
      &.active{
        .store01{
          opacity: 1;
          transition-delay: .2s;
        }
        .store02{
          opacity: 1;
          transition-delay: .4s;
        }
        .store03{
          opacity: 1;
          transition-delay: .6s;
        }
        .store04{
          opacity: 1;
          transition-delay: .8s;
        }
        .store05{
          opacity: 1;
          transition-delay: 1s;
        }
      }
}
.store.active .store01:hover,.store.active .store02:hover,.store.active .store03:hover,.store.active .store04:hover,.store.active .store05:hover{filter: drop-shadow(1px 1px 1px #aaa);transition-delay: 0.001s;}
 /*会社概要*/
.company{padding: 0 5%;margin: 40px 0;}
.company .inner{background: #fff;padding: 10px;border-radius: 20px;}
.company table{padding: 10px;}
.company .headline {
  font-family: var(--serif-font);
  font-weight: bold;
  text-align: center;
  font-size: 20px;
  position: relative;
  margin-bottom: 15px;
  @media (min-width: 481px) {
    font-size: 24px;
  }

  &::before,
  &::after {
    content: '';
    position: absolute;
    width: 25%;
    top: 50%;
    border-top: 2px dotted #fff;
  }
  &::before {
    left: 0;
  }
&::after {
    right: 0;
  }
}

 .company table {
  border-collapse: collapse;
  width: 100%;
  max-width: 700px;
  font-size: 13px;
  @media (min-width: 481px) {
    font-size: 1.15rem;
  }
}
.company table th,  .company table td {
  border: 2px solid #fff;
  background-color: #fff7d4;
  border-radius: 0 10px 10px 0;
  padding: 1em;
  align-content: center;
}
.company table th {
  background-color: #231815;
  color: #fff;
  font-weight: bold;
  text-align: center;
  border-radius: 10px 0 0 10px;
  width: 20%;
  min-width: 4em;
  position: relative;
}
.company table th::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 10px solid transparent;
  border-left: 10px solid #231815;
  z-index: 2;
}
 .company table th::after {
  content: '';
  position: absolute;
  top: 50%;
  left: calc(100% + 2px);
  transform: translateY(-50%);
  border: 12px solid transparent;
  border-left: 12px solid #fff;
  z-index: 1;
}
/*
@media (min-width: 481px) {}
@media (hover: hover) and (pointer: fine) {}
*/

/* ハンバーガーメニュー */
/* Nav styles */
.menu ul {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  justify-content: center; /* Center content vertically */
  align-items: center; /* Center content horizontally */
  list-style-type: none;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 0;
  left: -100vw; /* Slide-in from the left */
  width: 100vw;
  height: 100vh; /* Full view height */
  z-index: 10;
  font-family: var(--serif-font);
  font-weight: 800;
}
.menu li {
  background-image: linear-gradient(60deg, #90f183 0%, #90f183 100%);
  border-bottom: 1px solid #3b3b3b;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease-in-out;
  height: calc(100vh / 5); /* 5つのメニューアイテムの場合 */
  width: 100%; /* フル幅 */
  position: relative; /* aタグを位置決めするために必要 */
}

.menu li a {
  position: absolute; /* 親要素のサイズに合わせる */
  top: 0; /* 上端に合わせる */
  left: 0; /* 左端に合わせる */
  width: 100%; /* 親要素の幅いっぱいに広げる */
  height: 100%; /* 親要素の高さいっぱいに広げる */
  display: flex; /* 中央にテキストを配置 */
  justify-content: center;
  align-items: center;
  color: #333;
  letter-spacing: 2px;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.3s; /* アニメーションを追加 */
}

.menu li a:hover {
  background-image: linear-gradient(60deg, rgba(240, 196, 121, 0.3) 0%, rgba(245, 195, 129, 0.3) 100%); /* 背景色を薄く */
}



/* メニューのアニメーション */
.menu li {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.menu.open li {
  transform: translateX(100vw); /* 開く時のスライドイン */
}

/* 上から順番に遅延を設定 0.25足していく*/
.menu li:nth-of-type(1) {
  transition-delay: 0s;
}

.menu li:nth-of-type(2) {
  transition-delay: 0.025s;
}

.menu li:nth-of-type(3) {
  transition-delay: 0.05s;
}

.menu li:nth-of-type(4) {
  transition-delay: 0.075s;
}

.menu li:nth-of-type(5) {
  transition-delay: 0.1s;
}

.menu li:nth-of-type(6) {
  transition-delay: 0.125s;
}

.menu li:nth-of-type(7) {
  transition-delay: 0.15s;
}

.menu li:nth-of-type(8) {
  transition-delay: 0.175s;
}
.menu li:nth-of-type(9) {
  transition-delay: 0.2s;
}
.menu li:nth-of-type(10) {
  transition-delay: 0.225s;
}
.menu li:nth-of-type(11) {
  transition-delay: 0.275s;
}
/* スマホサイズ時の閉じるアニメーション */
@media (max-width: 768px) {
  /* メニューが閉じる時に上から順番に戻る */
  .menu.open li:nth-of-type(1) {
    transition-delay: 0s;
  }

  .menu.open li:nth-of-type(2) {
    transition-delay: 0.025s;
  }

  .menu.open li:nth-of-type(3) {
    transition-delay: 0.05s;
  }

  .menu.open li:nth-of-type(4) {
    transition-delay: 0.075s;
  }

  .menu.open li:nth-of-type(5) {
    transition-delay: 0.1s;
  }

  .menu.open li:nth-of-type(6) {
    transition-delay: 0.125s;
  }

  .menu.open li:nth-of-type(7) {
    transition-delay: 0.15s;
  }

  .menu.open li:nth-of-type(8) {
    transition-delay: 0.175s;
  }
  .menu li:nth-of-type(9) {
    transition-delay: 0.2s;
  }
  
  .menu li:nth-of-type(10) {
    transition-delay: 0.225s;
  }
  .menu li:nth-of-type(11) {
    transition-delay: 0.275s;
  }
}
@media (max-width: 1000px) {
  .menu ul {
    flex-direction: column;
  }
}

.hamburger {
  background-color: #fff;
  border-radius: 50%;
  position: fixed;
  top: 20px;
  right: 20px;
  border: 0;
  cursor: pointer;
  width: 40px;
  height: 40px;
  z-index: 999;
}

.hamburger:focus {
  outline: 0;
}

.hamburger .line {
  background-color: #000;
  display: block;
  margin: 5px auto;
  height: 2px;
  width: 20px;
  transition: all 0.1s ease-in;
}

.hamburger.open .line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open .line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.padded-section {
  scroll-margin-top: 150px; /* スクロール時の余白を確保 */
}

@media (max-width: 768px) {
  .padded-section {
      scroll-margin-top: 120px;
  }
}

/********* 選ばれる理由 **********/
#ganko_chosen .title {
  position: relative;
  margin-bottom: 5%;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.riyuu_ganta {
  position: absolute;
  bottom: -10px;
  right: -10px;
  width: 120px;
  transform: translateX(-10%);
  opacity: 0;
  transition: opacity 0.5s 0.5s;

  img {
    animation: rotate 0.6s 0.4s linear both;
    display: block;
    width: 100%;
  }
}

.title.animate .riyuu_ganta {
  opacity: 1;
}

@keyframes rotate {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.riyuu_box {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;

  &.animate {
    opacity: 1;
    transform: translateY(0);
  }

  .illust {
    img {
      opacity: 0;
      transform: scale(0.95);
      transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);

      .riyuu_box.animate & {
        opacity: 1;
        transform: scale(1);
      }

       &.slide-in-left {
        transform: translateX(-60px);
        .riyuu_box.animate & {
          transform: translateX(0);
        }
      }

      &.slide-in-right {
        transform: translateX(60px);
        .riyuu_box.animate & {
          transform: translateX(0);
        }
      }

      &.zoom-in {
        transform: scale(0.9);
        .riyuu_box.animate & {
          transform: scale(1);
        }
      }

      &.rotate-clockwise {
        transform: rotate(720deg);
        .riyuu_box.animate & {
          transform: rotate(0deg);
        }
      }

      &.swing-in-right {
        opacity: 0;
        transform: translateX(100%) rotate(15deg);
        .riyuu_box.animate & {
          animation: swingInRight 1s ease-out forwards;
        }
      }
    }
  }
}

@keyframes swingInRight {
  0% { opacity: 0; transform: translateX(100%) rotate(15deg); }
  40% { opacity: 1; transform: translateX(-10px) rotate(-10deg); }
  70% { transform: translateX(5px) rotate(5deg); }
  100% { transform: translateX(0) rotate(0); }
}

/* 初期状態 */
.title-wrapper {
  opacity: 0;
  transform: translateY(20px); /* 初期位置を少し下に設定 */
  transition: opacity 1s ease, transform 1s ease;
}

/* アニメーションが始まる時 */
.title-wrapper.animate {
  opacity: 1;
  transform: translateY(0); /* 元の位置に戻す */
}

/* title_img と riyuu_ganta のアニメーション */
.title_img, .riyuu_ganta {
  opacity: 0;
  transform: translateY(30px); /* 初期位置 */
  transition: opacity 1s ease, transform 1s ease;
}

.title_img.animate, .riyuu_ganta.animate {
  opacity: 1;
  transform: translateY(0); /* 元の位置に戻す */
}

/* 追加のスタイル（必要に応じて） */
.riyuu_ganta {
  position: absolute;
  top: 54px;
  right: -16px;
  width: 120px;
  transform: translateY(30px) rotateY(0deg); /* 初期状態 */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.riyuu_ganta.animate {
  opacity: 1;
  transform: translateY(0) rotateY(360deg); /* 回転 */
}

@media (max-width: 767px) {
  .riyuu_ganta {
    bottom: -6px;
    right: -16px;
    width: 105px;
  }

}
/* ========== レイアウト調整系はそのままでOK ========== */
#ganko_chosen .inner {
  position: relative;
}

.riyuu_box {
  width: 100%;
  position: relative;
  padding: 5% 0;
}
.riyuu_ils01, .riyuu_ils02, .riyuu_ils03_1,
.riyuu_ils03_2, .riyuu_ils04, .riyuu_ils05 {
  position: absolute;
}
.riyuu_ils01 {
  top: 12px;
  right: -14px;
  width: 225px;
}
.riyuu_ils02 {
  top: 29px;
  left: -14px;
  width: 193px;
}
.riyuu_h {
  margin-top: 5%;
}
.riyuu_ils03_1 {
  top: 51px;
  right: 0;
  width: 187px;
}
.riyuu_ils03_2 {
  bottom: 0;
  right: 0;
  width: 383px;
}
.riyuu_ils04 {
  top: 41px;
  left: -11px;
  width: 227px;
}
.riyuu_ils05 {
  top: 41px;
  right: -11px;
  width: 210px;
}

@media (max-width: 767px) {

  .riyuu_box {
    width: 100%;
    position: relative;
    padding: 6% 0;
  }
  .riyuu_h {
    margin-top: 0;
  }
  .riyuu_ils01 {
    top: 12px;
    right: -14px;
    width: 200px;
  }
  .riyuu_ils02 {
    top: 9px;
    left: -14px;
    width: 170px;
  }

  .riyuu_ils03_1 {
    top: 47px;
    right: 0;
    width: 159px;
  }
  .riyuu_ils03_2 {
    bottom: 0;
    right: 0;
    width: 339px;
  }
  .riyuu_ils04 {
    top: 41px;
    left: -11px;
    width: 198px;
  }
  .riyuu_ils05 {
    top: 41px;
    right: -11px;
    width: 190px;
  }

}
/********* がんたを探せ **********/
.answer-img-wrapper {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.6s ease, opacity 0.6s ease;
}

.answer-img-wrapper.show {
  max-height: 500px; /* 答え画像の高さに合わせて調整 */
  opacity: 1;
}
/* 共通スタイル */
.ganta_s {
  border-radius: 15px;
  background: #FFF;
  padding: 5%;
  margin: 5%;
}
.ganta_sagase_ttl {
  margin-bottom: 5%;
}

/* 問題画像 */
.riddle-image {
  width: 100%;
  max-width: 1000px;
  height: auto;
  transition: all 0.3s ease;
  cursor: pointer;
}
@media (min-width: 768px) {
  .riddle-image {
    max-width: 100%;
  }
}

/* 答え見るボタン */
.answer-label {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  background: #0ca239;
  color: #fff;
  font-weight: bold;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 2px 0 #8e3838;
  user-select: none;
}
.answer-label:active {
  top: 2px;
  box-shadow: 0 0 0 #8e3838;
}
.answer-label-wrapper {
  text-align: right;
  margin-top: 20px;
}

/* スマホ用答え画像（初期非表示） */
.answer-img {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.5s ease;
  padding-top: 5%;
}
.popup-toggle:checked ~ .mobile-only {
  max-height: 1000px;
  opacity: 1;
}

/* モーダル非表示状態 */
.popup-toggle {
  display: none;
}
.popup-modal {
  display: none;
}

/* モーダル表示：問題用と答え用を分けて制御 */
#show-question:checked ~ .popup-modal.for-question {
  display: flex;
}
#answer-popup:checked ~ .popup-modal.for-answer {
  display: flex;
}

/* モーダル本体（PCのみ） */
@media (min-width: 768px) {
  .popup-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }

  .popup-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
  }

  .popup-content img {
    max-height: 80vh;
    height: auto;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
  }

  .popup-close {
    position: fixed;
    inset: 0;
    cursor: pointer;
  }

  .mobile-only {
    display: none;
  }
}

/* モバイルではモーダル非表示（答え画像は展開） */
@media (max-width: 767px) {
  .popup-modal {
    display: none !important;
  }

  .mobile-only {
    display: block;
  }
  label[for="show-question"] {
    pointer-events: none;
  }
}
/* ポップアップの閉じるボタン */
.popup-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  color: #333;
  background: white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  text-align: center;
  line-height: 36px;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.2s ease;
}

.popup-close-btn:hover {
  background: #f0f0f0;
}

.riddle-label {
  position: relative;
  display: inline-block;
}

.riddle-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.9em;
  padding: 4px 8px;
  border-radius: 5px;
  pointer-events: none;
}
/* 初期状態では非表示 */
.pc-only {
  display: none;
}
.mobile-only {
  display: none;
}

/* スマホ用のみ表示 */
@media (max-width: 767px) {
  .mobile-only {
    display: block;
  }
}

/* PC用のみ表示 */
@media (min-width: 768px) {
  .pc-only {
    display: inline-block; /* または block */
  }
}

#machigaisagashi.ganta_s {
  background: none;
  padding: 0;
  margin: 5%;
}

#machigaisagashi.ganta_s img{

  border-radius: 15px;
}


/* バナー */

.banner{
  padding: 0 5%;
  margin: 40px 0;
}
.banner .inner{
  background: #fff;
  padding: 10px;
  border-radius: 20px;
}