/* ============================================================
   MeDesign Members - 共通スタイルシート
   ------------------------------------------------------------
   色・余白・フォント・角丸は、下の「CSS変数」でまとめて
   管理しています。デザインを調整するときは、まずここを
   変更してください。
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS変数（色・フォント・余白・角丸）
   ------------------------------------------------------------ */
:root {
  /* 背景色 */
  --bg-base: #FCFAF7;      /* サイト全体の背景 */
  --bg-white: #FFFFFF;     /* カードの背景 */
  --bg-soft: #F7F2EC;      /* 薄いベージュの帯・パネル */

  /* メインカラー（くすみピンク） */
  --main: #B88C91;
  --main-dark: #A87E86;
  --main-pale: #F4E9EA;    /* ピンクの淡い背景 */

  /* サブカラー */
  --sub-blue: #C7CEDD;     /* くすみブルー */
  --sub-lavender: #D8CFE5; /* 淡いラベンダー */
  --sub-blue-pale: #EEF1F6;
  --sub-lavender-pale: #F3EFF7;

  /* 文字色 */
  --text-main: #35333A;
  --text-sub: #59545D;
  --text-faint: #8A8490;

  /* アクセント（ゴールド：細い線や小さな装飾のみ） */
  --gold: #C8A96A;

  /* 状態色 */
  --state-done-bg: #EAF2EC;
  --state-done-text: #5E8468;
  --state-doing-bg: #F4E9EA;
  --state-doing-text: #A87E86;
  --state-todo-bg: #F1EFEC;
  --state-todo-text: #8A8490;

  /* 線・影 */
  --line: #EAE4DC;
  --shadow-card: 0 2px 12px rgba(90, 80, 75, 0.06);
  --shadow-card-hover: 0 6px 20px rgba(90, 80, 75, 0.10);

  /* フォント */
  --font-body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-mincho: "Zen Old Mincho", "Hiragino Mincho ProN", serif;
  --font-en: "Jost", "Zen Kaku Gothic New", sans-serif;

  /* 余白 */
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 22px;
  --space-lg: 36px;
  --space-xl: 56px;

  /* 角丸 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* レイアウト */
  --sidebar-width: 244px;
  --content-max: 980px;
}

/* ------------------------------------------------------------
   2. リセットと基本
   ------------------------------------------------------------ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-main);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

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

a {
  color: var(--main-dark);
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--main);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------
   3. 共通パーツ：見出し・ラベル
   ------------------------------------------------------------ */

/* 英字の小さなラベル（セクションの上に置く） */
.eyebrow {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--main-dark);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
}

/* ページタイトル */
.page-title {
  font-family: var(--font-mincho);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
}

.page-lead {
  color: var(--text-sub);
  font-size: 14.5px;
  margin-bottom: var(--space-lg);
}

/* セクション見出し */
.section-title {
  font-family: var(--font-mincho);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 4px;
}

.section-lead {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: var(--space-md);
}

.section {
  margin-bottom: var(--space-xl);
}

/* ------------------------------------------------------------
   4. 共通パーツ：ボタン
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  min-height: 44px; /* スマホで押しやすい高さ */
}

/* メインボタン（ピンク） */
.btn-primary {
  background: var(--main);
  color: #fff;
}

.btn-primary:hover {
  background: var(--main-dark);
  box-shadow: 0 4px 14px rgba(168, 126, 134, 0.35);
  transform: translateY(-1px);
}

/* 枠線ボタン */
.btn-outline {
  background: var(--bg-white);
  color: var(--main-dark);
  border-color: var(--main);
}

.btn-outline:hover {
  background: var(--main-pale);
}

/* 控えめなボタン */
.btn-soft {
  background: var(--bg-soft);
  color: var(--text-sub);
  border-color: var(--line);
}

.btn-soft:hover {
  background: #F1EAE1;
}

/* 小さめのボタン */
.btn-sm {
  padding: 8px 18px;
  font-size: 13.5px;
  min-height: 38px;
}

/* 横幅いっぱいのボタン（スマホ向け） */
.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------
   5. 共通パーツ：カード
   ------------------------------------------------------------ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-md);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

a.card:hover,
.card.is-hoverable:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* カードを並べるグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-sm);
}

/* ------------------------------------------------------------
   6. 共通パーツ：バッジ・タグ
   ------------------------------------------------------------ */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.7;
  white-space: nowrap;
  flex: none;
}

/* 章の状態バッジ */
.badge-done   { background: var(--state-done-bg);  color: var(--state-done-text); }
.badge-doing  { background: var(--state-doing-bg); color: var(--state-doing-text); }
.badge-todo   { background: var(--state-todo-bg);  color: var(--state-todo-text); }

