/* ============================================================
   英文法マスター - Apple Store サイト 共通スタイルシート
   ダークテーマ（ダークグリーン / Emerald）
   ============================================================ */

/* ------------------------------------------------------------
   CSS カスタムプロパティ（デザイントークン）
   ------------------------------------------------------------ */
:root {
  /* カラー */
  --bg-primary:    #022c22;
  --bg-secondary:  #064e3b;
  --bg-card:       #0d3b2e;
  --accent:        #34d399;
  --accent-hover:  #6ee7b7;
  --text-primary:  #f0fdf4;
  --text-secondary: #a7f3d0;
  --text-muted:    #6b7280;
  --border:        rgba(52, 211, 153, 0.2);

  /* タイポグラフィ */
  --font-family:   system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-size-base: 16px;
  --font-size-sm:   14px;
  --font-size-lg:   20px;
  --font-size-xl:   32px;
  --font-size-hero: 48px;

  /* レイアウト */
  --max-width:  1200px;
  --nav-height:   64px;
}

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* リンクのデフォルトスタイル */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* 画像の最大幅 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* リストマーカーのリセット */
ul,
ol {
  list-style: none;
}

/* ------------------------------------------------------------
   コンテナ
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ------------------------------------------------------------
   ナビゲーションバー
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background-color: rgba(2, 44, 34, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ブランドロゴ・アイコン＋テキスト */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.nav-brand img,
.nav-brand .nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ナビリンク（横並び） */
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* ハンバーガーボタン（モバイルのみ表示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-primary);
  font-size: 24px;
}


/* ------------------------------------------------------------
   ヒーローセクション
   ------------------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
  padding-bottom: 80px;
  background:
    /* 対角方向の色味バリエーション */
    linear-gradient(
      215deg,
      rgba(6, 78, 59, 0.0) 0%,
      rgba(6, 95, 70, 0.4) 35%,
      rgba(4, 60, 45, 0.0) 70%
    ),
    /* 左上のエメラルド光源 */
    radial-gradient(
      ellipse 80% 60% at 15% 20%,
      rgba(52, 211, 153, 0.08) 0%,
      transparent 60%
    ),
    /* 右下のサブ光源 */
    radial-gradient(
      ellipse 70% 50% at 85% 75%,
      rgba(52, 211, 153, 0.06) 0%,
      transparent 55%
    ),
    /* 上部中央のハイライト */
    radial-gradient(
      ellipse 50% 40% at 50% 10%,
      rgba(110, 231, 183, 0.05) 0%,
      transparent 50%
    ),
    /* ベースグラデーション（深みを追加） */
    linear-gradient(
      160deg,
      #011e18 0%,
      #022c22 25%,
      #064e3b 55%,
      #043927 80%,
      #011e18 100%
    );
  position: relative;
  overflow: hidden;
}

/* メイングロー（脈動アニメーション付き） */
.hero::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle,
    rgba(52, 211, 153, 0.18) 0%,
    rgba(52, 211, 153, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  animation: glowPulse 8s ease-in-out infinite;
}

/* サブグロー（ドリフトアニメーション付き） */
.hero::after {
  content: "";
  position: absolute;
  bottom: 10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(110, 231, 183, 0.10) 0%,
    rgba(52, 211, 153, 0.03) 45%,
    transparent 70%
  );
  pointer-events: none;
  animation: glowDrift 12s ease-in-out infinite;
  z-index: 0;
}

/* 散布型フローティング文字レイヤー */
.hero-floating-chars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-floating-chars span {
  position: absolute;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  pointer-events: none;
  user-select: none;
}

/*
 * 各 span の静的 opacity は prefers-reduced-motion: reduce 時のフォールバック値。
 * アニメーション有効時は charBreathe が opacity を制御するため、静的値は上書きされる。
 */
