/* ==========================================================================
   BPaaS事業 スタッフ入社時Web研修サイト - スタイルシート
   ハーモニープラス株式会社
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* カラーシステム */
  --primary-navy: #0f2744;
  --primary-blue: #1e40af;
  --primary-light: #3b82f6;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;

  --accent-teal: #0d9488;
  --accent-teal-subtle: #f0fdfa;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;

  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;

  --success-color: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;

  --danger-color: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --warning-color: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;

  /* シャドウ */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* タイポグラフィ */
  --font-family: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* レイアウト */
  --sidebar-width: 320px;
  --header-height: 64px;
}

/* リセット & ベース */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* レイアウト全体構造 */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   サイドバー（章ナビゲーション・進捗）
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-navy);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

/* 進捗バー表示 */
.sidebar-progress {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.progress-percent {
  color: #60a5fa;
  font-size: 14px;
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* チャプターリスト */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item.active .nav-link {
  background: linear-gradient(90deg, #1d4ed8, #2563eb);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.nav-icon {
  margin-right: 10px;
  font-size: 14px;
  width: 20px;
  text-align: center;
}

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

.nav-status {
  margin-left: 6px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.status-done {
  color: #34d399;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-reset-progress {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset-progress:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   メインコンテンツエリア
   ========================================================================== */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* モバイル用トップバー */
.mobile-topbar {
  display: none;
  height: var(--header-height);
  background-color: var(--primary-navy);
  color: #ffffff;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-md);
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.mobile-title {
  font-size: 15px;
  font-weight: 700;
}

.mobile-progress-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

/* メイン学習コンテンツエリア */
.main-content {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

/* ==========================================================================
   章ヘッダー
   ========================================================================== */
.chapter-header {
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
}

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

.chapter-number-badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--primary-blue);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.chapter-time {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chapter-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.35;
  margin-bottom: 8px;
}

.chapter-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ==========================================================================
   コンテンツコンポーネント
   ========================================================================== */

/* ヒーローカード (トップ用) */
.hero-card {
  background: linear-gradient(135deg, #0f2744 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 40px 36px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #93c5fd;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 6px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 16px;
  color: #94a3b8;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.8;
  color: #e2e8f0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
}

.hero-desc p + p {
  margin-top: 8px;
}

/* スライドコンテナ */
.slide-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 36px;
  overflow: hidden;
}

.slide-header {
  background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slide-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-blue);
  background: var(--primary-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.slide-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.slide-body {
  padding: 32px 28px;
}

/* 見出し */
.section-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-navy);
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 28px 0 14px;
}

.highlight-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 18px;
}

/* カード & ボックス */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-inner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.quote-block {
  background: var(--primary-subtle);
  border-left: 4px solid var(--primary-blue);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 20px;
}

.lead-box {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.highlight-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

/* アラート・通知ボックス */
.notice-box {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 20px 0;
}

.notice-box.info {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
}

.notice-box.warning {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #92400e;
}

.notice-box.alert {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #991b1b;
}

.notice-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 15px;
}

.notice-body ul {
  padding-left: 20px;
}

.notice-body li + li {
  margin-top: 6px;
}

.danger-card {
  border-left: 4px solid var(--danger-color);
  background-color: #fffafb;
}

.warning-card {
  border-left: 4px solid var(--warning-color);
  background-color: #fffdfa;
}

/* 導線バナーカード（Chapter 01用） */
.guide-link-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1.5px solid #93c5fd;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.guide-link-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.guide-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.guide-text {
  flex: 1;
}

.guide-text strong {
  color: var(--primary-navy);
  font-size: 15px;
}

.guide-text p {
  font-size: 13.5px;
  color: #1e3a8a;
  margin-top: 4px;
  line-height: 1.5;
}

.guide-arrow {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-blue);
}

/* リスト */
.styled-list, .styled-bullet-list {
  list-style: none;
  padding-left: 0;
}

.styled-bullet-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.styled-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary-blue);
  font-weight: bold;
  font-size: 18px;
}

.styled-list li {
  margin-bottom: 8px;
}