/* 教材形式バッジ */
.badge-format {
  background: var(--sub-blue-pale);
  color: #6B7690;
  border: 1px solid var(--sub-blue);
}

.badge-lavender {
  background: var(--sub-lavender-pale);
  color: #8377A0;
  border: 1px solid var(--sub-lavender);
}

/* ------------------------------------------------------------
   7. レイアウト：サイドバーと本体
   ------------------------------------------------------------ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* --- サイドバー（PC） --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--line);
  padding: 28px 18px 20px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 60;
}

.sidebar-logo {
  font-family: var(--font-en);
  font-size: 19px;
  letter-spacing: 0.14em;
  color: var(--text-main);
  padding: 0 10px;
}

.sidebar-logo small {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-top: 2px;
}

.sidebar-nav {
  margin-top: 26px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 2px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
  background: var(--bg-soft);
  color: var(--text-main);
}

/* 現在地のメニュー */
.sidebar-nav a.is-active {
  background: var(--main-pale);
  color: var(--main-dark);
  font-weight: 500;
}

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

/* サイドバー下部の情報 */
.sidebar-foot {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.8;
}

.sidebar-foot dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.sidebar-foot dd {
  color: var(--text-sub);
  margin-bottom: 8px;
}

.btn-logout {
  margin-top: 10px;
  width: 100%;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: background 0.2s ease;
}

.btn-logout:hover {
  background: var(--bg-soft);
}

/* --- 本体 --- */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 44px 40px 90px;
}

.main-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* --- モバイル用ヘッダー --- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(252, 250, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 70;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-header .m-logo {
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: 0.14em;
  color: var(--text-main);
}

/* ハンバーガーボタン */
.hamburger {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-main);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* メニューが開いたときのハンバーガー */
body.drawer-open .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.drawer-open .hamburger span:nth-child(2) { opacity: 0; }
body.drawer-open .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ドロワーの背景 */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(53, 51, 58, 0.35);
  z-index: 55;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.drawer-open .drawer-overlay {
  opacity: 1;
}

/* --- モバイル下部ナビ --- */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 50;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav ul {
  display: flex;
}

.bottom-nav li {
  flex: 1;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  color: var(--text-faint);
  padding: 4px 0;
}

.bottom-nav a svg {
  width: 20px;
  height: 20px;
}

.bottom-nav a.is-active {
  color: var(--main-dark);
}

/* ------------------------------------------------------------
   8. 入口ページ（index.html）
   ------------------------------------------------------------ */
.entry-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(720px 420px at 12% -6%, var(--main-pale) 0%, transparent 62%),
    radial-gradient(640px 420px at 96% 104%, var(--sub-lavender-pale) 0%, transparent 60%),
    var(--bg-base);
}

.entry-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(90, 80, 75, 0.10);
  padding: 52px 40px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* カード上部の細いゴールドの線 */
.entry-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.entry-logo {
  font-family: var(--font-en);
  font-size: 24px;
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}

.entry-sub {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 30px;
}

.entry-headline {
  font-family: var(--font-mincho);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.9;
  margin-bottom: 18px;
}

.entry-text {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 30px;
  text-align: left;
}

.entry-note {
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-faint);
}

/* ふわっと表示するアニメーション */
.fade-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.8s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.15s; }
.fade-up.delay-2 { animation-delay: 0.3s; }
.fade-up.delay-3 { animation-delay: 0.45s; }

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

/* スクロールで表示する要素（main.jsで .is-visible が付く） */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------
   9. ダッシュボード
   ------------------------------------------------------------ */

/* あいさつと現在地のヒーロー */
.dash-hero {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px;
  margin-bottom: var(--space-sm);
  position: relative;
  overflow: hidden;
}

.dash-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--main-pale), var(--gold), var(--sub-lavender));
}

.dash-greeting {
  font-family: var(--font-mincho);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.9;
  margin-bottom: 18px;
}

.dash-step-label {
  font-family: var(--font-en);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.dash-step {
  font-family: var(--font-mincho);
  font-size: 18px;
  font-weight: 600;
  color: var(--main-dark);
  margin-bottom: 14px;
}

.dash-week-theme {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14.5px;
  margin-bottom: 16px;
}

.dash-week-theme strong {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--main-dark);
  margin-bottom: 4px;
  font-weight: 500;
}

/* 進捗バー */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.progress-label {
  font-size: 13px;
  color: var(--text-sub);
}

.progress-label b {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 500;
  color: var(--main-dark);
  margin-left: 6px;
}

