/* ==========================================
              全体
============================================ */

body {
  background-color: #fff8c9;
}

.bg-base {
  background-color: #fff8c9; 
}

.fade-in-up {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

section {
  padding-top: 150px;
}

@media (max-width: 768px) {
  section {
    padding-top: 60px;
  }
}

/* ==========================================
                    タイトル
============================================ */

.section-title {
  text-align: center; 
  margin: 10px 0 20px;
}

@media screen and (max-width: 768px) {
  .section-title {
    margin: 20px 0 25px; 
  }
}

.section-title img {
  height: 105px;
  width: auto;
  max-width: 100%;
}

@media screen and (max-width: 768px) {
  .section-title img {
    height: auto;
    margin: 0 auto;
    padding: 0 10px;
  }
}

/* ==========================================
                ロード画面
============================================ */
#loader {
  position: fixed;
  inset: 0;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#loader img {
  width: 150px; 
  height: auto;
  margin-bottom: 20px;
}

.loader-text {
  font-size: 1.8rem;
  font-weight: bold;
  color: #54250e;
  letter-spacing: 0.1em;
}
/* ==========================================
              バナー
============================================ */
.banner-container {
  width: 100%;
  background-color: #c6f1fe;
  overflow: hidden;
}

.main-banner {
  position: relative;
  width: 100%;
  height: 500px;
}

@media (max-width: 768px) {
  .main-banner {
    height: 420px;
  }
}

.bg-sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /* 芝生（画像の下端）を基準にして収める設定 */
  object-fit: cover;
  object-position: bottom center; 
}

.content-wrapper {
  position: relative;
  width: 1100px;
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  z-index: 3;
}

.banner-title {
  position: absolute;
  top: 100px; /* 位置を少し上に調整 */
  left: 195px;
  width: 380px;
}

@media (max-width: 768px) {
  .banner-title {
    top: 40px;
    left: 70px;
    width: 65%;
  }
}

.fammy-sitter {
  position: absolute;
  bottom: 10px; /* 芝生の直上にファミーが座るよう調整 */
  right: 140px;
  width: 285px;
}

@media (max-width: 768px) {
  .fammy-sitter {
    width: 50%;
    right: 65px;
    bottom: 5px;
  }
}

.cloud-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.cloud {
  position: absolute;
  height: auto;
  will-change: transform;
  animation: flow linear infinite;
}

.cloud-big {
  width: 100%;
  height: 100px; 
  object-fit: contain;
  object-position: center;
  top: 50px;
  animation-duration: 20s;
}

.cloud-middle {
  width: 100%;
  height: 70px; 
  object-fit: contain;
  object-position: center;
  top: 150px;
  animation-duration: 32s;
}

.cloud-small {
  width: 100%;
  height: 50px; 
  object-fit: contain;
  object-position: center;
  top: 250px;
  animation-duration: 40s;
}

