﻿/* ================================================================================
 * 繝輔ぃ繧､繝ｫ蜷・ app/assets/stylesheets/tutorial.css
 * 逶ｮ逧・ 繝√Η繝ｼ繝医Μ繧｢繝ｫ讖溯・縺ｮ繧ｹ繧ｿ繧､繝ｫ螳夂ｾｩ
 * 菴懈・譌･: 2026-02-12
 * 繧ｳ繝｡繝ｳ繝郁ｿｽ蜉譌･: 2026-02-13
 * 蜻ｽ蜷崎ｦ丞援: luxury-* 繧ｯ繝ｩ繧ｹ縺ｨ tutorial-* 繧ｯ繝ｩ繧ｹ繧剃ｽｿ逕ｨ
 * 繝・・繝・ 繝繝ｼ繧ｯ繝・・繝橸ｼ郁レ譎ｯ #0a0a0a縲・2a2a2a縲√ざ繝ｼ繝ｫ繝峨い繧ｯ繧ｻ繝ｳ繝茨ｼ・
 *
 * 縲先ｧ区・縲・
 * 1. 繝√Η繝ｼ繝医Μ繧｢繝ｫ荳隕ｧ繝壹・繧ｸ・・ndex・・  竊・.tutorial-index 莉･荳・
 * 2. 繧ｫ繝・ざ繝ｪ繧ｵ繧､繝峨ヰ繝ｼ繝ｬ繧､繧｢繧ｦ繝・        竊・.tutorial-settings-* 莉･荳・
 * 3. 繝√Ε繝励ち繝ｼ繧ｫ繝ｼ繝峨げ繝ｪ繝・ラ             竊・.tutorial-chapter-* 莉･荳・
 * 4. 繝壹・繧ｸ繝阪・繧ｷ繝ｧ繝ｳ                     竊・.tutorial-page-* 莉･荳・
 * 5. 繝√Η繝ｼ繝医Μ繧｢繝ｫ隧ｳ邏ｰ繝壹・繧ｸ・・how・・    竊・.tutorial-show 莉･荳・
 * 6. 繧ｹ繝・ャ繝励う繝ｳ繧ｸ繧ｱ繝ｼ繧ｿ繝ｼ               竊・.tutorial-step-* 莉･荳・
 * 7. 繝翫ン繧ｲ繝ｼ繧ｷ繝ｧ繝ｳ繝懊ち繝ｳ                 竊・.tutorial-nav-btn 莉･荳・
 * 8. 螳御ｺ・Γ繝・そ繝ｼ繧ｸ                       竊・.tutorial-complete-* 莉･荳・
 * 9. 繝ｬ繧ｹ繝昴Φ繧ｷ繝悶ョ繧ｶ繧､繝ｳ                 竊・@media 繧ｯ繧ｨ繝ｪ
 *
 * 縲舌Μ繝輔ぃ繧ｯ繧ｿ繝ｪ繝ｳ繧ｰ蝓ｺ貅悶托ｼ・026-02-13譎らせ・・
 * 繧ｳ繝ｼ繝芽｡梧焚・医さ繝｡繝ｳ繝磯勁螟厄ｼ・ 邏・00陦・竊・800陦梧悴貅縺ｮ縺溘ａ縲悟撫鬘後↑縺励坂恣
 * CSS蝓ｺ貅・ 500陦梧悴貅=螳檎挑 / 800陦梧悴貅=蝠城｡後↑縺・/ 1200陦梧悴貅=豕ｨ諢・/ 1200陦御ｻ･荳・蠢・・
 *
 * 縲先隼蝟・せ繝ｻ蟇ｾ蠢懈婿驥晄｡医・
 * - 迴ｾ蝨ｨ700陦後〒縲悟撫鬘後↑縺励阪□縺後∵ｩ溯・霑ｽ蜉縺ｫ繧医ｊ800陦後ｒ雜・∴繧句ｴ蜷医・蛻・牡繧呈､懆ｨ・
 * - 蛻・牡蛟呵｣・ tutorial_index.css・井ｸ隕ｧ繝壹・繧ｸ・峨→ tutorial_show.css・郁ｩｳ邏ｰ繝壹・繧ｸ・・
 * - 繧ｫ繝ｩ繝ｼ螟画焚・・ffd700, rgba(255, 215, 0, ...)遲会ｼ峨・CSS螟画焚蛹悶☆繧九→菫晏ｮ域ｧ蜷台ｸ・
 * ================================================================================ */