.progress-bar {
  flex: 1;
  min-width: 160px;
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

/* 幅は data-progress 属性から main.js が設定します */
.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--main), var(--main-dark));
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

.progress-current {
  width: 100%;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* 今週やることリスト（ダッシュボード内） */
.dash-tasks {
  margin: 16px 0 20px;
}

/* ダッシュボードのカード：アイコン */
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-main);
}

.dash-card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--main-pale);
  color: var(--main-dark);
}

.dash-card:nth-child(3n+2) .card-icon {
  background: var(--sub-blue-pale);
  color: #6B7690;
}

.dash-card:nth-child(3n) .card-icon {
  background: var(--sub-lavender-pale);
  color: #8377A0;
}

.dash-card .card-icon svg {
  width: 21px;
  height: 21px;
}

.dash-card h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.dash-card p {
  font-size: 13px;
  color: var(--text-sub);
  flex: 1;
}

.dash-card .card-meta {
  font-size: 14px;
  color: var(--main-dark);
  font-weight: 500;
}

.card-arrow {
  font-family: var(--font-en);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--main-dark);
}

/* ------------------------------------------------------------
   10. チェックリスト
   ------------------------------------------------------------ */
.check-list li {
  margin-bottom: 8px;
}

/* チェックボックス風UI（保存はされません） */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 14.5px;
  color: var(--text-main);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check-item:hover {
  border-color: var(--main);
}

.check-box {
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--sub-blue);
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.check-box svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* チェックが付いた状態 */
.check-item.is-checked {
  background: var(--bg-soft);
}

.check-item.is-checked .check-box {
  background: var(--main);
  border-color: var(--main);
}

.check-item.is-checked .check-box svg {
  opacity: 1;
}

.check-item.is-checked .check-text {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: var(--sub-blue);
}

.check-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 10px;
}

/* ------------------------------------------------------------
   11. カリキュラム（縦型ステップ）
   ------------------------------------------------------------ */
.chapter-list {
  position: relative;
  padding-left: 30px;
}

/* 章をつなぐ細いゴールドの線 */
.chapter-list::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: linear-gradient(180deg, var(--gold), var(--line));
}

.chapter {
  position: relative;
  margin-bottom: 16px;
}

/* 章番号の丸マーカー */
.chapter::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 26px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1.5px solid var(--gold);
}

.chapter.is-doing::before {
  background: var(--main);
  border-color: var(--main);
  box-shadow: 0 0 0 4px var(--main-pale);
}

.chapter.is-done::before {
  background: var(--gold);
}

.chapter-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.chapter-num {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
}

.chapter h3 {
  font-family: var(--font-mincho);
  font-size: 18px;
  font-weight: 600;
  width: 100%;
}

.chapter p {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.chapter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chapter-term {
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ------------------------------------------------------------
   12. 3か月ロードマップ
   ------------------------------------------------------------ */
.roadmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.roadmap-card {
  position: relative;
}

.roadmap-month {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.roadmap-card h3 {
  font-family: var(--font-mincho);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
}

.roadmap-card li {
  font-size: 13.5px;
  color: var(--text-sub);
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
}

.roadmap-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 1.5px;
  background: var(--main);
}

.roadmap-note {
  margin-top: var(--space-sm);
  font-size: 13.5px;
  color: var(--text-sub);
  background: var(--sub-lavender-pale);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

/* ------------------------------------------------------------
   13. 面談・作業会
   ------------------------------------------------------------ */
.meeting-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meeting-date {
  font-family: var(--font-mincho);
  font-size: 20px;
  font-weight: 600;
  color: var(--main-dark);
}

.meeting-detail dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.meeting-detail dd {
  font-size: 14.5px;
  margin-bottom: 10px;
}

.prep-list li {
  font-size: 14px;
  color: var(--text-sub);
  padding-left: 18px;
  position: relative;
  margin-bottom: 4px;
}

.prep-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 7px;
  height: 1.5px;
  background: var(--gold);
}

/* ------------------------------------------------------------
   14. 教材ライブラリ・特典
   ------------------------------------------------------------ */
.material-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.material-card h3 {
  font-size: 15.5px;
  font-weight: 600;
}

.material-card p {
  font-size: 13px;
  color: var(--text-sub);
  flex: 1;
}

.material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.category-title {
  font-family: var(--font-mincho);
  font-size: 17px;
  font-weight: 600;
  margin: var(--space-lg) 0 var(--space-sm);
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.category-title:first-of-type {
  margin-top: 0;
}

/* ------------------------------------------------------------
   15. AI活用ガイド
   ------------------------------------------------------------ */
.ai-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  counter-reset: aistep;
}

.ai-step {
  text-align: center;
  padding: 28px 18px;
}

.ai-step .step-num {
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}

.ai-step h3 {
  font-family: var(--font-mincho);
  font-size: 16.5px;
  font-weight: 600;
}

.ai-caution {
  background: var(--sub-blue-pale);
  border-left: 3px solid var(--sub-blue);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-sub);
  margin: var(--space-md) 0;
}

/* 質問の順番リスト */
.guide-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.guide-steps li:last-child {
  border-bottom: none;
}

.guide-steps .g-num {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--gold);
  width: 22px;
  flex-shrink: 0;
  text-align: center;
  margin-top: 2px;
}

