/* ===================== 基本リセット ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  width: 100%;
  height: 100%;
  font-family: serif;
  background: #f0f0ef;
  color: #333;
  scroll-behavior: smooth;
  overflow-x: hidden;
}
a {
  color: #f0f0ef;
  text-decoration: none;
}
body {
  width: 100vw;
  overflow-x: hidden;
}

/* ===================== ヘッダー・ナビ ===================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
header.visible {
  opacity: 1;
  pointer-events: auto;
}
.nav-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* メニューを右寄せに修正 */
  padding: 0 20px;
}
.hamburger {
  display: none; 
  flex-direction: column;
  cursor: pointer;
}
.hamburger span {
  height: 3px;
  width: 25px;
  background: #333;
  margin-bottom: 4px;
  border-radius: 2px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
nav li {
  cursor: pointer;
  transition: opacity 0.3s ease;
}
nav li:hover {
  opacity: 0.7;
}
@media screen and (max-width: 768px) {
  .nav-container {
    justify-content: space-between;
    padding: 0 8px;
    background: none;
  }
  .hamburger {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1001;
  }
  nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    align-items: center;
    background: rgba(0,0,0,0.9);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav.open {
    max-height: 500px;
  }
  nav ul {
    flex-direction: column;
    gap: 0;
  }
  nav li {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
}

/* ========== ハンバーガーオーバーレイ（モバイル） ========== */
.hamburger-overlay {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 10002; /* increased so the button stays above the overlay and other elements */
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: none; /* デフォルト非表示、モバイルで表示 */
}
.hamburger-overlay__line {
  position: absolute;
  left: 11px;
  width: 26px;
  height: 2px;
  background-color: #fff;
  transition: all .35s;
  border-radius: 2px;
}
.hamburger-overlay__line:nth-of-type(1) { top: 14px; }
.hamburger-overlay__line:nth-of-type(2) { top: 23px; }
.hamburger-overlay__line:nth-of-type(3) { top: 32px; }
.hamburger-overlay.active .hamburger-overlay__line { background-color: #fff; }
.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(1) { transform: translateY(9px) rotate(-45deg); }
.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(2) { opacity: 0; }
.hamburger-overlay.active .hamburger-overlay__line:nth-of-type(3) { transform: translateY(-9px) rotate(45deg); }

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.95);
  visibility: hidden;
  opacity: 0;
  transition: all .45s ease;
  z-index: 10001; /* increased so overlay appears above high z-index elements like the splash */
  pointer-events: none;
}
.nav-overlay.active { visibility: visible; opacity: 1; pointer-events: auto; }

.nav-overlay__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}
.nav-overlay__list { margin: 0; padding: 0; list-style: none; }
.nav-overlay__item {
  opacity: 0;
  transform: translateY(20px);
  transition: all .45s ease;
}
.nav-overlay.active .nav-overlay__item { opacity: 1; transform: translateY(0); }
.nav-overlay.active .nav-overlay__item:nth-child(1) { transition-delay: 0.08s; }
.nav-overlay.active .nav-overlay__item:nth-child(2) { transition-delay: 0.14s; }
.nav-overlay.active .nav-overlay__item:nth-child(3) { transition-delay: 0.2s; }
.nav-overlay.active .nav-overlay__item:nth-child(4) { transition-delay: 0.26s; }
.nav-overlay__link {
  display: inline-block;
  padding: 20px 8px;
  color: #fff;
  font-size: 22px;
  text-decoration: none;
}
.nav-overlay__link:hover { color: #9effea; }

/* モバイルでハンバーガーを表示、既存の nav を非表示にする */
@media (max-width: 768px) {
  .hamburger-overlay { display: block; }
  header .nav-container nav { display: none !important; }
}

/* ===================== トップ画像 ===================== */
.hero-content img {
  max-width: 600px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.hero-visual-pc,
.hero-visual-sp {
  width: 100vw;
  max-width: 100vw;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0;
}
.hero-visual-pc {
  display: block;
  aspect-ratio: 18/9;
  object-fit: cover;
  object-position: center bottom;
}
.hero-visual-sp {
  display: none;
}

@media (max-width: 600px) {
  .hero-visual-pc {
    display: none !important;
  }
  .hero-visual-sp {
    display: block !important;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    object-fit: contain;
    aspect-ratio: unset !important; /* 16:9解除 */
  }
}
@media (min-width: 601px) and (max-width: 769px) {
  .hero-visual-pc {
    display: none !important;
  }
  .hero-visual-sp {
    display: block !important;
  }
}
@media (min-width: 770px) {
  .hero-visual-pc {
    display: block !important;
  }
  .hero-visual-sp {
    display: none !important;
  }
}

/* 追加: 769px 以下ではスマホ用トップ画像はオリジナル比率を使用する */
@media (max-width: 769px) {
  .hero-visual-sp {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;          /* 高さは自動にしてオリジナル比率を維持 */
    aspect-ratio: unset !important;   /* アスペクト比の強制を解除 */
    object-fit: contain !important;   /* 画像全体を表示 */
  }
  .hero-visual-pc {
    display: none !important;
  }
}

/* ===================== セクション共通 ===================== */
section, .common-section, .staff-section {
  min-height: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 0;
  margin-bottom: 0;
}
section:nth-of-type(odd) {
  background: #fff;
}
section:nth-of-type(even) {
  background: #f0f0ef;
}

/* STORYとMUSICセクションの背景色を#fffに設定 */
#story-section,
#music-section {
  background: #fff !important;
  max-width: none !important;
  width: 100% !important;
}

/* 既存の各セクションの個別背景指定は不要なら削除・統合 */

.common-section h2, .staff-section h2 {
  font-size: 2em;
  margin-bottom: 20px;
}
.common-section p, .staff-section p {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* 各セクションの個別paddingやmargin-bottomは原則削除・統一 */

/* NEWSセクションの余白調整 */
.news-container {
  padding: 0;
  margin: 0 auto;
}

/* STAFF SPECセクションの余白調整 */
.staff-spec-container {
  padding: 0;
  margin: 0 auto;
}

/* CHARACTERセクションの余白調整 */
.character-section {
  padding: 64px 0;
  margin: 0;
}
.char-main-content {
  margin-top: 0;
}

/* サウンド・ダウンロード・SNS・ゲームシステムも同様に統一 */
.sound-section,
.system-section,
.download-section,
.sns-section {
  margin: 0 auto;
  padding: 0;
}

footer {
  margin-top: 0;
  background: #fff;
}

/* ===================== STAFF SPEC ===================== */
.staff-spec-container {
  background: #fff;
  color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  width: 95vw;
  margin: 0 auto;
}
.staff-spec-table {
  width: 100%;
  margin: 0 auto 32px auto;
  color: #000;
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.staff-spec-row {
  display: flex;
  padding: 18px 0 18px 0;
  border-bottom: 1px dashed #aaa;
}
.staff-spec-row:last-child {
  border-bottom: none;
}
.staff-spec-label,
.staff-spec-value {
  text-align: center;
}
.staff-spec-label {
  width: 48%;
  font-weight: bold;
  letter-spacing: 0.1em;
  padding-left: 18px;
  background: #fff;
  border-right: 1px solid #eee;
}
.staff-spec-value {
  width: 60%;
  text-align: left;
  letter-spacing: 0.05em;
  padding-left: 18px;
}
.staff-spec-image img {
  width: 120px;
  height: auto;
  margin-top: 16px;
  filter: drop-shadow(0 2px 8px #0006);
}
.spec-main-title {
  font-size: 3rem;
  font-family: 'serif';
  letter-spacing: 0.2em;
  margin-bottom: 0.2em;
}
.system-spec-table {
  width: 100%;
  margin-top: 32px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid #000;
  overflow: hidden;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.system-spec-header {
  display: flex;
  background: #fff;
  color: #000000;
  font-weight: bold;
  text-align: center;
}
.system-spec-header > div {
  flex: 1;
  padding: 16px 8px;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #000;
  font-size: 1.08em;
}
.system-spec-header > div:first-child {
  flex: 0 0 160px;
  max-width: 160px;
  min-width: 160px;
  text-align: left;
  padding-left: 18px;
}
.system-spec-header > div:last-child {
  border-right: none;
}
.system-spec-row {
  display: flex;
  border-bottom: 1px dashed #aaa;
  color: #000;
}
.system-spec-row:last-child {
  border-bottom: none;
}
.system-spec-row > div {
  flex: 1;
  padding: 16px 8px;
  text-align: center;
  border-right: 1px solid #eee;
}
.system-spec-row > div:last-child {
  border-right: none;
}
.system-spec-row > div[colspan="2"] {
  flex: 2;
  text-align: center;
  border-right: none;
}
.system-spec-row > div:first-child {
  flex: 0 0 160px;
  max-width: 160px;
  min-width: 100px;
  text-align: left;
  font-weight: bold;
  color: #000000;
  background: #fff;
  border-right: 1px solid #000;
  padding-left: 18px;
}
@media (max-width: 600px) {
  .staff-spec-container {
    padding: 24px 8px;
    max-width: 98vw;
  }
  .staff-spec-title h2 {
    font-size: 1.5rem;
  }
  .staff-spec-image img {
    width: 80px;
  }
  .spec-main-title { font-size: 2rem; }
  .system-spec-table { font-size: 0.9rem; }
  .staff-spec-label, .system-spec-row > div:first-child {
    padding-left: 8px;
  }
  .staff-spec-value, .system-spec-row > div {
    padding-left: 8px;
    padding-right: 4px;
  }
  .staff-spec-label {
    width: 140px !important;
  }
  .system-spec-row > div:first-child {
    flex: 0 0 120px !important;
    max-width: 120px !important;
    min-width: 100px;
  }
  .system-spec-header > div:first-child {
    flex: 0 0 120px !important;
    max-width: 120px !important;
    min-width: 100px;
    padding-left: 8px;
  }
  .system-spec-header > div {
    padding: 16px 8px;
  }
  header {
    background: transparent !important;
  }
  .nav-container {
    background: transparent !important;
  }
}

/* ===================== NEWSセクション ===================== */
.news-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 32px 0 0 0;
}
.news-title {
  text-align: center;
  font-size: 2.2rem;
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  margin-bottom: 28px;
}
.news-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.news-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1.5px solid #ababab;
  padding: 22px 16px 18px 16px;
  text-align: center;
  transition: box-shadow 0.2s;
  max-width: 480px; /* 横幅を小さくする */
  width: 100%;
  margin: 0 auto;
}
.news-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}
.news-date {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.news-headline {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 8px;
  font-family: 'Times New Roman', serif;
}
.news-desc {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0;
}
.news-archive-btn-container {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.news-archive-btn {
  background: #111;
  color: #fff;
  font-size: 1rem;
  padding: 8px 26px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s;
  letter-spacing: 0.08em;
}
.news-archive-btn:hover {
  background: #333;
}
@media (max-width: 600px) {
  .news-container {
    padding: 16px 0 0 0;
    max-width: 98vw;
  }
  .news-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }
  .news-list {
    gap: 14px;
  }
  .news-card {
    padding: 12px 6px 12px 6px;
    border-radius: 10px;
    border-width: 1px;
    max-width: 98vw;
  }
  .news-date {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }
  .news-headline {
    font-size: 1rem;
    margin-bottom: 6px;
  }
  .news-desc {
    font-size: 0.9rem;
  }
  .news-archive-btn {
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 7px;
  }
}

/* ===================== キャラクター ===================== */
.character-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 80px 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: #f0f0ef;
}
.character-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("https://via.placeholder.com/1200x800?text=Sky+Background") no-repeat center / cover;
  z-index: 1;
  filter: brightness(0.7);
  opacity: 0.8;
}
/* 固定幅にして中央に配置、flexの伸縮を抑えて「動く」挙動を防止 */
.char-main-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;   /* 固定上限（必要に応じて調整） */
  width: 1000px;       /* デスクトップでの固定幅 */
  flex: 0 0 1000px;    /* flex の伸縮を止める */
  min-height: 700px;  /* 最小高さを固定して縦の伸縮を防止 */
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  margin-top: 20px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  padding: 20px; /* 内側の余白を確保して見た目を安定 */
}
.char-illustration {
  position: relative;
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-width: 280px;
  max-height: 660px; /* 画像エリアの最大高さを固定 */
}
.char-illustration img {
  display: block;
  width: auto;
  max-width: 400px; /* 一律の最大横幅を設定して表示サイズの差を防止 */
  max-height: 620px; /* 一律の最大高さを設定 */
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.5s ease, transform 0.3s ease;
  margin: 0 auto;
}
.char-text-container {
  flex: 1;
  padding: 20px;
  padding-top: 60px; /* 上部に余白を追加して下げる */
  color: #f0f0ef;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* centerからflex-startに変更して上揃えに */
  min-height: 660px; /* 最小高さを固定 */
}
.char-icon-group {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
}
.char-icon-group img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #ababab;
  margin-right: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}
