/* ============================================================
   ミュージックワールド ～バイオリン姫と魔法のシンフォニー～
   Main Stylesheet — Pastel Pink × Gold Fantasy Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Noto+Serif+JP:wght@300;400;600;700&display=swap');

/* ── Variables ── */
:root {
  --gold: #c9a227;
  --gold-light: #e8c96a;
  --gold-dark: #9a7a10;
  --pink: #f48fb1;
  --pink-light: #fce4ec;
  --pink-pale: #fff5f8;
  --lavender: #e8d5f5;
  --cream: #fffdf7;
  --white: #ffffff;
  --text-dark: #3d1a2e;
  --text-mid: #7a4060;
  --text-pale: #a87898;
  --purple-pale: #b098c8;
  --gradient-bg: linear-gradient(160deg, #fce4ec 0%, #fffdf7 50%, #f3e5f5 100%);
  --gradient-card: linear-gradient(160deg, rgba(255,255,255,0.97) 0%, rgba(252,228,236,0.90) 100%);
  --gradient-gold: linear-gradient(135deg, #9a7a10, #c9a227, #e8c96a, #c9a227, #9a7a10);
  --font-title: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Noto Serif JP', serif;
  --shadow-gold: 0 0 18px rgba(201,162,39,0.30), 0 0 40px rgba(201,162,39,0.10);
  --shadow-card: 0 4px 24px rgba(180,90,140,0.10), 0 1px 6px rgba(0,0,0,0.05);
  --border-gold: 1px solid rgba(201,162,39,0.45);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--pink-pale);
  color: var(--text-dark);
  line-height: 1.8;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--gold); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--pink-light); }
::-webkit-scrollbar-thumb { background: var(--gradient-gold); border-radius: 4px; }

/* ── Sparkle Background ── */
.stars-bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--gradient-bg);
  overflow: hidden;
}
.stars-bg::before, .stars-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 15%, rgba(201,162,39,0.40), transparent),
    radial-gradient(1.5px 1.5px at 25% 35%, rgba(244,143,177,0.45), transparent),
    radial-gradient(2px 2px at 40% 10%, rgba(201,162,39,0.35), transparent),
    radial-gradient(1.5px 1.5px at 55% 45%, rgba(244,143,177,0.35), transparent),
    radial-gradient(2.5px 2.5px at 70% 20%, rgba(201,162,39,0.50), transparent),
    radial-gradient(1.5px 1.5px at 80% 60%, rgba(244,143,177,0.40), transparent),
    radial-gradient(2px 2px at 90% 30%, rgba(201,162,39,0.35), transparent),
    radial-gradient(1.5px 1.5px at 15% 70%, rgba(244,143,177,0.45), transparent),
    radial-gradient(1.5px 1.5px at 35% 80%, rgba(201,162,39,0.30), transparent),
    radial-gradient(2px 2px at 60% 75%, rgba(244,143,177,0.40), transparent),
    radial-gradient(1.5px 1.5px at 75% 85%, rgba(201,162,39,0.30), transparent),
    radial-gradient(2px 2px at 5% 50%, rgba(244,143,177,0.45), transparent),
    radial-gradient(1.5px 1.5px at 95% 55%, rgba(201,162,39,0.30), transparent),
    radial-gradient(2px 2px at 48% 92%, rgba(244,143,177,0.40), transparent),
    radial-gradient(2.5px 2.5px at 20% 5%, rgba(201,162,39,0.45), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
.stars-bg::after {
  background-image:
    radial-gradient(1.5px 1.5px at 8% 40%, rgba(244,143,177,0.35), transparent),
    radial-gradient(2px 2px at 30% 60%, rgba(201,162,39,0.45), transparent),
    radial-gradient(1.5px 1.5px at 50% 25%, rgba(244,143,177,0.40), transparent),
    radial-gradient(2.5px 2.5px at 65% 50%, rgba(201,162,39,0.35), transparent),
    radial-gradient(1.5px 1.5px at 85% 15%, rgba(244,143,177,0.50), transparent),
    radial-gradient(2px 2px at 45% 65%, rgba(201,162,39,0.30), transparent),
    radial-gradient(1.5px 1.5px at 72% 40%, rgba(244,143,177,0.40), transparent),
    radial-gradient(1.5px 1.5px at 18% 88%, rgba(201,162,39,0.35), transparent),
    radial-gradient(2px 2px at 93% 78%, rgba(244,143,177,0.45), transparent),
    radial-gradient(1.5px 1.5px at 38% 48%, rgba(201,162,39,0.30), transparent);
  animation-delay: 2s;
  animation-direction: alternate-reverse;
}
@keyframes twinkle {
  0%   { opacity: 0.55; }
  100% { opacity: 1; }
}

/* ── Header / Nav ── */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: linear-gradient(to bottom, rgba(255,248,252,0.97), rgba(255,248,252,0.80));
  backdrop-filter: blur(12px);
  border-bottom: var(--border-gold);
  box-shadow: 0 2px 16px rgba(180,90,140,0.08);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.nav-logo {
  font-family: var(--font-title);
  font-size: clamp(0.75rem, 1.4vw, 0.92rem);
  color: var(--gold-dark);
  letter-spacing: 0.08em;
  line-height: 1.3;
}
.nav-logo span {
  display: block; font-size: 0.78em;
  color: var(--text-pale); font-family: var(--font-heading); letter-spacing: 0.12em;
}
nav ul { list-style: none; display: flex; gap: 0.3rem; flex-wrap: wrap; }
nav ul li a {
  font-family: var(--font-heading);
  font-size: 0.76rem; letter-spacing: 0.12em;
  color: var(--text-mid);
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent; border-radius: 2px;
  transition: all 0.3s ease; display: block; text-transform: uppercase;
}
nav ul li a:hover, nav ul li a.active {
  color: var(--gold-dark);
  border-color: rgba(201,162,39,0.45);
  background: rgba(201,162,39,0.07);
}
/* Project nav — subtle gold accent */
nav ul li a.nav-project {
  color: var(--gold);
  border-color: rgba(201,162,39,0.30);
  text-shadow: 0 0 12px rgba(201,162,39,0.25);
}
nav ul li a.nav-project:hover {
  color: var(--gold-light);
  border-color: rgba(201,162,39,0.65);
  background: rgba(201,162,39,0.10);
  text-shadow: 0 0 16px rgba(201,162,39,0.45);
}

/* Hamburger */
.hamburger { display: none; cursor: pointer; background: none; border: none; padding: 0.5rem; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--gold-dark); margin: 5px 0; transition: all 0.3s ease;
}

/* ── Page Hero ── */
.page-hero {
  padding: 10rem 2rem 5rem;
  text-align: center; position: relative;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(255,245,248,0.70));
}
.page-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--gold); text-shadow: var(--shadow-gold);
  letter-spacing: 0.1em; margin-bottom: 1rem;
}
.page-hero .subtitle {
  font-family: var(--font-heading);
  color: var(--text-pale); letter-spacing: 0.2em; font-size: 0.9rem;
}

/* ── Gold Divider ── */
.gold-divider {
  text-align: center; margin: 2rem auto;
  display: flex; align-items: center; gap: 1rem; max-width: 500px;
}
.gold-divider::before, .gold-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--gradient-gold); opacity: 0.6;
}
.gold-divider .icon { color: var(--gold); font-size: 1.2rem; }

/* ── Section Common ── */
.section { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem; }
.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--gold-dark);
  text-shadow: 0 0 20px rgba(201,162,39,0.22);
  text-align: center; margin-bottom: 0.5rem; letter-spacing: 0.08em;
}
.section-subtitle {
  font-family: var(--font-heading); color: var(--text-pale);
  text-align: center; letter-spacing: 0.2em; font-size: 0.8rem;
  margin-bottom: 3rem; text-transform: uppercase;
}

/* ── Card ── */
.card {
  background: var(--gradient-card);
  border: var(--border-gold); border-radius: 8px; padding: 2rem;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top left, rgba(201,162,39,0.05), transparent 60%);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold), var(--shadow-card); }