/* --- アルファベット（1〜6番目） --- */
.hero-floating-chars span:nth-child(1) {
  top: 5%; left: 8%; font-size: 42px; opacity: 0.13;
  --char-rotate: -18deg; --char-opacity-base: 0.13; --char-opacity-peak: 0.19;
  animation: floatUp 9s ease-in-out infinite, charBreathe 9s ease-in-out infinite;
  animation-delay: 0s, 0s;
}
.hero-floating-chars span:nth-child(2) {
  top: 12%; right: 12%; font-size: 34px; opacity: 0.11;
  --char-rotate: 12deg; --char-opacity-base: 0.11; --char-opacity-peak: 0.17;
  animation: floatDown 11s ease-in-out infinite, charBreathe 11s ease-in-out infinite;
  animation-delay: -3s, -2s;
}
.hero-floating-chars span:nth-child(3) {
  top: 68%; left: 5%; font-size: 38px; opacity: 0.11;
  --char-rotate: 8deg; --char-opacity-base: 0.11; --char-opacity-peak: 0.16;
  animation: floatUp 13s ease-in-out infinite, charBreathe 13s ease-in-out infinite;
  animation-delay: -7s, -5s;
}
.hero-floating-chars span:nth-child(4) {
  top: 78%; right: 10%; font-size: 30px; opacity: 0.10;
  --char-rotate: -10deg; --char-opacity-base: 0.10; --char-opacity-peak: 0.15;
  animation: floatDown 8s ease-in-out infinite, charBreathe 8s ease-in-out infinite;
  animation-delay: -1s, -4s;
}
.hero-floating-chars span:nth-child(5) {
  top: 35%; left: 3%; font-size: 26px; opacity: 0.10;
  --char-rotate: 20deg; --char-opacity-base: 0.10; --char-opacity-peak: 0.15;
  animation: floatUp 10s ease-in-out infinite, charBreathe 10s ease-in-out infinite;
  animation-delay: -5s, -8s;
}
.hero-floating-chars span:nth-child(6) {
  top: 88%; left: 35%; font-size: 28px; opacity: 0.11;
  --char-rotate: -5deg; --char-opacity-base: 0.11; --char-opacity-peak: 0.16;
  animation: floatDown 14s ease-in-out infinite, charBreathe 14s ease-in-out infinite;
  animation-delay: -9s, -3s;
}
/* --- 記号・句読点（7〜13番目） --- */
.hero-floating-chars span:nth-child(7) {
  top: 8%; left: 38%; font-size: 36px; opacity: 0.10;
  --char-rotate: -8deg; --char-opacity-base: 0.10; --char-opacity-peak: 0.15;
  animation: floatDown 9s ease-in-out infinite, charBreathe 9s ease-in-out infinite;
  animation-delay: -2s, -6s;
}
.hero-floating-chars span:nth-child(8) {
  top: 22%; right: 30%; font-size: 28px; opacity: 0.09;
  --char-rotate: 15deg; --char-opacity-base: 0.09; --char-opacity-peak: 0.14;
  animation: floatUp 12s ease-in-out infinite, charBreathe 12s ease-in-out infinite;
  animation-delay: -8s, -1s;
}
.hero-floating-chars span:nth-child(9) {
  top: 50%; left: 10%; font-size: 32px; opacity: 0.09;
  --char-rotate: -12deg; --char-opacity-base: 0.09; --char-opacity-peak: 0.14;
  animation: floatDown 11s ease-in-out infinite, charBreathe 11s ease-in-out infinite;
  animation-delay: -4s, -7s;
}
.hero-floating-chars span:nth-child(10) {
  top: 60%; right: 5%; font-size: 24px; opacity: 0.10;
  --char-rotate: 6deg; --char-opacity-base: 0.10; --char-opacity-peak: 0.15;
  animation: floatUp 8s ease-in-out infinite, charBreathe 8s ease-in-out infinite;
  animation-delay: -6s, -3s;
}
.hero-floating-chars span:nth-child(11) {
  top: 82%; right: 32%; font-size: 22px; opacity: 0.08;
  --char-rotate: -15deg; --char-opacity-base: 0.08; --char-opacity-peak: 0.13;
  animation: floatDown 13s ease-in-out infinite, charBreathe 13s ease-in-out infinite;
  animation-delay: -10s, -5s;
}
.hero-floating-chars span:nth-child(12) {
  top: 42%; right: 8%; font-size: 20px; opacity: 0.10;
  --char-rotate: 10deg; --char-opacity-base: 0.10; --char-opacity-peak: 0.15;
  animation: floatUp 10s ease-in-out infinite, charBreathe 10s ease-in-out infinite;
  animation-delay: -3s, -9s;
}
.hero-floating-chars span:nth-child(13) {
  top: 15%; left: 70%; font-size: 26px; opacity: 0.09;
  --char-rotate: -22deg; --char-opacity-base: 0.09; --char-opacity-peak: 0.14;
  animation: floatDown 7s ease-in-out infinite, charBreathe 7s ease-in-out infinite;
  animation-delay: -5s, -2s;
}
/* --- 英単語・フレーズ（14〜21番目） --- */
.hero-floating-chars span:nth-child(14) {
  top: 28%; left: 15%; font-size: 16px; opacity: 0.08; letter-spacing: 0.05em;
  --char-rotate: -6deg; --char-opacity-base: 0.08; --char-opacity-peak: 0.13;
  animation: floatUp 11s ease-in-out infinite, charBreathe 11s ease-in-out infinite;
  animation-delay: -7s, -4s;
}
.hero-floating-chars span:nth-child(15) {
  top: 75%; left: 18%; font-size: 14px; opacity: 0.08; letter-spacing: 0.05em;
  --char-rotate: 4deg; --char-opacity-base: 0.08; --char-opacity-peak: 0.12;
  animation: floatDown 9s ease-in-out infinite, charBreathe 9s ease-in-out infinite;
  animation-delay: -2s, -6s;
}
.hero-floating-chars span:nth-child(16) {
  top: 18%; right: 8%; font-size: 14px; opacity: 0.07; letter-spacing: 0.05em;
  --char-rotate: -3deg; --char-opacity-base: 0.07; --char-opacity-peak: 0.11;
  animation: floatUp 13s ease-in-out infinite, charBreathe 13s ease-in-out infinite;
  animation-delay: -9s, -1s;
}
.hero-floating-chars span:nth-child(17) {
  top: 90%; right: 15%; font-size: 13px; opacity: 0.07; letter-spacing: 0.05em;
  --char-rotate: 8deg; --char-opacity-base: 0.07; --char-opacity-peak: 0.11;
  animation: floatDown 8s ease-in-out infinite, charBreathe 8s ease-in-out infinite;
  animation-delay: -4s, -7s;
}
.hero-floating-chars span:nth-child(18) {
  top: 55%; right: 22%; font-size: 15px; opacity: 0.07; letter-spacing: 0.05em;
  --char-rotate: -10deg; --char-opacity-base: 0.07; --char-opacity-peak: 0.11;
  animation: floatUp 10s ease-in-out infinite, charBreathe 10s ease-in-out infinite;
  animation-delay: -6s, -3s;
}
.hero-floating-chars span:nth-child(19) {
  top: 45%; left: 25%; font-size: 13px; opacity: 0.06; letter-spacing: 0.05em;
  --char-rotate: 14deg; --char-opacity-base: 0.06; --char-opacity-peak: 0.10;
  animation: floatDown 12s ease-in-out infinite, charBreathe 12s ease-in-out infinite;
  animation-delay: -8s, -5s;
}
.hero-floating-chars span:nth-child(20) {
  top: 65%; left: 42%; font-size: 12px; opacity: 0.06; letter-spacing: 0.05em;
  --char-rotate: -7deg; --char-opacity-base: 0.06; --char-opacity-peak: 0.10;
  animation: floatUp 14s ease-in-out infinite, charBreathe 14s ease-in-out infinite;
  animation-delay: -3s, -10s;
}
.hero-floating-chars span:nth-child(21) {
  top: 3%; left: 55%; font-size: 14px; opacity: 0.06; letter-spacing: 0.05em;
  --char-rotate: 5deg; --char-opacity-base: 0.06; --char-opacity-peak: 0.10;
  animation: floatDown 9s ease-in-out infinite, charBreathe 9s ease-in-out infinite;
  animation-delay: -5s, -8s;
}