.char-icon-group img:hover {
  transform: scale(1.1);
  opacity: 0.8;
}
.char-icon-group img.active {
  border-color: #00fac4;
  box-shadow: 0 0 10px rgba(255, 153, 0, 0.5);
}
.char-title-container {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}
.char-title {
  font-size: 2.2rem;
  margin-bottom: 0.3em;
  letter-spacing: 0.05em;
  margin-right: 10px;
}
.char-subtitle {
  font-size: 1.2rem;
  color: #f0f0ef;
}
.char-catchcopy {
  font-size: 1.1rem;
  margin-bottom: 1.2em;
  opacity: 0.9;
}
.profile-heading,
.spec-heading {
  font-weight: bold;
  margin-bottom: 0.5em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.1rem;
}
.profile-text,
.spec-text {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2em;
}

.vertical-quote {
  position: relative;
  top: -15%;
  right: 100%;
  margin-right: -80px;
  white-space: nowrap;
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  background: rgba(255,255,255,0.7);
  padding: 8px 12px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-align: left;
}
@media (max-width: 768px) {
  .vertical-quote {
    position: static;
    writing-mode: vertical-rl;
    text-align: left;
    margin: 10px auto;
    max-width: 90%;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .char-title {
    font-size: 1.4rem;
  }
  .char-subtitle {
    font-size: 1rem;
  }
  nav ul {
    font-size: 0.9em;
  }
  #splash-text h1 {
    font-size: 1.5rem;
  }
}

