/* ========================================
   蒼櫻〜約束の物語〜 公式サイト
   メインスタイルシート
   ======================================== */

/* --- CSS変数 --- */
:root {
  --color-sky: #7ec8e3;
  --color-sky-light: #6d8f9d;
  --color-sky-pale: #e8f6fc;
  --color-sakura: #f5c6d8;
  --color-sakura-deep: #e8a0b8;
  --color-sakura-light: #fce4ec;
  --color-white: #ffffff;
  --color-off-white: #fafafa;
  --color-text: #3a3540;
  --color-text-light: #6e6478;
  --color-text-muted: #a09aac;
  --color-border: #e8d8f0;

  --font-serif: 'Shippori Mincho', 'Noto Serif JP', 'Yu Mincho', serif;

  --header-height: 70px;
  --transition: 0.3s ease;

  --shadow-soft: 0 4px 24px rgba(126, 200, 227, 0.15);
  --shadow-card: 0 8px 32px rgba(90, 60, 120, 0.1);
}

/* --- リセット & ベース --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-serif);
  color: var(--color-text);
  background-color: var(--color-off-white);
  line-height: 1.8;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover { opacity: 0.75; }

ul { list-style: none; }

img { max-width: 100%; height: auto; display: block; }

/* ========================================
   桜の花びらアニメーション
   ======================================== */
#sakura-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.sakura-petal {
  position: absolute;
  top: 0;
  width: 14px;
  height: 14px;
  background: radial-gradient(ellipse at 40% 35%, #ffffff 50%, #c8e8f5 100%);
  border-radius: 150% 0% 150% 0%;
  animation: sakura-fall linear infinite;
  filter: drop-shadow(0 1px 3px rgba(180, 220, 240, 0.5));
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes sakura-fall {
  0%   { transform: translate3d(0,    -40px, 0) rotate(0deg);   opacity: 0;   }
  8%   { opacity: 0.85; }
  25%  { transform: translate3d(18px,  22vh, 0) rotate(80deg);  }
  50%  { transform: translate3d(-14px, 48vh, 0) rotate(160deg); opacity: 0.75; }
  75%  { transform: translate3d(22px,  74vh, 0) rotate(260deg); }
  92%  { opacity: 0.5; }
  100% { transform: translate3d(10px, 108vh, 0) rotate(360deg); opacity: 0;   }
}

/* ========================================
   ヘッダー
   ======================================== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}

#site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(126, 200, 227, 0.2);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo a {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-sky);
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(126, 200, 227, 0.3);
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--color-text-light);
  letter-spacing: 0.15em;
}

#global-nav ul {
  display: flex;
  gap: 4px;
}

#global-nav ul li a {
  display: block;
  padding: 6px 12px;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--color-text);
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
}

#global-nav ul li a:hover {
  background: var(--color-sky-pale);
  color: var(--color-sky);
  opacity: 1;
}

/* ハンバーガーボタン */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1100;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ヘッダーがトップにある時、白文字対応 */
#site-header:not(.scrolled) .logo-main { color: #b8e0f0; }
/* キービジュアル上のロゴとprojectに青灰色の縁取りを付ける */
body:not(.inner-page) #site-header:not(.scrolled) .logo-main,
body:not(.inner-page) #site-header:not(.scrolled) .logo-sub {
  text-shadow:
    -1px -1px 0 #6d8b9e,
     0   -1px 0 #6d8b9e,
     1px -1px 0 #6d8b9e,
    -1px  0   0 #6d8b9e,
     1px  0   0 #6d8b9e,
    -1px  1px 0 #6d8b9e,
     0    1px 0 #6d8b9e,
     1px  1px 0 #6d8b9e,
     0    2px 4px rgba(74, 105, 125, 0.2);
}
#site-header:not(.scrolled) .logo-sub  { color: rgba(255,255,255,0.6); }
#site-header:not(.scrolled) #global-nav ul li a { color: rgba(255,255,255,0.85); }
#site-header:not(.scrolled) #global-nav ul li a:hover { background: rgba(255,255,255,0.15); color: #fff; }
#site-header:not(.scrolled) .nav-toggle span { background: #fff; }

