/* style.css — たちばな開発 ブランドLPの全体スタイル定義 */

/* --- デザイン変数（トークン） --- */
:root {
  --bg-base: #f4f9f6; /* 明るいミントホワイトのベース背景（目に優しい白緑） */
  --bg-surface: rgba(255, 255, 255, 0.5); /* 白すりガラスの背景。Glassmorphism（すりガラス効果）を実現します */
  --bg-elevated: rgba(255, 255, 255, 0.75); /* 重なり順が上の要素向けの、少し濃いめの白すりガラス背景 */
  --accent-green: #059669; /* コントラストを担保した濃いめのエメラルドグリーン（中学生でも見やすい視認性） */
  --accent-glow: #10b981; /* ホバー（マウスを載せた時）などに発光させるための明るいエメラルドグリーン */
  --accent-teal: #0d9488; /* 深みのあるティール（青緑） */
  --gradient-primary: linear-gradient(135deg, #10b981, #06b6d4); /* 白背景に映える鮮やかなグラデーション */
  --text-primary: #0f172a; /* メインテキスト用の濃いスレートグレー（黒に近い灰色。文字の読みやすさを高めます） */
  --text-secondary: #334155; /* サブテキスト用のグレー */
  --text-dim: #64748b; /* 補足や非活性要素用の薄いグレー */
  --border-subtle: rgba(5, 150, 105, 0.15); /* 淡いエメラルドグリーンの境界線 */
  --glow-green: 0 8px 32px rgba(5, 150, 105, 0.08); /* 白テーマ用のふんわりとした緑の影 */
  --glow-strong: 0 12px 40px rgba(5, 150, 105, 0.15); /* 白テーマ用の少し強めの緑の影 */
  --radius-card: 16px; /* 角丸の半径（カード用） */
  --radius-btn: 12px; /* 角丸の半径（ボタン用） */
  --radius-input: 8px; /* 角丸の半径（入力欄用） */
  --font-ja: 'Zen Kaku Gothic New', sans-serif;
  --font-en: 'M PLUS 1', sans-serif;
  --section-gap: 100px;
}

/* --- ベースリセットと基本スタイル --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: var(--font-en);
}

body {
  background-color: var(--bg-base);
  /* 近未来感を引き立てるデジタルドットの背景パターン。白背景に合わせた淡い緑の点でテック感を演出します */
  background-image: radial-gradient(rgba(5, 150, 105, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-primary);
  font-family: var(--font-en), var(--font-ja);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* --- ヒーローセクション --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 88px;
  overflow: hidden;
  /* 背景画像の上に白〜薄緑のグラデーションを重ねて視認性を確保し、テーマに統合します */
  background-image: 
    linear-gradient(180deg, rgba(244, 249, 246, 0.55) 0%, rgba(244, 249, 246, 0.92) 100%),
    url('assets/hero-bg.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-text-content {
  text-align: center;
  margin-top: 40px;
  z-index: 2;
  /* グロウや軌道より上に配置 */
}

.hero-title-ja {
  font-family: var(--font-ja);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.hero-title-en {
  font-family: var(--font-en);
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-family: var(--font-ja);
  font-size: 1.25rem;
  color: var(--accent-green);
  font-weight: 500;
}

/* --- ヒーローコピーのタブ別出し分け（CSP安全＝両方をHTMLに置きCSSで表示切替） --- */
/* 既定（JS未適用時）は lab を見せる＝既存OG・被リンクと一貫 */
.hero-copy-actor { display: none; }
.hero-copy-lab { display: block; }
#page-home[data-active-view="actor"] .hero-copy-actor { display: block; }
#page-home[data-active-view="actor"] .hero-copy-lab { display: none; }
#page-home[data-active-view="lab"] .hero-copy-actor { display: none; }
#page-home[data-active-view="lab"] .hero-copy-lab { display: block; }

/* 開発ヒーロー：Reverb Lab の上に控えめな振り仮名 */
.hero-yomi {
  font-family: var(--font-ja);
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--accent-green);
  opacity: 0.78;
  margin-bottom: 2px;
  padding-left: 0.42em; /* letter-spacing分の右寄りを中央へ補正 */
}

.hero-title-lab {
  font-family: var(--font-en), var(--font-ja);
  letter-spacing: 0.01em;
}

/* サブタイトル内の強調（声の可能性を創る） */
.hero-emph {
  color: var(--accent-green);
  font-weight: 700;
  background: linear-gradient(180deg, transparent 62%, rgba(16, 185, 129, 0.16) 62%);
  padding: 0 2px;
}

/* --- ヒーロー軌道アニメーション (hero-orbit skill) --- */
.hero-orbit-container {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

.hero-main-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--glow-strong);
  /* 緩やかなパルスアニメーション */
  animation: pulse-glow 3s ease-in-out infinite;
}

.hero-main-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 40px rgba(74, 222, 128, 0.2);
  }

  50% {
    box-shadow: 0 0 60px rgba(74, 222, 128, 0.35);
  }
}

.orbit-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 20秒かけて1周 */
  animation: orbit-rotate 20s linear infinite;
}

@keyframes orbit-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.orbit-path-visual {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(74, 222, 128, 0.15);
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.orbit-path-visual::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(74, 222, 128, 0.05);
  border-radius: 50%;
}

.orbit-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  /* デジタルグリッド背景 */
  background-image: 
    linear-gradient(rgba(100, 200, 122, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 200, 122, 0.05) 1px, transparent 1px);
  background-size: 4px 4px;
  border: 1px solid rgba(100, 200, 122, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* 自転を打ち消して常に正位置を保つ（20秒） */
  animation: counter-rotate 20s linear infinite;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.5), 
    0 0 15px rgba(74, 222, 128, 0.15),
    inset 0 0 10px rgba(74, 222, 128, 0.1);
  z-index: 10;
  color: var(--accent-green);
}

/* ターゲットフレーム（L字の角） */
.orbit-icon::before,
.orbit-icon::after {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  pointer-events: none;
  transition: all 0.4s ease;
  opacity: 0.6;
}

.orbit-icon::before {
  border-top: 2px solid var(--accent-green);
  border-left: 2px solid var(--accent-green);
  top: -4px;
  left: -4px;
  border-top-left-radius: 8px;
}