/* ===================== サウンド・音楽 ===================== */
.sound-section {
  background: #f7f7fa;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(80,80,120,0.08);
  margin: 40px auto;
  padding: 32px 20px;
  max-width: 700px;
}
.sound-section h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #3a3a5a;
}
.sound-section p {
  margin-bottom: 18px;
  color: #555;
}
.sound-sample-group {
  display: flex;
  gap: 24px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 10px;
}
.sound-sample-group button {
  background: linear-gradient(90deg,#6a7cff 0%,#b7bfff 100%);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(80,80,120,0.10);
  transition: background 0.2s;
}
.sound-sample-group button:hover {
  background: linear-gradient(90deg,#4a5ccc 0%,#8a93e6 100%);
}

/* ===================== ゲームシステム・UI ===================== */
.system-section {
  background: #f4f8ff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(80,80,120,0.08);
  margin: 40px auto;
  padding: 32px 20px;
  max-width: 700px;
}
.system-section h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #3a3a5a;
}
.system-section p {
  margin-bottom: 18px;
  color: #555;
}
.system-img, .system-video {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(80,80,120,0.10);
  border: 1px solid #e0e4f0;
  margin-bottom: 16px;
  max-width: 400px;
  width: 100%;
}

/* ===================== ダウンロード・購入 ===================== */
.download-section {
  background: #f7f7fa;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(80,80,120,0.08);
  margin: 40px auto;
  padding: 32px 20px;
  max-width: 700px;
}
.download-section h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #3a3a5a;
}
.download-section p {
  margin-bottom: 18px;
  color: #555;
}
.download-section ul {
  margin-bottom: 18px;
  padding-left: 20px;
}
.download-section li {
  margin-bottom: 6px;
  color: #444;
}
.download-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* 明示的なサイズを指定してダウンロードビジュアルのサイズ不定問題を解消 */
.download-visual {
  flex: 0 0 510px; /* 固定基準幅 */
  width: 510px;    /* デスクトップ幅を明示 */
  max-width: 100%; /* コンテナ幅を超えない */
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
}