@keyframes flow {
  0% {
    transform: translate3d(100%, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}


/* ==========================================
            プロフィール
============================================ */
.profile-section {
  scroll-margin-top: 50px;
}

@media (max-width: 768px) {
  .profile-section {
    scroll-margin-top: 30px;
  }
}

.profile-card {
  background-color: #ffffff;
  border-radius: 30px;
  padding: 50px 0 20px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
  .profile-card {
    padding: 10px;
    margin: 0 15px;
  }
}

.profile-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 0 20px;
}

@media (max-width: 768px) {
  .profile-content {
    flex-direction: column;
    gap: 10px;
    margin: 0 10px;
  }
}

.profile-name {
  text-align: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: #54250e;
  padding: 10px 0 20px;
}

@media (max-width: 768px) {
  .profile-name {
    display: block;
    padding: 10px 0;
  }
}

.character-img {
  width: 200px;
  margin: 25px;
  will-change: transform;
  animation: anim_s 2s ease-in-out infinite;
}

@media (max-width: 768px) {
  .character-img {
    width: 180px;
  }
}

@keyframes anim_s {
  0%, 20% {
    transform: rotate(3deg);
  }
  40% {
    transform: rotate(-3deg);
  }
  60%, 100% {
    transform: rotate(3deg);
  }
}

.profile-table {
  border-collapse: collapse;
  margin-right: 30px;
}

.profile-table tr {
  border-bottom: 1px solid #c0a080;
}

.profile-table th {
  padding: 10px 0;
  width: 65px;
}

.label-box {
  background-color: #54250e;
  color: white;
  padding: 8px 0;
  text-align: center;
  line-height: 25px;
  font-size: 1.8rem;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .label-box {
    font-size: 1.6rem;
    padding: 5px 0;
  }
}

.profile-table td {
  padding: 5px 15px;
  vertical-align: middle;
  font-size: 1.8rem;
  font-weight: bold;
  color: #54250e;
}

@media (max-width: 768px) {
  .profile-table td {
    font-size: 1.6rem;
  }
  .profile-table th { 
    width: 90px; 
  }
  .profile-table br {
    display: none;
  }
}

.description {
  text-align: left;
  line-height: 1.8;
  margin: 20px 70px;
  color: #54250e;
  font-size: 1.6rem;
  font-weight: bold;
  padding: 20px 10px;
}

@media (max-width: 768px) {
  .description {
    margin: 5px;
    font-size: 1.5rem;
  }
}

/* ==========================================
          ファミーの活動日記
============================================ */
.diary-section {
  scroll-margin-top: 50px;
}

@media (max-width: 768px) {
  .diary-section {
    scroll-margin-top: 30px;
  }
}

.diary-card {
  background-color: #ffffff;
  border-radius: 30px;
  padding: 40px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .diary-card {
    padding: 20px;
    margin: 0 15px;
  }
}

.diary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .diary-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 5px;
  }
}

.diary-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
}

.diary-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.diary-item:hover img {
  transform: scale(1.05);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 2px 8px;
  font-size: 1.2rem;
  border-radius: 4px;
}

/* モーダル表示改善 */
.custom-modal {
  display: none; 
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.custom-modal.is-open {
  display: flex;
}

#media-box {
  position: relative;
  padding: 10px;
  max-width: 750px;
  width: 100%;
}

#media-content {
  position: relative;
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin: auto;
}

#media-content img, 
#media-content video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

#close-btn {
  position: absolute;
  top: -40px;
  right: 0;
  width: 44px;
  height: 44px;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 10002;
  font-size: 3.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#close-btn:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #close-btn {
    top: -45px;
    right: 5px;
  }
}

.more-container {
  text-align: center;
  margin-top: 20px;
}

.more-button {
  display: inline-block;
  background-color: #54250e;
  color: #ffffff;
  padding: 10px 80px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.8rem;
  transition: background-color 0.3s;
}

@media (max-width: 768px) {
  .more-button {
    padding: 10px 45px;
    font-size: 1.3rem;
  }
}

.more-button:hover {
  background-color: #7a3a1c;
}

#prev-btn, #next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 10001;
  font-size: 2.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#prev-btn {
  left: -20px;
}

#next-btn {
  right: -20px;
}

@media (max-width: 768px) {
  #prev-btn {
    left: 5px;
  }
  #next-btn {
    right: 5px;
  }
}

/* ==========================================
                    SNS
============================================ */
.sns-wrapper {
  margin: 60px 0 0;
  padding: 20px;
  text-align: center;
}

.sns-wrapper h2 {
  font-size: 3.0rem;
  color: #54250e;
  margin-bottom: 45px;
  font-weight: 800;
}

@media (max-width: 768px) {
  .sns-wrapper h2 {
    font-size: 2.0rem;
    margin-bottom: 20px;
  }
}

.sns-wrapper img {
  width: 100%;
}

.sns-section {
  padding: 80px 0 0;
  scroll-margin-top: 70px;
}

@media (max-width: 768px) {
  .sns-section {
    padding: 0;
    scroll-margin-top: 30px;
  }
}