.orbit-icon::after {
  border-bottom: 2px solid var(--accent-green);
  border-right: 2px solid var(--accent-green);
  bottom: -4px;
  right: -4px;
  border-bottom-right-radius: 8px;
}

.orbit-icon:hover::before,
.orbit-icon:hover::after {
  width: 160%;
  height: 160%;
  opacity: 1;
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.orbit-icon i {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 8px var(--accent-glow));
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.orbit-icon:hover i {
  transform: scale(1.1);
}

@keyframes counter-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(-360deg);
  }
}

/* 5つのアイコンを72度等間隔で配置 */
/* 角度は「真上 = -90°」を基準に時計回りで72°ずつ増やす */
/* 座標計算: left = 50% + cos(angle)*50%, top = 50% + sin(angle)*50% */
/* アイコン中心合わせ: margin -22px（アイコン44pxの半分） */

/* angle = -90° (真上): cos=-90°=0, sin=-90°=-1 */
.orbit-1 {
  top: 0%;       /* 50% + (-1)*50% = 0% */
  left: 50%;     /* 50% + 0*50%   = 50% */
  margin-top: -22px;
  margin-left: -22px;
}

/* angle = -18° (右上): cos=-18°≈0.951, sin=-18°≈-0.309 */
.orbit-2 {
  top: 34.55%;   /* 50% + (-0.309)*50% ≈ 34.55% */
  left: 97.55%;  /* 50% + 0.951*50%    ≈ 97.55% */
  margin-top: -22px;
  margin-left: -22px;
}

/* angle = 54° (右下): cos=54°≈0.588, sin=54°≈0.809 */
.orbit-3 {
  top: 90.45%;   /* 50% + 0.809*50% ≈ 90.45% */
  left: 79.4%;   /* 50% + 0.588*50% ≈ 79.4% */
  margin-top: -22px;
  margin-left: -22px;
}

/* angle = 126° (左下): cos=126°≈-0.588, sin=126°≈0.809 */
.orbit-4 {
  top: 90.45%;   /* 50% + 0.809*50%  ≈ 90.45% */
  left: 20.6%;   /* 50% + (-0.588)*50% ≈ 20.6% */
  margin-top: -22px;
  margin-left: -22px;
}

/* angle = 198° (左上): cos=198°≈-0.951, sin=198°≈-0.309 */
.orbit-5 {
  top: 34.55%;   /* 50% + (-0.309)*50% ≈ 34.55% */
  left: 2.45%;   /* 50% + (-0.951)*50% ≈ 2.45% */
  margin-top: -22px;
  margin-left: -22px;
}

/* ホバーで軌道停止＋拡大 */
.orbit-ring:hover {
  animation-play-state: paused;
}

/* リンクホバー時のスタイル調整 */
.orbit-icon:hover {
  transform: scale(1.2) !important;
  box-shadow: var(--glow-green);
  background: var(--bg-elevated);
  /* アイコン個別の自転キャンセルアニメーションも一時停止する */
  animation-play-state: paused;
}

/* --- レスポンシブ --- */
@media (max-width: 767px) {
  .hero-orbit-container {
    width: 260px;
    height: 260px;
  }

  .hero-main-icon {
    width: 100px;
    height: 100px;
  }

  .orbit-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
    margin-top: -20px !important;
    margin-left: -20px !important;
  }

  .hero-title-ja {
    font-size: 2rem;
  }

  .hero-title-en {
    font-size: 0.85rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    padding: 0 16px;
  }

  .hero-yomi {
    font-size: 0.7rem;
    letter-spacing: 0.34em;
    padding-left: 0.34em;
  }
}

/* --- SPA Transition --- */
.page-transition {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-transition.fade-out {
  opacity: 0;
}

/* --- 下部固定チャットバー --- */
.chat-bar-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 56px;
  background: linear-gradient(90deg, rgba(244, 249, 246, 0.85) 0%, rgba(16, 185, 129, 0.1) 50%, rgba(244, 249, 246, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 10px rgba(5, 150, 105, 0.05);
  z-index: 9999;
  display: flex;
  justify-content: center;
}

.chat-bar {
  position: relative;
  /* マスコットの絶対配置の基準 */
  width: 100%;
  max-width: 768px;
  /* モバイルファーストからタブレット程度の幅に制限 */
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px 0 88px;
  /* マスコット(64px)+余白のために左パディングを増やす */
  gap: 12px;
  overflow: visible !important;
  /* マスコットおよび吹き出しがはみ出せるように */
}

/* 検索にヒットしなかった時の揺れアニメーション */
.chat-bar.shake {
  animation: bar-shake 300ms ease;
}

@keyframes bar-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  75% {
    transform: translateX(4px);
  }
}

/* --- マスコットキャラ --- */
@keyframes mascot-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes mascot-jump {
  0% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-10px) scale(1.05);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes mascot-shake {

  0%,
  100% {
    transform: translateX(0) rotate(0);
  }

  20% {
    transform: translateX(-3px) rotate(-5deg);
  }

  40% {
    transform: translateX(3px) rotate(5deg);
  }

  60% {
    transform: translateX(-2px) rotate(-3deg);
  }

  80% {
    transform: translateX(2px) rotate(3deg);
  }
}

.chat-mascot {
  position: absolute;
  left: 6px;
  bottom: -5px;
  width: 88px;
  height: 110px;
  z-index: 10001;
  cursor: pointer;
  filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.2));
  animation: mascot-float 3s ease-in-out infinite;
  transition: filter 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.chat-mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

/* 入力フォーカス時 */
.chat-bar.focused .chat-mascot {
  filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.4));
  transform: rotate(8deg);
  animation: none;
}

/* 遷移成功時 */
.chat-mascot.jump {
  animation: mascot-jump 250ms ease-out !important;
}

/* 該当なし時 */
.chat-mascot.shake {
  animation: mascot-shake 300ms ease !important;
}

.search-icon {
  display: flex;
  align-items: center;
  color: var(--accent-green);
  flex-shrink: 0;
}

#chatInput {
  flex: 1;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-en), var(--font-ja);
  font-size: 16px;
  min-width: 0;
  /* flex内で縮小可能に */
  padding: 8px 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