/* ボケライト（装飾的な光の粒） */
.hero-bokeh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-bokeh span {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(52, 211, 153, 0.25) 0%,
    rgba(52, 211, 153, 0.05) 50%,
    transparent 70%
  );
  pointer-events: none;
  filter: blur(1px);
}

.hero-bokeh span:nth-child(1) {
  width: 6px; height: 6px; top: 15%; left: 20%; opacity: 0.6;
  animation: floatUp 10s ease-in-out infinite; animation-delay: -2s;
}
.hero-bokeh span:nth-child(2) {
  width: 4px; height: 4px; top: 30%; right: 25%; opacity: 0.4;
  animation: floatDown 14s ease-in-out infinite; animation-delay: -5s;
}
.hero-bokeh span:nth-child(3) {
  width: 8px; height: 8px; top: 60%; left: 70%; opacity: 0.35;
  animation: floatUp 12s ease-in-out infinite; animation-delay: -8s;
}
.hero-bokeh span:nth-child(4) {
  width: 3px; height: 3px; top: 75%; left: 30%; opacity: 0.5;
  animation: floatDown 9s ease-in-out infinite; animation-delay: -1s;
}
.hero-bokeh span:nth-child(5) {
  width: 5px; height: 5px; top: 45%; right: 15%; opacity: 0.45;
  animation: floatUp 11s ease-in-out infinite; animation-delay: -6s;
}
.hero-bokeh span:nth-child(6) {
  width: 7px; height: 7px; top: 85%; left: 55%; opacity: 0.3;
  animation: floatDown 13s ease-in-out infinite; animation-delay: -4s;
}
.hero-bokeh span:nth-child(7) {
  width: 4px; height: 4px; top: 10%; right: 40%; opacity: 0.5;
  animation: floatUp 8s ease-in-out infinite; animation-delay: -3s;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* ヒーロータイトル */
.hero-title {
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ヒーローサブタイトル */
.hero-subtitle {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
}

/* ヒーロー説明文 */
.hero-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 40px;
}

/* ヒーローボタングループ */
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   ヒーロー アニメーション
   ------------------------------------------------------------ */

/* メイングロー: 緩やかなスケール脈動 */
@keyframes glowPulse {
  0%, 100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) scale(1.15);
    opacity: 0.7;
  }
}