/* ========================================
 * 繝√Η繝ｼ繝医Μ繧｢繝ｫ荳隕ｧ繝壹・繧ｸ・・ndex・・
 * ======================================== */

.tutorial-index {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.tutorial-header {
  margin-bottom: 32px;
}

.tutorial-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.tutorial-subtitle {
  font-size: 15px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* 繝励Ο繧ｰ繝ｬ繧ｹ繧ｻ繧ｯ繧ｷ繝ｧ繝ｳ */
.tutorial-progress-section {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 215, 0, 0.1);
  border-radius: 12px;
}

.tutorial-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.tutorial-progress-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.tutorial-progress-percentage {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-primary);
}

.tutorial-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.tutorial-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.tutorial-all-complete-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-primary);
}

/* ========================================
 * 繧ｫ繝・ざ繝ｪ繧ｵ繧､繝峨ヰ繝ｼ繝ｬ繧､繧｢繧ｦ繝・
 * ======================================== */

.tutorial-settings-layout {
  display: flex;
  gap: 32px;
}

.tutorial-settings-sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 8px;
  align-self: flex-start;
}

.tutorial-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tutorial-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  text-align: left;
}

.tutorial-nav-item:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.tutorial-nav-item.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--gold-primary);
}

/* 繝翫ン繧｢繧､繝・Β荳頑ｮｵ: 繧｢繧､繧ｳ繝ｳ + 繝ｩ繝吶Ν */
.tutorial-nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tutorial-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tutorial-nav-row span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 繝翫ン繧｢繧､繝・Β荳区ｮｵ: 繝励Ο繧ｰ繝ｬ繧ｹ繝舌・ + 繧ｫ繧ｦ繝ｳ繝・*/
.tutorial-nav-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tutorial-nav-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border-secondary);
  border-radius: 2px;
  overflow: hidden;
}

.tutorial-nav-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-secondary));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.tutorial-nav-progress-fill.complete {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.tutorial-nav-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 24px;
  text-align: right;
}

.tutorial-nav-item.active .tutorial-nav-count {
  color: rgba(255, 215, 0, 0.7);
}

.tutorial-nav-check {
  flex-shrink: 0;
  color: #22c55e;
}

.tutorial-settings-main {
  flex: 1;
  min-width: 0;
}

/* 繝√Ε繝励ち繝ｼ繧ｫ繝ｼ繝峨げ繝ｪ繝・ラ */
.tutorial-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tutorial-chapter-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tutorial-chapter-card:hover {
  background: var(--bg-surface-hover);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.tutorial-chapter-card.completed {
  border-color: rgba(255, 215, 0, 0.2);
}

.tutorial-chapter-card.completed:hover {
  border-color: rgba(255, 215, 0, 0.4);
}

.tutorial-chapter-card.updated {
  border-color: rgba(59, 130, 246, 0.3);
}

.tutorial-chapter-card.updated:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.tutorial-chapter-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 193, 7, 0.05) 100%);
  border-radius: 12px;
  margin-bottom: 16px;
}

.tutorial-chapter-icon svg {
  width: 24px;
  height: 24px;
  color: var(--gold-primary);
}

.tutorial-chapter-content {
  flex: 1;
  margin-bottom: 16px;
}

.tutorial-chapter-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tutorial-chapter-description {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.tutorial-chapter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-secondary);
}

.tutorial-chapter-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
}

.tutorial-chapter-badge.completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tutorial-chapter-badge.pending {
  background: var(--bg-surface);
  color: var(--text-tertiary);
  border: 1px solid var(--border-primary);
}

.tutorial-chapter-badge.updated {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.tutorial-chapter-xp {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-primary);
}

/* ========================================
 * 繝壹・繧ｸ繝阪・繧ｷ繝ｧ繝ｳ
 * ======================================== */