.quote-example {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 14px;
  margin-top: var(--space-sm);
}

.quote-example .q-bad {
  color: var(--text-faint);
  margin-bottom: 10px;
}

.quote-example .q-good {
  color: var(--text-main);
}

/* ------------------------------------------------------------
   16. FAQ（アコーディオン）
   ------------------------------------------------------------ */
.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 16px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.7;
}

.faq-q .faq-mark {
  font-family: var(--font-en);
  color: var(--main-dark);
  margin-right: 4px;
}

.faq-q .faq-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

/* 回答部分（main.jsで開閉します） */
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-a-inner {
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--text-sub);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin: 0 0;
}

/* ------------------------------------------------------------
   17. 相談ページ・プロフィール
   ------------------------------------------------------------ */
.support-hero {
  text-align: center;
  padding: 40px 24px;
}

.support-hero h2 {
  font-family: var(--font-mincho);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.9;
}

.support-hero p {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 24px;
}

.support-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* プロフィール */
.profile-card {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--main-pale), var(--sub-lavender-pale));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.profile-photo .photo-placeholder {
  font-family: var(--font-en);
  font-size: 26px;
  letter-spacing: 0.1em;
  color: var(--main-dark);
}

.profile-name {
  font-family: var(--font-mincho);
  font-size: 21px;
  font-weight: 600;
}

.profile-role {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.profile-text p {
  font-size: 14.5px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

/* 修了後の案内 */
.after-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}

.after-list li:last-child {
  border-bottom: none;
}

.after-list .a-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sub-lavender);
  flex-shrink: 0;
  margin-top: 10px;
}

/* ------------------------------------------------------------
   18. ページ下部の共通フッター
   ------------------------------------------------------------ */
.page-footer {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  letter-spacing: 0.06em;
}

.page-footer .f-logo {
  font-family: var(--font-en);
  letter-spacing: 0.16em;
  margin-bottom: 4px;
}

/* ------------------------------------------------------------
   19. レスポンシブ（スマートフォン最優先）
   ------------------------------------------------------------ */
@media (max-width: 900px) {

  /* サイドバーはドロワーメニューに */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.32s ease;
    width: min(300px, 84vw);
    padding-top: 72px;
    box-shadow: none;
  }

  body.drawer-open .sidebar {
    transform: translateX(0);
    box-shadow: 12px 0 40px rgba(53, 51, 58, 0.14);
  }

  .drawer-overlay {
    display: block;
    pointer-events: none;
  }

  body.drawer-open .drawer-overlay {
    pointer-events: auto;
  }

  .mobile-header {
    display: flex;
  }

  .bottom-nav {
    display: block;
  }

  .main {
    margin-left: 0;
    padding: 80px 18px 110px; /* 上：固定ヘッダー分 / 下：下部ナビ分 */
  }

  /* カードは1列に */
  .card-grid {
    grid-template-columns: 1fr;
  }

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

  .ai-steps {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-text p {
    text-align: left;
  }

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

  .dash-greeting {
    font-size: 18.5px;
  }

  .entry-card {
    padding: 42px 26px 34px;
  }

  .entry-headline {
    font-size: 21px;
  }

  .support-buttons {
    flex-direction: column;
  }

  .support-buttons .btn {
    width: 100%;
  }
}