/* サブグロー: 位置ドリフト */
@keyframes glowDrift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  33% {
    transform: translate(-30px, -20px) scale(1.08);
    opacity: 0.8;
  }
  66% {
    transform: translate(20px, 15px) scale(0.95);
    opacity: 0.9;
  }
}

/* フローティング文字: 上方向浮遊 */
@keyframes floatUp {
  0%, 100% {
    transform: translateY(0) rotate(var(--char-rotate, 0deg));
  }
  50% {
    transform: translateY(-18px) rotate(var(--char-rotate, 0deg));
  }
}

/* フローティング文字: 下方向浮遊 */
@keyframes floatDown {
  0%, 100% {
    transform: translateY(0) rotate(var(--char-rotate, 0deg));
  }
  50% {
    transform: translateY(12px) rotate(var(--char-rotate, 0deg));
  }
}

/* フローティング文字: opacity呼吸エフェクト */
@keyframes charBreathe {
  0%, 100% {
    opacity: var(--char-opacity-base, 0.08);
  }
  50% {
    opacity: var(--char-opacity-peak, 0.14);
  }
}

/* ------------------------------------------------------------
   ボタン
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 9999px; /* ピル型 */
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

/* プライマリボタン */
.btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
}

/* アウトラインボタン */
.btn-outline {
  background-color: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background-color: rgba(52, 211, 153, 0.1);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* App Store 公式バッジ */
.app-store-badge {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-badge:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.app-store-badge:active {
  transform: translateY(0);
}

/* ------------------------------------------------------------
   セクション共通
   ------------------------------------------------------------ */
.section {
  padding-block: 96px;
}

/* 交互背景のセクション */
.section-alt {
  padding-block: 96px;
  background-color: var(--bg-secondary);
}

/* セクションタイトル */
.section-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

/* セクションサブタイトル */
.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 56px;
}

/* ------------------------------------------------------------
   機能カードグリッド（3カラム）
   ------------------------------------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 機能カード */
.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(52, 211, 153, 0.45);
}