.tutorial-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  padding: 16px 0;
}

.tutorial-page-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tutorial-page-btn:hover:not(:disabled) {
  background: var(--bg-surface-active);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--text-primary);
}

.tutorial-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tutorial-page-numbers {
  display: flex;
  gap: 6px;
}

.tutorial-page-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-primary);
  background: var(--bg-surface);
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.tutorial-page-dot:hover {
  background: var(--bg-surface-active);
  border-color: rgba(255, 215, 0, 0.3);
}

.tutorial-page-dot.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.15));
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.tutorial-page-info {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 100px;
  text-align: center;
}

/* ========================================
 * 繝√Η繝ｼ繝医Μ繧｢繝ｫ隧ｳ邏ｰ繝壹・繧ｸ・・how - 繧ｹ繝・ャ繝代・・・
 * ======================================== */

/* ジュニア向け: padding-bottom を 40px→12px に縮小（2026-02-16）
 * 理由: 画像サイズ制御と合わせてスクロール不要化するため */
.tutorial-show {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 12px;
}

/* 繧ｹ繝・ャ繝励う繝ｳ繧ｸ繧ｱ繝ｼ繧ｿ繝ｼ */
/* ジュニア向け: margin-bottom 40→20px、padding 20→12px に縮小（2026-02-16）
 * 理由: ナビゲーションボタンがビューポート内に収まるようにするため */
.tutorial-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  padding: 12px 0;
}

.tutorial-step-dot-wrapper {
  display: flex;
  align-items: center;
}

.tutorial-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-hover);
  border: 2px solid var(--border-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tutorial-step-dot.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.15));
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.tutorial-step-dot.visited {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.5);
}

.tutorial-step-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.tutorial-step-dot.active .tutorial-step-number {
  color: var(--gold-primary);
}

.tutorial-step-dot.visited .tutorial-step-number {
  color: #22c55e;
}

.tutorial-step-line {
  width: 40px;
  height: 2px;
  background: var(--bg-surface-active);
  transition: background 0.3s ease;
}

.tutorial-step-line.visited {
  background: rgba(34, 197, 94, 0.4);
}

/* 繧ｹ繝・ャ繝励さ繝ｳ繝・Φ繝・*/
.tutorial-step-content {
  animation: tutorialFadeIn 0.3s ease;
}

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

.tutorial-step-header {
  text-align: center;
  margin-bottom: 16px;
}

.tutorial-step-counter {
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.tutorial-step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ジュニア向け: position: relative を追加（2026-02-16）
 * 理由: XP獲得オーバーレイ（.tutorial-complete-overlay）が position: absolute で
 *        このボディ領域全体に重なるための基準要素（アンカー）として機能する。
 *        padding は 24→16px に縮小（スクロール不要化のため） */
.tutorial-step-body {
  position: relative;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
}

.tutorial-step-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ジュニア向け: 画像サイズ制御（2026-02-16追加）
 * max-height: 45vh → ビューポート高さの45%に制限
 * これにより画像が大きすぎてナビゲーションボタンが画面外に押し出されるのを防止
 * display: flex + align-items/justify-content → 画像を領域内で中央配置 */
.tutorial-step-image-area {
  width: 100%;
  min-height: 200px;
  max-height: 45vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ジュニア向け: object-fit: contain で画像のアスペクト比を維持（2026-02-16追加）
 * max-height: 45vh と組み合わせることで、画像がビューポートに収まりつつ
 * 縦横比を崩さずに表示される */
.tutorial-step-image {
  width: 100%;
  max-height: 45vh;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.tutorial-step-image-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-primary);
  border-radius: 12px;
  gap: 12px;
  color: rgba(255, 215, 0, 0.4);
}

.tutorial-step-image-fallback span {
  font-size: 13px;
  color: var(--text-muted);
}

/* 繝翫ン繧ｲ繝ｼ繧ｷ繝ｧ繝ｳ繝懊ち繝ｳ */
.tutorial-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 16px;
}

.tutorial-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.tutorial-nav-btn:hover:not(:disabled) {
  background: var(--bg-surface-active);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--text-primary);
}