/* ── Button ── */
.btn {
  display: inline-block; font-family: var(--font-heading);
  font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.8rem 2.5rem;
  border: 1px solid var(--gold); color: var(--gold-dark);
  background: rgba(255,255,255,0.75);
  cursor: pointer; transition: all 0.3s ease;
  position: relative; overflow: hidden; border-radius: 2px;
}
.btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient-gold);
  opacity: 0; transform: scaleX(0); transition: all 0.3s ease;
}
.btn:hover { color: var(--white); }
.btn:hover::before { opacity: 1; transform: scaleX(1); }
.btn span { position: relative; z-index: 1; }

/* ── Footer ── */
footer {
  background: linear-gradient(to top, rgba(252,228,236,0.98), rgba(255,248,252,0.95));
  border-top: var(--border-gold);
  padding: 3rem 2rem; text-align: center; margin-top: 4rem;
}
footer p {
  color: var(--text-pale); font-size: 0.8rem;
  font-family: var(--font-heading); letter-spacing: 0.15em;
}
footer .footer-logo {
  font-family: var(--font-title); color: var(--gold-dark);
  font-size: 0.95rem; margin-bottom: 0.3rem;
}
footer .footer-logo-sub {
  font-family: var(--font-heading); color: var(--text-pale);
  font-size: 0.72rem; letter-spacing: 0.15em; margin-bottom: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin: 1rem 0; flex-wrap: wrap; }
.footer-links a {
  color: var(--text-pale); font-family: var(--font-heading);
  font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase;
}
.footer-links a:hover { color: var(--gold); }

/* ── Animated musical notes ── */
.note {
  position: fixed; pointer-events: none; z-index: -1;
  font-size: 1.5rem; color: rgba(201,162,39,0.18);
  animation: floatNote linear infinite;
}
@keyframes floatNote {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

/* ── Fade-in ── */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  nav { width: 100%; max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
  nav.open { max-height: 500px; }
  nav ul { flex-direction: column; padding: 0.5rem 0; }
  nav ul li a { padding: 0.6rem 1rem; }
  .nav-inner { flex-wrap: wrap; }
}

/* ============================================================
   INDEX PAGE
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: space-between;
  flex-direction: column; text-align: center;
  padding: 8rem 2rem 4.5rem;
  position: relative; overflow: hidden;

  /* キービジュアル背景 */
  background-image: url('../images/background/hero-background-main.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed; /* PC: パララックス */
  background-repeat: no-repeat;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  /* 上部・下部に薄くグラデーションをかけてロゴ・ボタンの可読性を確保 */
  background:
    linear-gradient(to bottom,
      rgba(20,5,15,0.22) 0%,
      transparent 25%,
      transparent 65%,
      rgba(20,5,15,0.28) 100%);
  pointer-events: none; z-index: 0;
}
/* 前景コンテンツを確実にオーバーレイより上に */
.hero > * { position: relative; z-index: 1; }
.hero-ornament {
  width: 200px; height: 2px;
  background: var(--gradient-gold);
  margin: 1.5rem auto; position: relative; opacity: 0.7;
}
.hero-ornament::before, .hero-ornament::after {
  content: '♦'; position: absolute; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 0.7rem;
}
.hero-ornament::before { left: -1rem; }
.hero-ornament::after  { right: -1rem; }

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: clamp(0.7rem, 1.5vw, 0.9rem);
  letter-spacing: 0.5em; color: var(--gold-dark);
  text-transform: uppercase; margin-bottom: 0.8rem;
}
/* メインタイトル（ヒーロー上部） */
.hero-title {
  line-height: 1; margin: 0;
}
.hero-title-logo {
  display: block;
  width: min(900px, 86vw);
  height: auto;
  margin: 0 auto;
  filter:
    drop-shadow(0 0 40px rgba(201,162,39,0.55))
    drop-shadow(0 2px 24px rgba(0,0,0,0.30))
    drop-shadow(0 0 100px rgba(201,162,39,0.18));
}

/* ヒーロー内ボタン */
.hero-buttons { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.btn-hero {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 18px rgba(0,0,0,0.18);
}

/* キャッチコピー帯（ヒーロー直下）：ガラス風 */
.hero-tagline-band {
  background: rgba(255, 248, 252, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: var(--border-gold);
  border-bottom: 1px solid rgba(201,162,39,0.18);
  padding: 2rem 2rem 1.8rem;
  text-align: center;
}
.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.8vw, 1.05rem);
  color: var(--text-mid); max-width: 580px;
  margin: 0 auto; font-style: italic; line-height: 2;
}

/* Visual violin (non-top pages) */
.hero-visual { width: 260px; height: 260px; margin: 2rem auto; position: relative; }
.violin-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 18px rgba(201,162,39,0.45)); }

/* ── トップページ専用スタイル ── */
/* stars-bg をキービジュアルに差し替え（スクロール後も背景が続く） */
.page-top .stars-bg {
  background: url('../images/background/hero-background-main.png') center top / cover no-repeat;
}
/* トップページでは stars-bg のスパークルアニメーションを非表示 */
.page-top .stars-bg::before,
.page-top .stars-bg::after { display: none; }

/* ── イントロセクション：ガラスモーフィズム ── */
.hero-intro-wrap {
  background: rgba(255, 248, 252, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(201,162,39,0.28);
  border-bottom: 1px solid rgba(201,162,39,0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 4px 32px rgba(180,90,140,0.06);
}

/* ── レスポンシブ ── */
@media (max-width: 768px) {
  .hero {
    /* iOS Safari: background-attachment:fixed が機能しないため scroll に */
    background-attachment: scroll;
    background-position: center center;
    padding: 6.5rem 1.5rem 4rem;
  }
}
/* 縦持ち：220%スケールでキャラ2人が両端に収まる（64%でキャラ中央に） */
@media (orientation: portrait) and (max-width: 768px) {
  .hero {
    background-size: 220% auto;
    background-position: 64% top;
    /* 画像高さ(≈115vw)＋ボタン分のみ確保してボタンを画像直下に寄せる */
    min-height: calc(115vw + 8rem);
    justify-content: space-between;
  }
  /* 画像終端(≈74%)に向けてフェードアウト → ボタンエリアを暗く */
  .hero::before {
    background:
      linear-gradient(to bottom,
        rgba(20,5,15,0.40) 0%,
        transparent 18%,
        transparent 70%,
        rgba(20,5,15,0.80) 84%,
        rgba(20,5,15,0.99) 100%);
  }
}
@media (max-width: 600px) {
  .hero-title-logo { width: min(460px, 93vw); }
  .hero-buttons { gap: 1rem; }
}

/* Announcement band */
.announcement-band {
  background: linear-gradient(135deg,
    rgba(244,228,236,0.97) 0%,
    rgba(252,228,236,0.99) 50%,
    rgba(244,228,236,0.97) 100%);
  border-top: var(--border-gold); border-bottom: var(--border-gold);
  padding: 1rem 2rem; text-align: center;
  font-family: var(--font-heading); font-size: 0.82rem;
  letter-spacing: 0.2em; color: var(--gold-dark); text-transform: uppercase;
  position: relative; /* stars-bg の上に確実に重なるよう */
}

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.info-card { text-align: center; }
.info-card .icon-wrap {
  width: 70px; height: 70px; margin: 0 auto 1.5rem;
  border: 1px solid rgba(201,162,39,0.5); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
  background: radial-gradient(circle, rgba(252,228,236,0.9), rgba(255,248,252,0.85));
  box-shadow: var(--shadow-gold);
}
.info-card h3 {
  font-family: var(--font-heading); color: var(--gold-dark);
  font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 0.8rem;
}
.info-card p { color: var(--text-mid); font-size: 0.9rem; }

/* ============================================================
   STORY PAGE
   ============================================================ */
.story-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: start; margin-bottom: 4rem;
}
@media (max-width: 900px) { .story-layout { grid-template-columns: 1fr; } }

.story-visual {
  position: sticky; top: 100px;
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 8px; overflow: hidden; aspect-ratio: 3/4;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
}
.story-visual-inner {
  padding: 0; text-align: center; position: relative;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.story-main-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: 4px;
}
.story-visual svg { width: 200px; filter: drop-shadow(0 0 12px rgba(201,162,39,0.5)); }
.story-visual-label {
  font-family: var(--font-heading); font-size: 0.75rem;
  letter-spacing: 0.3em; color: var(--text-pale);
  text-transform: uppercase; margin-top: 1.5rem;
}
.story-content h2 {
  font-family: var(--font-title); color: var(--gold-dark);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 1.5rem;
  text-shadow: 0 0 12px rgba(201,162,39,0.20);
}
.story-content p { color: var(--text-mid); margin-bottom: 1.5rem; font-size: 1rem; line-height: 2; }
.story-content .highlight {
  background: linear-gradient(135deg, rgba(244,143,177,0.10), rgba(201,162,39,0.06));
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.5rem; margin: 2rem 0;
  font-style: italic; color: var(--text-mid); border-radius: 0 6px 6px 0;
}
@media (max-width: 900px) {
  .story-content {
    background: rgba(15, 4, 20, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 1.8rem 1.4rem;
    border: 1px solid rgba(201,162,39,0.18);
  }
}

.acts-timeline { margin: 3rem 0; }
.act-item { display: flex; gap: 2rem; margin-bottom: 2.5rem; align-items: flex-start; }
.act-number {
  font-family: var(--font-title); font-size: 2.5rem;
  color: rgba(201,162,39,0.30); line-height: 1; min-width: 60px; text-align: center;
}
.act-content h3 {
  font-family: var(--font-heading); color: var(--gold-dark);
  font-size: 1rem; letter-spacing: 0.1em; margin-bottom: 0.5rem;
}
.act-content p { color: var(--text-mid); font-size: 0.9rem; }

/* ============================================================
   CHARACTERS PAGE
   ============================================================ */
.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem; margin-bottom: 4rem;
}
.char-icon {
  cursor: pointer; text-align: center; padding: 1.5rem 1rem;
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 10px; box-shadow: var(--shadow-card);
  transition: all 0.3s ease; position: relative; overflow: hidden;
}
.char-icon::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient-gold);
  opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.char-icon:hover { transform: translateY(-6px); box-shadow: var(--shadow-gold), var(--shadow-card); }