/* ========================================
   ボタン
   ======================================== */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 30px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-sky) 0%, var(--color-sky-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(126, 200, 227, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(126, 200, 227, 0.5);
  opacity: 1;
}

.btn-secondary {
  background: rgba(71, 199, 242, 0.2);
  color: var(--color-white);
  border: 1.5px solid rgba(104, 217, 255, 0.6);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--color-sky);
  border: 1.5px solid var(--color-sky);
}

.btn-outline:hover {
  background: var(--color-sky-pale);
  transform: translateY(-2px);
  opacity: 1;
}

.btn.disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   セクション共通
   ======================================== */
.section {
  padding: 100px 0;
  position: relative;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.section-title .title-en {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--color-sky);
  font-family: 'Georgia', serif;
  text-transform: uppercase;
}

.section-title .title-ja {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.15em;
  position: relative;
  padding-bottom: 16px;
}

.section-title .title-ja::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-sky-light), var(--color-sakura-deep));
  border-radius: 2px;
}

.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 48px;
  letter-spacing: 0.1em;
}

/* ========================================
   ヒーローセクション
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 260px;
  background: linear-gradient(to top, #fafafa 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero_pc.png') center center / cover no-repeat;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(245, 198, 216, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 80%, rgba(168, 216, 234, 0.2) 0%, transparent 60%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to top, rgba(245, 198, 216, 0.15), transparent);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 55, 0.1);
}

.hero-content {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  text-align: center;
  color: var(--color-white);
  padding: 0 32px;
  width: max-content;
  max-width: calc(100vw - 64px);
}

.hero-emblem {
  font-size: 2rem;
  color: var(--color-sakura);
  margin-bottom: 24px;
  display: block;
  animation: emblem-pulse 3s ease-in-out infinite;
}

@keyframes emblem-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.8; }
  50%       { transform: scale(1.12); opacity: 1;   }
}

.hero-title {
  position: absolute;
  bottom: 48px;
  right: 48px;
  z-index: 10;
  margin: 0;
}

.hero-title img {
  width: min(240px, 32vw);
  height: auto;
}

.title-kanji {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  line-height: 1;
  text-shadow: 0 2px 20px rgba(126, 200, 227, 0.6), 0 0 60px rgba(245, 198, 216, 0.3);
  animation: title-fade-in 1.2s ease forwards;
  opacity: 0;
}

.title-kana {
  font-size: clamp(0.85rem, 2vw, 1rem);
  letter-spacing: 0.5em;
  color: rgba(255, 255, 255, 0.75);
  animation: title-fade-in 1.2s 0.3s ease forwards;
  opacity: 0;
}

.title-subtitle {
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  animation: title-fade-in 1.2s 0.5s ease forwards;
  opacity: 0;
}

@keyframes title-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.hero-catchcopy {
  position: absolute;
  top: calc(var(--header-height) );
  left: 48px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45), 0 0 40px rgba(126, 200, 227, 0.4);
  z-index: 10;
  animation: title-fade-in 1.2s 0.8s ease forwards;
  opacity: 0;
  line-height: 1.6;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  animation: title-fade-in 1.2s 1s ease forwards;
  opacity: 0;
}

.hero-divider span {
  color: var(--color-sakura);
  font-size: 0.5rem;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: title-fade-in 1.2s 1.2s ease forwards;
  opacity: 0;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(20, 63, 70, 0.918);
  z-index: 10;
}

.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  font-family: 'Georgia', serif;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
  animation: scroll-line 1.5s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ========================================
   ニュースセクション
   ======================================== */
.news-section {
  background: var(--color-white);
  padding: 80px 0;
}

.news-list {
  border-top: 1px solid var(--color-border);
}

.news-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  min-width: 90px;
}

.news-tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  min-width: 56px;
  text-align: center;
}

.tag-new  { background: var(--color-sakura-light); color: var(--color-sakura-deep); }
.tag-info { background: var(--color-sky-pale);     color: var(--color-sky); }