.download-visual-img {
  display: block;
  width: 100%;
  height: 287px; /* 510px × 9/16 = 約287px（16:9））*/
  object-fit: cover;
  aspect-ratio: 16/9;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-radius: 0;
}

.coming-soon-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 2.5rem;
  font-weight: bold;
  padding: 20px 40px;
  border-radius: 12px;
  letter-spacing: 0.15em;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border: 3px solid #fff;
}

/* レスポンシブ：画面幅が狭い場合は幅を100%にして高さは自動 */
@media (max-width: 600px) {
  .download-container {
    max-width: 100vw;
    padding-left: 0;
    padding-right: 0;
  }
  .download-visual {
    max-width: 100vw !important;
    width: 100vw !important;
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
  .download-visual-img {
    width: 100%;
    height: auto; /* アスペクト比を保ちながら自動調整 */
    display: block;
    object-fit: contain;
    aspect-ratio: 16/9;
  }
  .coming-soon-overlay {
    font-size: 1.8rem;
    padding: 15px 30px;
    border-width: 2px;
  }
}
/* ===================== SNS・コミュニティ ===================== */
.sns-section {
  background: #f4f8ff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(80,80,120,0.08);
  margin: 40px auto;
  padding: 32px 20px;
  max-width: 700px;
  text-align: center;
}
.sns-section h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #3a3a5a;
}
.sns-section p {
  margin-bottom: 18px;
  color: #555;
}
.sns-section a {
  display: inline-block;
  margin: 0 12px;
  padding: 8px 20px;
  background: linear-gradient(90deg,#5a7a7a 0%,#b7c7c7 100%);
  color: #2a2a4a;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(80,120,120,0.10);
  transition: background 0.2s;
}
.sns-section a:hover {
  background: linear-gradient(90deg,#3a5a5a 0%,#8a9e9e 100%);
}
@media (max-width: 600px) {
  .sound-section, .system-section, .download-section, .sns-section {
    padding: 20px 6px;
    margin: 24px 0;
    max-width: 98vw;
  }
  .common-section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .common-section p {
    padding-left: 10px;
    padding-right: 10px;
  }
  .sound-sample-group {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .system-img, .system-video {
    max-width: 98vw;
  }
  .download-btn {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
  }
  .sns-section a {
    margin: 8px 0;
    width: 90%;
    padding: 10px 0;
  }
}

/* ===================== アニメーション ===================== */
@keyframes fadeInContent {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
.char-fade-animation {
  animation: fadeInContent 0.5s ease forwards;
}

/* ===================== メディアクエリ ===================== */
@media (max-width: 768px) {
  .char-main-content {
    flex-direction: column;
    width: 95% !important;
    max-width: 95vw !important;
    min-height: 750px !important; /* 最小高さを固定 */
    flex: 0 0 auto !important;
    padding: 15px !important;
  }
  .char-illustration {
    flex: 0 0 auto;
    width: 100%;
    max-height: 420px; /* 画像エリアの最大高さを固定 */
    padding: 10px;
    min-width: auto;
  }
  .char-illustration img {
    max-width: 280px;
    max-height: 400px;
  }
  .char-text-container {
    flex: 0 0 auto;
    width: 100%;
    padding: 15px;
    padding-top: 30px; /* 上部余白を固定 */
    min-height: 300px; /* 最小高さを固定 */
  }
  .vertical-quote {
    position: static;
    writing-mode: vertical-rl;
    text-align: left;
    margin: 10px auto;
    max-width: 90%;
  }
  nav {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    align-items: center;
    background: rgba(0,0,0,0.9);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  nav.open {
    max-height: 500px;
  }
  nav ul {
    flex-direction: column;
    gap: 0;
  }
  nav li {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
  .hamburger {
    display: flex;
  }
  #splash-text h1 {
    font-size: 2rem;
  }
  .top-section,
  .hero-content {
    min-height: auto;
    padding-top: 0;
    margin-top: 0;
  }
  .hero-visual-sp {
    margin-top: 0 !important;
    padding-top: 0 !important;
    display: block;
  }
  .character-section {
    padding: 20px 10px;
  }
  .top-section {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}
@media (max-width: 480px) {
  .char-title {
    font-size: 1.4rem;
  }
  .char-subtitle {
    font-size: 1rem;
  }
  nav ul {
    font-size: 0.9em;
  }
  #splash-text h1 {
    font-size: 1.5rem;
    gap: 12px !important; /* 2行の間隔を少し狭く */
  }
  #splash-logo img {
    width: 70% !important;
    height: auto !important;
    max-width: 350px !important;
  }
  #splash-part1, #splash-part2 {
    font-size: 1.6rem !important;
  }
}

/* ===================== スプラッシュ・ブロック ===================== */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f0f0ef;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 1;
  transition: opacity 1s ease, background-color 2s ease;
}
#splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
#splash-logo,
#splash-text {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f0f0ef;
}
#splash-logo {
  opacity: 0;
  transition: opacity 2s ease;
}
#splash-logo.visible {
  opacity: 1;
}
#splash-logo.hidden {
  opacity: 0;
}
#splash-text {
  opacity: 0;
  transition: opacity 2s ease;
}
#splash-text.visible {
  opacity: 1;
}
#splash-part1, #splash-part2 {
  opacity: 0;
  font-family: serif;
  transition: opacity 2s ease;
}
#splash-part1.visible, #splash-part2.visible {
  opacity: 1;
}
#splash-part1.hidden, #splash-part2.hidden {
  opacity: 0;
}