.char-icon:hover::before { opacity: 0.06; }
.char-icon.active { border-color: var(--gold); box-shadow: var(--shadow-gold); }
.char-avatar {
  width: 80px; height: 80px; margin: 0 auto 1rem;
  border-radius: 50%; border: 2px solid rgba(201,162,39,0.50);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  background: radial-gradient(circle, rgba(252,228,236,0.90), rgba(255,248,252,0.95));
  box-shadow: 0 0 12px rgba(201,162,39,0.18); transition: all 0.3s ease;
}
.char-icon:hover .char-avatar, .char-icon.active .char-avatar {
  box-shadow: 0 0 22px rgba(201,162,39,0.45); border-color: var(--gold);
}
.char-name {
  font-family: var(--font-heading); font-size: 0.8rem;
  color: var(--gold-dark); letter-spacing: 0.1em; display: block; margin-bottom: 0.2rem;
}
.char-role { font-size: 0.7rem; color: var(--text-pale); font-family: var(--font-heading); letter-spacing: 0.1em; }

/* ── Character Avatar with Image ── */
.char-avatar-has-img { overflow: hidden; padding: 0; }
.char-avatar-has-img .char-avatar-image {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  border-radius: 50%; display: block;
}
.char-avatar-has-img .char-avatar-fallback {
  width: 100%; height: 100%;
  display: none; align-items: center; justify-content: center; font-size: 2.5rem;
}

/* ══════════════════════════════════════════════════════════
   CHARACTER POPUP
   ══════════════════════════════════════════════════════════ */
.char-popup {
  position: fixed; z-index: 3500;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,0.99) 0%, rgba(255,245,250,0.99) 100%);
  border: 1px solid rgba(201,162,39,0.55);
  border-radius: 12px; backdrop-filter: blur(18px);
  box-shadow: 0 12px 50px rgba(180,80,130,0.18), 0 0 30px rgba(201,162,39,0.10);
  color: var(--text-dark);
  opacity: 0; transform: scale(0.93) translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
  pointer-events: none;
  scrollbar-width: thin; scrollbar-color: rgba(201,162,39,0.35) transparent;
}
.char-popup::-webkit-scrollbar { width: 5px; }
.char-popup::-webkit-scrollbar-thumb { background: rgba(201,162,39,0.30); border-radius: 3px; }
.char-popup.show { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; }
.char-popup.hiding {
  opacity: 0; transform: scale(0.95) translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease; pointer-events: none;
}
/* スクロールしても常に上部に固定されるヘッダーバー */
.char-popup-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 0.4rem 0.6rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.99) 0%, rgba(255,245,250,0.99) 100%);
  border-bottom: 1px solid rgba(201,162,39,0.18);
}
.char-popup-close {
  background: rgba(201,162,39,0.10); border: 1px solid rgba(201,162,39,0.35);
  color: rgba(201,162,39,0.75); font-size: 0.78rem;
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.char-popup-close:hover { background: rgba(201,162,39,0.20); color: var(--gold-dark); box-shadow: 0 0 8px rgba(201,162,39,0.4); }
.char-popup-img-area {
  width: 100%; background: rgba(252,228,236,0.40);
  border-bottom: 1px solid rgba(201,162,39,0.15);
  overflow: hidden; max-height: 260px;
  display: flex; align-items: center; justify-content: center;
}
.char-popup-img-area img { width: 100%; height: auto; max-height: 260px; object-fit: contain; display: block; }
.char-popup-avatar-only { padding: 1.4rem 0 0.4rem; display: flex; justify-content: center; }
.char-popup-avatar {
  width: 90px; height: 90px; border-radius: 50%; border: 2px solid;
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
  background: radial-gradient(circle, rgba(252,228,236,0.90), rgba(255,248,252,0.95));
}

/* ポップアップ上部メイン画像（丸型ではなく元比率で全体表示） */
.char-popup-main-img-area {
  width: 100%;
  background: rgba(252,228,236,0.35);
  border-bottom: 1px solid rgba(201,162,39,0.18);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.char-popup-main-img-full {
  width: 100%; height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.char-popup-body { padding: 0.9rem 1.2rem 1.3rem; }
.char-popup-name {
  font-family: var(--font-title); color: var(--gold-dark);
  font-size: clamp(1rem, 3vw, 1.25rem);
  text-shadow: 0 0 10px rgba(201,162,39,0.25);
  margin-bottom: 0.2rem; padding-right: 2rem; line-height: 1.3;
}
.char-popup-namesub { font-family: var(--font-heading); font-size: 0.65rem; color: var(--text-pale); letter-spacing: 0.2em; margin-bottom: 0.6rem; }
.char-popup-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; align-items: center; }
.char-popup-desc { color: var(--text-mid); font-size: 0.82rem; line-height: 1.9; margin: 0.7rem 0 0; }

/* モバイル暗幕 */
.char-popup-backdrop {
  position: fixed; inset: 0; z-index: 3400;
  background: rgba(0,0,0,0); transition: background 0.28s ease; pointer-events: none;
}
.char-popup-backdrop.active { background: rgba(30,5,15,0.55); pointer-events: auto; }
@media (min-width: 641px) { .char-popup-backdrop { display: none !important; } }

/* char-stats */
.char-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.char-stat dt { font-family: var(--font-heading); font-size: 0.67rem; letter-spacing: 0.2em; color: var(--text-pale); text-transform: uppercase; margin-bottom: 0.25rem; }
.char-stat dd { font-family: var(--font-heading); color: var(--gold-dark); font-size: 0.84rem; }

/* ポップアップ最下部キャラクター詳細画像 */
.char-popup-detail-img-wrap { margin-top: 1.4rem; padding-bottom: 0.4rem; }
.char-popup-detail-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.45), transparent);
  margin-bottom: 1.1rem;
}
.char-popup-detail-img {
  width: 100%; height: auto; display: block;
  border-radius: 6px; border: 1px solid rgba(201,162,39,0.30);
  box-shadow: 0 4px 16px rgba(180,80,130,0.12);
  cursor: zoom-in; transition: box-shadow 0.2s ease;
}
.char-popup-detail-img:hover { box-shadow: 0 4px 24px rgba(201,162,39,0.35); }

/* ============================================================
   WORLD MAP PAGE
   ============================================================ */
