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

/* --- デザイン変数（トークン） --- */
:root {
  --bg-base: #0a0f0d;
  --bg-surface: #111c16;
  --bg-elevated: #162117;
  --accent-green: #64c87a;
  --accent-glow: #4ade80;
  --accent-teal: #2dd4a8;
  --gradient-primary: linear-gradient(135deg, #22c55e, #06b6d4);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --border-subtle: rgba(100, 200, 122, 0.1);
  --glow-green: 0 0 40px rgba(74, 222, 128, 0.12);
  --glow-strong: 0 0 80px rgba(74, 222, 128, 0.2);
  --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(100, 200, 122, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--text-primary);
  /* 日本語フォントをメインに適用しつつ、英数字はInterが優先されるように指定 */
  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;
  overflow: hidden;
  /* 背景にグリーンの放射状グロウを配置（アイコン後方） */
  background: radial-gradient(circle at center, rgba(74, 222, 128, 0.08) 0%, rgba(10, 15, 13, 0) 50%);
}

.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: #ffffff;
  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: 400;
}

/* --- ヒーロー軌道アニメーション (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);
  }
}

/* 4つのアイコンを90度間隔で配置（0°, 90°, 180°, 270°） */
/* 中心に合わせるため、アイコンサイズの半分（22px）をネガティブマージンで調整 */
.orbit-1 {
  top: 0;
  left: 50%;
  margin-top: -22px;
  margin-left: -22px;
}

.orbit-2 {
  top: 50%;
  left: 100%;
  margin-top: -22px;
  margin-left: -22px;
}

.orbit-3 {
  top: 100%;
  left: 50%;
  margin-top: -22px;
  margin-left: -22px;
}

.orbit-4 {
  top: 50%;
  left: 0;
  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;
  }
}

/* --- 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(10, 15, 13, 0.85) 0%, rgba(45, 212, 168, 0.15) 50%, rgba(10, 15, 13, 0.85) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -1px 8px rgba(74, 222, 128, 0.3);
  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.05);
  border: 1px solid transparent;
  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.1);
  border-color: var(--accent-glow);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.2);
}

.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(10, 15, 13, 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: #fff;
  border-bottom: 2px solid var(--accent-green);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  margin-bottom: 32px;
  text-shadow: 0 0 10px rgba(100, 200, 122, 0.3); /* 文字自体もうっすら発光させる */
}

/* 追加: セクションタイトルの左側にデジタルな四角いアクセントをつける */
.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: rgba(17, 28, 22, 0.4); /* 透明度を上げて背景を透けさせる */
  backdrop-filter: blur(16px); /* すりガラス効果（後ろの要素をぼかす） */
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(100, 200, 122, 0.15); /* 境界線もうっすらと緑に */
  border-radius: var(--radius-card);
  padding: 32px;
  gap: 32px;
  align-items: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.profile-card:hover {
  transform: translateY(-4px); /* 少し浮き上がる */
  border-color: rgba(100, 200, 122, 0.4); /* 枠線が明るくなる */
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 60px rgba(74, 222, 128, 0.15); /* ふわっとした影と発光 */
}

.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: #fff;
  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: rgba(17, 28, 22, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(100, 200, 122, 0.1);
  border-radius: var(--radius-card);
  padding: 24px;
  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(100, 200, 122, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4), var(--glow-green);
}

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

.sample-title {
  color: #fff;
  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: #fff;
  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(100, 200, 122, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 60px 20px;
}

.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: rgba(17, 28, 22, 0.4); /* 透明化 */
  backdrop-filter: blur(12px); /* すりガラス効果 */
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(100, 200, 122, 0.15);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  text-align: center;
  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(100, 200, 122, 0.5); /* 枠線が明るく光る */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(74, 222, 128, 0.2);
}

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

.feature-title {
  color: #fff;
  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: rgba(17, 28, 22, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(100, 200, 122, 0.15);
  border-radius: var(--radius-card);
  padding: 32px;
  text-decoration: none;
  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(74, 222, 128, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(74, 222, 128, 0.25);
}

.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: #fff;
  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(100, 200, 122, 0.07) 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(17, 28, 22, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(100, 200, 122, 0.15);
  border-radius: 24px;
  padding: 8px;
  min-width: auto;
  box-shadow: 0 0 30px rgba(74, 222, 128, 0.1), 0 8px 32px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

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

.bubble-arrow {
  position: absolute;
  background: rgba(17, 28, 22, 0.7);
  border-right: 1px solid rgba(100, 200, 122, 0.15);
  border-bottom: 1px solid rgba(100, 200, 122, 0.15);
  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(100, 200, 122, 0.08);
  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 rgba(100, 200, 122, 0.15);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.howto-step:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 200, 122, 0.4);
  box-shadow: 0 12px 30px rgba(74, 222, 128, 0.1);
}

/* 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: #fff;
  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 {
  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 {
  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);
}