/* ==========================================================================
   Layout
   ========================================================================== */
html {
  height: 100%;
}
body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.site-content-wrapper {
  flex: 1 0 auto; /* フッターを押し下げるためにコンテンツエリアを拡張 */
}
.footer {
  flex-shrink: 0; /* コンテンツが少ない時にフッターが縮むのを防ぐ */
}



#page-container {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--vh, 1vh) * 100);
  background: var(--c-bg);
  color: var(--c-text);
  opacity: 1;
  transition: opacity 0.4s ease;
}

#page-container.is-exiting {
  opacity: 0;
}

#main-content {
  flex-grow: 1;
  width: 100%;
}

.section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

@media (max-width: 768px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ==========================================================================
   Header & Navigation (New Design)
   ========================================================================== */

/* Header */
.header {
  position: fixed;
  top: 7.5px;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  z-index: 1000;
  color: var(--text);
  transition: all 0.3s var(--ease-out-cubic);
}

/* ヘッダーバー自体の左右の余白を調整 */
.header .container {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  position: relative;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 54px; /* clampをやめて固定高さに */
  width: auto;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}

/* Main navigation container */
.nav {
  display: flex;
  gap: clamp(1.5rem, 3vw, 40px); /* レスポンシブな間隔に修正 */
  padding: 0.8rem 2.5rem;
  background: linear-gradient(180deg, rgb(247 107 178 / 80%), rgb(255 192 215 / 80%));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 0px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.nav-a {
  position: relative;
  color: white;
  font-size: 18px; /* 少し小さくしてスペースを確保 */
  font-weight: 600;
  text-transform: uppercase;
}
.nav .nav-a:hover {
  color: var(--text);
}
.nav-a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.5rem;
  width: calc(100% - 1rem);
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease-out-cubic);
  transform-origin: center;
}
.nav-a:hover::after {
  transform: scaleX(1);
}

/* New container for the STORE link */
.nav-store-link-wrapper {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(0deg, #e5a4de, #cd88c6);
  border-radius: 50px;
  transition: all 0.3s ease;
}

.nav-store-link-wrapper .nav-a {
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-store-link-wrapper .nav-a:hover {
  color: white;
}
.nav-store-link-wrapper .nav-a::after {
  display: none;
}
.nav-store-link-wrapper .external-icon {
  stroke: white;
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
  display: block; /* 子供の絶対配置をしやすくするため flex から変更 */
  position: relative; /* span要素を絶対配置するための基準点として設定 */
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

/* ハンバーガーメニューの各ラインの基本スタイル */
.mobile-nav-toggle span {
  display: block;
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text);
  margin: 0; /* マージンをリセット */
  left: 50%;
  margin-left: -12px; /* 幅の半分を引いて中央揃え */
  transition: transform 0.4s var(--ease-out-cubic), top 0.4s var(--ease-out-cubic), opacity 0.4s var(--ease-out-cubic);
  transform-origin: center center; /* 回転の中心を明示的に指定 */
}

/* ハンバーガーメニューの初期状態（三本線） */
.mobile-nav-toggle span:first-child {
  top: 16px;
}

.mobile-nav-toggle span:nth-child(2) {
  top: 23px;
}

.mobile-nav-toggle span:last-child {
  top: 30px;
}

/* メニューが開いた時の「×」マークの状態 */
.mobile-nav-toggle[aria-expanded="true"] span:first-child {
  top: 23px; /* 中央に移動 */
  transform: rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0; /* 中央の線を消す */
}

.mobile-nav-toggle[aria-expanded="true"] span:last-child {
  top: 23px; /* 中央に移動 */
  transform: rotate(-45deg);
}


.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background-color: var(--header-bg);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.4s var(--ease-out-cubic);
  z-index: 998;
  padding: 80px 24px 24px;
  display: flex;
  flex-direction: column;
}


.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
  z-index: 1000;
}

.mobile-nav-close svg {
  width: 32px;
  height: 32px;
  color: var(--text);
}

.mobile-nav.is-open {
  right: 0;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-nav-inner .nav-a {
  font-size: 20px;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.nav-a.external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-a .external-icon {
  width: 1em;
  height: 1em;
}

/* Footer */
.footer {
  background: linear-gradient(180deg, rgba(255, 245, 250, 0.7) 0%, rgba(255, 255, 255, 0.5) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.05);
  padding: 40px 0;
  text-align: center;
  color: var(--text);
}
.footer-logo img {
  height: 96px;
  width: auto;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  font-size: 14px;
}
.footer-nav a {
  color: var(--muted);
}
.footer-nav a.external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-nav a .external-icon {
  width: 1em;
  height: 1em;
  opacity: 0.6;
}
.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   Utilities
   ========================================================================== */

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s;
}

#loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--c-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.header .nav-a.external-link,
.mobile-nav-inner .nav-a.external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-a .external-icon {
  width: 1em;
  height: 1em;
}

/* Responsive */

/* 中間サイズの画面用の調整 */
@media (max-width: 1400px) {
  .nav {
    padding: 0.8rem 2rem;
  }
  .nav-a {
    font-size: 16px;
  }
}


/* ハンバーガーメニューに切り替えるブレークポイント */
@media (max-width: 1280px) { /* ブレークポイントを少し広げます */
  .nav-wrapper {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* PC用ナビゲーションを表示するブレークポイント */
@media (min-width: 1281px) { /* ブレークポイントを少し広げます */
    .mobile-nav,
    .mobile-nav-toggle,
    .mobile-nav-close {
        display: none !important;
    }
}