.world-intro { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.world-intro p { color: var(--text-mid); font-size: 1rem; line-height: 2; }
.world-map-container {
  position: relative; background: var(--gradient-card);
  border: var(--border-gold); border-radius: 8px;
  padding: 3rem; margin-bottom: 4rem; min-height: 500px;
  overflow: hidden; box-shadow: var(--shadow-card);
}
.world-map-container::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(244,143,177,0.10), transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(201,162,39,0.05), transparent 50%);
}
.map-svg-wrap { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }
.map-svg-wrap svg { width: 100%; filter: drop-shadow(0 0 8px rgba(201,162,39,0.25)); }
.kingdoms-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; margin-top: 3rem;
}
.kingdom-card {
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 8px; padding: 2rem; box-shadow: var(--shadow-card);
  transition: all 0.3s ease; cursor: default;
}
.kingdom-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-gold), var(--shadow-card); }
.kingdom-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.kingdom-emblem {
  width: 55px; height: 55px; border-radius: 50%;
  border: 2px solid rgba(201,162,39,0.50);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
  background: radial-gradient(circle, rgba(252,228,236,0.90), rgba(255,248,252,0.95));
  flex-shrink: 0;
}
.kingdom-name { font-family: var(--font-heading); color: var(--gold-dark); font-size: 1rem; letter-spacing: 0.1em; }
.kingdom-subtitle { font-size: 0.75rem; color: var(--text-pale); font-family: var(--font-heading); letter-spacing: 0.15em; }
.kingdom-card p { color: var(--text-mid); font-size: 0.88rem; line-height: 1.9; }
.kingdom-tag {
  display: inline-block; margin-top: 1rem;
  font-family: var(--font-heading); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-dark); border: 1px solid rgba(201,162,39,0.30);
  padding: 0.15rem 0.6rem; border-radius: 2px; margin-right: 0.4rem;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-filter { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.filter-btn {
  font-family: var(--font-heading); font-size: 0.75rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(201,162,39,0.35); color: var(--text-pale);
  background: rgba(255,255,255,0.65); cursor: pointer;
  transition: all 0.3s ease; border-radius: 2px;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold); color: var(--gold-dark); background: rgba(201,162,39,0.10);
}
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem; margin-bottom: 3rem;
}
.gallery-item {
  position: relative; aspect-ratio: 4/3;
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 8px; overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-card); transition: all 0.3s ease;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-gold), var(--shadow-card); }
.gallery-item-inner {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem; text-align: center; position: relative;
}
.gallery-item .art-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.gallery-item .art-title { font-family: var(--font-heading); color: var(--gold-dark); font-size: 0.85rem; letter-spacing: 0.1em; margin-bottom: 0.3rem; }
.gallery-item .art-category { font-size: 0.7rem; color: var(--text-pale); font-family: var(--font-heading); letter-spacing: 0.15em; text-transform: uppercase; }
.gallery-overlay {
  position: absolute; inset: 0; background: rgba(61,26,46,0.82);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-text { font-family: var(--font-heading); color: var(--gold-light); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* Gallery items with real images */
.gallery-item--img .gallery-item-inner { padding: 0; justify-content: flex-end; padding-bottom: 0.7rem; }
.gallery-item--img .gallery-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item--img .art-title,
.gallery-item--img .art-category { position: relative; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,0.9); }

/* Gallery Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20,5,15,0.92);
  display: none; align-items: center; justify-content: center;
  padding: 2rem; cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox-content {
  max-width: 800px; width: 100%; background: var(--gradient-card);
  border: var(--border-gold); border-radius: 8px;
  padding: 3rem; text-align: center; cursor: default;
  position: relative; animation: popIn 0.3s ease; box-shadow: var(--shadow-card);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close { position: absolute; top: 1rem; right: 1.5rem; font-size: 1.5rem; color: var(--gold); cursor: pointer; background: none; border: none; line-height: 1; }
.lightbox-icon { font-size: 6rem; margin-bottom: 1.5rem; display: block; }
.lightbox-title { font-family: var(--font-title); color: var(--gold-dark); font-size: 1.5rem; text-shadow: var(--shadow-gold); margin-bottom: 0.5rem; }
.lightbox-desc { color: var(--text-mid); font-size: 0.9rem; line-height: 1.9; }

/* ============================================================
   BGM PLAYER
   ============================================================ */
.bgm-player {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000;
  background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(252,228,236,0.96));
  border: 1px solid rgba(201,162,39,0.55); border-radius: 12px;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 28px rgba(180,90,140,0.15), 0 0 18px rgba(201,162,39,0.10);
  min-width: 285px; transition: opacity 0.3s ease;
}
.bgm-inner { padding: 0.7rem 1rem 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bgm-row1 { display: flex; align-items: center; gap: 0.8rem; }
.bgm-info { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; }
.bgm-note-anim { font-size: 1.25rem; color: var(--gold); flex-shrink: 0; animation: bgmNoteFloat 1.8s ease-in-out infinite alternate; }
@keyframes bgmNoteFloat {
  0%   { transform: translateY(0) rotate(-8deg); opacity: 0.7; }
  100% { transform: translateY(-5px) rotate(8deg); opacity: 1; }
}
.bgm-text { min-width: 0; }
.bgm-title { font-family: var(--font-heading); font-size: 0.72rem; color: var(--gold-dark); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bgm-sub { font-size: 0.58rem; color: var(--text-pale); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0.1rem; }
.bgm-controls { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.bgm-btn {
  width: 30px; height: 30px;
  border: 1px solid rgba(201,162,39,0.45);
  background: rgba(252,228,236,0.60); color: var(--gold-dark);
  border-radius: 50%; cursor: pointer; font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; flex-shrink: 0;
}
.bgm-btn:hover { background: rgba(201,162,39,0.20); box-shadow: 0 0 8px rgba(201,162,39,0.40); }
.bgm-play-btn { font-size: 0.72rem; }
.bgm-min-btn  { font-size: 1rem; font-weight: bold; line-height: 1; }
.bgm-vol-wrap { display: flex; align-items: center; gap: 0.3rem; }
.bgm-vol-icon { font-size: 0.75rem; cursor: default; user-select: none; }
.bgm-volume {
  width: 68px; height: 4px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, var(--gold) 40%, rgba(201,162,39,0.22) 40%);
  border-radius: 2px; outline: none; cursor: pointer;
}
.bgm-volume::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 5px rgba(201,162,39,0.60); cursor: pointer; }
.bgm-volume::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; border: none; background: var(--gold); box-shadow: 0 0 5px rgba(201,162,39,0.60); cursor: pointer; }
.bgm-row2 { display: flex; align-items: center; gap: 0.5rem; padding: 0 0.1rem; }
.bgm-time { font-family: var(--font-heading); font-size: 0.58rem; color: var(--text-pale); letter-spacing: 0.05em; white-space: nowrap; min-width: 28px; text-align: center; }
.bgm-seek {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, var(--gold) 0%, rgba(201,162,39,0.22) 0%);
  border-radius: 2px; outline: none; cursor: pointer;
}
.bgm-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 5px rgba(201,162,39,0.70); cursor: pointer; transition: transform 0.15s; }
.bgm-seek::-webkit-slider-thumb:hover { transform: scale(1.3); }
.bgm-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: none; background: var(--gold); box-shadow: 0 0 5px rgba(201,162,39,0.70); cursor: pointer; }
.bgm-play-btn.bgm-pulse { animation: bgmPlayPulse 1.2s ease-in-out infinite; }
@keyframes bgmPlayPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(201,162,39,0.40); transform: scale(1); }
  50%       { box-shadow: 0 0 22px rgba(201,162,39,0.90); transform: scale(1.15); }
}
.bgm-restore {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(201,162,39,0.55);
  background: linear-gradient(135deg, rgba(255,255,255,0.97), rgba(252,228,236,0.96));
  color: var(--gold-dark); font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(201,162,39,0.30);
  animation: bgmRestorePulse 2.5s ease-in-out infinite;
}
@keyframes bgmRestorePulse {
  0%, 100% { box-shadow: 0 0 10px rgba(201,162,39,0.25); }
  50%       { box-shadow: 0 0 26px rgba(201,162,39,0.60); }
}
@media (max-width: 500px) {
  .bgm-player { right: 0.5rem; bottom: 0.5rem; min-width: 250px; }
  .bgm-volume { width: 48px; }
  .bgm-title  { font-size: 0.65rem; }
}