#chatInput::placeholder {
  color: #64748b;
}

#chatInput:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent-glow);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.15);
}

.hamburger-btn {
  background: transparent;
  border: none;
  color: var(--accent-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.3s ease, filter 0.3s ease;
}

.hamburger-btn:hover {
  color: var(--accent-glow);
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

/* --- ハンバーガーメニュー --- */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(244, 249, 246, 0.5); /* 明るいテーマ用の白緑半透明オーバーレイ */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-panel {
  position: absolute;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding: 40px 24px;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.menu-overlay.active .menu-panel {
  right: 0;
}

.menu-close-btn {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 40px;
  transition: color 0.3s ease;
}

.menu-close-btn:hover {
  color: var(--accent-green);
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-link {
  font-family: var(--font-ja);
  font-size: 18px;
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
}

.menu-link:hover,
.menu-link.active {
  color: var(--accent-green);
}

.menu-link:hover {
  transform: translateX(8px);
}

/* --- レスポンシブ (モバイル用フッター/マスコット補正) --- */
@media (max-width: 767px) {
  .chat-bar {
    padding: 0 12px 0 68px;
    /* モバイル時はマスコットが縮小されるための左余白確保 */
  }

  .chat-mascot {
    width: 60px;
    height: 75px;
    left: 12px;
    bottom: 0;
  }
}

/* --- レイアウト / 汎用 --- */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-block {
  padding: var(--section-gap) 0;
}

.section-title {
  font-family: var(--font-en);
  font-size: 2rem;
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 32px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8); /* 文字の背後を軽く白くして視認性を補助 */
}

/* 追加: セクションタイトルの左側にデジタルな四角いアクセントをつける */
.section-title::before {
  content: '';
  display: block;
  width: 12px;
  height: 24px;
  background: var(--accent-green);
  box-shadow: var(--glow-green);
  border-radius: 2px;
}

/* --- スクロールアニメーション (js連動) --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- About --- */
.about-content {
  max-width: 720px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

/* --- Profile --- */
.profile-card {
  display: flex;
  background: var(--bg-surface); /* 白すりガラスの背景を使用 */
  backdrop-filter: blur(16px); /* すりガラス効果 */
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle); /* 境界線も明るいテーマの緑に */
  border-radius: var(--radius-card);
  padding: 32px;
  gap: 32px;
  align-items: center;
  box-shadow: var(--glow-green), inset 0 1px 0 rgba(255, 255, 255, 0.5); /* 淡いシャドウと内側の白グロウ */
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.profile-card:hover {
  transform: translateY(-4px); /* 少し浮き上がる */
  border-color: rgba(5, 150, 105, 0.35); /* 枠線が少し明るい緑に */
  box-shadow: var(--glow-strong), inset 0 1px 0 rgba(255, 255, 255, 0.8); /* 浮遊感のある影 */
}

.profile-img-wrap {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg-elevated);
}

.profile-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.profile-title {
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 16px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  background: rgba(100, 200, 122, 0.1);
  color: var(--accent-green);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-en);
}

.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-family: var(--font-en);
  font-size: 0.95rem;
  transition: color 0.3s ease;
  text-decoration: none;
}

.sns-btn:hover {
  color: var(--accent-glow);
}

/* --- Voice Samples --- */
.subsection-title {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  margin-top: 40px;
}

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

.sample-card {
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--glow-green);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.sample-card:hover {
  transform: translateY(-8px);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: var(--glow-strong);
}

.sample-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.sample-title {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.1rem;
}

.sample-tag {
  align-self: flex-start;
  background: var(--bg-elevated);
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--text-secondary);
}

/* Custom Audio Player */
.custom-audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  background: var(--accent-green);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.play-btn:hover {
  background: var(--accent-glow);
  transform: scale(1.05);
}

.progress-container {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-primary);
  border-radius: 4px;
  transition: width 0.1s linear;
}

.time-display {
  font-family: var(--font-en);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* --- Achievements --- */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 6px;
  height: 100%;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 40px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.timeline-year {
  display: block;
  font-family: var(--font-en);
  color: var(--accent-green);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.timeline-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Contact & Footer --- */
.contact-box {
  text-align: center;
  background: rgba(5, 150, 105, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 60px 20px;
  box-shadow: var(--glow-green);
}

.contact-text {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-primary);
  color: #fff;
  font-family: var(--font-ja);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.2);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.35);
}

.footer {
  padding: 60px 0 120px;
  /* チャットバーと重ならないように深めのpadding-bottom */
  text-align: center;
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--section-gap);
}

.sns-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.sns-links a {
  color: var(--text-dim);
  transition: color 0.3s ease, transform 0.2s ease;
}

.sns-links a:hover {
  color: var(--accent-green);
  transform: scale(1.1);
}

.copyright {
  font-family: var(--font-en);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* --- Responsive Phase 3 --- */
@media (max-width: 767px) {
  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .profile-tags {
    justify-content: center;
  }

  .samples-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 40px 16px;
  }
}

/* --- SPA Pages (Phase 4) --- */
.page-view {
  display: none;
  animation: fadeInBase 0.4s ease-out;
}

.page-view.active {
  display: block;
}