.tutorial-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tutorial-next-btn {
  margin-left: auto;
}

.tutorial-complete-btn {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 193, 7, 0.1));
  border-color: rgba(255, 215, 0, 0.4);
  color: var(--gold-primary);
}

.tutorial-complete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 193, 7, 0.15));
  border-color: rgba(255, 215, 0, 0.6);
  color: var(--gold-primary);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
}

/* ========================================
 * XP獲得完了オーバーレイ（2026-02-16追加）
 * ========================================
 * ジュニア向け: チャプター完了時にXP獲得メッセージを表示するオーバーレイ。
 * 以前は画面下部に追加されていたが、ステップ画像に重なる形式に変更。
 *
 * DOM構造（tutorial_stepper.js の completeChapter() で動的生成）:
 *   .tutorial-step-body（position: relative = オーバーレイの基準要素）
 *     └ .tutorial-complete-overlay（position: absolute = 全面を覆う半透明背景）
 *         └ .tutorial-complete-message（中央配置されるXP表示カード）
 *             ├ h3: "+50 XP" テキスト
 *             └ p: "Chapter completed!" テキスト
 *
 * 【テーマ対応】
 *   ダークモード: 黒半透明背景 rgba(0, 0, 0, 0.6) + ゴールドアクセント
 *   ライトモード: 白半透明背景 rgba(255, 255, 255, 0.6) + ブラウンゴールド
 *   → ライトテーマ対応は本ファイル下部のライトテーマセクションで定義
 */
.tutorial-complete-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  z-index: 10;
  animation: tutorialFadeIn 0.5s ease;
}

.tutorial-complete-message {
  text-align: center;
  padding: 40px 48px;
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.95), rgba(10, 10, 20, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.15);
  animation: tutorialXpPop 0.5s ease;
}

/* ジュニア向け: XP獲得メッセージの出現アニメーション（2026-02-16追加）
 * scale(0.8)→scale(1.05)→scale(1) で「ポップ」する演出 */
@keyframes tutorialXpPop {
  0% { opacity: 0; transform: scale(0.8); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

.tutorial-complete-message h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.tutorial-complete-message p {
  font-size: 14px;
  color: var(--text-tertiary);
}

/* ========================================
 * ライトテーマ対応
 * shared_sidebar.css のブラウンゴールドパターンに準拠
 * ======================================== */

/* タイトルグラデーション: 白→ダークネイビー */
[data-theme="light"] .tutorial-title {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 50%, #1a1a2e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* プログレスセクション: ゴールドボーダー→ブラウンゴールド */
[data-theme="light"] .tutorial-progress-section {
  border-color: rgba(180, 83, 9, 0.15);
}

/* 全完了バッジ: ゴールド背景・ボーダー→ブラウンゴールド */
[data-theme="light"] .tutorial-all-complete-badge {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.1) 0%, rgba(180, 83, 9, 0.03) 100%);
  border-color: rgba(180, 83, 9, 0.25);
}

/* カテゴリナビ active: ゴールド→ブラウンゴールド */
[data-theme="light"] .tutorial-nav-item.active {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.1) 0%, rgba(180, 83, 9, 0.03) 100%);
  border-color: rgba(180, 83, 9, 0.25);
}

[data-theme="light"] .tutorial-nav-item.active .tutorial-nav-count {
  color: rgba(180, 83, 9, 0.7);
}

/* チャプターカードホバー: ゴールドボーダー→ブラウンゴールド、シャドウ軽減 */
[data-theme="light"] .tutorial-chapter-card:hover {
  border-color: rgba(180, 83, 9, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .tutorial-chapter-card.completed {
  border-color: rgba(180, 83, 9, 0.15);
}

[data-theme="light"] .tutorial-chapter-card.completed:hover {
  border-color: rgba(180, 83, 9, 0.35);
}

/* チャプターアイコン背景: ゴールド→ブラウンゴールド */
[data-theme="light"] .tutorial-chapter-icon {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.1) 0%, rgba(180, 83, 9, 0.03) 100%);
}

/* チャプターフッター: 白半透明ボーダー→黒半透明 */
[data-theme="light"] .tutorial-chapter-footer {
  border-top-color: rgba(0, 0, 0, 0.06);
}