.news-text {
  font-size: 0.9rem;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

/* ========================================
   あらすじセクション
   ======================================== */
.story-section {
  background: linear-gradient(160deg, var(--color-sky-pale) 0%, var(--color-white) 50%, var(--color-sakura-light) 100%);
  overflow: hidden;
}

.story-bg-deco {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245, 198, 216, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.story-content {
  max-width: 700px;
  margin: 0 auto 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.story-ornament {
  color: var(--color-sakura-deep);
  font-size: 1.2rem;
  opacity: 0.6;
}

.story-text {
  font-size: 1rem;
  line-height: 2.2;
  color: var(--color-text);
  letter-spacing: 0.12em;
}

.kaigyo{
  display: none;
}

.story-text em {
  font-style: normal;
  color: var(--color-sky);
  font-size: 1.05rem;
}

.story-cta { text-align: center; }

/* ========================================
   キャラクターセクション
   ======================================== */
.characters-section {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-sky-pale) 100%);
}

/* カードリスト */
.chara-list {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

/* カード本体 */
.chara-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--color-white);
  position: relative;
  transition: box-shadow var(--transition);
}

.chara-card:hover {
  box-shadow: 0 16px 48px rgba(90, 60, 120, 0.14);
}

/* テーマカラー（キャラクターごとに変更） */
.chara-card[data-theme="sunshine"] {
  --chara-color: #b96b1c;
  --chara-bg: linear-gradient(170deg, #ffe3c4 0%, #fff6c9 100%);
  --chara-accent: rgba(238, 167, 64, 0.16);
}

.chara-icon-link[data-theme="sunshine"] .chara-icon-fig {
  border-color: #e4a44d;
  background: linear-gradient(135deg, #ffe3c4, #fff6c9);
}

.chara-icon-link[data-theme="sunshine"] .chara-icon-kana {
  color: #b96b1c;
}

/* 8人分のアイコンは、既存の大きさと間隔を保って折り返す */
.chara-icon-list:has(.chara-icon-link[data-theme="sunshine"]) {
  flex-wrap: wrap;
}

.chara-card[data-theme="sakura"] {
  --chara-color: var(--color-sakura-deep);
  --chara-bg: linear-gradient(170deg, #fce4ec 0%, #fff0f5 100%);
  --chara-accent: rgba(232, 160, 184, 0.15);
}
.chara-card[data-theme="sky"] {
  --chara-color: #5ab8d6;
  --chara-bg: linear-gradient(170deg, #ddf3fc 0%, #f0faff 100%);
  --chara-accent: rgba(90, 184, 214, 0.12);
}
.chara-card[data-theme="twilight"] {
  --chara-color: #8b6bb1;
  --chara-bg: linear-gradient(170deg, #ede8f6 0%, #f7f4fc 100%);
  --chara-accent: rgba(139, 107, 177, 0.10);
}

/* シークレット: 既存カードの構造を保ち、澪だけ配色を変更 */
.chara-card[data-theme="secret"] {
  --chara-color: #88703c;
  --chara-bg: linear-gradient(170deg, #dcd9ee 0%, #f7f1df 100%);
  --chara-accent: rgba(176, 145, 79, 0.16);
  margin-top: 32px;
  background: linear-gradient(135deg, #faf8ff 0%, #fffaf0 100%);
  border: 1px solid #c9b77e;
  box-shadow: 0 8px 32px rgba(104, 83, 139, 0.16);
}

.chara-card[data-theme="secret"] .chara-name {
  color: #655078;
}

.chara-icon-link[data-theme="secret"] .chara-icon-fig {
  border-color: #b49a5f;
  background: linear-gradient(135deg, #e9e2f4, #fff3d6);
  box-shadow: 0 0 0 4px rgba(176, 145, 79, 0.12), 0 4px 20px rgba(104, 83, 139, 0.18);
}

.chara-icon-link[data-theme="secret"] .chara-icon-kana {
  color: #88703c;
}

.chara-icon-link[data-theme="secret"] .chara-icon-kanji {
  color: #655078;
}

/* 立ち絵パネル */
.chara-visual {
  background: var(--chara-bg);
  overflow: hidden;
  position: relative;
  min-height: 460px;
}

/* 淡い光のボケ演出 */
.chara-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 85%, rgba(255,255,255,0.45) 0%, transparent 70%),
    radial-gradient(circle 80px at 80% 12%, rgba(255,255,255,0.3) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.chara-stand-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  z-index: 0;
  color: transparent;
}

/* プロフィールパネル */
.chara-detail {
  padding: 48px 48px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  position: relative;
}

/* 右上の淡い光彩 */
.chara-detail::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--chara-accent) 0%, transparent 70%);
  pointer-events: none;
}

/* 名前ヘッダー */
.chara-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.chara-name-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chara-kana {
  font-size: 0.74rem;
  letter-spacing: 0.45em;
  color: var(--chara-color);
  font-family: 'Georgia', serif;
  opacity: 0.9;
}

.chara-name {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--color-text);
  line-height: 1.15;
}

/* 紹介用アイコン画像 */
.chara-icon-wrap {
  margin: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--chara-color);
  box-shadow: 0 0 0 4px var(--chara-accent), 0 4px 16px rgba(0,0,0,0.08);
  flex-shrink: 0;
  background: var(--chara-bg);
}

.chara-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

/* キャッチコピー */
.chara-catch {
  font-size: 0.95rem;
  color: var(--chara-color);
  letter-spacing: 0.15em;
  padding: 8px 0 8px 14px;
  border-left: 3px solid var(--chara-color);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* 区切り線 */
.chara-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--chara-color) 0%, transparent 80%);
  opacity: 0.25;
}