/* ============================================================
   IMAGE PLACEHOLDERS
   ============================================================ */
.img-placeholder {
  position: relative;
  background: linear-gradient(135deg, rgba(252,228,236,0.50), rgba(255,245,248,0.80));
  border: 2px dashed rgba(201,162,39,0.38); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; width: 100%; aspect-ratio: 3 / 4; margin-top: 0.8rem;
}
.img-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg, transparent, transparent 18px, rgba(201,162,39,0.04) 18px, rgba(201,162,39,0.04) 36px);
}
.img-ph-label { position: relative; z-index: 1; text-align: center; color: rgba(201,162,39,0.60); font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; line-height: 2; padding: 1rem; }
.img-ph-label strong { display: block; font-size: 0.78rem; color: rgba(201,162,39,0.80); margin-top: 0.2rem; }
.gallery-img-placeholder {
  width: 100%; height: 100%; position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(252,228,236,0.50), rgba(255,248,252,0.80));
}
.gallery-img-placeholder::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 15px, rgba(201,162,39,0.04) 15px, rgba(201,162,39,0.04) 30px);
}

/* ============================================================
   CHARACTER DETAIL — Additional Styles
   ============================================================ */
.char-detail-left { display: flex; flex-direction: column; align-items: center; gap: 0; }
.char-name-sub { font-family: var(--font-heading); font-size: 0.72rem; color: var(--text-pale); letter-spacing: 0.2em; margin-bottom: 0.4rem; }
.char-attr-row {
  background: rgba(244,143,177,0.08);
  border-left: 2px solid rgba(201,162,39,0.40);
  padding: 0.45rem 1rem; margin-bottom: 0.6rem;
  font-size: 0.82rem; color: var(--text-mid); border-radius: 0 4px 4px 0;
}
.char-attr-label { font-family: var(--font-heading); font-size: 0.62rem; color: var(--gold-dark); letter-spacing: 0.2em; text-transform: uppercase; margin-right: 0.7rem; }
.role-badge {
  display: inline-block; font-family: var(--font-heading); font-size: 0.68rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-pale);
  border: 1px solid rgba(201,162,39,0.35); padding: 0.18rem 0.75rem; border-radius: 2px; margin-bottom: 0.5rem;
}
.country-badge {
  display: inline-block; font-family: var(--font-heading); font-size: 0.63rem;
  letter-spacing: 0.2em; border: 1px solid;
  padding: 0.15rem 0.75rem; border-radius: 2px; margin-bottom: 1rem; margin-left: 0.4rem;
}
.char-popup .role-badge   { margin-bottom: 0; }
.char-popup .country-badge { margin-bottom: 0; margin-left: 0; }
.char-popup .char-attr-row { margin-bottom: 0.5rem; font-size: 0.8rem; }

/* ============================================================
   WORLD PAGE — Kingdom theme accents (pastel)
   ============================================================ */