/* ページネーション: ゴールドボーダー→ブラウンゴールド */
[data-theme="light"] .tutorial-page-btn:hover:not(:disabled) {
  border-color: rgba(180, 83, 9, 0.3);
}

[data-theme="light"] .tutorial-page-dot:hover {
  border-color: rgba(180, 83, 9, 0.3);
}

[data-theme="light"] .tutorial-page-dot.active {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.15), rgba(180, 83, 9, 0.06));
  border-color: #b45309;
  box-shadow: 0 0 10px rgba(180, 83, 9, 0.12);
}

/* ステップドット active: ゴールド→ブラウンゴールド */
[data-theme="light"] .tutorial-step-dot.active {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.15), rgba(180, 83, 9, 0.06));
  border-color: #b45309;
  box-shadow: 0 0 12px rgba(180, 83, 9, 0.15);
}

/* 画像フォールバック: ゴールド→ブラウンゴールド */
[data-theme="light"] .tutorial-step-image-fallback {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(180, 83, 9, 0.4);
}

/* ナビゲーションボタンホバー: ゴールドボーダー→ブラウンゴールド */
[data-theme="light"] .tutorial-nav-btn:hover:not(:disabled) {
  border-color: rgba(180, 83, 9, 0.3);
}

/* 完了ボタン: ゴールド→ブラウンゴールド */
[data-theme="light"] .tutorial-complete-btn {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.12), rgba(180, 83, 9, 0.05));
  border-color: rgba(180, 83, 9, 0.35);
}

[data-theme="light"] .tutorial-complete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.2), rgba(180, 83, 9, 0.08));
  border-color: rgba(180, 83, 9, 0.5);
  box-shadow: 0 0 20px rgba(180, 83, 9, 0.1);
}

/* 完了オーバーレイ: ライトテーマ（2026-02-16追加）
 * ジュニア向け: ダークモードでは黒半透明背景だが、
 * ライトモードでは白半透明背景に変換し、背景との調和を保つ */
[data-theme="light"] .tutorial-complete-overlay {
  background: rgba(255, 255, 255, 0.6);
}

/* 完了メッセージ: ゴールド→ブラウンゴールド（2026-02-16追加）
 * ジュニア向け: ダークモードではダークネイビー背景+ゴールドボーダーだが、
 * ライトモードでは白背景+ブラウンゴールドボーダーに変換 */
[data-theme="light"] .tutorial-complete-message {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(245, 245, 245, 0.97));
  border-color: rgba(180, 83, 9, 0.25);
  box-shadow: 0 0 40px rgba(180, 83, 9, 0.1);
}

/* 完了メッセージh3: ゴールド→ブラウンゴールド（2026-02-16追加）
 * ジュニア向け: ダークモードの var(--gold-primary) = #FFD700（明るいゴールド）は
 * 白背景では視認性が低いため、ブラウンゴールド #b45309 に変換必須。
 * ※ --gold-primary はライトテーマで再定義されていないため、直接色指定が必要 */
[data-theme="light"] .tutorial-complete-message h3 {
  color: #b45309;
}

/* ========================================
 * ウッドモード対応
 * ======================================== */
[data-theme="wood"] .tutorial-title {
  background: linear-gradient(135deg, #e8dcc8 0%, #a89880 50%, #e8dcc8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="wood"] .tutorial-progress-section {
  border-color: rgba(200, 149, 106, 0.15);
}

[data-theme="wood"] .tutorial-all-complete-badge {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.1) 0%, rgba(200, 149, 106, 0.03) 100%);
  border-color: rgba(200, 149, 106, 0.25);
}

[data-theme="wood"] .tutorial-nav-item.active {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.1) 0%, rgba(200, 149, 106, 0.03) 100%);
  border-color: rgba(200, 149, 106, 0.25);
}

[data-theme="wood"] .tutorial-nav-item.active .tutorial-nav-count {
  color: rgba(200, 149, 106, 0.7);
}

[data-theme="wood"] .tutorial-chapter-card:hover {
  border-color: rgba(200, 149, 106, 0.3);
  box-shadow: 0 8px 32px rgba(200, 149, 106, 0.08);
}