/* プロフィール一覧 */
.chara-profile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  position: relative;
  z-index: 1;
}

.chara-profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chara-profile-item dt {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--chara-color);
  background: var(--chara-accent);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid rgba(0,0,0,0.04);
}

.chara-profile-item dd {
  font-size: 0.88rem;
  color: var(--color-text);
  letter-spacing: 0.08em;
}

/* 紹介文 */
.chara-intro-text {
  font-size: 0.88rem;
  line-height: 2.1;
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
}

.chara-intro-text em {
  font-style: normal;
  color: var(--chara-color);
  display: block;
  margin-top: 10px;
  font-size: 0.87rem;
  letter-spacing: 0.1em;
}

/* アンカー遷移時にfixedヘッダーに被らないオフセット */
.chara-card {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

/* ========================================
   TOPページ キャラアイコンリスト（最大7つ）
   ======================================== */
.chara-icon-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: nowrap;
  margin-bottom: 48px;
}

.chara-icon-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: inherit;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.chara-icon-link:hover {
  transform: translateY(-8px);
  opacity: 1;
}

.chara-icon-fig {
  margin: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-sky-pale), var(--color-sakura-light));
  box-shadow: var(--shadow-soft);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.chara-icon-link:hover .chara-icon-fig {
  border-color: var(--color-sky);
  box-shadow: 0 8px 28px rgba(126, 200, 227, 0.4);
}

.chara-icon-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}

.chara-icon-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.chara-icon-kana {
  display: block;
  font-size: 0.62rem;
  color: var(--color-sky);
  letter-spacing: 0.2em;
  font-family: 'Georgia', serif;
}

.chara-icon-kanji {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text);
  letter-spacing: 0.2em;
  font-weight: 700;
}

.characters-cta {
  text-align: center;
}

/* ========================================
   キャラクターページ専用スタイル（character.html）
   ======================================== */

/* inner-pageクラスでヘッダーを常に白背景に固定 */
body.inner-page #site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(126, 200, 227, 0.2);
}

body.inner-page #site-header .logo-main { color: var(--color-sky) !important; }
body.inner-page #site-header .logo-sub  { color: var(--color-text-light) !important; }
body.inner-page #site-header #global-nav ul li a { color: var(--color-text) !important; }
body.inner-page #site-header #global-nav ul li a:hover {
  background: var(--color-sky-pale) !important;
  color: var(--color-sky) !important;
}
body.inner-page #site-header .nav-toggle span { background: var(--color-text) !important; }

/* ページヘッダー */
.chara-page-header {
  padding-top: calc(var(--header-height) + 64px);
  padding-bottom: 64px;
  background: linear-gradient(160deg, var(--color-sky-pale) 0%, var(--color-white) 50%, var(--color-sakura-light) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.chara-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 70% 30%, rgba(245, 198, 216, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 20% 70%, rgba(168, 216, 234, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.chara-page-header-inner {
  position: relative;
  z-index: 1;
}

.chara-page-breadcrumb {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--color-text-muted);
  font-family: 'Georgia', serif;
  margin-bottom: 16px;
  transition: color var(--transition);
}

.chara-page-breadcrumb::before {
  content: '← ';
}

.chara-page-breadcrumb:hover {
  color: var(--color-sky);
  opacity: 1;
}

.page-label-en {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--color-sky);
  font-family: 'Georgia', serif;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.page-label-ja {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-text);
  display: inline-block;
  padding-bottom: 20px;
  position: relative;
  margin: 0;
}

.page-label-ja::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-sky-light), var(--color-sakura-deep));
  border-radius: 2px;
}