/* カードアイコン */
.feature-card .card-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 4px;
}

/* カードタイトル（日本語） */
.feature-card .card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-primary);
}

/* カード英語サブタイトル */
.feature-card .card-en {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* カード説明文 */
.feature-card .card-description {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ------------------------------------------------------------
   ギャラリー タブ
   ------------------------------------------------------------ */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.gallery-tab {
  padding: 10px 28px;
  border-radius: 9999px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background-color: transparent;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* アクティブなタブ */
.gallery-tab.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--bg-primary);
}

/* ------------------------------------------------------------
   ギャラリー スクロールコンテナ
   ------------------------------------------------------------ */
.gallery-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  padding-inline: 8px;
}

/* カスタムスクロールバー（Webkit） */
.gallery-scroll::-webkit-scrollbar {
  height: 6px;
}

.gallery-scroll::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: 3px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

.gallery-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ギャラリーアイテム（各スクリーンショット） */
.gallery-item {
  flex-shrink: 0;
  scroll-snap-align: start;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--bg-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
  display: block;
  object-fit: cover;
}

/* ------------------------------------------------------------
   デバイス別ギャラリー（iPhone / iPad）
   ------------------------------------------------------------ */

/* iPhone スクリーンショット */
.gallery-iphone .gallery-item {
  width: 200px;
}

.gallery-iphone .gallery-item img {
  width: 200px;
  height: auto;
}

/* iPad スクリーンショット */
.gallery-ipad .gallery-item {
  width: 320px;
}

.gallery-ipad .gallery-item img {
  width: 320px;
  height: auto;
}

/* 非表示クラス（タブ切り替えで使用） */
.gallery-hidden {
  display: none !important;
}

/* ------------------------------------------------------------
   試験バッジグリッド（4カラム）
   ------------------------------------------------------------ */
.exams-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* 試験バッジ */
.exam-badge {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.exam-badge:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-3px);
}

.exam-badge .badge-label {
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.exam-badge .badge-name {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-top: 4px;
  display: block;
}

/* ------------------------------------------------------------
   CTA（コールトゥアクション）セクション
   ------------------------------------------------------------ */
.cta {
  padding-block: 96px;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    rgba(52, 211, 153, 0.12) 50%,
    var(--bg-secondary) 100%
  );
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta .container {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.cta-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: 40px;
}

/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* フッターリンクリスト */
.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* コピーライト */
.copyright {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* ------------------------------------------------------------
   プライバシーポリシー・サポートページ コンテンツ
   ------------------------------------------------------------ */
.page-content {
  max-width: 800px;
  margin-inline: auto;
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 96px;
  padding-inline: 24px;
}

.page-content h1 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.page-content h2 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--accent);
  margin-top: 48px;
  margin-bottom: 16px;
}

.page-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-content ul,
.page-content ol {
  list-style: disc;
  padding-left: 24px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  margin-bottom: 6px;
}

.page-content .page-date {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: 48px;
}

/* ------------------------------------------------------------
   FAQ（よくある質問）
   ------------------------------------------------------------ */
.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(52, 211, 153, 0.4);
}

/* 質問テキスト */
.faq-item .question {
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-item .question::before {
  content: "Q";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
}

/* 回答テキスト */
.faq-item .answer {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 36px;
}

/* ------------------------------------------------------------
   お問い合わせフォーム
   ------------------------------------------------------------ */
.contact-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-top: 24px;
  margin-bottom: 48px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.3);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a7f3d0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-submit {
  display: block;
  width: 100%;
  padding: 14px 36px;
  margin-top: 24px;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--bg-primary);
  background-color: var(--accent);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.form-submit:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.35);
}

.form-submit:active {
  transform: translateY(0);
}

/* 送信成功メッセージ */
.form-success {
  text-align: center;
  padding: 40px 24px;
  color: var(--accent);
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: 1.8;
}