.kingdom-gengaku { border-left: 3px solid #f48fb1; }
.kingdom-kangaku  { border-left: 3px solid #d4a830; }
.kingdom-dagaku   { border-left: 3px solid #7ec8e3; }
.kingdom-kenban   { border-left: 3px solid #c890e8; }
.kingdom-gengaku .kingdom-name { color: #c4507a; }
.kingdom-kangaku  .kingdom-name { color: #9a7a10; }
.kingdom-dagaku   .kingdom-name { color: #3a8ca8; }
.kingdom-kenban   .kingdom-name { color: #8840b0; }
.kingdom-gengaku .kingdom-emblem { border-color: #f48fb1; box-shadow: 0 0 12px rgba(244,143,177,0.30); }
.kingdom-kangaku  .kingdom-emblem { border-color: #d4a830; box-shadow: 0 0 12px rgba(212,168,48,0.30); }
.kingdom-dagaku   .kingdom-emblem { border-color: #7ec8e3; box-shadow: 0 0 12px rgba(126,200,227,0.30); }
.kingdom-kenban   .kingdom-emblem { border-color: #c890e8; box-shadow: 0 0 12px rgba(200,144,232,0.30); }

/* World map actual image */
.world-map-img-wrap {
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.world-map-img {
  width: 100%; height: auto;
  max-height: 600px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  border: 1px solid rgba(201,162,39,0.25);
}
/* 画像読み込み失敗時のフォールバック */
.world-map-fallback {
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(252,228,236,0.3);
  border-radius: 6px; border: 2px dashed rgba(201,162,39,0.3);
}
.world-map-caption {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.68rem; color: rgba(201,162,39,0.55);
  letter-spacing: 0.3em; text-transform: uppercase;
  margin-top: 0.9rem; position: relative; z-index: 1;
}

/* Kingdom card images */
.kingdom-card-img-wrap {
  width: 100%;
  margin-bottom: 1.2rem;
  border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(201,162,39,0.22);
  background: rgba(252,228,236,0.25);
  display: flex; align-items: center; justify-content: center;
}
.kingdom-card-img {
  width: 100%; height: auto;
  max-height: 220px;
  object-fit: contain;
  display: block;
}

/* World map image placeholder (旧プレースホルダー — 互換性維持) */
.world-map-img-placeholder { min-height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 1; }
.world-map-img-placeholder .map-ph-label { font-family: var(--font-heading); font-size: 0.7rem; color: rgba(201,162,39,0.60); letter-spacing: 0.2em; text-transform: uppercase; margin-top: 1rem; line-height: 2; }

/* ============================================================
   STORY PAGE — Chapter list
   ============================================================ */
.chapters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; }
.chapter-item {
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 6px; padding: 1rem 1.4rem;
  display: flex; gap: 1rem; align-items: flex-start;
  box-shadow: var(--shadow-card); transition: all 0.3s ease;
}
.chapter-item:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(201,162,39,0.18), var(--shadow-card); border-color: rgba(201,162,39,0.65); }
.chapter-num { font-family: var(--font-title); color: rgba(201,162,39,0.35); font-size: 1.4rem; line-height: 1; min-width: 36px; text-align: right; flex-shrink: 0; }
.chapter-text h4 { font-family: var(--font-heading); color: var(--gold-dark); font-size: 0.82rem; letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.chapter-text p { color: var(--text-mid); font-size: 0.78rem; line-height: 1.7; }

/* ============================================================
   DETAIL IMAGE LIGHTBOX（キャラクター詳細画像クリックで拡大）
   ============================================================ */
.detail-lightbox {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(20,5,15,0.0);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; transition: background 0.3s ease; cursor: pointer;
}
.detail-lightbox.open { background: rgba(20,5,15,0.90); }
.detail-lightbox-inner {
  max-width: min(92vw, 960px); max-height: 90vh;
  position: relative; cursor: default;
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.detail-lightbox.open .detail-lightbox-inner { opacity: 1; transform: scale(1); }
.detail-lightbox-close {
  position: absolute; top: -2.4rem; right: 0;
  background: none; border: none;
  color: rgba(255,255,255,0.85); font-size: 0.85rem;
  cursor: pointer; transition: color 0.2s ease; z-index: 1;
  font-family: var(--font-heading); letter-spacing: 0.15em;
  display: flex; align-items: center; gap: 0.4rem;
}
.detail-lightbox-close:hover { color: var(--gold-light); }
.detail-lightbox-img {
  width: 100%; height: auto; max-height: 85vh;
  object-fit: contain; display: block;
  border-radius: 6px; border: 1px solid rgba(201,162,39,0.45);
  cursor: zoom-out; box-shadow: 0 8px 40px rgba(0,0,0,0.60);
}

/* ============================================================
   BGM CONSENT DIALOG（初回訪問時の音楽再生確認）
   ============================================================ */
.bgm-consent-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(20,5,15,0.0);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  transition: background 0.4s ease;
  pointer-events: none;
}
.bgm-consent-overlay.open {
  background: rgba(20,5,15,0.72);
  pointer-events: auto;
}
.bgm-consent-dialog {
  background: linear-gradient(160deg, #fffdf7 0%, #fce4ec 60%, #f3e5f5 100%);
  border: 1px solid rgba(201,162,39,0.5);
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(180,90,140,0.22), 0 0 0 1px rgba(201,162,39,0.15), 0 0 60px rgba(201,162,39,0.08);
  padding: 2.2rem 2rem 2rem;
  max-width: 400px; width: 100%;
  text-align: center;
  opacity: 0; transform: scale(0.88) translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.bgm-consent-overlay.open .bgm-consent-dialog {
  opacity: 1; transform: scale(1) translateY(0);
}
.bgm-consent-icon {
  font-size: 3rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 12px rgba(201,162,39,0.5));
}
.bgm-consent-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--gold-dark);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.bgm-consent-desc {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.bgm-consent-buttons {
  display: flex; flex-direction: column; gap: 0.7rem;
}
.bgm-consent-btn {
  width: 100%; padding: 0.72rem 1rem;
  border-radius: 50px; border: none; cursor: pointer;
  font-family: var(--font-heading); font-size: 0.88rem;
  letter-spacing: 0.08em; transition: all 0.25s ease;
}
.bgm-consent-yes {
  background: var(--gradient-gold);
  color: #3d1a00;
  box-shadow: 0 3px 14px rgba(201,162,39,0.35);
}
.bgm-consent-yes:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(201,162,39,0.50);
}
.bgm-consent-no {
  background: transparent;
  border: 1px solid rgba(180,90,140,0.30);
  color: var(--text-pale);
}
.bgm-consent-no:hover {
  background: rgba(180,90,140,0.06);
  color: var(--text-mid);
}
@media (max-width: 480px) {
  .bgm-consent-dialog { padding: 1.8rem 1.4rem 1.5rem; }
  .bgm-consent-title  { font-size: 1rem; }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
  display: flex; gap: 0.3rem; align-items: center; flex-shrink: 0; margin-left: 0.5rem;
}
.lang-btn {
  font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.08em;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(201,162,39,0.35); border-radius: 2px;
  background: transparent; color: var(--text-pale);
  cursor: pointer; transition: all 0.2s ease; line-height: 1.5;
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold-dark); background: rgba(201,162,39,0.07); }
.lang-btn.active {
  border-color: var(--gold); color: var(--gold-dark);
  background: rgba(201,162,39,0.12); font-weight: 600;
}
@media (max-width: 768px) {
  .lang-switcher { margin-left: 0; }
}

/* ============================================================
   OPENING INTRO MODAL
   ============================================================ */
.opening-modal {
  position: fixed; inset: 0; z-index: 99990;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  pointer-events: none; opacity: 0;
  transition: opacity 0.5s ease;
}
.opening-modal.is-visible {
  pointer-events: auto; opacity: 1;
}
.opening-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 3, 8, 0.90);
}
.opening-modal__content {
  position: relative; z-index: 1;
  background: linear-gradient(160deg,
    rgba(255,253,247,0.10) 0%,
    rgba(252,228,236,0.08) 60%,
    rgba(243,229,245,0.10) 100%);
  border: 1px solid rgba(201,162,39,0.52);
  border-radius: 22px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 0 70px rgba(201,162,39,0.16),
    0 0 140px rgba(244,143,177,0.08),
    inset 0 1px 0 rgba(255,255,255,0.14),
    0 20px 80px rgba(0,0,0,0.60);
  padding: 3.2rem 2.8rem 2.8rem;
  max-width: 460px; width: 100%;
  text-align: center;
  opacity: 0; transform: scale(0.86) translateY(24px);
  transition: opacity 0.45s ease 0.1s, transform 0.45s cubic-bezier(0.34,1.56,0.64,1) 0.1s;
}
.opening-modal.is-visible .opening-modal__content {
  opacity: 1; transform: scale(1) translateY(0);
}
.opening-modal__deco {
  font-size: 2.4rem; color: var(--gold);
  margin-bottom: 1.4rem;
  display: block;
  filter: drop-shadow(0 0 16px rgba(201,162,39,0.75));
  animation: openingDecoPulse 3s ease-in-out infinite;
}
@keyframes openingDecoPulse {
  0%, 100% { opacity: 0.72; transform: scale(1) rotate(0deg); }
  50%       { opacity: 1;    transform: scale(1.14) rotate(15deg); }
}
.opening-modal__title {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.8vw, 1.28rem);
  color: var(--gold-light);
  letter-spacing: 0.06em;
  line-height: 1.75;
  margin-bottom: 2.4rem;
  text-shadow:
    0 0 24px rgba(201,162,39,0.55),
    0 0 60px rgba(201,162,39,0.18);
}
.opening-modal__actions {
  display: flex; flex-direction: column; gap: 0.95rem;
}
.opening-modal__btn {
  width: 100%; padding: 0.88rem 1.4rem;
  border-radius: 50px; border: none; cursor: pointer;
  font-family: var(--font-heading); font-size: 0.92rem;
  letter-spacing: 0.10em;
  transition: all 0.28s ease;
  display: flex; align-items: center; justify-content: center; gap: 0.65rem;
}
.opening-modal__btn--play {
  background: linear-gradient(135deg, #9a7a10 0%, #c9a227 30%, #e8c96a 50%, #c9a227 70%, #9a7a10 100%);
  background-size: 200% auto;
  color: #2a1000;
  box-shadow:
    0 4px 22px rgba(201,162,39,0.45),
    0 0 36px rgba(201,162,39,0.16);
  animation: openingBtnShimmer 3.5s linear infinite;
}
@keyframes openingBtnShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.opening-modal__btn--play:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,162,39,0.65), 0 0 50px rgba(201,162,39,0.22);
}
.opening-modal__btn-icon { font-size: 0.82rem; }
.opening-modal__btn--skip {
  background: transparent;
  border: 1px solid rgba(201,162,39,0.32);
  color: rgba(201,162,39,0.65);
  font-size: 0.82rem;
}
.opening-modal__btn--skip:hover {
  background: rgba(201,162,39,0.09);
  color: var(--gold-light);
  border-color: rgba(201,162,39,0.55);
}
@media (max-width: 480px) {
  .opening-modal__content { padding: 2.4rem 1.8rem 2.2rem; }
  .opening-modal__title   { font-size: 1rem; margin-bottom: 2rem; }
}

/* ============================================================
   OPENING VIDEO OVERLAY
   ============================================================ */
.opening-video-overlay {
  position: fixed; inset: 0; z-index: 99995;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
  transition: opacity 0.45s ease;
}
.opening-video-overlay.is-visible {
  pointer-events: auto; opacity: 1;
}
.opening-video__player {
  width: 100%; height: 100%;
  object-fit: contain;
  max-width: 100vw; max-height: 100vh;
  display: block;
}

/* ── 右上トップバー：音量（横）＋スキップ（常時表示） ── */
.ovc-topbar {
  position: absolute;
  top: 1.2rem; right: 1.4rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* 横型音量コントロール */
.ovc-vol-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(0,0,0,0.52);
  border: 1px solid rgba(201,162,39,0.32);
  border-radius: 50px;
  padding: 0.38rem 0.85rem;
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease;
}
.ovc-vol-inline:hover {
  border-color: rgba(201,162,39,0.58);
}
.ovc-mute-btn {
  background: none; border: none; cursor: pointer;
  font-size: 0.92rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.70));
  transition: transform 0.2s ease;
  padding: 0; width: 22px; height: 22px;
}
.ovc-mute-btn:hover { transform: scale(1.18); }
/* CC字幕ボタン */
.cc-menu-wrap {
  position: relative;
}
.ovc-cc-btn {
  background: rgba(0,0,0,0.45); border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 4px; cursor: pointer; color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  line-height: 1; padding: 3px 6px;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, color 0.2s;
  opacity: 0.85;
}
.ovc-cc-btn:hover { opacity: 1; border-color: var(--gold-light); }
.ovc-cc-btn[aria-pressed="false"] {
  opacity: 0.4; text-decoration: line-through;
}
.ovc-cc-btn[aria-pressed="true"] {
  border-color: var(--gold); color: var(--gold);
}
.cc-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(10,5,20,0.92);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 68px;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.7);
}
.cc-menu[hidden] { display: none; }
.cc-menu__item {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}
.cc-menu__item:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cc-menu__item.active { color: var(--gold); background: rgba(201,162,39,0.18); }
/* 横スライダー */
.ovc-vol {
  -webkit-appearance: none; appearance: none;
  width: 76px; height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px; outline: none; cursor: pointer;
}
.ovc-vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 6px rgba(201,162,39,0.80);
  cursor: pointer; transition: transform 0.15s ease;
}
.ovc-vol::-webkit-slider-thumb:hover { transform: scale(1.25); }
.ovc-vol::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%; border: none;
  background: var(--gold-light);
  box-shadow: 0 0 6px rgba(201,162,39,0.80);
  cursor: pointer;
}

/* スキップボタン */
.opening-video__skip {
  background: rgba(0,0,0,0.52);
  border: 1px solid rgba(201,162,39,0.38);
  color: rgba(201,162,39,0.88);
  font-family: var(--font-heading); font-size: 0.70rem;
  letter-spacing: 0.18em;
  padding: 0.40rem 1.0rem; border-radius: 50px;
  cursor: pointer; backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.opening-video__skip:hover {
  background: rgba(201,162,39,0.14);
  color: var(--gold-light);
  border-color: rgba(201,162,39,0.68);
  box-shadow: 0 0 12px rgba(201,162,39,0.26);
}

/* ── 下部タイムライン（非アクティブで自動消去） ── */
.opening-video__controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.2rem 1.8rem 1.3rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 4;
  pointer-events: none;
}
/* JS から .is-visible を付与して表示制御 */
.opening-video__controls.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.ovc-timeline-wrap {
  display: flex; align-items: center; gap: 0.75rem;
}
.ovc-time {
  font-family: var(--font-heading); font-size: 0.62rem;
  color: rgba(255,255,255,0.78); letter-spacing: 0.06em;
  white-space: nowrap; min-width: 30px; text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.90);
}
.ovc-seek {
  flex: 1; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.28);
  border-radius: 2px; outline: none; cursor: pointer;
  transition: height 0.18s ease;
}
.ovc-seek:hover { height: 6px; }
.ovc-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 8px rgba(201,162,39,0.85);
  cursor: pointer; transition: transform 0.15s ease;
}
.ovc-seek::-webkit-slider-thumb:hover { transform: scale(1.3); }
.ovc-seek::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; border: none;
  background: var(--gold-light);
  box-shadow: 0 0 8px rgba(201,162,39,0.85);
  cursor: pointer;
}