.page-label-lead {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  letter-spacing: 0.2em;
  margin-top: 20px;
}

/* キャラクターページのカードリストセクション */
.chara-page-section {
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-sky-pale) 100%);
}

/* 現在のページのナビリンクをハイライト */
#global-nav ul li a.nav-current {
  background: var(--color-sky-pale);
  color: var(--color-sky);
}

body.inner-page #site-header #global-nav ul li a.nav-current {
  background: var(--color-sky-pale) !important;
  color: var(--color-sky) !important;
}

/* ========================================
   ギャラリーセクション
   ======================================== */
.gallery-section {
  background: linear-gradient(180deg, var(--color-sky-pale) 0%, var(--color-off-white) 100%);
}

.gallery-placeholder {
  border-radius: 16px;
  overflow: hidden;
  border: 2px dashed var(--color-border);
}

.gallery-placeholder-inner {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--color-text-muted);
  background: var(--color-white);
}

.gallery-placeholder-icon {
  font-size: 3rem;
  opacity: 0.4;
}

/* ========================================
   ゲームセクション
   ======================================== */
.game-section {
  background: var(--color-white);
}

.game-content {
  display: flex;
  justify-content: center;
}

/* イベント展示への案内 */
.event-invitation {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: clamp(28px, 5vw, 48px) 24px;
  text-align: center;
  border: 1px solid var(--color-sakura-deep);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--color-sakura-light), #fffaf0 55%, var(--color-sky-pale));
  box-shadow: var(--shadow-soft);
}

.event-invitation-label {
  display: inline-block;
  padding: 5px 18px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: #fff;
  color: #925064;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.event-invitation h3 {
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.event-invitation p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.event-invitation .event-invitation-link {
  width: auto;
  max-width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, #98536c, #794b70);
  color: #fff;
  box-shadow: 0 4px 16px rgba(152, 83, 108, 0.2);
}

.event-invitation-link:focus-visible {
  outline: 3px solid #794b70;
  outline-offset: 4px;
}

.game-info-box {
  background: linear-gradient(135deg, var(--color-sky-pale), var(--color-sakura-light));
  border-radius: 24px;
  padding: 60px 80px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-soft);
  max-width: 500px;
  width: 100%;
}

.game-info-icon { font-size: 3rem; }

.game-info-text {
  color: var(--color-text-light);
  letter-spacing: 0.1em;
  line-height: 2;
}

/* ========================================
   ムービーセクション
   ======================================== */
.movie-section {
  background: linear-gradient(160deg, #6be3cf, #cdf7f7);
  padding: 100px 0;
}

.movie-section .section-title .title-en { color: var(--color-sky-light); }
.movie-section .section-title .title-ja { color: var(--color-white); }
.movie-section .section-title .title-ja::after {
  background: linear-gradient(90deg, var(--color-sky-light), var(--color-sakura));
}

.movie-placeholder {
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(126, 200, 227, 0.2);
  background: rgba(255, 255, 255, 0.5);
}

.movie-placeholder-inner {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(49, 160, 182, 0.731);
}

.movie-play-icon {
  font-size: 1.5rem;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(47, 157, 162, 0.356);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
}

/* ========================================
   スペシャルセクション
   ======================================== */
.special-section {
  background: var(--color-off-white);
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.special-card {
  background: var(--color-white);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.special-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(90, 60, 120, 0.12);
}

.special-card-icon    { font-size: 2.5rem; }
.special-card-title   { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.12em; color: var(--color-text); }
.special-card-status  { font-size: 0.75rem; color: var(--color-text-muted); letter-spacing: 0.15em; }

/* ========================================
   フッター
   ======================================== */
#site-footer {
  background: linear-gradient(180deg, hsl(169, 100%, 90%), #62c4aa);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 40px;
  position: relative;
}

#site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, #fafafa 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  align-items: center;
  gap: 24px;
}

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

.footer-logo img {
  width: 300px;
  max-width: 80vw;
  height: auto;
}

.footer-catch {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.2em;
}

.footer-nav ul {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav ul li a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border-radius: 12px;
  transition: color var(--transition), background var(--transition);
}

.footer-nav ul li a:hover {
  color: var(--color-sky-light);
  background: rgba(126, 200, 227, 0.1);
  opacity: 1;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.1em;
}

/* ========================================
   ページトップボタン
   ======================================== */
.page-top-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--color-sky);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 4px 16px rgba(126, 200, 227, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 500;
}