/* さらに小さい画面 */
@media (max-width: 380px) {
  body {
    font-size: 15px;
  }

  .main {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ============================================================
   13. カリキュラム連動機能（curriculum-data.js）
   ------------------------------------------------------------
   ・ロック中の章
   ・章カード内のレッスン一覧
   ・レッスン本文／ワークシート／AI補助ツールページ（プロース表示）
   ・AIプロンプトのコピーボタン
   ・教材の表（Markdownテーブル）
   ============================================================ */

/* ロック中の章：タイトルと概要だけを表示し、操作できないことが分かるようにする */
.chapter.is-locked {
  opacity: 0.62;
}

.chapter.is-locked::before {
  background: var(--bg-soft);
  border-color: var(--line);
}

.chapter.is-locked h3::after {
  content: "🔒";
  margin-left: 8px;
  font-size: 13px;
  vertical-align: middle;
}

.badge-locked {
  background: var(--bg-soft);
  color: var(--text-faint);
}

/* 章カード内のレッスン一覧（未ロックの章にのみ表示） */
.lesson-sublist {
  list-style: none;
  margin: 10px 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lesson-sublist li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-sublist a {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-main);
  text-decoration: none;
  background: var(--bg-soft);
  transition: background 0.15s ease;
}

.lesson-sublist a:hover {
  background: var(--main-pale);
}

.lesson-sublist .l-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--state-todo-text);
}

.lesson-sublist li.is-done .l-mark { background: var(--state-done-text); }
.lesson-sublist li.is-doing .l-mark { background: var(--state-doing-text); }

.lesson-sublist .l-current-tag {
  font-size: 11px;
  color: var(--main-dark);
  font-weight: 600;
  flex: none;
}

/* レッスン／ワークシート／AIツールページ共通：メタ情報チップ */
.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 14px 0 26px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-sub);
}

.lesson-meta strong {
  color: var(--text-main);
}

/* 教材本文（Markdownから変換したプロース） */
.lesson-body {
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--text-main);
  max-width: 720px;
}

.lesson-body h1 {
  font-family: var(--font-mincho);
  font-size: 23px;
  margin: 0 0 18px;
}

.lesson-body h2 {
  font-family: var(--font-mincho);
  font-size: 19px;
  margin: 34px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.lesson-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.lesson-body h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--main-dark);
}

.lesson-body p {
  margin: 0 0 14px;
}

.lesson-body ul,
.lesson-body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.lesson-body li {
  margin-bottom: 6px;
}

.lesson-body .md-checklist {
  list-style: none;
  padding-left: 0;
}

.lesson-body blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-sub);
  font-size: 14.5px;
}

.lesson-body strong {
  color: var(--main-dark);
}

.lesson-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

.lesson-body a {
  color: var(--main-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 表（横スクロールでモバイル崩れ防止） */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  -webkit-overflow-scrolling: touch;
}

.md-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 13.5px;
}

.md-table th,
.md-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.md-table th {
  background: var(--bg-soft);
  font-weight: 700;
  white-space: nowrap;
}

/* 図解：カードUI（:::cards ブロック） */
.md-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.md-card-item {
  background: var(--bg-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}

.md-card-item h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--main-dark);
  margin-bottom: 6px;
}

.md-card-item p {
  font-size: 13.5px;
  color: var(--text-sub);
  margin: 0;
}

/* 図解：ステップフロー（:::flow ブロック） */
.md-flow {
  list-style: none;
  margin: 0 0 20px;
  padding-left: 8px;
  position: relative;
}

.md-flow li {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 22px 26px;
}

.md-flow li:last-child {
  padding-bottom: 0;
}

.md-flow-num {
  position: absolute;
  left: 0;
  top: 4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--main);
  border: 2px solid var(--main-pale);
  box-shadow: 0 0 0 2px var(--main);
}

.md-flow li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -4px;
  width: 1px;
  background: var(--line);
}

.md-flow li:last-child::before {
  display: none;
}

.md-flow-body h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.md-flow-body p {
  font-size: 13.5px;
  color: var(--text-sub);
  margin: 0;
}

/* AIプロンプトのコードブロック＋コピーボタン */
.prompt-block {
  position: relative;
  margin: 0 0 18px;
  background: var(--sub-lavender-pale);
  border: 1px solid var(--sub-lavender);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.prompt-block pre {
  margin: 0;
  padding: 40px 16px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  border: 1px solid var(--sub-lavender);
  background: var(--bg-white);
  color: var(--main-dark);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy-btn:hover {
  background: var(--main);
  color: #fff;
}

.copy-btn.is-copied {
  background: var(--state-done-bg);
  color: var(--state-done-text);
  border-color: var(--state-done-bg);
}

/* レッスンページ・ワークシートページのフッターナビ */
.lesson-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* 仮リンク表示（実URL未設定であることが分かるように） */
.tag-placeholder {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: var(--radius-pill);
  background: var(--state-todo-bg);
  color: var(--text-faint);
}

@media (max-width: 640px) {
  .lesson-body {
    font-size: 15px;
  }

  .lesson-meta {
    font-size: 12.5px;
  }
}
