  :root {
    --bg: #f4f5f7;
    --card-bg: #ffffff;
    --text: #1f2937;
    --text-soft: #6b7280;
    --border: #e5e7eb;
    --primary: #1e40af;
    --primary-soft: #dbeafe;
    --critical: #b91c1c;
    --critical-soft: #fee2e2;
    --high: #c2410c;
    --high-soft: #fed7aa;
    --mid: #6b7280;
    --mid-soft: #f3f4f6;
    --good: #059669;
    --good-soft: #d1fae5;
    --bad: #dc2626;
    --bad-soft: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
    --radius: 10px;
    --radius-sm: 6px;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  header {
    background: linear-gradient(135deg, #1e3a8a, #3730a3);
    color: white;
    padding: 20px 40px 16px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 200;
  }

  header h1 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  header .meta {
    font-size: 13px;
    opacity: 0.85;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }

  header .meta span::before { content: '・ '; opacity: 0.5; }
  header .meta span:first-child::before { content: ''; }

  main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 80px;
  }

  /* Stats grid */
  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
  }

  .stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
  }

  .stat-card .num {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
  }

  .stat-card.critical .num { color: var(--critical); }

  .stat-card .label {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 4px;
    letter-spacing: 0.05em;
  }

  /* Section heading */
  .section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 32px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--primary);
    color: var(--text);
  }

  .section-title.critical {
    border-left-color: var(--critical);
  }

  /* Critical axes */
  .critical-axes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 36px;
  }

  .critical-card {
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
    border: 1px solid var(--critical-soft);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
    cursor: pointer;
  }

  .critical-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }

  .critical-card .id {
    display: inline-block;
    font-weight: 700;
    color: var(--critical);
    font-size: 14px;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
  }

  .critical-card .star { color: var(--critical); margin-right: 4px; }

  .critical-card .title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
  }

  .critical-card .summary {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
  }

  /* Phase navigation */
  .phase-nav {
    position: sticky;
    top: 152px;
    background: var(--bg);
    padding: 12px 0;
    margin-bottom: 16px;
    z-index: 10;
    border-bottom: 1px solid var(--border);
  }

  .phase-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .pill {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-soft);
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
  }

  .pill:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  .pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .pill .count {
    opacity: 0.6;
    margin-left: 4px;
    font-size: 11px;
  }

  .pill.active .count { opacity: 0.85; }

  /* Phase section */
  .phase-section {
    margin-bottom: 32px;
  }

  .phase-section.hidden { display: none; }

  .phase-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0 4px;
  }

  .phase-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
  }

  .phase-header .phase-id {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
  }

  .phase-header .count {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: auto;
  }

  /* Axis cards */
  .axis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  @media (min-width: 900px) {
    .axis-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  .axis-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
    overflow: hidden;
  }

  .axis-card:hover {
    box-shadow: var(--shadow);
  }

  .axis-card.expanded {
    box-shadow: var(--shadow);
  }

  .axis-card-toggle {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 20px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    display: block;
  }
  .axis-card-toggle:hover { background: #fafbfc; }

  .axis-summary {
    font-size: 12.5px;
    color: var(--text-soft);
    line-height: 1.65;
    margin-top: 6px;
    /* 折りたたみ時は最大2行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .axis-card.expanded .axis-summary {
    -webkit-line-clamp: unset;
    color: var(--text);
  }

  .axis-head-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .axis-expand-icon {
    font-size: 13px;
    color: var(--text-soft);
    transition: transform 0.2s;
    line-height: 1;
  }
  .axis-card.expanded .axis-expand-icon {
    transform: rotate(180deg);
  }

  .axis-card-body {
    padding: 0 20px 18px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 14px;
  }

  .axis-detail {
    background: linear-gradient(135deg, #fffbeb 0%, #fffaf0 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid var(--high);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 10px 0 14px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--text);
  }
  .axis-detail-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--high);
    background: #fef3c7;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
  }
  .axis-detail b { color: var(--text); font-weight: 700; }
  .axis-detail .why-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--high);
    margin-right: 4px;
  }

  /* v4: 軸カードの importance 別カラー左ボーダーは削除 (重要度バッジで代替) */
  .axis-card.critical,
  .axis-card.high,
  .axis-card.mid {
    /* 左ボーダー無し。importance-badge (右側のピル) と axis-id.critical だけで表現 */
  }

  .axis-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .axis-head-left {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
  }

  .axis-id {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
  }

  .axis-id.critical {
    color: var(--critical);
    background: var(--critical-soft);
  }

  .axis-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
  }

  .star {
    color: var(--critical);
    margin-right: 2px;
  }

  .importance-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
  }

  .importance-badge.critical {
    background: var(--critical);
    color: white;
  }

  .importance-badge.high {
    background: var(--high-soft);
    color: var(--high);
  }

  .importance-badge.mid {
    background: var(--mid-soft);
    color: var(--mid);
  }

  .axis-criteria {
    font-size: 13px;
    color: var(--text);
    background: #fafafa;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 12px;
    line-height: 1.5;
  }

  .axis-criteria-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-soft);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
  }

  .compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
  }

  .compare-item {
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
  }

  .compare-item.good {
    background: var(--good-soft);
    border-left: 3px solid var(--good);
  }

  .compare-item.bad {
    background: var(--bad-soft);
    border-left: 3px solid var(--bad);
  }

  .compare-item .label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
  }

  .compare-item.good .label { color: var(--good); }
  .compare-item.bad .label { color: var(--bad); }

  .compare-item .body {
    color: var(--text);
  }

  .axis-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-soft);
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
  }

  .axis-source {
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 11px;
  }

  .axis-condition {
    font-size: 11px;
    color: var(--text-soft);
    font-style: italic;
  }

  /* Search */
  .search-wrap {
    margin-bottom: 16px;
  }

  .search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    font-family: inherit;
  }

  .search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
  }

  .empty-msg {
    text-align: center;
    padding: 40px;
    color: var(--text-soft);
    font-size: 14px;
  }

  /* Footer */
  footer {
    max-width: 1280px;
    margin: 60px auto 40px;
    padding: 24px;
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
    border-top: 1px solid var(--border);
  }


  /* Source badges */
  .source-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-left: 4px;
    white-space: nowrap;
  }
  .source-badge.source-M {
    background: #dbeafe;
    color: #1e40af;
  }
  .source-badge.source-Y {
    background: #ede9fe;
    color: #6d28d9;
  }
  .source-badge.source-C {
    background: #ffedd5;
    color: #c2410c;
  }
  .source-badge .lbl { font-size: 9px; opacity: 0.85; }

  /* v2: 新軸バッジ */
  .new-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: #dcfce7;
    color: #15803d;
    margin-left: 4px;
    border: 1px solid #86efac;
  }
  .axis-card.is-new { position: relative; }
  .axis-card.is-new::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: #22c55e;
    border-radius: 4px 0 0 4px;
  }
  .ci-new {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    margin-left: 4px;
    letter-spacing: 0.05em;
  }
  .record-axis-new {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #dcfce7;
    color: #15803d;
    font-weight: 800;
    margin-left: 4px;
    letter-spacing: 0.05em;
  }

  /* v2: 観察ポイント表示 */
  .axis-observe {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
    padding: 8px 14px;
    margin: 10px 0;
    font-size: 12.5px;
    color: var(--text);
    border-radius: 4px;
  }
  .axis-observe-label {
    font-weight: 700;
    color: #0369a1;
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-right: 6px;
  }
  .record-axis-observe {
    font-size: 11px;
    color: #0369a1;
    margin: 4px 0 6px;
    padding: 4px 8px;
    background: #f0f9ff;
    border-radius: 3px;
    border-left: 2px solid #0ea5e9;
  }

  /* v2: ○/△/× 判定基準セクション */
  .score-criteria {
    background: var(--surface, #f8fafc);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0;
  }
  .score-criteria-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft, #4b5563);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .score-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    padding: 6px 0;
    border-top: 1px dashed var(--line, #e5e7eb);
    font-size: 12.5px;
    line-height: 1.65;
  }
  .score-row:first-of-type { border-top: none; }
  .score-mark {
    font-weight: 800;
    text-align: center;
    font-size: 16px;
    line-height: 1;
    padding-top: 2px;
  }
  .score-row.score-good .score-mark { color: #047857; }
  .score-row.score-mid .score-mark { color: #b45309; }
  .score-row.score-bad .score-mark { color: #b91c1c; }
  .score-text { color: var(--text, #1f2937); }

  /* v3: ビューモード切替 */
  .view-mode-toggle {
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
    margin-bottom: 12px;
  }
  .view-mode-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft, #4b5563);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
  }
  .view-mode-btn:hover {
    background: rgba(255,255,255,0.6);
    color: var(--text, #1f2937);
  }
  .view-mode-btn.active {
    background: white;
    color: var(--primary, #1e3a8a);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  }

  /* v6: ゴールバナー + 3 階層 (知る / なぜ / 土台) */
  .goal-banner {
    margin: 8px 0 24px;
    padding: 18px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 2px solid #fcd34d;
    display: grid;
    gap: 6px;
  }
  .goal-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #b45309;
  }
  .goal-text {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
  }
  .goal-text b {
    color: #b45309;
  }
  .goal-flow {
    font-size: 12.5px;
    color: #6b7280;
    margin-top: 4px;
    line-height: 1.7;
  }
  .goal-flow b {
    color: #1f2937;
  }

  /* tier-block: 原則グループ */
  .tier-block {
    margin: 16px 0 32px;
  }
  .tier-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid var(--border, #e5e7eb);
  }
  .tier-header.tier-know {
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
    border-color: #93c5fd;
  }
  .tier-header.tier-why {
    background: linear-gradient(135deg, #fce7f3 0%, #ffffff 100%);
    border-color: #f9a8d4;
  }
  .tier-header.tier-foundation {
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
    border-color: #6ee7b7;
  }
  .tier-badge {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 4px 12px;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--border, #e5e7eb);
  }
  .tier-know .tier-badge {
    color: #1e40af;
    border-color: #93c5fd;
  }
  .tier-why .tier-badge {
    color: #be185d;
    border-color: #f9a8d4;
  }
  .tier-foundation .tier-badge {
    color: #047857;
    border-color: #6ee7b7;
  }
  .tier-sub {
    font-size: 13px;
    color: var(--text-soft, #4b5563);
    font-weight: 600;
  }

  /* v5: 原則ピルにグループラベルを混ぜる */
  .pill-tier-label {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: var(--text-faint, #9ca3af);
    padding: 0 8px;
    margin-left: 4px;
  }

  /* v3: 原則ピル */
  .principle-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin: 8px 0;
  }
  .pill.principle-pill {
    padding: 6px 12px;
    font-size: 12px;
    border-left: 3px solid var(--p-color, #ddd);
  }
  .pill.principle-pill.active {
    background: var(--p-color, #1e3a8a);
    border-color: var(--p-color, #1e3a8a);
    color: white;
  }
  .pill.principle-pill .pp-id {
    font-weight: 800;
    margin-right: 4px;
    opacity: 0.85;
  }

  /* v3: 軸カードの原則バッジ */
  .principle-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
    font-weight: 800;
    margin-left: 4px;
    letter-spacing: 0.05em;
    cursor: help;
  }

  /* v4: 原則セクション (色を控えめに) */
  .principle-section {
    /* 左ボーダー削除。原則の色はヘッダーの ID ピルでのみ表現 */
    padding-left: 0;
  }
  .principle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 12px;
    /* 背景グラデーション削除 */
  }
  .principle-id {
    background: var(--p-color, #1e3a8a);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 14px;
  }
  .principle-title-sub {
    font-weight: 500;
    color: var(--text-soft, #4b5563);
    font-size: 0.85em;
  }
  .principle-abstract {
    margin: 0 20px 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text, #1f2937);
    border-left: 3px solid var(--p-color, #ddd);
  }

  /* v4: 原則の「どういうことか / なぜ必要か」2部 */
  .principle-detail {
    margin: 12px 20px 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  @media (max-width: 720px) {
    .principle-detail { grid-template-columns: 1fr; }
  }
  .principle-block {
    background: #f9fafb;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    padding: 12px 16px;
  }
  .principle-block-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft, #6b7280);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
  }
  .principle-block-body {
    font-size: 13px;
    line-height: 1.85;
    color: var(--text, #1f2937);
  }
  .principle-points-label {
    margin: 16px 20px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft, #4b5563);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  /* v4: ポイントの (a)/(b)/(c) セクション */
  /* v4.2: ポイントセクション (a/b/c) — 背景は薄く、左ボーダーで識別 */
  .point-section {
    margin: 12px 0;
    padding: 14px 18px;
    border-radius: 8px;
    background: #fafbfc;
    border-left: 3px solid #e5e7eb;
  }
  .point-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft, #4b5563);
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    text-transform: uppercase;
  }
  .point-body {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--text, #1f2937);
  }
  .point-explain {
    border-left-color: #6366f1;
    background: #f5f7ff;
  }
  .point-explain .point-label { color: #4338ca; }
  .point-yamada {
    border-left-color: #047857;
    background: #f3fbf7;
  }
  .point-yamada .point-label { color: #047857; }
  .point-poor {
    border-left-color: #b91c1c;
    background: #fdf6f6;
  }
  .point-poor .point-label { color: #b91c1c; }
  .point-empty em {
    color: #9ca3af;
    font-style: italic;
    font-size: 12px;
  }

  /* v4.2: スクリプト形式の例 (台詞展開) — 見やすさ改善 */
  .point-script {
    font-size: 13.5px;
    line-height: 1.75;
    margin-top: 8px;
  }

  /* 台詞行 (スタッフ・お客様) */
  .script-line {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 7px 0;
  }
  .script-line .speaker {
    flex-shrink: 0;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    min-width: 52px;
    text-align: center;
    letter-spacing: 0.05em;
    line-height: 1.5;
    margin-top: 1px;
  }
  .script-line .body {
    flex: 1;
    color: #1f2937;
    line-height: 1.75;
  }

  /* 話者の色 (background pill) */
  .script-staff .speaker {
    background: #d1fae5;
    color: #065f46;
  }
  .point-poor .script-staff .speaker {
    background: #fee2e2;
    color: #991b1b;
  }
  .script-customer .speaker {
    background: #e0e7ff;
    color: #3730a3;
  }
  .script-customer .body {
    color: #4b5563;
  }

  /* NG / OK ラベル */
  .script-ng .ng-ok-label,
  .script-ok .ng-ok-label {
    flex-shrink: 0;
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.1em;
    min-width: 38px;
    text-align: center;
    line-height: 1.5;
    margin-top: 1px;
  }
  .script-ng .ng-ok-label {
    background: #fee2e2;
    color: #991b1b;
  }
  .script-ok .ng-ok-label {
    background: #d1fae5;
    color: #065f46;
  }

  /* シーン説明・ノート [...] */
  .script-note {
    font-size: 12px;
    color: #6b7280;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px 12px;
    margin: 8px 0;
    border-radius: 4px;
    line-height: 1.65;
  }

  /* 空行 (ブロック区切り) */
  .script-blank {
    height: 8px;
  }

  /* 箇条書き */
  .script-bullet {
    font-size: 12.5px;
    color: #4b5563;
    padding-left: 16px;
    margin: 4px 0;
    line-height: 1.7;
  }

  /* 装飾なしのプレーンテキスト */
  .script-plain {
    font-size: 13px;
    color: #4b5563;
    margin: 4px 0;
  }

  /* v4: マニュアル章番号バッジ */
  .manual-ref {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: 8px;
    letter-spacing: 0.02em;
  }
  .pp-ref {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-soft, #6b7280);
    margin-left: 4px;
    opacity: 0.7;
  }

  /* Source filter pills */
  .source-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
  }
  .pill.source-pill { padding: 6px 12px; font-size: 12px; }
  .pill.source-pill.active.M { background: #1e40af; border-color: #1e40af; }
  .pill.source-pill.active.Y { background: #6d28d9; border-color: #6d28d9; }
  .pill.source-pill.active.C { background: #c2410c; border-color: #c2410c; }

  /* Comparison summary */
  .comparison {
    background: white;
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 36px;
  }
  .comparison-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
  }
  .comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
  }
  .comparison-item {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border-left: 3px solid;
  }
  .comparison-item.M { border-left-color: #1e40af; background: #eff6ff; }
  .comparison-item.Y { border-left-color: #6d28d9; background: #f5f3ff; }
  .comparison-item.C { border-left-color: #c2410c; background: #fff7ed; }
  .comparison-item .ci-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
  }
  .comparison-item.M .ci-num { color: #1e40af; }
  .comparison-item.Y .ci-num { color: #6d28d9; }
  .comparison-item.C .ci-num { color: #c2410c; }
  .comparison-item .ci-label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
  }
  .comparison-item .ci-desc {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 6px;
    line-height: 1.5;
  }
  .comparison-note {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.6;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 4px;
  }


  /* Tabs */
  .tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin: 0 -24px 24px;
    padding: 0 24px;
    overflow-x: auto;
    position: sticky;
    top: 100px;
    background: var(--bg);
    z-index: 100;
    box-shadow: 0 6px 12px -8px rgba(0,0,0,0.08);
  }
  .tab-btn {
    padding: 12px 22px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
  }
  .tab-btn:hover { color: var(--primary); }
  .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* Manual tab */
  .manual-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
  }
  .manual-toc-sticky {
    position: sticky;
    top: 168px; /* header(100) + tabs(~50) + small gap */
    align-self: start;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
  }
  .manual-toc {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
  }
  .manual-toc-title {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 8px;
  }
  .manual-toc-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .manual-toc-item {
    font-size: 12.5px;
    color: var(--primary);
    text-decoration: none;
    padding: 5px 8px;
    border-radius: 4px;
    line-height: 1.4;
  }
  .manual-toc-item:hover { background: var(--primary-soft); }

  .chapter-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    scroll-margin-top: 168px;
  }
  .chapter-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-soft);
  }
  .chapter-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 20px 0 8px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
  }
  .chapter-card > h3:first-child,
  .chapter-card > .chapter-title + h3 {
    margin-top: 0;
  }
  .chapter-card p {
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text);
    margin: 8px 0;
  }
  .chapter-card ul,
  .chapter-card ol {
    font-size: 13.5px;
    line-height: 1.8;
    margin: 8px 0;
    padding-left: 24px;
  }
  .chapter-card li {
    margin-bottom: 4px;
  }
  .chapter-card .muted {
    color: var(--text-soft);
    font-size: 12.5px;
  }

  /* Block: script (dialogue) */
  .script-block {
    background: var(--mid-soft);
    border-left: 4px solid var(--primary);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin: 10px 0;
  }
  .script-line {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text);
    padding: 5px 0;
  }
  .script-line + .script-line {
    border-top: 1px dashed var(--border);
  }
  /* マニュアルの台本行はブロック表示。
     ポイント解説用 .script-line (line 974: display:flex) が
     同名クラスのため漏れて適用されるのを打ち消す */
  .script-block .script-line {
    display: block;
  }

  /* Block: tip / POINT */
  .tip-box {
    background: linear-gradient(to right, #fef3c7, #fffbeb);
    border: 1px solid #fcd34d;
    border-left: 4px solid #d97706;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--text);
  }
  .tip-title {
    display: inline-block;
    background: #d97706;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    letter-spacing: 0.05em;
    vertical-align: 1px;
  }

  /* Block: warn */
  .warn-box {
    background: var(--critical-soft);
    border: 1px solid #fca5a5;
    border-left: 4px solid var(--critical);
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--critical);
    font-weight: 500;
  }

  /* Block: compare */
  .compare-block {
    display: grid;
    gap: 8px;
    margin: 12px 0;
  }
  .compare-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    align-items: start;
  }
  .compare-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 4px 10px;
    border-radius: 4px;
    text-align: center;
  }
  .compare-text {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
  }

  /* Block: image */
  .manual-image-block {
    margin: 14px 0;
    text-align: center;
  }
  .manual-image-block img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
  }
  .manual-image-block .caption {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 6px;
  }

  /* Mobile / narrow: TOC stacks above content */
  @media (max-width: 900px) {
    .manual-layout {
      grid-template-columns: 1fr;
    }
    .manual-toc-sticky {
      position: static;
      max-height: none;
      overflow-y: visible;
    }
    .manual-toc-list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .compare-row {
      grid-template-columns: 1fr;
    }
  }

  /* Checklist tab - Table view */
  .checklist-controls {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
  }
  .btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    font-weight: 500;
  }
  .btn:hover { border-color: var(--primary); color: var(--primary); }
  .btn.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
  }
  .btn.btn-primary:hover {
    background: #1e3a8a;
    color: white;
  }
  .ctrl-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-soft);
  }
  .ctrl-group label { font-weight: 600; }
  .ctrl-select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    font-family: inherit;
    color: var(--text);
  }
  .muted-label {
    font-size: 12px;
    color: var(--text-soft);
    margin-left: auto;
  }

  /* 店舗フィルタ (チェックボックスドロップダウン) */
  .store-filter-wrap {
    position: relative;
  }
  .store-filter-toggle {
    padding: 7px 12px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .store-filter-toggle:hover { border-color: var(--primary); }
  .store-filter-toggle::after {
    content: "▾";
    font-size: 10px;
    color: var(--text-soft);
  }
  .store-filter-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 8px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
  }
  .store-filter-panel.hidden { display: none; }
  .store-filter-panel .filter-actions {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    padding-bottom: 6px;
  }
  .store-filter-panel .filter-actions button {
    padding: 4px 8px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-soft);
    flex: 1;
  }
  .store-filter-panel .filter-actions button:hover {
    border-color: var(--primary);
    color: var(--primary);
  }
  .store-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
  }
  .store-filter-item:hover { background: var(--mid-soft); }
  .store-filter-item input { cursor: pointer; }
  .store-filter-item .count {
    margin-left: auto;
    color: var(--text-soft);
    font-size: 11px;
  }

  /* Modal */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 500;
    animation: modalFade 0.12s ease-out;
  }
  .modal-overlay.hidden { display: none; }
  @keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .modal {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 22px 24px 18px;
  }
  .modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .modal-field {
    margin-bottom: 14px;
  }
  .modal-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 5px;
  }
  .modal-required { color: var(--critical); }
  .modal-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    color: var(--text);
  }
  .modal-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
  }
  .modal-error {
    font-size: 12px;
    color: var(--critical);
    background: var(--critical-soft);
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 12px;
  }
  .modal-error.hidden { display: none; }
  .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
  }

  /* Analytics tab */
  .analytics-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .period-toggle {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    box-shadow: var(--shadow-sm);
  }
  .period-btn {
    padding: 7px 18px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    font-family: inherit;
  }
  .period-btn:hover { color: var(--primary); }
  .period-btn.active {
    background: var(--primary);
    color: white;
  }

  .add-obs-form {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr 0.9fr auto;
    gap: 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    align-items: end;
  }
  .obs-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .obs-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-soft);
  }
  .period-hint {
    font-weight: 400;
    color: var(--text-soft);
    font-size: 10px;
  }
  .obs-field input,
  .obs-field select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    background: white;
    font-family: inherit;
    color: var(--text);
    width: 100%;
  }
  .obs-field input:focus,
  .obs-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
  }
  .obs-actions { align-items: stretch; }
  .obs-error {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--critical);
    background: var(--critical-soft);
    border-radius: 4px;
    padding: 6px 10px;
  }
  .obs-error.hidden { display: none; }

  .analytics-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }
  .analytics-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
  }
  .analytics-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .scatter-wrap {
    width: 100%;
    aspect-ratio: 540 / 500;
    background: #fafbfc;
    border-radius: 6px;
    overflow: hidden;
  }
  .timeseries-wrap {
    aspect-ratio: 900 / 400;
  }
  .scatter-svg .ts-line-achievement {
    fill: none;
    stroke-width: 2;
  }
  .scatter-svg .ts-line-contract {
    fill: none;
    stroke-width: 2;
    stroke-dasharray: 6,4;
  }
  .scatter-svg .ts-point {
    stroke: white;
    stroke-width: 1.5;
    cursor: pointer;
  }
  .scatter-svg .ts-point.contract { fill-opacity: 0.55; }
  .ts-legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
  }
  .ts-metric-key {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-soft);
  }
  .ts-metric-key .key-line {
    display: inline-block;
    width: 22px;
    height: 0;
    border-top: 2px solid var(--text-soft);
    margin-right: 2px;
    vertical-align: middle;
  }
  .ts-metric-key .key-line.dashed {
    border-top-style: dashed;
    margin-left: 14px;
  }
  .scatter-svg { width: 100%; height: 100%; display: block; }
  .scatter-svg .axis { stroke: #9ca3af; stroke-width: 1; }
  .scatter-svg .grid { stroke: #e5e7eb; stroke-width: 1; }
  .scatter-svg .tick-label { font-size: 10px; fill: var(--text-soft); }
  .scatter-svg .axis-label {
    font-size: 11px;
    fill: var(--text);
    font-weight: 600;
  }
  .scatter-svg .data-point {
    stroke: white;
    stroke-width: 1.5;
    cursor: pointer;
    transition: r 0.1s;
  }
  .scatter-svg .data-point:hover { stroke-width: 2.5; }
  .scatter-svg .regression-line {
    stroke: #6b7280;
    stroke-width: 1.5;
    stroke-dasharray: 5,4;
    fill: none;
  }
  .scatter-svg .empty-msg {
    font-size: 13px;
    fill: var(--text-soft);
    text-anchor: middle;
  }
  .scatter-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
  }
  .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  .stat-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-block {
    background: var(--mid-soft);
    border-radius: 6px;
    padding: 10px 12px;
  }
  .stat-block .lbl {
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 600;
    margin-bottom: 4px;
  }
  .stat-block .val {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
  }
  .stat-block.r-strong .val { color: var(--good); }
  .stat-block.r-medium .val { color: #d97706; }
  .stat-block.r-weak .val { color: var(--text-soft); }
  .stat-block.r-negative .val { color: var(--bad); }
  .stat-block .sub {
    font-size: 10px;
    color: var(--text-soft);
    margin-top: 2px;
  }
  .stats-note {
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 12px;
    line-height: 1.6;
  }

  .obs-table-wrap { overflow-x: auto; }
  .obs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }
  .obs-table th, .obs-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  .obs-table th {
    background: var(--mid-soft);
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .obs-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .obs-table td.staff-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
  }
  .obs-table .staff-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .obs-table .obs-period-badge {
    display: inline-block;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 6px;
  }
  .obs-table .obs-del {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-soft);
    cursor: pointer;
    padding: 3px 8px;
    font-size: 11px;
    font-family: inherit;
  }
  .obs-table .obs-del:hover {
    border-color: var(--bad);
    color: var(--bad);
    background: var(--bad-soft);
  }
  .obs-empty-row td {
    text-align: center;
    color: var(--text-soft);
    padding: 24px;
    font-size: 13px;
  }
  .btn.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
  }

  @media (max-width: 900px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .add-obs-form {
      grid-template-columns: 1fr 1fr;
    }
  }

  /* Subtabs (タブ内のサブナビ) */
  .subtabs {
    display: inline-flex;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    gap: 2px;
  }
  .subtab-btn {
    padding: 7px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    font-family: inherit;
  }
  .subtab-btn:hover { color: var(--primary); }
  .subtab-btn.active {
    background: var(--primary);
    color: white;
  }
  .subview { display: none; }
  .subview.active { display: block; }

  /* チェックリスト記録モード */
  .record-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
  }
  .record-progress {
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 6px;
  }
  .record-body {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .record-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-soft);
    font-size: 13px;
  }
  .record-phase {
    border-bottom: 1px solid var(--border);
  }
  .record-phase:last-child { border-bottom: none; }
  .record-phase-title {
    background: linear-gradient(90deg, #eff6ff, #f5f3ff);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .record-axis {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    align-items: center;
  }
  .record-axis:last-child { border-bottom: none; }
  .record-axis:hover { background: #fafbfc; }
  .record-axis-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  .record-axis-id {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    background: var(--mid-soft);
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
  }
  .record-axis-id.critical {
    background: var(--critical-soft);
    color: var(--critical);
  }
  .record-axis-importance {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .record-axis-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
  }
  .record-axis-buttons {
    display: inline-flex;
    gap: 4px;
  }
  .record-axis-buttons .mx-btn { width: 36px; height: 36px; font-size: 14px; }
  .record-axis-stamp {
    font-size: 10px;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    min-width: 56px;
    text-align: right;
  }
  @media (max-width: 800px) {
    .record-axis {
      grid-template-columns: 1fr;
      gap: 8px;
    }
    .record-axis-stamp { text-align: left; }
  }

  /* 契約率記録 タブ */
  .contract-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  .contract-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
  }
  .contract-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-soft);
    background: white;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    font-size: 13px;
  }
  .contract-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }
  .contract-card-head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
  }
  .contract-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .contract-card-store {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-soft);
    background: var(--mid-soft);
    padding: 2px 8px;
    border-radius: 4px;
  }
  .legacy-badge {
    font-size: 10px;
    background: var(--mid-soft);
    color: var(--text-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
  }
  .contract-card-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
  }
  .cs-block { display: inline-flex; align-items: baseline; gap: 4px; }
  .cs-lbl {
    font-size: 10px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .cs-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
  }
  .contract-card-spark {
    padding: 8px 14px 4px;
    border-bottom: 1px solid var(--border);
  }
  .contract-card-spark .spark {
    width: 100%;
    height: 36px;
    display: block;
  }
  .contract-card-spark .spark-empty {
    text-align: center;
    font-size: 11px;
    color: var(--text-soft);
    padding: 8px 0;
  }
  .contract-card-table-wrap {
    max-height: 260px;
    overflow-y: auto;
  }
  .contract-card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
  }
  .contract-card-table th,
  .contract-card-table td {
    padding: 6px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  .contract-card-table th {
    background: var(--mid-soft);
    font-size: 10px;
    color: var(--text-soft);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 1;
  }
  .contract-card-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .contract-card-table .obs-del {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-soft);
    cursor: pointer;
    padding: 2px 8px;
    font-size: 11px;
    font-family: inherit;
  }
  .contract-card-table .obs-del:hover {
    border-color: var(--bad);
    color: var(--bad);
    background: var(--bad-soft);
  }
  .contract-empty-row td {
    text-align: center;
    color: var(--text-soft);
    padding: 16px;
    font-size: 12px;
  }
  .contract-more td {
    text-align: center;
    color: var(--text-soft);
    font-size: 11px;
    padding: 6px;
    background: var(--mid-soft);
  }

  /* Matrix Table */
  .matrix-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }
  .matrix-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
  }
  .matrix-table tr {
    height: auto;
  }
  .matrix-table tbody tr td {
    min-height: 56px;
  }

  .matrix-table th, .matrix-table td {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    background: white;
    vertical-align: middle;
    box-sizing: border-box;
  }
  .matrix-table th:last-child, .matrix-table td:last-child {
    border-right: none;
  }

  /* THEAD - スタッフ名行 (上に固定) */
  .matrix-table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    padding: 10px 8px;
    border-bottom: 2px solid var(--primary-soft);
    height: 76px;
    position: sticky;
    top: 152px;
    z-index: 30;
  }
  .matrix-table thead th.criteria-th {
    text-align: left;
    padding: 12px 16px;
    width: 360px;
    min-width: 360px;
    z-index: 35;
  }
  .matrix-table thead th.person-th {
    width: 130px;
    min-width: 130px;
  }
  .person-header-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: relative;
  }
  .person-header-cell .name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
  }
  .person-header-cell .store {
    font-size: 10px;
    color: var(--text-soft);
    line-height: 1.2;
  }
  .person-header-cell .pct {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
  }
  .person-header-cell .last-updated {
    font-size: 10px;
    color: var(--text-soft);
    background: var(--mid-soft);
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 3px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
  }
  .ctrl-date-group .ctrl-date {
    font-family: inherit;
    color: var(--text);
  }
  .person-header-cell .delete-x,
  .person-header-cell .edit-pencil {
    position: absolute;
    top: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.1s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .person-header-cell .delete-x {
    right: -6px;
    background: var(--bad-soft);
    color: var(--bad);
  }
  .person-header-cell .edit-pencil {
    left: -6px;
    background: var(--primary-soft);
    color: var(--primary);
  }
  .matrix-table thead th:hover .delete-x,
  .matrix-table thead th:hover .edit-pencil { opacity: 1; }
  .person-header-cell .delete-x:hover { background: var(--bad); color: white; }
  .person-header-cell .edit-pencil:hover { background: var(--primary); color: white; }

  /* フェーズ区切り行 */
  .matrix-table tr.phase-tr td {
    background: linear-gradient(90deg, #eff6ff, #f5f3ff);
    border-top: 2px solid var(--primary-soft);
    border-bottom: 1px solid var(--primary-soft);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
  }

  /* 判定基準セル (左カラム sticky) */
  .matrix-table td.criteria-td {
    background: white;
    width: 360px;
    min-width: 360px;
  }
  .ci-meta {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
    align-items: center;
  }
  .ci-id {
    font-weight: 700;
    font-size: 11px;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
  }
  .ci-id.critical { color: var(--critical); background: var(--critical-soft); }
  .ci-importance {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 999px;
    font-weight: 700;
  }
  .ci-importance.critical { background: var(--critical); color: white; }
  .ci-importance.high { background: var(--high-soft); color: var(--high); }
  .ci-importance.mid { background: var(--mid-soft); color: var(--mid); }
  .criteria-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text);
  }

  /* スコアセル */
  .matrix-table td.score-td {
    text-align: center;
    padding: 8px 6px;
  }
  .btn-group {
    display: inline-flex;
    gap: 2px;
  }
  .mx-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    transition: all 0.1s;
  }
  .mx-btn:hover { border-color: var(--text); }
  .mx-btn.selected.good { background: var(--good); color: white; border-color: var(--good); }
  .mx-btn.selected.mid { background: #f59e0b; color: white; border-color: #f59e0b; }
  .mx-btn.selected.bad { background: var(--bad); color: white; border-color: var(--bad); }

  /* 一覧モードの読み取り専用セル */
  .mx-readonly {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    user-select: none;
  }
  .mx-readonly.good { background: var(--good-soft); color: var(--good); }
  .mx-readonly.mid { background: #fef3c7; color: #d97706; }
  .mx-readonly.bad { background: var(--bad-soft); color: var(--bad); }
  .mx-readonly.none { color: var(--text-soft); font-weight: 400; font-size: 14px; }

  /* 合計行 */
  .matrix-table tfoot td {
    background: #f8fafc;
    border-top: 2px solid var(--primary-soft);
    text-align: center;
    padding: 10px 8px;
  }
  .matrix-table tfoot td.total-label-td {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    background: #f8fafc;
  }
  .total-pct {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
  }
  .total-bd {
    font-size: 10px;
    color: var(--text-soft);
    margin-top: 2px;
  }

  .empty-msg-cell {
    padding: 40px;
    text-align: center;
    color: var(--text-soft);
    font-size: 14px;
    background: white;
  }

  /* Print */
  @media print {
    .phase-nav, .search-wrap { display: none; }
    .axis-card { break-inside: avoid; }
    .phase-section.hidden { display: block !important; }
  }

  /* ===========================================================
     v7 Philosophy tab
     =========================================================== */

  #tab-philosophy {
    max-width: 1100px;
    margin: 0 auto;
  }

  /* 1. Hero (目的) — ミニマル統一版 */
  .phil-hero {
    background: white;
    color: var(--text);
    border-radius: 12px;
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
  }

  /* Label row */
  .phil-hero-label-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
  }

  .phil-hero-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2em;
    padding: 4px 10px;
    border-radius: 4px;
  }

  .phil-hero-label {
    font-size: 13px;
    letter-spacing: 0.12em;
    font-weight: 700;
    color: var(--text-soft);
  }

  /* Main goal text */
  .phil-hero-main {
    font-size: 18px;
    line-height: 1.75;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 18px;
  }

  .phil-hero-main strong {
    font-weight: 700;
    background: linear-gradient(transparent 62%, #fde68a 62%);
    padding: 2px 4px;
    color: var(--text);
  }

  /* Pills */
  .phil-hero-pills {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .phil-hero-pill {
    display: inline-block;
    background: var(--primary-soft);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 16px;
  }

  .phil-hero-pill-sep {
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 400;
  }

  /* Sub list */
  .phil-hero-sub {
    list-style: none;
    margin: 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
  }

  .phil-hero-sub li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
  }

  .phil-hero-sub li:last-child { margin-bottom: 0; }

  .phil-hero-sub-mark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-top: 2px;
  }

  .phil-hero-sub-mark-x {
    background: var(--bad-soft);
    color: var(--bad);
  }

  .phil-hero-sub-mark-o {
    background: var(--good-soft);
    color: var(--good);
  }

  .phil-hero-sub-mark-arrow {
    background: #fef3c7;
    color: #b45309;
  }

  .phil-hero-sub li em {
    font-style: normal;
    font-weight: 700;
    color: var(--primary);
  }

  @media (max-width: 720px) {
    .phil-hero { padding: 22px 20px; }
    .phil-hero-main { font-size: 16px; }
  }

  /* Section title */
  .phil-section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
  }

  /* Overview (やること = ポイント の俯瞰) */
  .phil-overview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 8px;
    flex-wrap: wrap;
  }

  .phil-overview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 14px 22px;
    box-shadow: var(--shadow-sm);
  }

  .phil-overview-item.phil-card-understand {
    border-color: #2563eb;
    background: #eff6ff;
  }

  .phil-overview-item.phil-card-support {
    border-color: #059669;
    background: #ecfdf5;
  }

  .phil-overview-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
  }

  .phil-card-understand .phil-overview-num { color: #2563eb; }
  .phil-card-support .phil-overview-num { color: #059669; }

  .phil-overview-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
  }

  .phil-overview-arrow {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 500;
  }

  .phil-overview-note {
    text-align: center;
    color: var(--text-soft);
    font-size: 13px;
    margin: 0 0 32px;
    font-style: italic;
  }

  /* Detail section (① / ② を縦に並べる) */
  .phil-detail-section {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 28px 32px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    counter-reset: phil-h3;
  }

  .phil-detail-section.phil-card-understand {
    border-top: 5px solid #2563eb;
  }

  .phil-detail-section.phil-card-support {
    border-top: 5px solid #059669;
  }

  .phil-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
  }

  .phil-detail-num {
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
  }

  .phil-card-understand .phil-detail-num { color: #2563eb; }
  .phil-card-support .phil-detail-num { color: #059669; }

  .phil-detail-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
  }

  /* h3 with numbered circle badge */
  .phil-h3 {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 36px 0 16px;
    padding: 10px 18px 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--border);
  }

  .phil-h3::before {
    counter-increment: phil-h3;
    content: counter(phil-h3);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--text-soft);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  }

  .phil-card-understand .phil-h3 {
    background: #eff6ff;
    border-left-color: #2563eb;
  }

  .phil-card-understand .phil-h3::before {
    background: #2563eb;
  }

  .phil-card-support .phil-h3 {
    background: #ecfdf5;
    border-left-color: #059669;
  }

  .phil-card-support .phil-h3::before {
    background: #059669;
  }

  .phil-h3:first-of-type { margin-top: 0; }

  .phil-p {
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--text);
    margin: 0 0 12px;
  }

  /* Info table (引き出すべき内容 / 質問例 / 変換例) */
  .phil-info-table-wrap {
    overflow-x: auto;
    margin: 12px 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .phil-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    line-height: 1.7;
    background: white;
  }

  .phil-info-table thead th {
    background: #f3f4f6;
    text-align: left;
    padding: 10px 14px;
    font-weight: 700;
    color: var(--text);
    border-bottom: 2px solid #d1d5db;
    font-size: 12.5px;
  }

  .phil-info-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
  }

  .phil-info-table tbody tr:last-child td { border-bottom: none; }

  .phil-info-table tbody td:first-child {
    width: 24%;
    background: #f1f5f9;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    border-right: 1px solid #e5e7eb;
  }

  .phil-card-understand .phil-info-table thead th {
    background: #eff6ff;
    color: #1e40af;
  }

  .phil-card-support .phil-info-table thead th {
    background: #ecfdf5;
    color: #047857;
  }

  /* スマホ: テーブルを縦並びカード型に切り替え */
  @media (max-width: 720px) {
    .phil-info-table-wrap {
      overflow: visible;
      border: none;
      border-radius: 0;
    }
    .phil-info-table {
      table-layout: auto !important;
      font-size: 14px;
    }
    .phil-info-table thead { display: none; }
    .phil-info-table colgroup { display: none; }
    .phil-info-table tbody tr {
      display: block;
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-bottom: 14px;
      overflow: hidden;
      background: white;
    }
    .phil-info-table tbody tr:last-child { margin-bottom: 0; }
    .phil-info-table tbody td {
      display: block;
      padding: 10px 14px;
      border: none;
      border-bottom: 1px solid #f3f4f6;
      width: auto !important;
      white-space: normal !important;
      vertical-align: top;
    }
    .phil-info-table tbody tr td:last-child { border-bottom: none; }
    .phil-info-table tbody tr td:first-child {
      background: #eff6ff;
      color: #1e40af;
      font-weight: 800;
      font-size: 14.5px;
      padding: 8px 14px;
    }
    .phil-card-support .phil-info-table tbody tr td:first-child {
      background: #ecfdf5;
      color: #047857;
    }
  }

  /* Pitfall block */
  .phil-pitfall {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 12px;
  }

  .phil-pitfall p {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.75;
    color: #7f1d1d;
  }

  .phil-pitfall p:last-child { margin-bottom: 0; }

  .phil-pitfall ul {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 13.5px;
    line-height: 1.85;
    color: #7f1d1d;
  }

  .phil-pitfall li { margin-bottom: 6px; }

  .phil-pitfall strong { color: #991b1b; }

  /* Updated phil-point-detail for richer content */
  .phil-point-detail p {
    margin: 0 0 8px;
  }

  .phil-point-detail p:last-child { margin-bottom: 0; }

  .phil-point-detail ul, .phil-point-detail ol {
    margin: 6px 0 8px;
    padding-left: 22px;
  }

  .phil-point-detail li { margin-bottom: 3px; }

  /* 2. やること (2 cards) — legacy, kept for fallback */
  .phil-todo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
  }

  @media (max-width: 880px) {
    .phil-todo-grid { grid-template-columns: 1fr; }
  }

  .phil-todo-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px 26px 28px;
    box-shadow: var(--shadow);
    position: relative;
  }

  .phil-card-understand { border-top: 4px solid #2563eb; }
  .phil-card-support { border-top: 4px solid #059669; }

  .phil-todo-num {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
  }

  .phil-card-understand .phil-todo-num { color: #2563eb; }
  .phil-card-support .phil-todo-num { color: #059669; }

  .phil-todo-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--text);
  }

  .phil-todo-block {
    margin-bottom: 22px;
  }

  .phil-todo-block:last-child { margin-bottom: 0; }

  .phil-todo-block-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-soft);
    background: var(--mid-soft);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    text-transform: uppercase;
  }

  .phil-card-understand .phil-todo-block-label {
    background: #dbeafe;
    color: #1e40af;
  }

  .phil-card-support .phil-todo-block-label {
    background: #d1fae5;
    color: #047857;
  }

  .phil-todo-block-body {
    font-size: 14px;
    line-height: 1.75;
    color: var(--text);
  }

  .phil-todo-block-body p { margin: 0 0 10px; }
  .phil-todo-block-body p:last-child { margin-bottom: 0; }

  .phil-list {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.85;
  }

  .phil-list li { margin-bottom: 4px; }

  .phil-emphasis {
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 12px !important;
    font-size: 14px;
  }

  .phil-key-point {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 14px 0;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
  }

  .phil-key-point-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
    background: white;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
  }

  .phil-key-point p {
    margin: 0 0 8px;
    font-size: 15px;
    color: #78350f;
    font-weight: 500;
    line-height: 1.6;
  }

  .phil-key-point p strong {
    color: #b45309;
    font-weight: 700;
  }

  .phil-key-point ul {
    margin: 6px 0 0;
    padding-left: 22px;
    font-size: 13.5px;
    color: #78350f;
    line-height: 1.7;
  }

  .phil-key-point li { margin-bottom: 2px; }
  .phil-key-point li strong { color: #b45309; }

  .phil-callout {
    background: #f0fdf4;
    border-left: 3px solid #059669;
    padding: 12px 16px;
    margin-top: 12px;
    border-radius: 4px;
    font-size: 13.5px;
  }

  .phil-callout strong {
    color: #047857;
    display: block;
    margin-bottom: 4px;
  }

  .phil-callout ul {
    margin: 4px 0 0;
    padding-left: 20px;
  }

  .phil-callout li { margin-bottom: 2px; }

  .phil-points-hint {
    font-size: 11.5px;
    color: var(--text-soft);
    margin-bottom: 6px;
    font-style: italic;
  }

  .phil-points {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .phil-points > li {
    padding: 10px 0 10px 24px;
    border-bottom: 1px dashed var(--border);
    position: relative;
    font-size: 14px;
    line-height: 1.7;
  }

  .phil-points > li:last-child { border-bottom: none; }

  .phil-points > li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    font-weight: 700;
    color: var(--primary);
  }

  .phil-card-support .phil-points > li::before { color: #059669; }

  .phil-points strong {
    color: var(--text);
    font-weight: 700;
  }

  /* Always-visible point summary (heading for each principle) */
  .phil-points .phil-point-summary {
    display: block;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 4px;
  }

  .phil-points .phil-point-summary strong {
    color: var(--text);
    font-weight: 700;
  }

  /* Inline example inside a principle detail (実例カードを埋め込み) */
  .phil-point-example {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
  }

  .phil-point-example .phil-example {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .phil-point-example .phil-example-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
    border-left: none;
    padding: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .phil-point-example .phil-example-title::before {
    content: '具体例 — ';
    color: var(--text-soft);
    font-weight: 600;
  }

  .phil-point-example .phil-example-grid {
    gap: 10px;
  }

  .phil-point-example .phil-example-card {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.6;
  }

  .phil-point-example .phil-example-tag {
    font-size: 10.5px;
    padding: 2px 8px;
    margin-bottom: 6px;
  }

  .phil-point-example .phil-example-line {
    margin-bottom: 5px;
  }

  .phil-point-example .phil-example-arrow {
    font-size: 11.5px;
    margin: 4px 0;
  }

  .phil-point-detail {
    margin-top: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border-left: 3px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.85;
    color: #374151;
  }

  .phil-card-understand .phil-point-detail {
    border-left-color: #93c5fd;
    background: #eff6ff;
  }

  .phil-card-support .phil-point-detail {
    border-left-color: #6ee7b7;
    background: #ecfdf5;
  }

  .phil-point-detail strong {
    color: var(--text);
    font-weight: 700;
  }

  .phil-order-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 14px 18px;
    text-align: center;
    font-size: 14px;
    color: #92400e;
    margin: 8px 0 32px;
  }

  .phil-order-note strong { color: #78350f; }

  /* 3. Examples */
  .phil-examples-intro {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 20px;
  }

  .phil-examples {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .phil-example {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
  }

  .phil-example-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
  }

  .phil-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  @media (max-width: 760px) {
    .phil-example-grid { grid-template-columns: 1fr; }
  }

  .phil-example-card {
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13.5px;
    line-height: 1.65;
  }

  .phil-good {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
  }

  .phil-bad {
    background: #fef2f2;
    border: 1px solid #fecaca;
  }

  .phil-example-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
  }

  .phil-good .phil-example-tag {
    background: #059669;
    color: white;
  }

  .phil-bad .phil-example-tag {
    background: #dc2626;
    color: white;
  }

  .phil-example-line {
    margin-bottom: 8px;
    color: var(--text);
  }

  .phil-example-line:last-child { margin-bottom: 0; }

  .phil-example-arrow {
    font-size: 12.5px;
    color: var(--text-soft);
    margin: 6px 0;
    padding-left: 4px;
    font-style: italic;
  }

  .phil-example-note {
    color: var(--text-soft);
    font-size: 12px;
    font-style: italic;
  }