.page-top-btn.visible { opacity: 1; pointer-events: auto; }
.page-top-btn:hover   { transform: translateY(-3px); opacity: 0.85; }

/* ========================================
   スクロールフェードイン
   ======================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   レスポンシブ
   ======================================== */

/* タブレット: 画像カラムを少し縮小 */
/* 7人分のアイコンが収まらない幅では、既存のサイズ・間隔のまま折り返す */
@media (min-width: 769px) and (max-width: 1000px) {
  .chara-icon-list:has(.chara-icon-link[data-theme="secret"]) {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .chara-card {
    grid-template-columns: 260px 1fr;
  }

  .chara-detail {
    padding: 36px 28px 36px 28px;
  }

  .chara-name { font-size: 2rem; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .hero-bg {
    background-image:
      linear-gradient(to top, #fafafa 0%, transparent 35%),
      url('../images/hero_sp.png');
    background-size: contain;
    background-position: center top;
  }

  .kaigyo{
    display: block;
  }
  .nav-toggle { display: flex; }

  #global-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(300px, 80vw);
    height: 100vh;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 32px 40px;
    z-index: 1050;
  }

  #global-nav.open { right: 0; }

  #global-nav ul { flex-direction: column; gap: 4px; }
  #global-nav ul li a { font-size: 1rem; padding: 12px 16px; border-radius: 12px; color: var(--color-text) !important; }
  #global-nav ul li a:hover { background: var(--color-sky-pale) !important; color: var(--color-sky) !important; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .section { padding: 70px 0; }
  .container { padding: 0 20px; }

  /* TOPアイコンリスト: 折り返してグリッド表示 */
  .chara-icon-list {
    flex-wrap: wrap;
    gap: 20px 24px;
  }

  .chara-icon-fig {
    width: 88px;
    height: 88px;
  }

  /* キャラクターページヘッダー */
  .chara-page-header {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 40px;
  }

  .page-label-ja { font-size: 1.5rem; }

  /* キャラクターカード: スマホは縦一列 */
  .chara-list { gap: 40px; }

  .chara-card {
    grid-template-columns: 1fr;
  }

  .chara-visual {
    min-height: 300px;
    height: 300px;
  }

  .chara-detail {
    padding: 28px 24px 36px;
    gap: 14px;
  }

  .chara-name { font-size: 1.9rem; }

  .chara-icon-wrap {
    width: 56px;
    height: 56px;
  }

  .chara-profile-list { gap: 8px 16px; }

  .special-grid { grid-template-columns: 1fr; gap: 16px; }

  .game-info-box { padding: 40px 32px; }

  .hero-catchcopy {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    top: calc(var(--header-height) + 32px);
    left: auto;
    right: 20px;
    font-size: clamp(1rem, 4.5vw, 1.3rem);
    letter-spacing: 0.35em;
  }

  .hero-title { display: none; }

  .hero-content { bottom: 24px; }

  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { width: 200px; text-align: center; }

  .news-item { gap: 12px; }

  .page-top-btn { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .title-kanji { font-size: 3.5rem; }
  .section-title .title-ja { font-size: 1.3rem; }
  .story-text { font-size: 0.9rem; }

  .chara-name { font-size: 1.6rem; }
  .chara-detail { padding: 24px 20px 28px; }
  .chara-visual { height: 260px; min-height: 260px; }

  .chara-icon-fig { width: 72px; height: 72px; }
  .chara-icon-kanji { font-size: 0.78rem; }
}