@keyframes fadeInBase {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- VoiLab Page --- */
.voilab-hero {
  padding: 120px 20px 60px;
  text-align: center;
}

.page-title {
  font-size: 2.4rem;
  color: #fff;
  margin-bottom: 16px;
  font-family: var(--font-en), var(--font-ja);
}

.title-sub {
  display: block;
  font-size: 1.2rem;
  color: var(--accent-green);
  margin-top: 8px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

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

.feature-card {
  background: var(--bg-surface); /* 白すりガラスを使用 */
  backdrop-filter: blur(12px); /* すりガラス効果 */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle); /* 境界線も明るいテーマの緑に */
  border-radius: var(--radius-card);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--glow-green);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(5, 150, 105, 0.35); /* 枠線が少し明るく */
  box-shadow: var(--glow-strong);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.feature-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.story-box {
  background: rgba(100, 200, 122, 0.05);
  border-left: 4px solid var(--accent-green);
  padding: 40px;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin-bottom: 60px;
}

.story-box p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.cta-container {
  margin: 60px 0 80px;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #1e0b51, #5865F2, #4ade80);
  background-size: 200% 200%;
  color: #fff;
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 16px 40px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 8px 30px rgba(88, 101, 242, 0.4);
  transition: all 0.3s ease;
  animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-discord:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 40px rgba(88, 101, 242, 0.6);
  color: #fff;
}

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

@media (max-width: 767px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .voilab-hero {
    padding-top: 80px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .title-sub {
    font-size: 1rem;
  }

  .story-box {
    padding: 24px;
  }

  .btn-discord {
    font-size: 1rem;
    padding: 14px 28px;
  }
}

/* --- Tools Page --- */
.tools-hero {
  padding: 120px 20px 40px;
  text-align: center;
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface); /* 白すりガラス */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px;
  text-decoration: none;
  box-shadow: var(--glow-green);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.tool-active {
  cursor: pointer;
}

.tool-active:hover {
  transform: translateY(-8px);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: var(--glow-strong);
}

.tool-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  user-select: none;
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.tool-content {
  flex: 1;
}

.tool-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.tool-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.tool-status {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-en), var(--font-ja);
  font-weight: 700;
}

.status-available {
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent-glow);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.status-soon {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --- Tool Detail Pages --- */
.tool-detail-hero {
  padding: 100px 20px 40px;
  text-align: center;
}

.back-link {
  display: inline-block;
  color: var(--accent-green);
  text-decoration: none;
  font-family: var(--font-ja);
  font-size: 0.95rem;
  margin-bottom: 32px;
  transition: opacity 0.3s ease;
}

.back-link:hover {
  opacity: 0.7;
}

.detail-icon {
  font-size: 4rem;
  margin-bottom: 24px;
  text-shadow: var(--glow-green);
}

@media (max-width: 767px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================= */
/* --- Visual Polish: Dark Tech Aesthetics Enhancements (Phase 7+)           */
/* ========================================================================= */

/* 1. Background Texture */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(5, 150, 105, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
  z-index: 0;
}

/* 2. Hero Section Glow */
.hero-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, rgba(74, 222, 128, 0.03) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* 3. Section Divider */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.3), transparent);
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.1);
  margin: 0 auto;
}

/* 4. Glow Borders for Cards */
.card,
.sample-card,
.tool-card,
.feature-card {
  border: 1px solid rgba(100, 200, 122, 0.15);
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.05), inset 0 1px 0 rgba(100, 200, 122, 0.1);
}

.card:hover,
.sample-card:hover,
.tool-card:hover,
.feature-card:hover {
  border-color: rgba(100, 200, 122, 0.4);
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.15), inset 0 1px 0 rgba(100, 200, 122, 0.2);
}

/* 5. Section Title Underline Glow */
.section-title {
  border-bottom: none;
  /* override previous border */
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent-green);
  margin-top: 8px;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

/* 6. Audio Player Play Button Glow */
.play-btn,
.audio-play-btn {
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.play-btn:hover,
.audio-play-btn:hover {
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* 7. Timeline Glow (Achievements) */
.timeline-dot {
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.timeline::before {
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.15);
}

/* 8. Emoji Icon Background Glow */
.feature-icon,
.detail-icon {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  padding: 20px;
  display: inline-block;
}

/* 9. Stagger Animations for Cards */
@keyframes staggerFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-section:not(.is-visible) .sample-card,
.fade-in-section:not(.is-visible) .feature-card,
.fade-in-section:not(.is-visible) .tool-card {
  opacity: 0;
}

.fade-in-section.is-visible .sample-card,
.fade-in-section.is-visible .feature-card,
.fade-in-section.is-visible .tool-card {
  animation: staggerFadeIn 0.6s ease-out backwards;
}

.fade-in-section.is-visible .sample-card:nth-child(1),
.fade-in-section.is-visible .feature-card:nth-child(1),
.fade-in-section.is-visible .tool-card:nth-child(1) {
  animation-delay: 0.1s;
}

.fade-in-section.is-visible .sample-card:nth-child(2),
.fade-in-section.is-visible .feature-card:nth-child(2),
.fade-in-section.is-visible .tool-card:nth-child(2) {
  animation-delay: 0.2s;
}

.fade-in-section.is-visible .sample-card:nth-child(3),
.fade-in-section.is-visible .feature-card:nth-child(3),
.fade-in-section.is-visible .tool-card:nth-child(3) {
  animation-delay: 0.3s;
}

.fade-in-section.is-visible .sample-card:nth-child(4),
.fade-in-section.is-visible .feature-card:nth-child(4),
.fade-in-section.is-visible .tool-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* 10. Social Icon Hover Glow */
.social-icon:hover {
  color: var(--accent-green);
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.5));
}

/* 11. Lucide Icons Styling */
.lucide,
[data-lucide] {
  width: 28px;
  height: 28px;
  stroke: var(--accent-green);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.3));
}

.feature-card [data-lucide],
.tool-card [data-lucide] {
  width: 36px;
  height: 36px;
}

.orbit-icon [data-lucide] {
  width: 20px;
  height: 20px;
}

.detail-icon [data-lucide] {
  width: 64px;
  height: 64px;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.1) 0%, transparent 70%);
  border: 1px solid rgba(100, 200, 122, 0.15);
  margin: 0 auto 16px;
}

/* 12. Audio Play Buttons Revamp */
.play-btn,
.audio-play-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: transparent !important;
  border: 1.5px solid var(--accent-green) !important;
  color: var(--accent-green) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.15) !important;
}

.play-btn:hover,
.audio-play-btn:hover {
  background: rgba(74, 222, 128, 0.1) !important;
  box-shadow: 0 0 20px rgba(74, 222, 128, 0.35) !important;
  transform: scale(1.05) !important;
}

.play-btn svg,
.audio-play-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: var(--accent-green) !important;
  stroke: none !important;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
  }

  50% {
    box-shadow: 0 0 24px rgba(74, 222, 128, 0.4);
  }

  100% {
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.15);
  }
}

.play-btn.playing,
.audio-play-btn.playing {
  animation: pulse-ring 1.5s ease-in-out infinite !important;
}