.sns-list {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
}

@media (max-width: 768px) {
  .sns-list {
    gap: 15px;
    width: 80%;
    margin: 0 auto;
  }
}

.sns-list li {
  width: 75px;
}

.sns-list li a {
  display: inline-block;
  transition: transform 0.2s;
}

.sns-list li a:hover {
  transform: scale(1.1);
}

/* ==========================================
            デジタルコンテンツ
============================================ */
.digital-section {
  scroll-margin-top: 50px;
}

@media (max-width: 768px) {
  .digital-section {
    scroll-margin-top: 30px;
  }
}

.digital-container {
  display: flex;
  background-color: #ffffff;
  border-radius: 30px;
  padding: 35px;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  justify-content: center;
  gap: 20px;
}

@media (max-width: 768px) {
  .digital-container {
    flex-direction: column;
    align-items: center;
    margin: 0 15px;
    padding: 20px;
  }
}

.digital-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 250px;
}

.dl-note {
  font-size: 1.2rem; 
  color: #666;
  margin-bottom: 8px; 
  text-align: center;
}

.digital-item img {
  width: 100%;
  border-radius: 15px;
}

.dl-btn {
  display: block;
  padding: 8px 5px;
  text-align: center;
  text-decoration: none;
  border: 1px solid #ccc;
  color: #555;
  background: #efefef;
  transition: all 0.3s ease;
  font-size: 1.4rem;
  font-weight: bold;
  border-radius: 5px;
}

.dl-btn:hover {
  background: #54250e;
  color: #fff;
  border-color: #54250e;
}

/* ==========================================
                    おみくじ
============================================ */

.fortune-slip-section .fortune-slip-title {
  font-size: 3.0rem;
  color: #54250e;
  margin-bottom: 20px;
  font-weight: 800;
  text-align: center;
}

.fortune-slip-section p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 8px; 
  text-align: center;
}

.game-container {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  margin: 0 auto 50px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .game-container {
    padding: 40px 20px;
  }
}

.char-image {
  width: 150px;
  height: 150px;
  background-color: #e2eeff;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.char-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-container h3 {
  color: #333;
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.bubble {
  background: #e2eeff;
  position: relative;
  border-radius: 10px;
  padding: 15px;
  margin: 10px 20px 20px;
  font-size: 1.5rem;
  color: #2c3e50;
  line-height: 1.5;
}

.btn {
  background-color: #fda726;
  color: white;
  border: none;
  padding: 15px 35px;
  font-size: 1.8rem;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.btn:hover {
  background-color: #e68a00;
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.95);
}

/* ==========================================
                  著作権表記
============================================ */
.copyright-notice {
  text-align: center;
  font-size: 1.4rem;
  margin-top: 40px;
  padding: 10px 0;
  background-color: #54250e;
  color: #ffffff;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .copyright-notice {
    font-size: 1.1rem;
  }
}

.copyright-notice a {
  color: #ffffff;
  font-size: 1.2rem;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .copyright-notice a {
    font-size: 1.0rem;
  }
}

/* ==========================================
                  TOPへ戻る
============================================ */
.top-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

@media (max-width: 768px) {
  .top-button {
    right: 10px;
    bottom: 10px;
  }
}

.top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.top-button img {
  width: 90px;
  height: auto;
}

@media (max-width: 768px) {
  .top-button img {
    width: 50px;
  }
}

/* ==========================================
      縮小から拡大するアニメーション（フワッと遅く）
============================================ */
.zoom-in-up {
  opacity: 0;
  transform: translate3d(0, 80px, 0) scale(0.85);
  transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.zoom-in-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* ==========================================
      下からスライドインするアニメーション
============================================ */
.fade-in-up {
  opacity: 0;
  transform: translate3d(0, 35px, 0);
  transition: opacity 1.4s cubic-bezier(0.25, 1, 0.5, 1),
              transform 1.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ==========================================
        コピーライト
============================================ */

.company{
    font-size: 1.2rem;
    line-height: 1.8;
}