[data-theme="wood"] .tutorial-chapter-card.completed {
  border-color: rgba(200, 149, 106, 0.15);
}

[data-theme="wood"] .tutorial-chapter-card.completed:hover {
  border-color: rgba(200, 149, 106, 0.35);
}

[data-theme="wood"] .tutorial-chapter-icon {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.1) 0%, rgba(200, 149, 106, 0.03) 100%);
}

[data-theme="wood"] .tutorial-chapter-footer {
  border-top-color: rgba(200, 149, 106, 0.06);
}

[data-theme="wood"] .tutorial-page-btn:hover:not(:disabled) {
  border-color: rgba(200, 149, 106, 0.3);
}

[data-theme="wood"] .tutorial-page-dot:hover {
  border-color: rgba(200, 149, 106, 0.3);
}

[data-theme="wood"] .tutorial-page-dot.active {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.15), rgba(200, 149, 106, 0.06));
  border-color: #c8956a;
  box-shadow: 0 0 10px rgba(200, 149, 106, 0.12);
}

[data-theme="wood"] .tutorial-step-dot.active {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.15), rgba(200, 149, 106, 0.06));
  border-color: #c8956a;
  box-shadow: 0 0 12px rgba(200, 149, 106, 0.15);
}

[data-theme="wood"] .tutorial-step-image-fallback {
  background: rgba(26, 26, 24, 0.02);
  border-color: rgba(200, 149, 106, 0.1);
  color: rgba(200, 149, 106, 0.4);
}

[data-theme="wood"] .tutorial-nav-btn:hover:not(:disabled) {
  border-color: rgba(200, 149, 106, 0.3);
}

[data-theme="wood"] .tutorial-complete-btn {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.12), rgba(200, 149, 106, 0.05));
  border-color: rgba(200, 149, 106, 0.35);
}

[data-theme="wood"] .tutorial-complete-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(200, 149, 106, 0.2), rgba(200, 149, 106, 0.08));
  border-color: rgba(200, 149, 106, 0.5);
  box-shadow: 0 0 20px rgba(200, 149, 106, 0.1);
}

[data-theme="wood"] .tutorial-complete-overlay {
  background: rgba(26, 26, 24, 0.6);
}

[data-theme="wood"] .tutorial-complete-message {
  background: linear-gradient(135deg, rgba(42, 37, 32, 0.97), rgba(26, 26, 24, 0.97));
  border-color: rgba(200, 149, 106, 0.25);
  box-shadow: 0 0 40px rgba(200, 149, 106, 0.1);
}

[data-theme="wood"] .tutorial-chapter-card {
  background-image: var(--wood-grain-card);
  box-shadow: inset 0 2px 0 0 rgba(200, 149, 106, 0.3);
}

[data-theme="wood"] .tutorial-complete-message h3 {
  color: #c8956a;
}

/* ========================================
 * 繝ｬ繧ｹ繝昴Φ繧ｷ繝悶ョ繧ｶ繧､繝ｳ
 * ======================================== */

@media (max-width: 768px) {
  .tutorial-settings-layout {
    flex-direction: column;
    gap: 20px;
  }

  .tutorial-settings-sidebar {
    flex: none;
    position: static;
  }

  .tutorial-settings-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .tutorial-nav-item {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 8px;
    gap: 4px;
    width: auto;
  }

  .tutorial-nav-row span {
    white-space: nowrap;
  }

  .tutorial-nav-count {
    display: none;
  }

  .tutorial-nav-progress-bar {
    height: 3px;
  }
}

@media (max-width: 640px) {
  .tutorial-chapters-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-title {
    font-size: 22px;
  }

  .tutorial-step-title {
    font-size: 20px;
  }

  .tutorial-step-indicator {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tutorial-step-line {
    width: 20px;
  }

  .tutorial-navigation {
    flex-wrap: wrap;
  }

  .tutorial-nav-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .tutorial-pagination {
    flex-wrap: wrap;
    gap: 10px;
  }

  .tutorial-page-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .tutorial-page-info {
    width: 100%;
    order: -1;
  }
}