.progress-container {
  background: rgba(255, 255, 255, 0.05) !important;
}

.progress-bar {
  background: var(--accent-green) !important;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.3) !important;
}

/* 13. Mascot Bubble and Voice Input */
.mascot-bubble {
  position: absolute;
  bottom: 64px;
  /* バーの高さ + 余白 */
  left: 16px;
  /* マスコットのleft位置と揃える */
  transform: translateY(8px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 10002;

  /* ガラスモーフィズム */
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 8px;
  min-width: auto;
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.12);
  white-space: nowrap;
}

.mascot-bubble.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.bubble-arrow {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  width: 10px;
  height: 10px;
  bottom: -5px;
  left: 24px;
  transform: rotate(45deg);
}

.bubble-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 16px;
  color: var(--text-primary);
  font-family: var(--font-ja);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.bubble-option:hover {
  background: rgba(74, 222, 128, 0.1);
  color: var(--accent-green);
}

.bubble-option [data-lucide] {
  width: 18px;
  height: 18px;
  stroke: var(--accent-green);
  stroke-width: 1.5;
}

.bubble-divider {
  height: 1px;
  background: rgba(5, 150, 105, 0.1);
  margin: 2px 8px;
}

@keyframes mascot-listening {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.2));
    transform: scale(1);
  }

  50% {
    filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.5));
    transform: scale(1.05);
  }
}

.chat-mascot.listening {
  animation: mascot-listening 1s ease-in-out infinite;
}

.chat-mascot.menu-open {
  animation: none !important;
  transform: rotate(8deg);
}

/* 14. Hero Icon Adjustments */
.hero-main-icon {
  width: 156px !important;
  height: 156px !important;
}

@media (max-width: 767px) {
  .hero-main-icon {
    width: 104px !important;
    height: 104px !important;
  }
}

/* 15. Orbit Icon Tweaks */
.orbit-icon {
  overflow: hidden !important;
  border-radius: 50% !important;
  background: var(--bg-base) !important;
  animation: none !important;
}

.orbit-icon img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  position: static !important;
  animation: counter-rotate 20s linear infinite !important;
}

/* ========================================================================= */
/* --- How to Use セクション                                                  */
/* --- 各ツール詳細ページに表示する使い方ステップ                                   */
/* ========================================================================= */

/* howto-steps — ステップ一覧のラッパー（縦並びflexbox） */
.howto-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

/* howto-step — 1ステップの行（番号バッジ + コンテンツを横並び） */
.howto-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--glow-green);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.howto-step:hover {
  transform: translateY(-4px);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: var(--glow-strong);
}

/* howto-step-number — 丸い番号バッジ */
.howto-step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(74, 222, 128, 0.08));
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--accent-green);
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

/* howto-step-content — テキスト部分 */
.howto-step-content {
  flex: 1;
  min-width: 0;
}

/* howto-step-title — ステップ見出し */
.howto-step-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* howto-step-desc — ステップ説明文 */
.howto-step-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* howto-step-image — スクリーンショット画像ラッパー */
.howto-step-image {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(100, 200, 122, 0.1);
  background: var(--bg-base);
}

/* howto-step-image img — 画像本体 */
.howto-step-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.howto-step:hover .howto-step-image img {
  transform: scale(1.02);
}

/* --- How to Use レスポンシブ --- */
@media (max-width: 767px) {
  .howto-step {
    padding: 20px 16px;
    gap: 14px;
  }

  .howto-step-number {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .howto-step-title {
    font-size: 1rem;
  }

  .howto-step-desc {
    font-size: 0.9rem;
  }

  .howto-step-image {
    border-radius: 8px;
  }
}

/* ========================================================================= */
/* --- Phase 8: System Boot, Custom Cursor Trail --- */
/* ========================================================================= */

/* 2. システムブート画面 */
#boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-base); /* メインの暗い背景 */
  z-index: 100000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#boot-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-content {
  width: 80%;
  max-width: 600px;
  font-family: monospace; /* ターミナル風フォント */
  color: var(--accent-green);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.boot-logo {
  font-family: var(--font-en);
  font-size: 2.5rem;
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--accent-green);
  padding-bottom: 8px;
  display: inline-block;
}

#boot-terminal {
  font-size: 1rem;
  line-height: 1.5;
  white-space: pre-wrap;
  min-height: 150px;
}

/* 3. カスタムカーソルとトレール（軌跡） */
/* OS標準のカーソルを隠す */
body.custom-cursor-enabled,
body.custom-cursor-enabled a,
body.custom-cursor-enabled button,
body.custom-cursor-enabled input {
  cursor: none;
}

/* 固有カーソルアイコン（ユーザーが操作する先端部分） */
#custom-cursor {
  /* デフォルトは非表示。JSがPC環境を検出したときだけ block に切り替える */
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 99999;
  /* SVGで描画した、シャープでテックな独自の矢印アイコン（アクセントグリーン） */
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%234ade80" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  /* 先端（左上）がマウス座標とぴったり合うように、微細にオフセット */
  transform: translate(-3px, -3px); 
  filter: drop-shadow(0 0 6px var(--accent-glow));
  transition: transform 0.1s ease;
}

/* 追尾するサークル（元の丸いデザイン） */
#cursor-trail {
  /* デフォルトは非表示。JSがPC環境を検出したときだけ block に切り替える */
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(74, 222, 128, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 10px rgba(74, 222, 128, 0.1);
  transition: width 0.3s ease, height 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

/* リンクホバー時の変化 */
body.custom-cursor-enabled #custom-cursor.hovering {
  /* ホバー時は矢印が少しだけ大きくなる */
  transform: translate(-3px, -3px) scale(1.1);
}

body.custom-cursor-enabled #cursor-trail.hovering {
  /* ホバー時はサークルが広がり、発光する */
  width: 48px;
  height: 48px;
  background: rgba(74, 222, 128, 0.1);
  border-color: var(--accent-glow);
}

/* ========================================================================= */
/* --- Phase 9: Scrollbar & Text Selection --- */
/* ========================================================================= */