/* ── 音符パーティクル（JS で動的生成） ── */
.ovc-note-particle {
  position: absolute;
  pointer-events: none;
  z-index: 12;
  color: rgba(232,201,106,0.96);
  text-shadow:
    0 0 10px rgba(201,162,39,0.95),
    0 0 22px rgba(255,248,180,0.80),
    0 0 40px rgba(255,255,255,0.40);
  user-select: none;
  will-change: transform, opacity;
}

/* ── 終了演出：ゴールデンブルーム（パーティクル後の残光） ── */
/* Opening subtitles */
.opening-subtitle {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 94vw;
  text-align: center;
  color: #fff;
  font-size: 2vw;
  font-family: var(--font-body);
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(0,0,0,1), 0 2px 5px rgba(0,0,0,0.9);
  background: rgba(0, 0, 0, 0.38);
  padding: 0.45rem 1.4rem;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 20;
}
.opening-subtitle.visible { opacity: 1; }

/* テロップ専用（キャラ名・クレジット）― セリフとは独立した別要素 */
.opening-subtitle-telop {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 60vw;
  text-align: center;
  color: #fff;
  font-size: 1.3vw;
  font-family: var(--font-body);
  line-height: 1.6;
  text-shadow: 0 0 10px rgba(0,0,0,1), 0 2px 5px rgba(0,0,0,0.9);
  background: rgba(0, 0, 0, 0.38);
  padding: 0.35rem 1rem;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 20;
  white-space: nowrap;
}
.opening-subtitle-telop.visible { opacity: 1; }
.opening-subtitle-telop.pos-bl { bottom: 30%; top: auto;    left: 4%;   right: auto; transform: none; text-align: left;  }
.opening-subtitle-telop.pos-br { bottom: 30%; top: auto;    right: 4%;  left: auto;  transform: none; text-align: right; }
.opening-subtitle-telop.pos-tl { top: 30%;    bottom: auto; left: 4%;   right: auto; transform: none; text-align: left;  }
.opening-subtitle-telop.pos-tr { top: 30%;    bottom: auto; right: 4%;  left: auto;  transform: none; text-align: right; }

/* 縦画面（スマホ縦持ち）― 16:9動画の黒帯に収める・1行固定 */
@media (orientation: portrait) and (max-width: 768px) {
  .opening-subtitle {
    font-size: 5vw;
    bottom: 26%;
  }
  .opening-subtitle-telop {
    font-size: 3.5vw;
  }
  /* 縦持ち：テロップは位置に関わらず上の黒帯へ（セリフ字幕との重なり防止） */
  .opening-subtitle-telop.pos-bl,
  .opening-subtitle-telop.pos-br,
  .opening-subtitle-telop.pos-tl,
  .opening-subtitle-telop.pos-tr {
    top: 20%;
    bottom: auto;
    left: 4%;
    right: auto;
    transform: none;
    text-align: left;
  }
}

