/* ─────────────────────────────────────────────────────────
   ai/assets/progress.css — マイページ / 進捗ビュー (#progress)
   旧 /my/ の inline スタイルを #progress スコープに移植。
   /ai/ の LP / player / report に漏れないよう全セレクタを #progress で限定し、
   トークンも #progress ローカルに閉じる (global :root を汚さない)。
   nr-mode-tabs / nr-dash-* は nr-engagement.css 相当を自前定義
   (/ai/ は nr-engagement.css を読み込まないため)。
   ───────────────────────────────────────────────────────── */

#progress {
  --pg-bg:         #f6f3ec;
  --pg-surface:    rgba(51,65,74,0.04);
  --pg-surface-2:  rgba(51,65,74,0.06);
  --pg-border:     rgba(51,65,74,0.09);
  --pg-gold:       #1d7f96;
  --pg-success:    #35a06c;
  --pg-success-bg: rgba(53,160,108,0.1);
  --pg-text-1:     rgba(51,65,74,0.88);
  --pg-text-3:     rgba(51,65,74,0.7);
  --pg-radius:     16px;
  --pg-radius-lg:  20px;
  background: var(--pg-bg);
  color: var(--pg-text-1);
  min-height: 100vh;
}

#progress .progress-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 20px 72px;
}
#progress .progress-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
#progress .progress-back {
  background: var(--pg-surface); border: 1px solid var(--pg-border);
  border-radius: 9999px; padding: 8px 16px; min-height: 40px;
  font-size: 13px; font-weight: 700; color: var(--pg-text-1);
  cursor: pointer; font-family: inherit;
}
#progress .progress-back:hover { background: var(--pg-surface-2); }
#progress .progress-title {
  font-family: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  font-size: 22px; font-weight: 900; letter-spacing: 0; margin: 0;
}

#progress .section-title {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}

/* ── LEVEL HERO ── */
#progress .level-hero {
  background: linear-gradient(135deg, #eaf5f7, #eaf7f0);
  border-radius: var(--pg-radius-lg); padding: 28px 24px;
  text-align: center; margin-bottom: 20px;
}
#progress .level-icon { font-size: 48px; line-height: 1; }
#progress .level-name { font-size: 20px; font-weight: 900; margin: 8px 0 2px; letter-spacing: -0.01em; }
#progress .level-label { font-size: 12px; font-weight: 600; color: var(--pg-text-3); letter-spacing: 1px; text-transform: uppercase; }
#progress .level-xp {
  font-size: 32px; font-weight: 900; margin: 12px 0 4px;
  background: linear-gradient(90deg, #34d399, #1d7f96);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#progress .level-xp-label { font-size: 12px; color: var(--pg-text-3); font-weight: 600; }
#progress .level-progress { margin-top: 16px; }
#progress .level-progress-info { display: flex; justify-content: space-between; font-size: 11px; color: var(--pg-text-3); font-weight: 600; margin-bottom: 6px; }
#progress .level-track { height: 8px; background: rgba(255,255,255,0.6); border-radius: 4px; overflow: hidden; }
#progress .level-fill { height: 100%; background: linear-gradient(90deg, #34d399, #1d7f96); border-radius: 4px; transition: width 0.6s ease; }

/* ── STATS ROW ── */
#progress .stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
#progress .stat-card { background: var(--pg-surface); border-radius: var(--pg-radius); padding: 16px; text-align: center; }
#progress .stat-value { font-size: 28px; font-weight: 900; }
#progress .stat-label { font-size: 12px; color: var(--pg-text-3); font-weight: 600; margin-top: 2px; }

/* ── TOOL BREAKDOWN ── */
#progress .tool-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
#progress .tool-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--pg-surface); border-radius: var(--pg-radius); padding: 14px 16px;
  text-decoration: none; color: inherit; transition: background 0.2s;
}
#progress .tool-item:hover { background: var(--pg-surface-2); }
#progress .tool-icon { font-size: 24px; flex-shrink: 0; }
#progress .tool-info { flex: 1; min-width: 0; }
#progress .tool-name { font-size: 14px; font-weight: 700; }
#progress .tool-xp { font-size: 12px; color: var(--pg-text-3); font-weight: 600; }
#progress .tool-bar-track { height: 4px; background: var(--pg-surface-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
#progress .tool-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
#progress .tool-arrow { color: var(--pg-text-3); font-size: 14px; flex-shrink: 0; }
#progress .tool-badge { font-size: 11px; font-weight: 700; color: var(--pg-gold); background: rgba(29,127,150,0.12); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }

/* ── CALENDAR ── */
#progress .calendar { margin-bottom: 24px; }
#progress .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
#progress .cal-header { font-size: 11px; font-weight: 600; color: var(--pg-text-3); text-align: center; padding: 4px 0; }
#progress .cal-day { aspect-ratio: 1; border-radius: 4px; background: var(--pg-surface); }
#progress .cal-day.active { background: #34d399; }
#progress .cal-day.today { outline: 2px solid var(--pg-gold); outline-offset: -1px; }
#progress .cal-day.empty { background: transparent; }

/* ── CTA ── */
#progress .cta-section { text-align: center; padding: 20px 0 0; }
#progress .cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--pg-gold), #e8950a);
  color: #fff; font-size: 15px; font-weight: 700;
  padding: 14px 32px; border-radius: 14px; border: none;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(29,127,150,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
#progress .cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(29,127,150,0.4); }

/* ── WEAK AREAS ── */
#progress .weak-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
#progress .weak-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--pg-surface); border-radius: var(--pg-radius); padding: 14px 16px;
  text-decoration: none; color: inherit; transition: background 0.2s;
}
#progress .weak-item:hover { background: var(--pg-surface-2); }
#progress .weak-left { flex: 1; min-width: 0; }
#progress .weak-tool-tag { font-size: 11px; font-weight: 600; color: var(--pg-text-3); margin-bottom: 4px; }
#progress .weak-label { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
#progress .weak-bar-track { height: 4px; background: var(--pg-surface-2); border-radius: 2px; overflow: hidden; }
#progress .weak-bar-fill { height: 100%; border-radius: 2px; }
#progress .weak-acc { font-size: 14px; font-weight: 900; flex-shrink: 0; width: 38px; text-align: right; }
#progress .weak-no-data { font-size: 13px; color: var(--pg-text-3); text-align: center; padding: 16px 0; }

/* ── EMPTY STATE ── */
#progress .empty-state { text-align: center; padding: 48px 20px; }
#progress .empty-icon { font-size: 48px; margin-bottom: 12px; }
#progress .empty-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
#progress .empty-desc { font-size: 14px; color: var(--pg-text-3); line-height: 1.6; margin-bottom: 20px; }

/* ── LEARNING PLAN (診断連携) ── */
#progress .my-plan { margin-bottom: 24px; }
#progress .my-plan-primary {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--pg-radius);
  background: linear-gradient(135deg, rgba(29,127,150,0.12), rgba(29,127,150,0.03));
  border: 1px solid rgba(29,127,150,0.3); text-decoration: none; color: inherit;
  transition: background 0.2s ease, transform 0.12s ease;
}
#progress .my-plan-primary:hover { background: linear-gradient(135deg, rgba(29,127,150,0.18), rgba(29,127,150,0.06)); }
#progress .my-plan-primary:active { transform: scale(0.99); }
#progress .my-plan-primary-icon { font-size: 30px; flex-shrink: 0; }
#progress .my-plan-primary-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#progress .my-plan-primary-eyebrow { font-size: 10.5px; font-weight: 700; color: #14596a; letter-spacing: 0.04em; }
#progress .my-plan-primary-label { font-size: 16px; font-weight: 900; letter-spacing: -0.01em; }
#progress .my-plan-primary-tagline { font-size: 12px; color: var(--pg-text-3); }
#progress .my-plan-primary-arrow { font-size: 18px; color: #14596a; flex-shrink: 0; }
#progress .my-plan-sec-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#progress .my-plan-sec {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: var(--pg-surface); text-decoration: none; color: inherit; transition: background 0.2s ease;
}
#progress .my-plan-sec:hover { background: var(--pg-surface-2); }
#progress .my-plan-sec-icon { font-size: 18px; flex-shrink: 0; }
#progress .my-plan-sec-label { flex: 1; font-size: 13.5px; font-weight: 700; }
#progress .my-plan-retake { display: block; margin: 12px auto 0; padding: 6px 12px; font-size: 12px; color: var(--pg-text-3); text-decoration: none; text-align: center; }
#progress .my-plan-retake:hover { color: var(--pg-text-1); }
#progress .my-plan-cta {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--pg-radius);
  background: var(--pg-surface); border: 1px dashed var(--pg-border); text-decoration: none; color: inherit; transition: background 0.2s ease;
}
#progress .my-plan-cta:hover { background: var(--pg-surface-2); }
#progress .my-plan-cta-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#progress .my-plan-cta-title { font-size: 14.5px; font-weight: 900; }
#progress .my-plan-cta-sub { font-size: 12px; color: var(--pg-text-3); }