/* 1. テキスト選択時の色 */
::selection {
  background: var(--accent-green);
  color: var(--bg-base);
}
::-moz-selection {
  background: var(--accent-green);
  color: var(--bg-base);
}

/* 2. カスタムスクロールバー */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
  border-left: 1px solid rgba(100, 200, 122, 0.1);
}

::-webkit-scrollbar-thumb {
  background: rgba(74, 222, 128, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 222, 128, 0.6);
}

/* ───────── ツール固有チップ（ヒーロー内・アイコン＋名前のみ・背景に溶け込む・2026-06-17） ───────── */
.hero-tools {
  width: 100%;
  max-width: 720px;
  margin: 42px auto 0;
}
.hero-tools-label {
  text-align: center;
  font-family: var(--font-en);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  color: var(--accent-green);
  opacity: .85;
  margin-bottom: 16px;
}
/* ツールラベルのタブ別出し分け（既定＝lab） */
.hero-tools-label-actor { display: none; }
.hero-tools-label-lab { display: block; }
#page-home[data-active-view="actor"] .hero-tools-label-actor { display: block; }
#page-home[data-active-view="actor"] .hero-tools-label-lab { display: none; }
#page-home[data-active-view="lab"] .hero-tools-label-actor { display: none; }
#page-home[data-active-view="lab"] .hero-tools-label-lab { display: block; }
.tool-badge-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 7px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  text-decoration: none;
  box-shadow: 0 6px 18px -12px rgba(5, 150, 105, 0.3);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.tool-badge:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(5, 150, 105, 0.4);
  box-shadow: var(--glow-green);
}
.tool-badge-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
}
.tool-badge-icon img { width: 100%; height: 100%; object-fit: cover; }
.tool-badge-name {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  white-space: nowrap;
}
@media (max-width: 767px) {
  .tool-badge { padding: 6px 13px 6px 6px; }
  .tool-badge-name { font-size: .86rem; }
}
@media (max-width: 560px) {
  .hero-tools { margin-top: 32px; }
  /* チップを少し小さくして、最小幅(320px)でも横2個が確実に収まる＝flex-wrapが膨張せず単独折返しも防ぐ */
  .tool-badge-grid { gap: 8px; }
  .tool-badge { gap: 7px; padding: 6px 12px 6px 6px; }
  .tool-badge-icon { width: 26px; height: 26px; }
  .tool-badge-name { font-size: .8rem; }
}

/* ========================================================================= */
/* --- レベル段階グラフ（Lv1→Lv5の上り坂）— 声優タブの固有UI・白緑グラス近未来  */
/* ヒーロー内（.fade-in-sectionの外）に置くため reveal/IntersectionObserverと無干渉 */
/* ========================================================================= */
.level-ladder {
  display: block; /* 両タブで表示（バッジ廃止後の唯一のツール表示） */
  width: 100%;
  max-width: 720px;
  margin: 28px auto 0;
}

.level-ladder-caption {
  text-align: center;
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

/* 上り坂の土台（左下から右上へ伸びるグリーンの斜めグラデ＝奥行き） */
.level-steps {
  list-style: none;
  margin: 0;
  padding: 14px 14px 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(to top, rgba(13, 148, 136, 0.08) 0%, transparent 70%),
    var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--glow-green), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  position: relative;
  overflow: hidden;
}

/* （旧）上り坂の斜めライン装飾は除去。階段の上昇感は .level-step-bar の
   段階的な高さ（64→144px）だけで表現し、不要な対角線は描かない。 */

.level-step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.level-step-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.level-step-link:hover {
  transform: translateY(-4px);
}

/* 各ステップの縦バー（Lv1→Lv5で段階的に高くなる＝階段グラフ） */
.level-step-bar {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.22), rgba(13, 148, 136, 0.10));
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-bottom: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 18px -14px rgba(5, 150, 105, 0.5);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.level-step:nth-child(1) .level-step-bar { height: 64px; }
.level-step:nth-child(2) .level-step-bar { height: 84px; }
.level-step:nth-child(3) .level-step-bar { height: 104px; }
.level-step:nth-child(4) .level-step-bar { height: 124px; }
.level-step:nth-child(5) .level-step-bar { height: 144px; }

.level-step-link:hover .level-step-bar {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.34), rgba(13, 148, 136, 0.16));
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--glow-green);
}

.level-step-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px -6px rgba(5, 150, 105, 0.5);
}
.level-step-icon img { width: 100%; height: 100%; object-fit: cover; }

.level-step-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-bottom: 12px;
  text-align: center;
}

.level-step-lv {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--accent-green);
}

.level-step-name {
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 0.74rem;
  color: var(--text-primary);
  line-height: 1.25;
}

/* タブレット以下：バーを少し低くして収める */
@media (max-width: 767px) {
  .level-steps { gap: 7px; padding: 12px 10px 0; }
  .level-step:nth-child(1) .level-step-bar { height: 52px; }
  .level-step:nth-child(2) .level-step-bar { height: 68px; }
  .level-step:nth-child(3) .level-step-bar { height: 84px; }
  .level-step:nth-child(4) .level-step-bar { height: 100px; }
  .level-step:nth-child(5) .level-step-bar { height: 116px; }
  .level-step-icon { width: 26px; height: 26px; }
  .level-step-name { font-size: 0.68rem; }
}

