/*!
 * profile-sections.css
 * renderCalc / renderIndicators / renderTraits 用の共通スタイル
 * apps/profile と apps/compat 双方で利用
 */

.profile {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 24px 28px; margin: 18px 0;
}
.mp-title {
  /* 相性モーダル H2 とスタイル統一 */
  margin: 0 0 14px; padding-bottom: 8px;
  font-size: 16px; color: #4c1d95;
  border-bottom: 2px solid #c4b5fd;
}
.profile h2.sec {
  margin: 24px 0 10px; padding-bottom: 4px;
  font-size: 15px; color: #4c1d95;
  border-bottom: 1px solid #ddd6fe;
}
.profile h3 {
  margin: 16px 0 6px;
  font-size: 13.5px; color: #6b21a8;
}
.profile p { margin: 6px 0; }
.profile ul { margin: 4px 0 8px; padding-left: 24px; }
.profile ul li { margin: 2px 0; }

table.rows-table, table.key-table {
  width: 100%; border-collapse: collapse; margin: 10px 0;
  background: #fff; font-size: 13px;
}
table.rows-table th, table.rows-table td,
table.key-table th, table.key-table td {
  border: 1px solid #e5e7eb; padding: 7px 10px; text-align: center;
  vertical-align: middle;
}
table.rows-table th, table.key-table th {
  background: #f3f4f6; color: #4b5563; font-size: 11px; font-weight: 600;
}
table.rows-table td.stage { background: #fafaf9; font-weight: 600; text-align: left; }
table.key-table td:first-child { font-weight: 600; background: #fafaf9; width: 22%; }
table.key-table td:nth-child(2) { width: 30%; }
table.key-table td:last-child { text-align: left; font-size: 12px; color: #4b5563; }

.tag-string {
  background: #f5f3ff; border-left: 4px solid #8b5cf6;
  padding: 10px 14px; border-radius: 0 8px 8px 0;
  font-size: 14px; margin: 12px 0;
}
.tag-string strong { color: #5b21b6; }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 6px;
  border-radius: 11px; font-size: 11px; font-weight: 600;
  border: 1px solid rgba(0,0,0,0.1);
  vertical-align: middle;
}
.chip-na { background: #f3f4f6; color: #9ca3af; }

.trait {
  background: #fafafa; border: 1px solid #e5e7eb;
  border-left: 3px solid #a78bfa;
  border-radius: 0 8px 8px 0;
  padding: 12px 18px; margin: 10px 0;
}
.trait h3 { margin-top: 0; color: #5b21b6; }

.two-col,
.three-col {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}
.two-col   { grid-template-columns: 1fr 1fr; }
.three-col { grid-template-columns: 1fr 1fr 1fr; }
.two-col .col-front,
.two-col .col-back,
.two-col .col-layer,
.two-col .col-group,
.three-col .col-front,
.three-col .col-back,
.three-col .col-layer,
.three-col .col-group {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
}
.two-col .col-front, .three-col .col-front { border-top: 3px solid #f59e0b; }
.two-col .col-back,  .three-col .col-back  { border-top: 3px solid #06b6d4; }
.two-col .col-layer, .three-col .col-layer { border-top: 3px solid #8b5cf6; }
.two-col .col-group, .three-col .col-group { border-top: 3px solid #10b981; }
.two-col .col-title,
.three-col .col-title {
  font-weight: 600; font-size: 13px;
  padding-bottom: 6px; margin-bottom: 8px;
  border-bottom: 1px dashed #e5e7eb;
}
.two-col .col-front .col-title, .three-col .col-front .col-title { color: #b45309; }
.two-col .col-back  .col-title, .three-col .col-back  .col-title { color: #0e7490; }
.two-col .col-layer .col-title, .three-col .col-layer .col-title { color: #6d28d9; }
.two-col .col-group .col-title, .three-col .col-group .col-title { color: #047857; }
.sx-type {
  font-weight: 600;
  background: #d1fae5;
  color: #047857;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 13px;
}
/* ─────────────────────────────────────
   要素呼称見出し（一時的な開発用ラベル）
   モーダル内の各要素にうっすら付ける見出し。
   不要になったら以下 3 クラスを CSS から消すか、display:none で隠す。
   ───────────────────────────────────── */
.nv-section-label {
  display: block;
  font-size: 10px;
  color: #cbd5e1;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 10px 0 4px;
  padding-bottom: 2px;
  border-bottom: 1px dashed #e5e7eb;
}
.nv-label {
  /* 加藤さん指示 2026-07-10: tn-heading 相当の見出しスタイルに変更 (メタ見出しから読者向け見出しへ) */
  /* 加藤さん指示 2026-08-01: バッジと見出しテキストを縦中央揃えするため flex 化 */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-weight: 600;
  color: #1f2937;
  font-size: 17px;
  letter-spacing: 0.02em;
  margin: 10px 0 2px;
}
/* 加藤さん指示 2026-08-01: 「あなたとの関係性」ラベル末尾に付ける
   関係性カテゴリバッジ (調和/順流/逆流/経由/同列順流/同列逆流) */
.nv-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.nv-cat-badge .mat-icon { font-size: 14px; line-height: 1; }
.nv-paragraph p,
.mp-tab-panel .dp-item p { margin: 2px 0 14px; }
/* 加藤さん指示 2026-07-29: 「あなたとの関係性」の heading リストは ul/li で構造化 */
.nv-paragraph .nv-state-list {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 14px;
}
.nv-paragraph .nv-state-list li {
  padding-left: 1em;
  position: relative;
  margin: 2px 0;
  line-height: 1.6;
  font-size: 15px;
}
.nv-paragraph .nv-state-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: #6b7280;
}
/* 詳細な関係性セクション
   .nv-paragraph 配下／.mp-tab-panel 配下のどちらでも適用される */
.nv-paragraph .dp-item,
.mp-tab-panel .dp-item { margin: 10px 0; }
.nv-paragraph .dp-pending,
.mp-tab-panel .dp-pending {
  color: #9ca3af;
  font-size: 12.5px;
  font-style: italic;
  margin: 4px 0;
}
.nv-paragraph .dp-pair,
.mp-tab-panel .dp-pair {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  gap: 2px;
  color: #4b5563;
  margin: 0 0 4px;
  /* font-size は共通 p スタイルに準拠 (加藤さん指示 2026-07-25) */
}
/* 加藤さん指示 2026-07-25: dp-heading が長文の時、
   左のアイコン群 (dp-chip-wrap / connector) を縮ませず、
   dp-heading 側だけ折り返すよう flex 幅制御。 */
.nv-paragraph .dp-pair > *,
.mp-tab-panel .dp-pair > * {
  flex-shrink: 0;
}
.nv-paragraph .dp-pair .dp-heading,
.mp-tab-panel .dp-pair .dp-heading {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}
.nv-paragraph .dp-chip,
.mp-tab-panel .dp-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.08);
  user-select: none;
}
.nv-paragraph .dp-chip-wrap,
.mp-tab-panel .dp-chip-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  vertical-align: middle;
}
.nv-paragraph .dp-chip-role,
.mp-tab-panel .dp-chip-role {
  font-size: 10px;
  color: #6b7280;
  line-height: 1;
  letter-spacing: 0.5px;
}
.nv-paragraph .dp-label,
.mp-tab-panel .dp-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-left: 2px;
}
.nv-paragraph .dp-heading,
.mp-tab-panel .dp-heading {
  font-weight: 600;
  color: #1f2937;
  margin-left: 4px;
}
/* 追補3-E: 現象名バッジ (ルビ付き) — 加藤さん指示 2026-07-15: 表記不要のため非表示 */
.nv-paragraph .dp-phenom-name,
.mp-tab-panel .dp-phenom-name {
  display: none;
  /* 復活時は以下を戻す:
  display: inline-block;
  font-size: 11px;
  color: #9ca3af;
  margin: 0 6px 0 4px;
  letter-spacing: 0.5px;
  */
}
.nv-paragraph .dp-block,
.mp-tab-panel .dp-block {
  margin: 4px 0;
  line-height: 1.55;
}
.nv-paragraph .dp-block-label,
.mp-tab-panel .dp-block-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: 1px;
}
.nv-heading {
  font-weight: 600;
  margin: 4px 0 0;
  color: #1f2937;
}
.clickable-type {
  cursor: pointer;
  color: #5b21b6;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-style: dotted;
}
.clickable-type:hover {
  color: #4c1d95;
  background: #f5f3ff;
  border-radius: 3px;
}
.two-col ul, .three-col ul { margin: 0; padding-left: 18px; }
.two-col li, .three-col li { font-size: 12.5px; margin: 3px 0; line-height: 1.75; }
@media (max-width: 900px) {
  .three-col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .two-col,
  .three-col { grid-template-columns: 1fr; }
}

/* プラス面・マイナス面の2カラム箇条書き */
.pm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}
.pm-grid .pm-col { font-size: 12px; }
.pm-grid .pm-head {
  font-weight: 600; font-size: 11.5px;
  margin-bottom: 4px; padding: 2px 0;
}
.pm-grid .pm-plus .pm-head { color: #15803d; }
.pm-grid .pm-minus .pm-head { color: #b91c1c; }
.pm-grid .pm-business .pm-head { color: #0369a1; }
.pm-grid .pm-family   .pm-head { color: #be185d; }
.pm-grid ul { margin: 0; padding-left: 18px; }
.pm-grid li { margin: 2px 0; line-height: 1.7; }
.pm-grid .pm-plus li { color: #166534; }
.pm-grid .pm-minus li { color: #991b1b; }
.pm-grid p { margin: 0; line-height: 1.7; }
.pm-grid .pm-business p { color: #075985; }
.pm-grid .pm-family   p { color: #9d174d; }

/* 社会性カードの「適職／特性」縦積み（旧 .pm-grid 2 カラムを廃止） */
.tr-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}
.tr-stack .tr-block { font-size: 12px; }
.tr-stack .tr-head {
  font-weight: 600; font-size: 11.5px;
  margin-bottom: 4px; padding: 2px 0;
}
.tr-stack .tr-jobs .tr-head     { color: #0369a1; }
.tr-stack .tr-personal .tr-head { color: #be185d; }
.tr-stack p { margin: 0; line-height: 1.7; }
.tr-stack .tr-jobs p     { color: #075985; }
.tr-stack .tr-personal p { color: #9d174d; }

/* 詳細情報ブロック */
.sd-detail { margin-top: 10px; }
.sd-detail-head {
  font-size: 13px; color: #5b21b6;
  margin-bottom: 4px;
}
.sd-detail .dn-list { padding-left: 22px; margin: 0; }
.sd-detail .dn-list li { font-size: 12.5px; line-height: 1.6; color: #1f2937; margin: 4px 0; }
.sd-detail .dn-list strong { color: #0369a1; }

/* 詳細情報ボタン */
.sd-detail-open {
  display: block;
  margin: 10px auto 0;
  padding: 6px 16px;
  background: #fff; color: #5b21b6;
  border: 1px solid #c4b5fd;
  border-radius: 14px;
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sd-detail-open:hover {
  background: #5b21b6; color: #fff;
}

/* レイヤー構造詳細ボタン */
.dp-detail-open {
  display: inline-block;
  margin: 8px 0 0;
  padding: 6px 14px;
  background: transparent;
  color: #06b6d4; border: 1px solid #06b6d4;
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.dp-detail-open:hover { background: #ecfeff; }

table.tg-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; background: #fff; margin: 8px 0;
}
table.tg-table th, table.tg-table td {
  border: 1px solid #e5e7eb; padding: 6px 10px;
  text-align: left; vertical-align: top;
}
table.tg-table thead th {
  background: #f3f4f6; color: #4b5563;
  font-size: 11px; text-align: center;
}
table.tg-table .tg-side {
  background: #fafaf9; font-weight: 600; color: #4b5563;
  text-align: center; width: 14%;
}
table.tg-table .tg-mean { color: #4b5563; font-size: 11.5px; }

.tg-combo {
  margin: 10px 0 4px; padding: 8px 14px;
  background: #f5f3ff; border-left: 4px solid #8b5cf6;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px; color: #4c1d95; line-height: 1.6;
}
.tg-pattern {
  margin: 10px 0 4px; padding: 10px 14px;
  background: #fefce8; border: 1px solid #fde68a;
  border-left: 4px solid #ca8a04;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px; line-height: 1.95;
}
.tg-pattern-head { color: #92400e; margin-bottom: 6px; }
.tg-pattern-head strong { color: #b45309; font-size: 13.5px; }
.tg-pattern-body { color: #78350f; }
.tg-pattern-body > div { margin: 2px 0; }
.tg-pattern-label {
  display: inline-block; min-width: 56px;
  color: #a16207; font-weight: 600; margin-right: 4px;
}
.tg-pattern-body strong { color: #b45309; }

.tg-match {
  margin: 10px 0 0; padding: 10px 14px;
  background: #ecfeff; border: 1px solid #67e8f9;
  border-left: 4px solid #06b6d4;
  border-radius: 0 6px 6px 0;
  font-size: 12px; line-height: 1.95;
}
.tg-match > strong:first-child {
  display: block; color: #0e7490; margin-bottom: 6px;
  font-size: 12.5px;
}
.tg-tag { display: inline-block; margin: 4px 0 8px; font-size: 12px; color: #0c4a6e; }
.tg-tag-value {
  display: inline-block; padding: 2px 10px;
  background: #06b6d4; color: #fff;
  border-radius: 12px; font-weight: 600; font-size: 13px;
  letter-spacing: 0.05em;
}
.tg-match ul { margin: 6px 0 0; padding-left: 20px; }
.tg-match li { margin: 3px 0; color: #0c4a6e; }
.tg-match strong { color: #0369a1; }

.tag-meaning {
  list-style: none; margin-left: -22px; margin-top: 10px;
  background: #fef3c7; border-left: 4px solid #f59e0b;
  border-radius: 0 6px 6px 0;
  padding: 8px 14px;
  font-size: 12.5px; line-height: 1.6; color: #78350f;
}
.tag-meaning > strong:first-child { color: #b45309; margin-right: 4px; }

.dn-block {
  list-style: none; margin-left: -22px; margin-top: 6px;
}
.dn-block > strong {
  display: inline;
}
.dn-list { list-style: disc; padding-left: 22px; margin: 0; }
.dn-list li { font-size: 12px; line-height: 1.6; color: #0c4a6e; margin: 4px 0; }
.dn-list strong { color: #0369a1; }

/* .dn-summary の装飾（青枠など）は不要のため削除。レイアウトのみ最低限残す。 */
.dn-summary {
  margin-top: 8px;
}
/* ─────────────────────────────────────
 * ブラッシュアップ用：本文 A〜H は全てフラット表示
 *   ラベル（A〜H ＋ 日本語説明）と セクション見出し（強み／注意） は構造のため残す
 * ───────────────────────────────────── */
.nv-item {
  margin: 8px 0;
}
.nv-meta {
  /* セクション識別ラベル（A/B/… ＋ 「フック文 — …」「タグライン + 性質キャッチ — …」等の説明）は
     ブラッシュアップ中の一時非表示。再表示するときは display:flex に戻す。 */
  display: none;
}
.nv-id {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: #475569; color: #fff;
  border-radius: 50%; font-weight: 600;
  font-size: 10px;
}
.nv-src {
  color: #6b7280;
  font-size: 10.5px;
  background: #f3f4f6;
  padding: 1px 8px; border-radius: 3px;
  letter-spacing: 0.02em;
}

/* 本文（A〜H）：全部同じスタイルで揃える */
.nv-tagline,
.nv-hook,
.nv-p,
.nv-sticky,
.nv-common,
.nv-strength-ext,
.nv-caution-advice {
  margin: 4px 0;
  padding: 0;
  background: none; border: none; border-left: none; border-bottom: none;
  color: #0f4659;
  font-size: 12.5px;
  font-weight: normal;
  font-style: normal;
  line-height: 2.0;
  letter-spacing: normal;
  border-radius: 0;
}

/* セクション見出し（【強みが活きる時】／【気をつけたい時】）はそのまま残す */
.nv-block {
  margin-top: 10px;
}
.nv-block-head {
  font-size: 12px; font-weight: 600;
  margin-bottom: 4px;
  padding: 2px 6px;
  display: inline-block;
  border-radius: 4px;
}
.nv-block.nv-strength-block,
.nv-block.nv-caution-block {
  background: none; border: none; padding: 0;
}
.nv-strength { color: #15803d; background: #dcfce7; }
.nv-caution  { color: #b91c1c; background: #fee2e2; }
.nv-block.nv-strength-block { background: #f0fdf4; border: 1px solid #bbf7d0; }
.nv-block.nv-caution-block  { background: #fef2f2; border: 1px solid #fecaca; }
.nv-strength-ext { color: #166534; }
.nv-caution-advice { color: #7f1d1d; font-size: 12px; margin-top: 6px; }
/* .dn-summary strong の青色装飾も削除（dn-summary 自体の装飾廃止に合わせる） */

.trait > ul > li.tr-codes { list-style: none; margin-left: -22px; }
.trait > ul > li.tr-compact-line { list-style: none; margin-left: -22px; }
.tr-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 16px; padding: 3px 10px;
  font-size: 12px; margin-right: 6px;
}
.clickable-digit { transition: filter .12s; }
.clickable-digit:hover { filter: brightness(1.1); }

/* ─────────────────────────────────────
 * 人物特性ナラティブ（タグライン直下、構成する色の直上）
 *   docs/concepts/07-narrative-rule.md に基づく 3 段落構成
 *   ── 他のナラティブテキスト（hook/tagline）と同じ見た目に統一
 * ─────────────────────────────────────*/
.nv-personal {
  margin: 8px 0;
}
.nv-personal p {
  margin: 0 0 4px 0;
  line-height: 1.7;
}
.nv-personal p:last-child {
  margin-bottom: 0;
}

/* ─────────────────────────────────────
 * 構成する色（B タグライン直下、C 性質キャッチ統合）
 *   各数字（チップ）が小見出し、narrSticky が説明文
 * ─────────────────────────────────────*/
.cc-list {
  margin: 4px 0;
  padding: 0;
  background: none; border: none;
}
.cc-item {
  margin: 6px 0;
  padding: 0;
  color: #1f2937;
}
.cc-head {
  display: flex; align-items: center;
  gap: 6px;
  margin-bottom: 2px;
  /* font-size / line-height は共通 p スタイルに準拠 (mp-tab-panel 継承 15px / 1.8) */
}
/* 「〇〇さんの特性」見出しのチップを 関係性チップと同じ正円スタイルに揃える */
.cc-head .chip {
  width: 26px;
  height: 26px;
  min-width: 26px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
}
.cc-trait {
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
  margin-right: 2px;
}
.cc-title {
  font-weight: 600;
  color: #1f2937;
}
.cc-desc {
  padding-left: 0;
  margin-bottom: 10px;
  /* font-size / line-height / color / letter-spacing は共通 p スタイルに準拠 */
}
/* 加藤さん指示 2026-07-25: cc-desc-shadow は改行しない (601px 以上で block 化していた指定を撤去) */

.sx-open, .calc-open-modal {
  display: inline-block; margin: 6px 0;
  padding: 6px 14px; background: transparent;
  color: #06b6d4; border: 1px solid #06b6d4;
  border-radius: 6px; font-size: 12px;
  cursor: pointer; font-weight: 600;
}
.sx-open:hover, .calc-open-modal:hover { background: #ecfeff; }

/* 数字構成アコーディオン（旧） */
.acc-accordion { margin: 4px 0; }
.acc-toggle {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600;
  color: #5b21b6;
  background: transparent;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.acc-toggle::-webkit-details-marker { display: none; }
.acc-toggle::after { content: ' ▼'; font-size: 9px; margin-left: 4px; }
.acc-accordion[open] .acc-toggle::after { content: ' ▲'; }
.acc-toggle:hover { background: #f5f3ff; }
.acc-accordion[open] .cc-list { margin-top: 8px; }

/* 数字構成: 表面意識・潜在意識ヘッダー */
.comp-summary {
  display: flex;
  gap: 12px;
  margin: 6px 0 10px;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  flex-wrap: wrap;
}
.comp-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.comp-summary-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
}

/* ─────────────────────────────────────────
   プロファイルモーダル下部タブUI
   （特性 / との関係性 / との因果）
   CSS-only: 隠した radio + label で切替
   ───────────────────────────────────────── */
.mp-tabs {
  margin: 24px 0 0;
  padding-top: 16px;
  /* 加藤さん指示 2026-07-25: 上部の border を削除 */
}
.mp-tab-radio { display: none; }
.mp-tabs-heading {
  display: none;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}
.mp-tab-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid #d1d5db;
  flex-wrap: nowrap;
}
.mp-tab-button {
  /* 加藤さん指示 2026-07-27: font-size 15px */
  /* 加藤さん指示 2026-07-30: タブは無彩色 */
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 8px 16px;
  font-size: 15px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  user-select: none;
  position: relative;
  bottom: -1px;
  white-space: nowrap;
}
.mp-tab-button:hover { background: #f3f4f6; }
.mp-tab-panel {
  display: none;
  padding: 4px 0;
  /* 段落テキスト共通スタイル (加藤さん指示 2026-07-25)。
     見出し (dp-heading = bold) と本文 (dp-item p = 400) はサイズ同等、weight で差を出す。 */
  font-size: 15px;
  line-height: 1.6;
  color: #222;
  font-weight: 400;
  letter-spacing: 0.100em;
  font-feature-settings: "palt";
}

/* 単独タブ */
.mp-tabs-single .mp-tab-button.active {
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  border-color: #d1d5db;
  border-bottom: 2px solid #fff;
}
.mp-tabs-single .mp-tab-panel.active { display: block; }

/* 複数タブ時: radio:checked で切替（最大3タブ） */
.mp-tab-radio-0:checked ~ .mp-tab-buttons .mp-tab-button:nth-of-type(1),
.mp-tab-radio-1:checked ~ .mp-tab-buttons .mp-tab-button:nth-of-type(2),
.mp-tab-radio-2:checked ~ .mp-tab-buttons .mp-tab-button:nth-of-type(3) {
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  border-color: #d1d5db;
  border-bottom: 2px solid #fff;
}
.mp-tab-radio-0:checked ~ .mp-tab-panel-0,
.mp-tab-radio-1:checked ~ .mp-tab-panel-1,
.mp-tab-radio-2:checked ~ .mp-tab-panel-2 {
  display: block;
}

/* タブ内の内側ラベル（「○○の特性」等）はタブ名と重複するので非表示 */
.mp-tab-panel .nv-label { display: none; }
.mp-tab-panel .sd-detail { margin: 0; }
.mp-tab-panel .nv-paragraph { margin-top: 0; }

/* 加藤さん指示 2026-07-25: 狭幅時、data-short 属性で短縮ラベルを表示。
   本文は font-size:0 で非表示、::before の擬似要素で短縮を 16px 描画。 */
@media (max-width: 520px) {
  .mp-tabs-3 .mp-tabs-heading { display: block; }
  .mp-tabs-3 .mp-tab-button {
    font-size: 0;
    padding: 6px 8px;
  }
  .mp-tabs-3 .mp-tab-button::before {
    content: attr(data-short);
    font-size: 15px;
  }
}

/* ─── モーダル上位タブ (mmt-tabs) ─────────────────
   「あなたと○○の物語」/「○○さんのひかり」を切替。加藤さん指示 2026-07-10。
   ラベルが長いため mp-tabs より横に広くゆとりを持たせる */
.mmt-modal-heading {
  font-size: 19px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: 0.02em;
  margin: 4px 0 14px;
  /* 加藤さん指示 2026-07-25: 下線を削除 */
}
.mmt-tabs { position: relative; }
.mmt-tab-radio { display: none; }
/* 加藤さん指示 2026-07-25: mmt-tab-* は mp-tab-* のスタイルを踏襲して共通化 */
.mmt-tab-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid #d1d5db;
  flex-wrap: nowrap;
}
.mmt-tab-button {
  /* 加藤さん指示 2026-07-27: font-size 15px */
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  padding: 8px 16px;
  font-size: 15px;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  user-select: none;
  position: relative;
  bottom: -1px;
  white-space: nowrap;
}
.mmt-tab-button:hover { background: #f3f4f6; }
.mmt-tab-panel {
  display: none;
  padding: 4px 0;
}
.mmt-tab-radio-0:checked ~ .mmt-tab-buttons .mmt-tab-button:nth-of-type(1),
.mmt-tab-radio-1:checked ~ .mmt-tab-buttons .mmt-tab-button:nth-of-type(2) {
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  border-color: #d1d5db;
  border-bottom: 2px solid #fff;
}
.mmt-tab-radio-0:checked ~ .mmt-tab-panel-0,
.mmt-tab-radio-1:checked ~ .mmt-tab-panel-1 {
  display: block;
}

/* 加藤さん指示 2026-07-27: font-size 15px */
@media (max-width: 520px) {
  .mmt-tab-button {
    padding: 8px 10px;
    font-size: 15px;
  }
}

/* 各パネル末尾のナビゲーション (相互切替ボタン)。加藤さん指示 2026-07-11。 */
.mmt-panel-nav {
  margin-top: 28px;
  padding-top: 18px;
  text-align: right;
  /* 加藤さん指示 2026-07-25: 上部の border を削除 */
}
.mmt-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  background: #1f2937;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  user-select: none;
  transition: background 0.15s;
  line-height: 1;
}
.mmt-nav-btn .mat-icon {
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: 0;
}
.mmt-nav-btn:hover { background: #111827; }
@media (max-width: 520px) {
  .mmt-panel-nav { text-align: center; }
  .mmt-nav-btn {
    padding: 10px 18px;
    font-size: 13px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

/* 詳細情報ブロック アコーディオン */
.acc-info {
  margin: 12px 0 0;
}
.acc-info-toggle {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600;
  color: #5b21b6;
  background: transparent;
  border: 1px solid #c4b5fd;
  border-radius: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.acc-info-toggle::-webkit-details-marker { display: none; }
.acc-info-toggle::after { content: ' ▼'; font-size: 9px; margin-left: 4px; }
.acc-info[open] .acc-info-toggle::after { content: ' ▲'; }
.acc-info-toggle:hover { background: #f5f3ff; }
.acc-info[open] > .sd-detail,
.acc-info[open] > .nv-paragraph {
  margin-top: 10px;
}
/* 詳細情報内のレイヤー構成表は小さめに */
.acc-info table.rows-table {
  font-size: 11px;
  margin: 6px 0;
}
.acc-info table.rows-table th,
.acc-info table.rows-table td {
  padding: 4px 8px;
}
.acc-info table.rows-table th {
  font-size: 10px;
}

/* ─────── 数字詳細モーダル ─────── */
.dm-header {
  padding: 22px 24px 18px;
  border-radius: 12px 12px 0 0;
}
.dm-header .num { font-size: 44px; font-weight: 600; line-height: 1; }
.dm-header .yomi { font-size: 20px; font-weight: 600; margin-top: 4px; }
.dm-header .colorname { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.dm-body { padding: 18px 22px 22px; }
.dm-essence {
  font-size: 13px; line-height: 1.6;
  background: #f5f3ff; border-left: 3px solid #8b5cf6;
  padding: 10px 14px; border-radius: 0 6px 6px 0;
  margin: 0 0 14px;
}
.dm-heading {
  margin: 0 0 10px; font-size: 15px; font-weight: 600;
  color: #1f2937; line-height: 1.6;
}
.dm-desc {
  margin: 0; font-size: 13px; line-height: 1.6; color: #1f2937;
}
.dm-body table { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
.dm-body th, .dm-body td {
  padding: 6px 10px; border: 1px solid #e5e7eb;
  text-align: left; vertical-align: top;
}
.dm-body th { background: #f9fafb; color: #4b5563; font-weight: 600; width: 32%; font-size: 11px; }
.dm-comb {
  margin: 14px 0 0; padding: 10px 14px;
  background: #fef9c3; border-radius: 6px;
  font-size: 12px; line-height: 1.6; color: #78350f;
}

/* ─────── 社会性マトリクスモーダル ─────── */
.sx-title {
  margin: 0 0 16px; font-size: 18px; color: #4c1d95;
  padding-bottom: 10px; border-bottom: 2px solid #c4b5fd;
}
table.sx-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; background: #fff;
}
table.sx-table th, table.sx-table td {
  border: 1px solid #e5e7eb; padding: 7px 10px;
  text-align: left; vertical-align: top;
}
table.sx-table thead th {
  background: #f3f4f6; color: #4b5563;
  font-size: 11px; text-align: center;
}
table.sx-table tbody th {
  background: #fafaf9; color: #4b5563;
  font-weight: 600; width: 18%; text-align: center;
}

/* ─────── 計算方法モーダル ─────── */
#calcModalBody { padding: 24px 28px; }
.calc-modal-title {
  margin: 0 0 12px; font-size: 17px; color: #4c1d95;
  padding-bottom: 8px; border-bottom: 2px solid #c4b5fd;
}
.calc-intro {
  background: #f5f3ff; border-left: 3px solid #8b5cf6;
  padding: 8px 12px; border-radius: 0 6px 6px 0;
  font-size: 12.5px; line-height: 1.6; margin: 0 0 14px;
}
.calc-section { margin-bottom: 20px; }
.calc-section h3 {
  margin: 0 0 8px; font-size: 14px;
  color: #6b21a8; padding-bottom: 4px;
  border-bottom: 1px dashed #ddd6fe;
}
table.calc-table {
  width: 100%; border-collapse: collapse;
  margin: 6px 0; background: #fff; font-size: 12px;
}
table.calc-table th, table.calc-table td {
  border: 1px solid #e5e7eb; padding: 6px 10px;
  text-align: left; vertical-align: top;
  line-height: 1.7;
}
table.calc-table th {
  background: #fafaf9; color: #4b5563;
  font-weight: 600; text-align: center;
  width: 10%; font-size: 12px;
}
table.calc-table td.calc-val {
  background: #ecfdf5; color: #065f46;
  font-weight: 600; text-align: center;
  width: 18%; font-size: 13px;
}
.calc-note {
  background: #fef9c3; border-left: 3px solid #facc15;
  padding: 8px 12px; border-radius: 0 6px 6px 0;
  font-size: 11.5px; line-height: 1.6; color: #78350f;
  margin: 6px 0;
}
.calc-note strong { color: #b45309; }
.calc-result {
  margin: 8px 0 0; padding: 6px 12px;
  background: #ecfdf5; border-radius: 6px;
  font-size: 13px; color: #065f46;
}
.calc-result strong { font-size: 14px; }
.dn-cycles {
  margin: 6px 0 0; padding-left: 22px;
  font-size: 12px; line-height: 1.95;
}
.dn-cycles li { margin: 2px 0; }
.calc-rules {
  margin: 6px 0 12px; padding-left: 22px;
  font-size: 12px; line-height: 1.95;
}
.calc-rules li { margin: 4px 0; }
.calc-source {
  font-size: 11px; color: #6b7280; margin: 8px 0 0;
}
.calc-source a { color: #6d28d9; }