.opening-video__flash {
  position: absolute; inset: 0; z-index: 11;
  background: radial-gradient(ellipse at center,
    rgba(255,252,220,1.00) 0%,
    rgba(232,201,106,0.85) 55%,
    rgba(201,162,39,0.60) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0s;
}
.opening-video__flash.flash-in {
  transition: opacity 0.45s ease-out;
  opacity: 0.88;
  pointer-events: auto;
}
.opening-video__flash.flash-hold {
  opacity: 0.88; pointer-events: auto; transition: none;
}
.opening-video__flash.flash-out {
  transition: opacity 0.55s ease-in;
  opacity: 0;
}

/* ── レスポンシブ ── */
@media (max-width: 600px) {
  .ovc-topbar { top: 0.8rem; right: 0.8rem; gap: 0.5rem; }
  .ovc-vol { width: 55px; }
  .opening-video__skip { font-size: 0.62rem; padding: 0.35rem 0.8rem; }
  .opening-video__controls { padding: 1.8rem 1rem 1rem; }
}

/* ============================================================
   GALLERY VIDEO CARD + MODAL
   ============================================================ */
.gallery-item--video .gallery-item-inner { padding: 0; overflow: hidden; }
.gallery-item-video-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.55;
}
.gallery-item-video-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -65%);
  font-size: 2.8rem; color: var(--gold-light);
  text-shadow: 0 0 24px rgba(232,201,106,0.9), 0 2px 8px rgba(0,0,0,0.8);
  z-index: 2; transition: transform 0.2s ease; pointer-events: none;
}
.gallery-item--video:hover .gallery-item-video-play { transform: translate(-50%, -65%) scale(1.15); }
.gallery-item-video-info {
  position: absolute; bottom: 0.9rem; left: 0; right: 0;
  text-align: center; z-index: 2; padding: 0 0.5rem;
}
.gallery-video-modal {
  position: fixed; inset: 0; z-index: 99980;
  background: rgba(10,3,8,0.92);
  display: none; align-items: center; justify-content: center;
  padding: 2rem; cursor: pointer;
}
.gallery-video-modal.is-open { display: flex; }
.gallery-video-content {
  position: relative; max-width: 900px; width: 100%;
  background: var(--gradient-card); border: var(--border-gold);
  border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-gold), var(--shadow-card);
  animation: popIn 0.3s ease; cursor: default;
}
.gallery-video__player {
  width: 100%; display: block; max-height: 70vh; object-fit: contain; background: #000;
}
.gallery-video-controls {
  background: linear-gradient(to top, rgba(10,3,8,0.97) 0%, rgba(10,3,8,0.75) 100%);
  padding: 0.7rem 1rem 0.8rem;
  overflow: visible;
}
.gvm-btn-row {
  display: flex; align-items: center; gap: 0.45rem; margin-top: 0.55rem;
}
.gvm-btn-spacer { flex: 1; }
.gvm-ctrl-btn {
  background: rgba(0,0,0,0.35); border: 1px solid rgba(201,162,39,0.38);
  color: rgba(201,162,39,0.88);
  font-family: var(--font-heading); font-size: 0.64rem; letter-spacing: 0.10em;
  padding: 0.28rem 0.65rem; border-radius: 50px;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: all 0.2s ease; white-space: nowrap; line-height: 1.5;
}
.gvm-ctrl-btn:hover {
  background: rgba(201,162,39,0.14); color: var(--gold-light);
  border-color: rgba(201,162,39,0.68); box-shadow: 0 0 10px rgba(201,162,39,0.2);
}
.gvm-close-btn {
  color: rgba(255,255,255,0.72); border-color: rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.5);
}
.gvm-close-btn:hover { color: #fff; border-color: rgba(255,255,255,0.55); background: rgba(180,0,0,0.18); }
.gvm-playpause-btn {
  color: var(--gold); border-color: rgba(201,162,39,0.6);
  background: rgba(201,162,39,0.10); min-width: 5.2em;
}
.gvm-playpause-btn:hover { background: rgba(201,162,39,0.22); }
/* バッファリングスピナー */
.gvm-spinner {
  display: none; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border: 4px solid rgba(201,162,39,0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: gvm-spin 0.8s linear infinite;
  pointer-events: none;
}
.gvm-spinner.is-active { display: block; }
/* ギャラリー動画字幕 */
#gvm-subtitle {
  position: absolute;
  bottom: 4rem; /* コントロールバーの上 */
}
@keyframes gvm-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
/* 動画クリック領域 */
.gallery-video__player { cursor: pointer; }
@media (max-width: 600px) {
  .gallery-video-modal { padding: 0.8rem; }
  .gallery-video-controls { padding: 0.5rem 0.7rem 0.6rem; }
  .gvm-ctrl-btn { font-size: 0.58rem; padding: 0.24rem 0.5rem; }
}

/* ── Project / Support pages ── */
.project-lead {
  max-width: 720px; margin: 0 auto;
  text-align: center; line-height: 2.0;
}
.project-lead p {
  color: var(--purple-pale); font-size: 1.05rem;
  margin-bottom: 1.4rem;
}
.project-lead .reveal {
  font-family: var(--font-heading);
  color: var(--gold); font-size: 1.15rem;
  letter-spacing: 0.08em; margin: 2rem 0 1rem;
}
.project-lead .highlight {
  color: var(--gold-light); font-weight: bold;
}
.project-cta {
  margin-top: 3rem; display: flex;
  flex-direction: column; align-items: center; gap: 1.2rem;
}
.project-cta .btn-primary {
  display: inline-block;
  font-family: var(--font-heading); letter-spacing: 0.15em;
  font-size: 1rem; padding: 1rem 2.8rem;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: #1a0a12; border-radius: 4px;
  box-shadow: 0 0 28px rgba(201,162,39,0.35);
  transition: all 0.3s ease; text-decoration: none;
}
.project-cta .btn-primary:hover {
  box-shadow: 0 0 42px rgba(201,162,39,0.6);
  transform: translateY(-2px);
}
.project-cta-links {
  display: flex; gap: 2rem; flex-wrap: wrap;
  justify-content: center; margin-top: 0.5rem;
}
.project-cta-links a {
  font-size: 0.8rem; color: var(--purple-pale);
  border-bottom: 1px solid rgba(201,162,39,0.2);
  padding-bottom: 1px; letter-spacing: 0.05em;
  transition: color 0.2s;
}
.project-cta-links a:hover { color: var(--gold); }

/* Support plans */
.support-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem; margin-top: 2.5rem;
}
.plan-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,162,39,0.18);
  border-radius: 10px; padding: 2rem 1.6rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s;
  display: flex; flex-direction: column; gap: 0.8rem;
}
.plan-card:hover { border-color: rgba(201,162,39,0.40); }
.plan-card--featured {
  border-color: rgba(201,162,39,0.55);
  background: rgba(201,162,39,0.06);
  box-shadow: 0 0 40px rgba(201,162,39,0.12), inset 0 0 30px rgba(201,162,39,0.04);
  position: relative;
}
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #1a0a12; font-family: var(--font-heading);
  font-size: 0.7rem; letter-spacing: 0.12em;
  padding: 0.25rem 1.2rem; border-radius: 20px;
  white-space: nowrap;
}
.plan-price {
  font-family: var(--font-heading); color: var(--gold);
  font-size: 1.6rem; letter-spacing: 0.05em;
}
.plan-price span { font-size: 0.85rem; color: var(--purple-pale); margin-left: 0.3rem; }
.plan-name {
  font-family: var(--font-heading); color: var(--gold-light);
  font-size: 0.95rem; letter-spacing: 0.15em;
}
.plan-tagline {
  font-size: 0.82rem; color: var(--purple-pale);
  font-style: italic; border-bottom: 1px solid rgba(201,162,39,0.12);
  padding-bottom: 0.8rem; margin-bottom: 0.4rem;
}
.plan-benefits {
  list-style: none; display: flex; flex-direction: column; gap: 0.5rem;
}
.plan-benefits li {
  font-size: 0.82rem; color: var(--text-pale);
  padding-left: 1.2em; position: relative;
}
.plan-benefits li::before {
  content: "♦"; position: absolute; left: 0;
  color: var(--gold); font-size: 0.55rem; top: 0.2em;
}
.plan-benefits li.plan-benefit--highlight {
  color: var(--purple-pale);
}
.support-agreement {
  max-width: 680px; margin: 3rem auto 0;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,162,39,0.15);
  border-radius: 8px; padding: 1.6rem 2rem;
}
.support-notice {
  font-size: 0.8rem; color: var(--text-pale);
  line-height: 1.9; margin-bottom: 1.2rem;
}
.support-notice p { margin-bottom: 0.4rem; }
.agree-row {
  display: flex; align-items: center; gap: 0.8rem;
  margin-bottom: 1.4rem; cursor: pointer;
}
.agree-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--gold);
  cursor: pointer; flex-shrink: 0;
}
.agree-row label {
  font-size: 0.85rem; color: var(--purple-pale);
  cursor: pointer; letter-spacing: 0.04em;
}
.btn-support {
  display: inline-block; width: 100%;
  font-family: var(--font-heading); letter-spacing: 0.15em;
  font-size: 0.9rem; padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  color: #1a0a12; border-radius: 4px; border: none;
  box-shadow: 0 0 24px rgba(201,162,39,0.3);
  transition: all 0.3s ease; cursor: pointer;
  text-align: center; text-decoration: none;
}
.btn-support:disabled {
  opacity: 0.35; cursor: not-allowed;
  box-shadow: none;
}
.btn-support:not(:disabled):hover {
  box-shadow: 0 0 38px rgba(201,162,39,0.55);
  transform: translateY(-1px);
}

/* guide / legal page */
.prose {
  max-width: 700px; margin: 0 auto;
  line-height: 2.0;
}
.prose h2 {
  font-family: var(--font-heading); color: var(--gold);
  font-size: 1rem; letter-spacing: 0.12em;
  margin: 2rem 0 0.6rem;
  border-bottom: 1px solid rgba(201,162,39,0.2);
  padding-bottom: 0.4rem;
}
.prose p, .prose li {
  font-size: 0.88rem; color: var(--purple-pale);
  margin-bottom: 0.6rem;
}
.prose ul { padding-left: 1.4rem; list-style: disc; }
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 0.85rem; margin: 1rem 0;
}
.prose table th, .prose table td {
  padding: 0.6rem 0.8rem; text-align: left;
  border-bottom: 1px solid rgba(201,162,39,0.12);
  color: var(--purple-pale);
}
.prose table th {
  color: var(--gold); font-family: var(--font-heading);
  font-size: 0.78rem; letter-spacing: 0.08em;
  white-space: nowrap; width: 35%;
}
/* Plush image gallery */
.plush-gallery {
  display: flex; gap: 1.5rem; justify-content: center;
  flex-wrap: wrap; margin: 0 auto;
}
.plush-item {
  text-align: center; max-width: 260px; width: 100%;
}
.plush-item img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 10px; border: 1px solid rgba(201,162,39,0.22);
  display: block;
}
.plush-item--set img { aspect-ratio: 4/3; }
.plush-label {
  font-family: var(--font-heading); color: var(--gold-light);
  font-size: 0.78rem; letter-spacing: 0.1em; margin-top: 0.6rem;
}

@media (max-width: 600px) {
  .support-plans { grid-template-columns: 1fr; }
  .prose table th { width: 40%; }
  .project-cta-links { gap: 1.2rem; }
  .plush-gallery { gap: 1rem; }
  .plush-item { max-width: 160px; }
}