#interaction-blocker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
}
#interaction-blocker.active {
  pointer-events: auto;
}
body.no-scroll {
  overflow: hidden;
}
.top-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  background-color: #f0f0ef;
}
.common-section {
  max-width: 600px;
  margin: 0 auto;
}

/* STORYとMUSICセクションは幅制限を解除 */
#story-section,
#music-section {
  max-width: none !important;
  width: 100% !important;
}

/* STORYとMUSICセクション内のコンテンツは中央寄せで幅制限 */
#story-section > div,
#music-section > div {
  max-width: 600px;
  margin: 0 auto;
}

.download-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}
.download-title {
  width: 100%;
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}
.download-visual {
  flex: 0 0 510px; /* 固定基準幅 */
  width: 510px;    /* デスクトップ幅を明示 */
  max-width: 100%; /* コンテナ幅を超えない */
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 18px;
}
.download-visual-img {
  display: block;
  width: 100%;
  height: 287px; /* 510px × 9/16 = 約287px（16:9））*/
  object-fit: cover;
  aspect-ratio: 16/9;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  border-radius: 0;
}
.download-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}
.download-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  width: 100%;
}
.booth-row {
  width: 100%;
  display: flex;
  justify-content: center;
}
@media (max-width: 600px) {
  .download-container {
    max-width: 100vw;
    padding-left: 0;
    padding-right: 0;
  }
  .download-visual {
    max-width: 100vw !important;
    width: 100vw !important;
    flex: 0 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
  .download-visual-img {
    width: 100%;
    height: auto; /* アスペクト比を保ちながら自動調整 */
    display: block;
    object-fit: contain;
    aspect-ratio: 16/9;
  }
}

/* スマホでcharacterセクションの左右余白を確保 */
@media (max-width: 600px) {
  .character-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  /* 内部要素が余白を二重に取らないように調整 */
  .character-section .char-main-content {
    box-sizing: border-box;
    padding-left: 0;
    padding-right: 0;
  }
}

/* 小さい画面ではさらに小さく */
@media (max-width: 380px) {
  .char-illustration img {
    max-width: 200px;
    max-height: 350px;
  }
  .char-title {
    font-size: 1.3rem;
  }
  .char-subtitle {
    font-size: 0.95rem;
  }
}

/* モバイルでキャラクター領域をレスポンシブ対応 */
@media (max-width: 600px) {
  .character-section {
    overflow-x: visible;
    padding: 20px 10px;
  }
  .char-main-content {
    width: 95% !important;
    max-width: 95vw !important;
    flex: 0 0 auto !important;
    min-height: 750px !important; /* 最小高さを固定 */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 15px !important;
  }
  .char-illustration {
    width: 100%;
    padding: 10px;
    max-height: 420px; /* 画像エリアの最大高さを固定 */
  }
  .char-illustration img {
    max-width: 250px;
    max-height: 380px;
    height: auto;
  }
  .char-text-container {
    width: 100%;
    padding: 15px;
    padding-top: 30px; /* 上部余白を固定 */
    min-height: 300px; /* 最小高さを固定 */
  }
}

/* タブレット幅（601px〜768px）も固定幅にする場合の設定 */
@media (min-width: 601px) and (max-width: 768px) {
  .char-main-content {
    width: 700px;
    max-width: 700px;
    flex: 0 0 700px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding: 18px;
  }
}

/* ===================== ダウンロードボタン ===================== */
.download-btn,
.booth-btn {
  /* コントラストの高いダーク系背景と白文字で視認性を確保 */
  display: inline-block;
  background: linear-gradient(90deg, #fff 0%, #fff 100%);
  color: #000000;
  border: 2px solid transparent; /* 境界は目立たせない */
  font-weight: bold;
  font-size: 1.08em;
  padding: 12px 32px;
  border-radius: 8px;
  text-align: center;
  border-color: #ababab;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.download-btn:hover,
.download-btn:focus {
  /* ホバーで反転して目立たせる */
  background: linear-gradient(90deg, #9effea 0%, #9effea 100%);
  color: #000;
  border-color: #000000;
  outline: none;
}

.booth-btn:hover,
.booth-btn:focus {
  /* ホバーで反転して目立たせる */
  background: linear-gradient(90deg, #ff9790 0%, #ff9790 100%);
  color: #000;
  border-color: #000000;
  outline: none;
}


/* アクセシビリティのためのフォーカスリング */
.download-btn:focus-visible,
.booth-btn:focus-visible {
  outline: 3px solid rgba(0,0,0,0.12);
  outline-offset: 3px;
}

/* 小さい画面用の既存スタイルはそのまま継承 */
@media (max-width: 600px) {
  .download-btn,
  .booth-btn {
    width: 98vw;
    font-size: 1em;
    padding: 12px 0;
    box-sizing: border-box;
  }
}

/* ===================== キャラクター幅のレスポンシブ固定（上書き） ===================== */
/* これらは既存の固定幅指定を上書きして、常にビューポートに収まるようにします。 */
.char-main-content {
  /* 最大幅は900pxだが、ビュー幅が小さければ100%まで縮む */
  max-width: 900px;
  width: min(900px, 100%);
  flex: 0 0 auto; /* 必要に応じて伸縮はさせるが、過度なflex-basis固定は避ける */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* タブレット幅: 最大700pxだがビュー幅を超えない */
@media (min-width: 601px) and (max-width: 768px) {
  .char-main-content {
    max-width: 700px;
    width: min(700px, 100%);
    flex: 0 0 auto;
  }
}

/* スマホ幅: 340px固定表示を維持するが、セクション側で横スクロール可能にして見切れを回避 */
@media (max-width: 600px) {
  .character-section {
    overflow-x: auto; /* 横スクロール許可 */
    padding-left: 12px;
    padding-right: 12px;
  }
  .char-main-content {
    max-width: 340px;
    width: 340px;
    flex: 0 0 340px;
    box-sizing: border-box;
  }
}

/* 強制: オーバーレイが何らかの理由で display:none になる場合に備えて上書き */
.nav-overlay {
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: auto; /* 小さい画面で内容が収まらない時にスクロール可能にする */
  -webkit-overflow-scrolling: touch;
}
.nav-overlay.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* nav-overlay 内のコンテンツが確実に上に来るようにする */
.nav-overlay__content { z-index: 10003; }