.check-list {
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: 800;
}

.toc-list, .styled-toc {
  padding-left: 24px;
}

.toc-list li, .styled-toc li {
  margin-bottom: 6px;
}

/* ==========================================================================
   2026年度 体制図 & 役割スタイル
   ========================================================================== */
.org-chart-wrap {
  background: #f8fafc;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.org-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.org-chart-badge {
  background: var(--primary-navy);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.org-chart-note {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.org-structure-grid {
  display: grid;
  grid-template-columns: 1fr auto 1.4fr;
  gap: 16px;
  align-items: center;
}

.org-side {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.side-title {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-blue);
}

.university-side .side-title {
  color: #b91c1c;
  border-color: #b91c1c;
}

.harmony-side .side-title {
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.level-box {
  background: #f8fafc;
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px;
  position: relative;
}

.level-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.role-node {
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.node-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.univ-leader .node-title { color: #b91c1c; }
.univ-staff .node-title { color: #991b1b; }
.hp-leader .node-title { color: var(--primary-blue); }
.hp-hr .node-title { color: #0284c7; }
.hp-manager .node-title { color: var(--primary-navy); }

.node-bullets {
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
  padding-left: 0;
}

.node-bullets li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 4px;
}

.node-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.node-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.flow-arrow-down {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 10px 0;
}

.org-connections {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  height: 100%;
  padding: 20px 0;
  gap: 30px;
}

.conn-line {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-blue);
}

.roles-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

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

.member-chip {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: var(--radius-sm);
  padding: 6px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--primary-blue);
}

/* 役割カードグリッド */
.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.role-card {
  position: relative;
  border-top: 4px solid var(--primary-blue);
}

.member-card { border-top-color: #059669; }
.manager-card { border-top-color: var(--primary-blue); }
.director-card { border-top-color: var(--primary-navy); }

.role-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.member-card .role-card-badge { background: #dcfce7; color: #166534; }
.manager-card .role-card-badge { background: #dbeafe; color: #1e40af; }
.director-card .role-card-badge { background: #e2e8f0; color: #0f172a; }

.role-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 12px;
}

/* 判断基準の左右対比カード */
.decision-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 18px 0;
}

.decision-col {
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.decision-col.allowed-col {
  background-color: var(--success-bg);
  border: 2px solid var(--success-border);
}

.decision-col.forbidden-col {
  background-color: var(--danger-bg);
  border: 2px solid var(--danger-border);
}

.decision-head {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.allowed-col .decision-head { color: var(--success-color); }
.forbidden-col .decision-head { color: var(--danger-color); }

.decision-col ul {
  padding-left: 20px;
}

.decision-col li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* 水平フローステップ */
.flow-steps-horizontal {
  display: flex;
  align-items: center;
  gap: 12px;
}

.h-step {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.h-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--primary-blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  border-radius: 50%;
  margin-bottom: 6px;
}

.h-step-text {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-main);
}

.h-step-arrow {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-blue);
}

/* チャット例コンポーネント */
.chat-example-box {
  background: #f8fafc;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 18px;
}

.chat-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.chat-header-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-navy);
}

.chat-header-note {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.manager-avatar {
  background: #dbeafe;
}

.chat-bubble {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  max-width: 85%;
  box-shadow: var(--shadow-sm);
}

.chat-user {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 2px;
}

.chat-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
}

/* ==========================================================================
   インシデント対策 スタイル
   ========================================================================== */
.featured-incident {
  border: 2.5px solid var(--primary-blue) !important;
  background: #fdfefe !important;
  position: relative;
}

.featured-badge {
  display: inline-block;
  background: linear-gradient(90deg, #1e40af, #2563eb);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.incident-case {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.incident-header {
  margin-bottom: 16px;
}

.incident-badge {
  display: inline-block;
  background: #b91c1c;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.incident-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.4;
}

.incident-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.comparison-col {
  border-radius: var(--radius-md);
  padding: 16px;
}

.comparison-col.correct {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
}

.comparison-col.wrong {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.col-head {
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comparison-col.correct .col-head { color: var(--success-color); }
.comparison-col.wrong .col-head { color: var(--danger-color); }

.comparison-col ul {
  padding-left: 20px;
  font-size: 14px;
}

.comparison-col li + li {
  margin-top: 6px;
}

.incident-point {
  background: #f1f5f9;
  border-left: 4px solid var(--primary-blue);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
  font-size: 14px;
}

.highlight-point {
  background: #eff6ff;
  border-left-color: var(--primary-blue);
  border-left-width: 5px;
}

/* freee 勤怠フローステップ */
.flow-step-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-badge {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.step-content h4 {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.platform-tags .badge {
  display: inline-block;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  margin-right: 6px;
}

/* テーブルスタイル */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  text-align: left;
}

.data-table th {
  background-color: #f8fafc;
  color: var(--primary-navy);
  font-weight: 700;
  width: 28%;
}

.data-table thead th {
  background-color: #f1f5f9;
  text-align: center;
  width: auto;
}

.compact-table th, .compact-table td {
  padding: 8px 12px;
  font-size: 13px;
}

.table-responsive {
  overflow-x: auto;
  margin: 16px 0;
}

/* 画像スタイル */
.media-container {
  text-align: center;
  margin: 20px 0;
}

.material-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}

.material-img.small {
  max-width: 320px;
}

.material-img.slide-frame {
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow-lg);
}

.photo-container {
  margin-top: 20px;
  text-align: center;
}

.building-img {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.photo-caption {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  word-break: break-all;
}

/* 現場心得 ルールカード */
.rule-card-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.rule-card {
  display: flex;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  align-items: flex-start;
  gap: 16px;
}

.rule-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1;
}

.rule-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 4px;
}

.rule-extra {
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
  display: inline-block;
  font-weight: 600;
}

.contact-box {
  background: linear-gradient(135deg, #1e3a8a, #0f2744);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: #fbbf24;
  margin-bottom: 8px;
}

.contact-text {
  font-size: 15px;
}

/* 誓約書ボックス */
.pledge-box {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 24px;
}

.pledge-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 16px;
  text-align: center;
}

.pledge-clause {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.pledge-clause h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.clause-items {
  padding-left: 20px;
  margin-top: 8px;
  font-size: 14px;
}

/* ISMS 3大要素グリッド */
.security-triad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.triad-card {
  background: #ffffff;
  border: 2px solid #93c5fd;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.triad-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #2563eb;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.triad-card h4 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 8px;
}

.triad-desc {
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 12px;
}

.triad-question {
  font-size: 12px;
  color: #1e40af;
  background: #eff6ff;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* 附属書A コントロールグリッド */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ctrl-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.ctrl-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-blue);
}

.ctrl-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 箇条グリッド */
.clauses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.clause-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clause-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--primary-blue);
  color: #ffffff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

/* 機密情報区分 */
.conf-level-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.conf-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.conf-tag {
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.conf-tag.red { background: #fee2e2; color: #991b1b; }
.conf-tag.orange { background: #ffedd5; color: #9a3412; }
.conf-tag.yellow { background: #fef9c3; color: #854d0e; }
.conf-tag.green { background: #dcfce7; color: #166534; }

/* チェックリストグリッド (事務所・PC) */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check-col {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.col-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--primary-blue);
  padding-bottom: 4px;
}

/* ロードマップ (トップページ) */
.chapter-roadmap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.roadmap-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.2s;
  cursor: pointer;
}

.roadmap-item:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.roadmap-item.highlight {
  border: 2px solid var(--primary-blue);
  background: #f0f7ff;
}

.roadmap-badge {
  font-size: 12px;
  font-weight: 800;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.roadmap-item.highlight .roadmap-badge {
  background: #2563eb;
}

.roadmap-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 2px;
}

.roadmap-content p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========================================================================
   理解度チェック（クイズ）
   ========================================================================== */
.quiz-section {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px dashed var(--border-medium);
}

.quiz-header {
  margin-bottom: 24px;
}

.quiz-badge {
  display: inline-block;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.quiz-main-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-navy);
}

.quiz-lead {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.quiz-card {
  background: #ffffff;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.quiz-question-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-q-num {
  background: var(--primary-subtle);
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.quiz-q-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 14.5px;
  font-family: var(--font-family);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quiz-option-btn:hover:not(:disabled) {
  background-color: var(--primary-subtle);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.opt-prefix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.quiz-option-btn.selected-correct {
  background-color: var(--success-bg);
  border-color: var(--success-color);
  color: #065f46;
  font-weight: 600;
}

.quiz-option-btn.selected-correct .opt-prefix {
  background-color: var(--success-color);
  color: #ffffff;
}

.quiz-option-btn.selected-wrong {
  background-color: var(--danger-bg);
  border-color: var(--danger-color);
  color: #991b1b;
  font-weight: 600;
}

.quiz-option-btn.selected-wrong .opt-prefix {
  background-color: var(--danger-color);
  color: #ffffff;
}

.quiz-option-btn:disabled {
  cursor: default;
}

/* クイズ判定結果フィードバック */
.quiz-feedback {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

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

.quiz-feedback.correct {
  background-color: var(--success-bg);
  border: 1px solid var(--success-border);
}

.quiz-feedback.wrong {
  background-color: var(--danger-bg);
  border: 1px solid var(--danger-border);
}

.feedback-status {
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quiz-feedback.correct .feedback-status { color: var(--success-color); }
.quiz-feedback.wrong .feedback-status { color: var(--danger-color); }

.feedback-explanation {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 6px;
}

.btn-retry-quiz {
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid var(--danger-color);
  color: var(--danger-color);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry-quiz:hover {
  background: var(--danger-color);
  color: #ffffff;
}

/* ==========================================================================
   Chapter 09 最終テスト専用スタイル
   ========================================================================== */
.final-test-container {
  padding: 20px 0;
}

.final-test-card {
  background: #ffffff;
  border: 2px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.final-badge {
  display: inline-block;
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.final-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-navy);
  margin-bottom: 12px;
}

.final-lead-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
  max-width: 680px;
  margin: 0 auto;
}

.test-action-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  margin: 32px 0 24px;
}

.action-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.btn-final-test {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 18px 48px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.35);
  transition: all 0.3s ease;
}

.btn-final-test:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(30, 64, 175, 0.45);
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
}

.btn-final-test .btn-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.btn-final-test .btn-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.btn-final-test .btn-subtext {
  font-size: 12px;
  color: #bfdbfe;
  margin-top: 4px;
}

/* ==========================================================================
   ページ下部ナビゲーション
   ========================================================================== */
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 2px solid var(--border-light);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1.5px solid var(--border-medium);
  background-color: #ffffff;
  color: var(--text-main);
}

.nav-btn:hover {
  background-color: var(--bg-subtle);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}

.nav-btn.primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-btn.primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.nav-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* フッター */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  padding: 24px 32px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   レスポンシブ対応
   ========================================================================== */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-topbar {
    display: flex;
  }

  .main-content {
    padding: 24px 16px 40px;
  }

  .org-structure-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .org-connections {
    flex-direction: row;
    height: auto;
    padding: 10px 0;
  }

  .roles-row {
    grid-template-columns: 1fr;
  }

  .decision-comparison-grid {
    grid-template-columns: 1fr;
  }

  .flow-steps-horizontal {
    flex-direction: column;
    gap: 8px;
  }

  .h-step-arrow {
    transform: rotate(90deg);
  }

  .incident-comparison {
    grid-template-columns: 1fr;
  }

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

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

  .hero-title {
    font-size: 24px;
  }

  .hero-card {
    padding: 28px 20px;
  }

  .slide-body {
    padding: 20px 16px;
  }

  .data-table th, .data-table td {
    padding: 8px 10px;
    font-size: 13px;
  }

  .data-table th {
    width: 35%;
  }

  .chapter-navigation {
    flex-direction: column;
    gap: 12px;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
  }
}

/* オーバーレイ */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 95;
}

.sidebar-overlay.active {
  display: block;
}