.form-success-retry {
  display: inline-block;
  margin-top: 16px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.form-success-retry:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------
   アプリ情報テーブル
   ------------------------------------------------------------ */
.app-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.app-info-table th,
.app-info-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

/* テーブルヘッダー */
.app-info-table th {
  width: 35%;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* テーブルデータ */
.app-info-table td {
  color: var(--text-secondary);
}

/* 最終行のボーダーなし */
.app-info-table tr:last-child th,
.app-info-table tr:last-child td {
  border-bottom: none;
}

/* 奇数行の背景 */
.app-info-table tr:nth-child(odd) {
  background-color: rgba(13, 59, 46, 0.4);
}

/* ============================================================
   レスポンシブデザイン
   ============================================================ */

/* ------------------------------------------------------------
   タブレット（最大 1024px）
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  /* 機能グリッドを2カラムに */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* 試験バッジは4カラム維持 */
  .exams-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------
   モバイル（最大 768px）
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  /* ヒーローフォントサイズを縮小 */
  .hero-title {
    font-size: clamp(28px, 8vw, var(--font-size-hero));
  }

  .hero-subtitle {
    font-size: clamp(18px, 5vw, var(--font-size-xl));
  }

  .hero-description {
    font-size: var(--font-size-base);
  }

  /* フローティング文字をモバイル向けに縮小 */
  .hero-floating-chars {
    transform: scale(0.7);
    transform-origin: center center;
  }

  /* ボケライトをモバイルで控えめに */
  .hero-bokeh {
    opacity: 0.6;
  }

  /* モバイルでは charBreathe を実質無効化し、アニメーション数を削減 */
  @keyframes charBreathe {
    0%, 50%, 100% { opacity: var(--char-opacity-base, 0.08); }
  }

  /* グローサイズをモバイル向けに縮小 */
  .hero::before {
    width: 500px;
    height: 500px;
  }

  .hero::after {
    width: 300px;
    height: 300px;
  }

  /* セクションのパディング削減 */
  .section,
  .section-alt,
  .cta {
    padding-block: 64px;
  }

  /* セクションタイトルサイズ縮小 */
  .section-title {
    font-size: clamp(22px, 6vw, var(--font-size-xl));
  }

  /* ナビリンクを縦方向ドロップダウンに変更 */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: rgba(2, 44, 34, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding-block: 8px;
    /* デフォルトは非表示 */
    display: none;
    z-index: 999;
  }

  /* .open クラスで表示 */
  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: var(--font-size-base);
    color: var(--text-primary);
  }

  .nav-links a:hover {
    background-color: rgba(52, 211, 153, 0.08);
    color: var(--accent);
  }

  /* 機能グリッドを1カラムに */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* 試験バッジを2カラムに */
  .exams-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ギャラリー画像サイズを縮小 */
  .gallery-iphone .gallery-item {
    width: 150px;
  }

  .gallery-iphone .gallery-item img {
    width: 150px;
  }

  .gallery-ipad .gallery-item {
    width: 240px;
  }

  .gallery-ipad .gallery-item img {
    width: 240px;
  }

  /* ボタンをフルwidth対応 */
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    padding: 14px 24px;
    width: 100%;
    max-width: 320px;
  }

  /* ページコンテンツのパディング調整 */
  .page-content {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 64px;
    padding-inline: 16px;
  }

  /* お問い合わせフォームのパディング調整 */
  .contact-form {
    padding: 24px 16px;
  }

  /* テーブルをレスポンシブ対応 */
  .app-info-table {
    table-layout: fixed;
    word-break: break-word;
  }

  .app-info-table th {
    width: 42%;
  }

  .app-info-table td {
    word-break: break-all;
  }
}

/* ------------------------------------------------------------
   アクセシビリティ: モーション軽減設定の尊重
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after,
  .hero-floating-chars span,
  .hero-bokeh span {
    animation: none !important;
  }

  /* アニメーション無効時でも回転角度を維持する静的フォールバック */
  .hero-floating-chars span {
    transform: rotate(var(--char-rotate, 0deg));
  }
}