/* 最小幅（320/375）：横並びの階段は維持しつつ文字とアイコンを縮め、はみ出しゼロ */
@media (max-width: 480px) {
  .level-ladder { margin-top: 28px; }
  .level-steps { gap: 5px; padding: 10px 7px 0; }
  .level-step:nth-child(1) .level-step-bar { height: 46px; }
  .level-step:nth-child(2) .level-step-bar { height: 58px; }
  .level-step:nth-child(3) .level-step-bar { height: 70px; }
  .level-step:nth-child(4) .level-step-bar { height: 82px; }
  .level-step:nth-child(5) .level-step-bar { height: 94px; }
  .level-step-bar { padding-top: 7px; }
  .level-step-icon { width: 22px; height: 22px; border-radius: 7px; }
  .level-step-lv { font-size: 0.62rem; }
  .level-step-name { font-size: 0.6rem; }
  .level-step-meta { padding-bottom: 9px; gap: 0; }
  .level-ladder-caption { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .level-step-link { transition: none; }
}

/* ========================================================================= */
/* --- ぼいラボ6診断への導線（レベルラダー直下・両タブ共有・ヒーロー内コンパクト 2026-06-23） */
/* 白緑グラスのトンマナ踏襲・固有絵文字バッジ・ヒーローを壊さない小型ピル */
/* ========================================================================= */
.hero-diagnoses {
  width: 100%;
  max-width: 720px;
  margin: 18px auto 0;
}
.hero-diagnoses-label {
  text-align: center;
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--accent-green);
  opacity: 0.9;
  margin: 0 0 10px;
}
.diagnosis-chips {
  /* ラダーのパネル枠（.level-steps）と同じ白グラス＋teal上昇グラデ＋白縁＋緑グロー */
  list-style: none;
  margin: 0;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  border-radius: var(--radius-card);
  background:
    linear-gradient(to top, rgba(13, 148, 136, 0.08) 0%, transparent 70%),
    var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--glow-green), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.diag-chip {
  /* ラダーのバー（.level-step-bar）と同じ緑グラデのガラス */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.16), rgba(13, 148, 136, 0.07));
  border: 1px solid rgba(5, 150, 105, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 8px 18px -14px rgba(5, 150, 105, 0.5);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.diag-chip:hover,
.diag-chip:focus-visible {
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.28), rgba(13, 148, 136, 0.12));
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--glow-green);
}
/* アイコンはラダーの白角丸スクエア（.level-step-icon）と同じ枠＋ブランド緑のLucide線画 */
.diag-chip-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 10px -6px rgba(5, 150, 105, 0.5);
}
.diag-chip-icon svg {
  width: 15px;
  height: 15px;
  color: var(--accent-green);
  stroke: var(--accent-green);
  stroke-width: 2;
}
.diag-chip-name {
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .hero-diagnoses { margin-top: 14px; }
  .diagnosis-chips { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
  .diag-chip-name { font-size: 0.72rem; }
}
@media (max-width: 360px) {
  .diag-chip-icon { width: 23px; height: 23px; }
  .diag-chip-name { font-size: 0.66rem; }
}
@media (prefers-reduced-motion: reduce) {
  .diag-chip { transition: none; }
}


/* ───────── モバイル微調整（2026-06-17・監査反映） ───────── */
/* 軌道アイコン等が端を超えた時の横スクロールを構造的に封じる */
html, body { overflow-x: hidden; }
/* 横長背景を縦長モバイルでcoverすると左のマイクが切れるため、被写体側へ寄せる */
@media (max-width: 767px) {
  .hero-section { background-position: 30% center; }
}

/* ========================================================================= */
/* --- 役割切替タブ（声優 / 開発）— 既存の白緑グラス×エメラルド語彙で構成        */
/* --- 1URL内でheroの下のセクション群を切替（?view=actor|lab）                 */
/* ========================================================================= */

/* セグメンテッドコントロール本体（白すりガラスのピル） */
.view-tabs {
  position: relative;
  z-index: 2; /* オービット/グロウより前面 */
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin: 36px auto 0;
  padding: 5px;
  background: var(--bg-surface);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  box-shadow: var(--glow-green), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 選択タブの下に滑走するグリーングラデのインジケータ（transformのみ＝コンポジタ安全） */
.view-tabs-indicator {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(50% - 5px);
  height: calc(100% - 10px);
  border-radius: 999px;
  background: var(--gradient-primary);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.28);
  /* 既定（lab）は右側へ寄せる。actor選択時はJSが data-active を付け替え translateX(0) */
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.view-tabs[data-active="actor"] .view-tabs-indicator {
  transform: translateX(0);
}

.view-tab {
  position: relative;
  z-index: 1; /* インジケータより前にラベルを置く */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 138px;
  padding: 11px 22px;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-ja);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.3s ease;
}

.view-tab[aria-selected="true"] {
  color: #fff;
  text-shadow: 0 1px 4px rgba(5, 150, 105, 0.35);
}

.view-tab[aria-selected="true"] [data-lucide] {
  stroke: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

.view-tab [data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.view-tab:hover:not([aria-selected="true"]) {
  color: var(--accent-green);
}

/* 狭幅では短縮ラベルへ（HTMLに両表記を持たせCSSで出し分け） */
.view-tab-short { display: none; }

/* --- view（役割パネル）の表示制御 --- */
.role-view[hidden] {
  display: none;
}

/* view切替時のクロスフェード（opacity + 微translateY・高さアニメ無し＝CLS回避） */
.role-view {
  animation: roleViewFade 0.45s ease-out;
}

@keyframes roleViewFade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* labのリード文（ツールセクション導入） */
.lab-lead {
  margin-bottom: 36px;
}

/* view相互送客の橋渡し文 */
.view-bridge-text {
  margin-top: 28px;
  font-family: var(--font-ja);
  font-size: 0.95rem;
  color: var(--text-dim);
}

.view-switch-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-green);
  font-weight: 700;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.view-switch-link:hover {
  color: var(--accent-glow);
  border-color: var(--accent-glow);
  transform: translateX(3px);
}

/* メニュー内のview切替リンク（アクティブ＝現在view） */
.menu-view-link.active {
  color: var(--accent-green);
}

.menu-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 0;
}

/* Profile bio（声優の自己紹介・一次情報） */
.profile-bio {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

/* --- フォーカス可視化の統一（緑のフォーカスリング・アクセシビリティ＆品質） --- */
.view-tab:focus-visible,
.view-switch-link:focus-visible,
.tool-card:focus-visible,
.menu-link:focus-visible,
.btn-primary:focus-visible,
.sns-btn:focus-visible,
.play-btn:focus-visible,
.orbit-icon:focus-visible,
.tool-badge:focus-visible,
.level-step-link:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 3px;
}

/* CTA押下時の手応え */
.btn-primary:active,
.view-tab:active {
  transform: translateY(1px) scale(0.99);
}

@media (max-width: 767px) {
  .view-tabs {
    margin-top: 28px;
    width: calc(100% - 24px);
    max-width: 360px;
  }
  .view-tab {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    font-size: 0.9rem;
  }
  /* モバイルは短縮ラベルで2タブを常時露出（役割切替は最重要動線・埋めない） */
  .view-tab-full { display: none; }
  .view-tab-short { display: inline; }
}

/* prefers-reduced-motion：インジケータ滑走・viewフェードを無効化 */
@media (prefers-reduced-motion: reduce) {
  .view-tabs-indicator { transition: none; }
  .role-view { animation: none; }
}

/* ========================================================================= */
/* --- 声優view：Profile（左）× Voice Samples（右）の2カラム                    */
/* デスクトップは横並び・モバイルは縦積み（Profile→Samples）                     */
/* ========================================================================= */
.actor-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 2カラム内のセクションは全幅・上下paddingを詰め、内側containerの制約を解除する */
.actor-top-grid .actor-top-col {
  padding: 56px 0;
  min-width: 0;
}

/* 左カラム（Profile）を右カラム（Samples）と同じ高さに伸ばし、内容を縦中央に置く。
   ＝プロフ下に空くチープな余白を解消し、2セクションの高さを揃える。 */
/* セクション見出しのルビ（例:「経験(リアル)」）の振り仮名を小さく上品に */
.section-title rt {
  font-size: 0.34em;
  font-weight: 700;
  color: var(--accent-green);
  letter-spacing: 0.08em;
}

/* 2カラム内のセクション/コンテナを縦に伸ばし、固有カードが高さ100%を取れるように */
.actor-top-grid .actor-top-col .container {
  max-width: none;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.actor-top-grid #profile { flex: 1; display: flex; flex-direction: column; }
/* サンプル側は縦に分散させ、最終行の底をプロフィールカードの底と完全一致させる */
.actor-top-grid #samples { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.actor-top-grid .actor-top-col .section-title {
  font-size: 1.4rem;
  text-align: left;
  margin-bottom: 14px;
}

/* 左：プロフィール固有カードを height:100% で右カラムと“上下完全一致”。
   中身は縦中央に置き、余白はカード内に内包＝チープな空白に見せない。 */
.actor-top-grid #profile .profile-card {
  flex: 1;
  flex-direction: column;
  text-align: center;
  gap: 16px;
  justify-content: center;
  padding: 28px 24px;
}
.actor-top-grid #profile .profile-img-wrap {
  width: 128px;
  height: 128px;
}
.actor-top-grid #profile .profile-bio { font-size: 0.9rem; }