/* ── COACH LAYER ── */
#progress .coach-menu { margin-bottom: 24px; }
#progress .coach-progress { font-size: 12px; font-weight: 700; color: var(--pg-text-3); margin-left: auto; }
#progress .coach-step {
  display: flex; align-items: center; gap: 12px; background: var(--pg-surface); border-radius: var(--pg-radius);
  padding: 14px 16px; text-decoration: none; color: inherit; transition: background 0.2s; min-height: 52px;
}
#progress .coach-step + .coach-step { margin-top: 8px; }
#progress .coach-step:hover { background: var(--pg-surface-2); }
#progress .coach-step.done { opacity: 0.55; }
#progress .coach-step.done .coach-step-title { text-decoration: line-through; }
#progress .coach-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--pg-border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
#progress .coach-step.done .coach-check { background: var(--pg-success); border-color: var(--pg-success); }
#progress .coach-step-body { flex: 1; min-width: 0; }
#progress .coach-step-eyebrow { font-size: 10.5px; font-weight: 700; color: var(--pg-text-3); letter-spacing: 0.04em; }
#progress .coach-step-title { font-size: 14px; font-weight: 700; margin-top: 1px; }
#progress .coach-step-sub { font-size: 12px; color: var(--pg-text-3); margin-top: 1px; }
#progress .coach-step-min { font-size: 11px; font-weight: 700; color: #14596a; background: rgba(29,127,150,0.12); border-radius: 6px; padding: 2px 8px; flex-shrink: 0; }
#progress .coach-done-msg { text-align: center; font-size: 13px; font-weight: 700; color: var(--pg-success); background: var(--pg-success-bg); border-radius: var(--pg-radius); padding: 12px; margin-top: 8px; }
#progress .coach-report { margin-bottom: 24px; }
#progress .coach-report-card { background: var(--pg-surface); border-radius: var(--pg-radius); padding: 16px; }
#progress .coach-comment { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
#progress .coach-comment-icon { font-size: 22px; flex-shrink: 0; }
#progress .coach-comment-text { font-size: 13px; line-height: 1.7; color: var(--pg-text-1); background: rgba(29,127,150,0.08); border-radius: 12px; padding: 10px 14px; }
#progress .coach-trend { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
#progress .coach-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin: 6px 0 4px; }
#progress .coach-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
#progress .coach-bar { width: 100%; max-width: 28px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #34d399, #1d7f96); min-height: 2px; }
#progress .coach-bar-label { font-size: 10px; color: var(--pg-text-3); font-weight: 600; }
#progress .coach-improve { margin-top: 12px; }
#progress .coach-improve-title { font-size: 12px; font-weight: 700; color: var(--pg-text-3); margin-bottom: 6px; }
#progress .coach-improve-item { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 0; border-top: 1px solid var(--pg-border); }
#progress .coach-delta-up { color: var(--pg-success); font-weight: 900; white-space: nowrap; }
#progress .coach-delta-down { color: #ef4444; font-weight: 900; white-space: nowrap; }
#progress .coach-improve-note { font-size: 12px; color: var(--pg-text-3); line-height: 1.6; }

/* ── SUMMARY (期間タブ + ダッシュカード。nr-engagement.css 相当を自前定義) ── */
#progress .nre-summary { margin: 0 0 20px; }
#progress .nr-mode-tabs {
  display: flex; gap: 0; margin: 0 auto 16px; max-width: 540px;
  border-bottom: 1px solid #e5dfd2; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