/* 右：ボイスサンプルは“3列のコンパクトカード”で高さを詰め、左の固有カードと上下を
   完全一致させる（ユーザー指定: サンプルのカードサイズ変更が必須）。各グループ=1行。 */
.actor-top-grid #samples .samples-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.actor-top-grid #samples .subsection-title {
  font-size: 1rem;
  margin: 0 0 10px;
}
.actor-top-grid #samples .subsection-title + .samples-grid { margin-bottom: 18px; }
.actor-top-grid #samples .sample-card { padding: 14px 14px; }
/* 再生ボタンの横軸を揃える＝ヘッダー高さをカード間で統一（コンパクト版） */
.actor-top-grid #samples .sample-header { margin-bottom: 12px; gap: 5px; min-height: 3.8em; }
.actor-top-grid #samples .sample-title { font-size: 0.9rem; }
.actor-top-grid #samples .sample-tag { font-size: 0.7rem; padding: 3px 7px; }
.actor-top-grid #samples .play-btn { width: 34px; height: 34px; }
.actor-top-grid #samples .custom-audio-player { gap: 10px; }
.actor-top-grid #samples .time-display { font-size: 0.72rem; }

/* タブレット縦・スマホ：縦積み（Profile→Samples）に切替え、はみ出しゼロ */
@media (max-width: 900px) {
  .actor-top-grid {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 800px;
    padding: 0;
  }
  .actor-top-grid .actor-top-col {
    padding: var(--section-gap) 0;
  }
  .actor-top-grid .actor-top-col .container {
    max-width: 800px;
    padding: 0 20px;
  }
  /* 縦積み時はプロフィールを既定の横組みへ戻す（広い1カラムなので横が映える） */
  .actor-top-grid #profile .profile-card {
    flex-direction: row;
    text-align: left;
    gap: 32px;
  }
  .actor-top-grid #profile .profile-img-wrap {
    width: 160px;
    height: 160px;
  }
  /* 縦積み時はサンプルを既定の3列グリッドへ戻す */
  .actor-top-grid #samples .samples-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .actor-top-grid #profile .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }
  .actor-top-grid #samples .samples-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================= */
/* --- 再生ボタンの横位置を揃える：sample-headerの高さをカード間で統一            */
/* タイトル文字数で再生ボタン(.play-btn)がズレないよう、ヘッダーの最小高さを固定   */
/* ========================================================================= */
.sample-header {
  min-height: 4.6em; /* タイトル2行 + タグ1行ぶんを確保し、playボタンの横軸を揃える */
  justify-content: flex-start;
}
@media (max-width: 767px) {
  /* 1カラム時はタイトルが1行に収まりやすいため最小高さを緩める（無駄な余白を作らない） */
  .sample-header { min-height: 3.6em; }
}

/* === モバイル最適化（2026-06-22）: 見出しバランス＋スクロール軽量化 === */
@media (max-width: 767px) {
  /* 「経験(リアル)から生まれた5つのアプリ」等の長い見出しを収め、右端の見切れと
     「アプリ」だけが孤立する不格好な折り返しを解消（font 2rem→1.4rem＋折返し許可）。 */
  .section-title {
    font-size: 1.4rem;
    line-height: 1.4;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .section-title::before { height: 20px; }
  .section-title rt { font-size: 0.42em; }

  /* スクロールのカクつき対策：すりガラス(backdrop-filter)を無効化し、毎フレームの
     再ブラー負荷を消す。各要素は背景色を持つので見た目はほぼ保たれる。
     特に固定の .chat-bar-wrapper（下部バー）がスクロール中ずっと再ブラーされ最大の負荷。 */
  .chat-bar-wrapper,
  .menu-overlay,
  .profile-card,
  .sample-card,
  .feature-card,
  .tool-card,
  .mascot-bubble,
  .tool-badge,
  .level-steps,
  .view-tabs {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