#progress .nr-mode-tab {
  flex: 0 0 auto; background: none; border: none; padding: 10px 14px;
  font-size: 13px; font-weight: 600; color: rgba(51,65,74,0.7); cursor: pointer;
  border-radius: 0; position: relative; white-space: nowrap; transition: color 0.15s; font-family: inherit;
}
#progress .nr-mode-tab:hover { color: rgba(51,65,74,0.88); }
#progress .nr-mode-tab.active { color: rgba(51,65,74,0.92); font-weight: 900; box-shadow: var(--pg-gold) 0 -3px 0 0 inset; }
#progress .nr-dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 16px 0; }
#progress .nr-dash-card { background: #ffffff; border: 1px solid #e5dfd2; border-radius: 14px; padding: 14px 16px; }
#progress .nr-dash-card .nr-dc-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(51,65,74,0.7); margin-bottom: 6px; }
#progress .nr-dash-card .nr-dc-value { font-size: 28px; font-weight: 900; letter-spacing: -0.8px; color: rgba(51,65,74,0.92); line-height: 1.1; }
#progress .nr-dash-card .nr-dc-sub { font-size: 12px; color: rgba(51,65,74,0.7); margin-top: 4px; }

/* ── 進捗導線ボタン (report / LP に置く) ── */
.progress-entry {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; color: #1d7f96; text-decoration: underline;
  text-underline-offset: 3px; padding: 6px 4px;
}
.progress-entry:hover { color: #14596a; }
/* ブランドヘッダー内の進捗リンク (ロゴの右に横並び) */
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand__progress {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: #33414a; text-decoration: none;
  background: rgba(31,41,55,0.06); border-radius: 9999px; padding: 6px 12px;
}
.brand__progress:hover { background: rgba(31,41,55,0.12); }

/* ── PRO ティーザー (コーチメニューの Pro 専用化・2026-07-15) ── */
.coach-probadge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 9999px;
  background: #ef8577;
  box-shadow: 0 2px 0 #d96c5e;
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  vertical-align: 2px;
}
.coach-teaser-line {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--ink-2, #5b6a73);
  margin: 8px 0 12px;
}
.coach-teaser-line em { font-style: normal; font-weight: 900; color: #e2695a; }
.coach-teaser-cta {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 9999px;
  background: #ef8577;
  box-shadow: 0 4px 0 #d96c5e;
  color: #fff;
  font-size: 13.5px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.coach-teaser-cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #d96c5e; }

/* ── 全ツールの復習予約 (axis×tool due・2026-07-15) ── */
.ctd-lead {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2, #5b6a73);
  margin: 6px 0 10px;
}
.ctd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1.5px solid var(--line, #e5dfd2);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s;
}
.ctd-row:hover { border-color: #1d7f96; }
.ctd-icon { flex: 0 0 auto; font-size: 18px; }
.ctd-body { flex: 1; min-width: 0; }
.ctd-body strong { display: block; font-size: 13px; font-weight: 900; color: var(--ink, #33414a); }
.ctd-meta { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3, #9aa4ab); }
.ctd-when {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2, #5b6a73);
}
.ctd-when--over { color: #e2695a; font-weight: 900; }
.ctd-lock {
  padding: 10px 12px;
  border: 1.5px dashed var(--line, #e5dfd2);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2, #5b6a73);
}
.ctd-lock-cta { font-weight: 900; color: #e2695a; }

/* もう1セット (2026-07-15) */
.coach-encore { display: inline-block; margin-left: 10px; font-size: 12px; padding: 8px 16px; }

/* ── マスタリーマップ (2026-07-15) ── */
.mmap-delta { font-size: 11.5px; font-weight: 700; color: #186f83; margin: 2px 0 8px; }
.mmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.mmap-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line, #e5dfd2);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s;
}
.mmap-cell:hover { transform: translateY(-1px); }
.mmap-mastered { border-color: #e8b53a; background: rgba(232,181,58,0.08); }
.mmap-growing  { border-color: #8dc2cd; background: rgba(29,127,150,0.05); }
.mmap-training { border-color: #f0a496; background: rgba(239,133,119,0.06); }
.mmap-badge { font-size: 15px; }
.mmap-name { font-size: 11.5px; font-weight: 900; color: var(--ink, #33414a); line-height: 1.4; }
.mmap-meta { font-size: 10.5px; font-weight: 700; color: var(--ink-3, #9aa4ab); }
