/* HR AI Insight — Editorial UI (documents/01_upload_redesign.html · Variation B / .v-editorial) */
:root {
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --bg: var(--surface);
  --bg-subtle: var(--surface-2);
  --bg-muted: #ebebed;
  --bg-elevated: var(--surface);
  --text: #14161a;
  /* `--text` のエイリアス。コード内で `var(--text-primary)` 参照が広く使われるため
   * 揃えて定義しておく（未定義だと background/color が透明になり詰む）。 */
  --text-primary: var(--text);
  --text-secondary: #55595f;
  --text-tertiary: #8a8a82;
  --brand: #2b4a6e;
  --brand-ink: #1a2f48;
  --brand-50: #eaf0f6;
  --brand-100: #d3dfed;
  --accent: var(--brand);
  --accent-hover: var(--brand-ink);
  --accent-soft: rgba(43, 74, 110, 0.08);
  --ok: #2f7a4d;
  --ok-50: #e6f2ea;
  --warn: #b8761f;
  --warn-50: #fbf2e0;
  --err: #b23232;
  --err-50: #fbe9e6;
  --border: #e6e3dc;
  --border-strong: #d3cfc6;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --radius: var(--r-md);
  --radius-lg: var(--r-lg);
  --shadow: 0 1px 3px rgba(20, 22, 26, 0.06);
  --font: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --font-serif: "Fraunces", "Noto Serif JP", serif;
  --space: 24px;
  --max-width: 1280px;
  --sidebar-w: 248px;
  --header-h: 60px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
  letter-spacing: -0.01em;
  font-feature-settings: "palt";
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* <small> は親の文字の約 0.83 倍になり、13px を割ることがある。最小 13px にそろえる */
small {
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  align-items: stretch;
}

.app-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: var(--page-bg);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}
.app-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0 28px;
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}
.app-header__start {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  min-width: 0;
  flex: 1 1 auto;
}
/* ヘッダの「現在の分析対象」は分析画面の年度を支配する重要コントロール。
   ブランドカラーで全周ボーダー + 強めの背景にして視認性を上げる（§10 ルール準拠）。 */
.app-header__focus {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--brand);
  background: var(--brand-50);
}
.app-header__focus::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  background-color: var(--brand);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") center/contain no-repeat;
  flex-shrink: 0;
}
.app-header__focus-kicker {
  font-size: 13px;
  color: var(--brand-ink);
  white-space: nowrap;
  font-weight: 700;
}
.app-header__focus-select {
  min-width: 140px;
  max-width: 220px;
  font-size: 14px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--brand);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.app-header__focus-select:hover {
  background: var(--brand-100);
}
.app-header__focus-select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.is-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-header__spacer {
  flex: 1;
}

.app-header__nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.app-header__model-label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* 今の AI の利用プラン（標準プラン・詳細分析プラン）。幅の狭い画面でも隠さない */
.app-header__plan {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.app-header__model-select {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  max-width: 200px;
  font-family: inherit;
  cursor: pointer;
}
.app-header__model-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ヘッダー右端のログアウトリンク。AI モデル選択の隣に配置し、
   Lambda@Edge Cookie 認証を破棄して /login.html に戻す。
   margin-left で機能グループ（AI モデル）と認証グループ（ログアウト）を視覚分離する。 */
.app-header__logout {
  font-size: 13px;
  padding: 6px 12px;
  margin-left: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  text-decoration: none;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.app-header__logout:hover {
  background: var(--brand-50);
  color: var(--brand-ink);
  border-color: var(--brand);
}
.app-header__logout:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ヘッダー右端のユーザーメニュー（人のアイコン＋氏名。押すと会社名・ログインID・ログアウトを出す） */
.app-header__user {
  position: relative;
  margin-left: 16px;
}
.app-header__user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.app-header__user-btn:hover,
.app-header__user-btn[aria-expanded="true"] {
  background: var(--brand-50);
  border-color: var(--brand);
}
.app-header__user-btn:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.app-header__user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  flex-shrink: 0;
}
.app-header__user-btn:hover .app-header__user-avatar,
.app-header__user-btn[aria-expanded="true"] .app-header__user-avatar {
  background: var(--surface);
}
.app-header__user-avatar svg {
  display: block;
}
.app-header__user-name {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.app-header__user-chevron {
  display: block;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform 0.15s;
}
.app-header__user-btn[aria-expanded="true"] .app-header__user-chevron {
  transform: rotate(180deg);
}
.app-header__user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 260px;
  max-width: 340px;
  padding: 16px 0 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(20, 22, 26, 0.12);
}
.app-header__user-menu-name {
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.app-header__user-menu-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 12px 18px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.app-header__user-menu-list dt {
  color: var(--text-secondary);
  white-space: nowrap;
}
.app-header__user-menu-list dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.app-header__user-menu-id {
  font-family: var(--font-mono);
}
.app-header__user-menu-foot {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}
.app-header__user-menu-logout {
  display: block;
  width: 100%;
  padding: 10px 18px;
  border: 0;
  background: none;
  color: var(--err);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.app-header__user-menu-logout:hover {
  background: var(--err-50);
}
.app-header__user-menu-logout:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
@media (max-width: 1480px) {
  .app-header__user {
    margin-left: 6px;
  }
  .app-header__user-name {
    max-width: 6em;
  }
}

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--brand-ink);
  color: #c6d2e0;
  padding: 18px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
}

.sidebar-brand {
  padding: 0 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}
.sidebar-brand__mark {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sidebar-brand__sub {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 4px;
  line-height: 1.35;
}

.app-sidebar a.nav-item {
  display: grid;
  /* 番号削除に伴い 3 列 (32px badge + 22px icon + 1fr label) から
     2 列 (22px icon + 1fr label) に縮約 */
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  margin: 0 8px;
  border-radius: var(--r-md);
  color: #a5b5c5;
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1.3;
  text-decoration: none;
}
.app-sidebar a.nav-item:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  color: #e2ecf5;
}
.app-sidebar a.nav-item.is-active,
.app-sidebar a.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: 600;
}

.sidebar-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  color: inherit;
}
.sidebar-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}
.app-sidebar a.nav-item:hover .sidebar-icon,
.app-sidebar a.nav-item.is-active .sidebar-icon {
  opacity: 1;
}
.sidebar-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-group-label,
.nav-section-label {
  margin: 12px 20px 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
  line-height: 1.2;
}
.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 12px;
}
.sidebar-divider--sub {
  margin: 6px 20px;
}

/* 分析グループ内の階層表示: 課題選択の子として真因探索・仮説検証をインデントし、
   ホーム画面と同じ「ルート A / B」バッジで対応関係を示す（案C・ユーザー選定 2026-07-04。
   罫線は描かない = 同日のユーザー判断を踏襲）。
   文字をわずかに小さくして「子」であることを補強する */
.app-sidebar a.nav-item--child {
  margin-left: 32px;
  font-size: 13px;
}
.nav-route-badge {
  display: inline-block;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.58);
  white-space: nowrap;
}
.app-sidebar a.nav-item:hover .nav-route-badge,
.app-sidebar a.nav-item.is-active .nav-route-badge {
  color: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.45);
}
.sidebar-item-caption {
  margin: -2px 20px 4px 46px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.32);
}

.app-main {
  flex: 1 0 auto;
  box-sizing: border-box;
  padding: 32px 40px 100px;
  width: min(100%, calc(var(--max-width) + 80px));
  margin: 0;
  align-self: flex-start;
}

.hero {
  text-align: center;
  padding: 48px 20px 56px;
  animation: fadeIn 0.5s ease;
}

.hero h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 12px;
  line-height: 1.3;
}

/* ホーム: ツール概要紹介（hero 内）。中央配置・全周ボーダー（規約 §10）。 */
.hero-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.hero-intro__lead {
  max-width: none;
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-color);
}
.hero-intro__points {
  margin: 0;
  display: grid;
  gap: 12px;
}
.hero-intro__point {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 12px;
  align-items: baseline;
}
.hero-intro__point dt {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--brand-ink, var(--text-color));
}
.hero-intro__point dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}
@media (max-width: 600px) {
  .hero-intro__point {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ホーム: データを自分で見る（リンクの行） */
.menu-overview {
  padding: 24px 28px 28px;
}
.menu-overview__title {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.menu-overview__lead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.menu-overview__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.menu-overview__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.menu-overview__link:hover {
  background: var(--surface-3, #f0f0f0);
  border-color: var(--text-secondary);
  color: var(--text);
}
.menu-overview__link-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
}
.menu-overview__link-icon > svg {
  width: 14px;
  height: 14px;
}

/* ホーム: はじめかた（取込 → 課題 → 真因探索 または 仮説検証 → レポートと施策） */
.how-phase {
  margin: 0 0 22px;
}
.how-phase:last-child {
  margin-bottom: 0;
}
.how-phase__title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}
.how-phase--branch .how-phase__title {
  color: var(--text);
}
.how-routes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
/* 2 枚を横に並べるのは、説明文が 1 行に十分な文字数入る幅（1201px 以上）のときだけ */
@media (min-width: 1201px) {
  .how-routes {
    grid-template-columns: 1fr 1fr;
  }
}

.how-card {
  padding: 24px 28px 28px;
}
.how-card__title {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.how-flow {
  /* V-12 (2026-05-17): 04 番号重複を解消し、6 ステップ線形フローに統一。
     列: 6 つのステップ列 + 5 つの矢印列 = 11 列。 */
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
  /* 各ステップが内容の自然な高さに収まるよう start。 */
  align-items: start;
  column-gap: 0;
  row-gap: 14px;
  width: 100%;
}
/* 狭い画面では grid を折り返し flex に切り替え（矢印は非表示） */
@media (max-width: 1200px) {
  .how-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .how-flow .how-arrow {
    display: none;
  }
  .how-flow .how-step {
    flex: 1 1 calc(50% - 6px);
    min-width: 200px;
  }
}

/* V-12: 2 ルート分岐対応の柔軟なフロー（任意のステップ数に対応） */
.how-flow--linear {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  grid-template-columns: none;
  gap: 0;
  column-gap: 0;
  row-gap: 12px;
}
.how-flow--linear .how-step {
  flex: 1 1 0;
  min-width: 140px;
}
.how-flow--linear .how-arrow {
  flex: 0 0 auto;
}
@media (max-width: 1200px) {
  .how-flow--linear .how-arrow {
    display: none;
  }
  .how-flow--linear .how-step {
    flex: 1 1 100%;
  }
}
.how-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0 2px;
  color: var(--text-tertiary);
  opacity: 0.9;
}
.how-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}
/* 番号・アイコンを左、見出しと説明を右に並べる（横に広いカードで上下の余白を作らない） */
.how-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 14px;
  padding: 14px 18px;
  margin: 0;
  font: inherit;
  color: inherit;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.how-step:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
}
.how-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}
.how-step__num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.how-step__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  opacity: 0.88;
  transition: color 0.18s ease, opacity 0.18s ease;
}
.how-step__icon svg {
  display: block;
  width: 22px;
  height: 22px;
}
.how-step:hover .how-step__icon {
  color: var(--text);
  opacity: 1;
}
.how-step__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.how-step__num,
.how-step__icon {
  flex: 0 0 auto;
}
.how-step__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.35;
}
.how-step__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}
@media (max-width: 960px) {
  .how-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .how-arrow {
    padding: 6px 0;
    transform: rotate(90deg);
  }
  .how-step {
    flex: none;
    max-width: 100%;
  }
}

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

.card {
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: var(--space);
  animation: fadeIn 0.45s ease;
}

.card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.card .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn--primary {
  background: var(--brand);
  color: #fff;
}
.btn--primary:hover {
  background: var(--brand-ink);
}
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--secondary:hover {
  background: var(--surface-2);
}
.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}
.btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  text-align: center;
  background: var(--bg-subtle);
  transition: border-color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--border-strong);
  background: var(--bg-muted);
}

/* アップロード画面: データ分類カード（documents/01_upload_redesign.html · Editorial .v-editorial .drop） */
.upload-zones-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 980px) {
  .upload-zones-grid {
    grid-template-columns: 1fr;
  }
}

/* 参照: .v-editorial .drop — 点線の内側ドロップ枠は無し。全体が選択領域（透明 input オーバーレイ） */
.upload-zone--editorial {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  margin: 0;
  padding: 28px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.upload-zone--editorial:hover {
  border-color: var(--text);
  box-shadow: 0 14px 40px -20px rgba(20, 22, 26, 0.18);
}
.upload-zone--editorial.upload-zone--uploaded {
  border-color: var(--ok);
  background: linear-gradient(180deg, #fbfefb 0%, #fff 60%);
}
.upload-zone--editorial.is-dragover {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-50);
}

.upload-zone__input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-zone__num {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 36px;
  line-height: 1;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease;
}
.upload-zone--uploaded .upload-zone__num {
  color: var(--ok);
}

.upload-zone__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding-right: 48px;
}
.upload-zone__kind {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.upload-zone__req-mark {
  font-size: 13px;
  font-weight: 600;
  color: var(--warn);
  letter-spacing: 0.06em;
}
.upload-zone__req-mark--opt {
  color: var(--text-tertiary);
  font-weight: 500;
}

.upload-zone__title {
  margin: 2px 0 0;
  padding-right: 40px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--text);
  max-width: 80%;
}

.upload-zone__desc {
  flex: 1;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.upload-zone__desc .upload-zone-hint-line {
  margin: 0 0 6px;
}
.upload-zone__desc .upload-zone-hint-line:last-of-type {
  margin-bottom: 0;
}
.upload-zone__desc .upload-zone-hint-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.upload-zone__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  min-height: 30px;
  flex-wrap: wrap;
}

.upload-zone__cta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.upload-zone__cta-ic {
  flex-shrink: 0;
}

.upload-zone__file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
}
.upload-zone__fname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-zone__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  flex-shrink: 0;
}
.upload-zone__more {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.upload-zone__clear {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  margin: 0;
  padding: 2px 6px;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
}
.upload-zone__clear:hover {
  color: var(--err);
  background: var(--err-50);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data th,
table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .app-shell {
    grid-template-columns: 1fr;
  }
  .app-sidebar {
    display: none;
  }
  .hero h1 {
    font-size: 28px;
  }
}

/* ═══════════════════════════════════════════
   課題選択ページ
═══════════════════════════════════════════ */
/* app-main と同じコンテンツ幅（他画面と揃える。820px 制限は撤廃） */
.issue-select-page {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-bottom: 64px;
  box-sizing: border-box;
}

.issue-select-header {
  margin-bottom: 32px;
}
.issue-select-header__title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.issue-select-header__lead {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* 課題選択タブ */
.issue-select-tablist {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-subtle);
}
.issue-select-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 8px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.issue-select-tab:last-child {
  border-right: none;
}
.issue-select-tab:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.issue-select-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 -3px 0 var(--text);
}
.issue-select-tab__num {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.75;
}
.issue-select-tab.is-active .issue-select-tab__num {
  opacity: 1;
}
.issue-select-tab__text {
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
}
.issue-select-panels {
  min-height: 120px;
}
.issue-select-panel[hidden] {
  display: none !important;
}
.issue-select-panel.is-active:not([hidden]) {
  display: block;
}

.issue-method-section__head--tabbed {
  border-bottom: 1px solid var(--border);
}

/* ── メソッドセクション共通 ── */
.issue-method-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}
.issue-method-section--disabled {
  opacity: 0.7;
}

.issue-method-section__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--brand-ink);
}
.issue-method-section__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--text);
  margin-top: 3px;
}
.issue-method-section--ai .issue-method-section__num,
.issue-method-section--custom .issue-method-section__num,
.issue-method-section--preset .issue-method-section__num {
  background: var(--text);
}

.issue-method-section__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}
.issue-method-section__desc {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}
.issue-method-section__badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.issue-method-section__badge--warn {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.issue-method-section__body {
  padding: 24px 28px;
  background: var(--bg-subtle);
}
.issue-method-section__disabled-msg {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  padding: 4px 0;
}

/* ── セクション 1: AI抽出 ── */
.btn--ai {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn--ai:hover:not(:disabled) {
  opacity: 0.82;
  transform: translateY(-1px);
}
.btn--ai:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}
.btn__sub {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.72;
}
.ai-detect-status {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.ai-issue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .ai-issue-grid {
    grid-template-columns: 1fr;
  }
}

/* 比較モード時のセクション分け: 時系列の発見 / 最新時点の発見 */
.ai-issue-section {
  margin-top: 24px;
}
.ai-issue-section:first-of-type {
  margin-top: 8px;
}

/* V-12 A1: メタ課題ビュー（個別発見の上に表示） */
.meta-themes-section {
  margin: 8px 0 32px;
  padding: 20px 22px;
  background: var(--surface-2, #f7f7f7);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
}
.meta-themes-section__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.meta-themes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 1100px) {
  .meta-themes-grid {
    grid-template-columns: 1fr;
  }
}
/* 折りたたみ化（2026-07-11）: 既定は1行のバー。カード一覧の下に置くため、埋もれない程度に薄いブランド色を敷く */
.meta-themes-section--collapsible {
  padding: 0;
  background: var(--brand-50);
  border-color: var(--brand-100);
  overflow: hidden;
  /* カード一覧との間隔はカード間 gap（16px）と揃える。既存 .meta-themes-section の margin-top: 8px を上書き */
  margin-top: 16px;
}
.meta-themes-collapse {
  margin: 0;
}
.meta-themes-collapse__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.meta-themes-collapse__summary::-webkit-details-marker {
  display: none;
}
.meta-themes-collapse__summary::before {
  content: "▶";
  font-size: 13px;
  color: var(--brand);
  flex-shrink: 0;
}
.meta-themes-collapse[open] > .meta-themes-collapse__summary::before {
  content: "▼";
}
.meta-themes-collapse__summary:hover {
  background: var(--brand-100);
}
.meta-themes-collapse__label {
  font-weight: 700;
  color: var(--brand-ink);
  flex-shrink: 0;
}
.meta-themes-collapse__teaser {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}
.meta-themes-collapse[open] .meta-themes-collapse__teaser {
  visibility: hidden;
}
.meta-themes-collapse__hint {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-tertiary);
}
/* 開閉状態に応じてヒント文言を切り替える（展開後に閉じる手がかりを残す） */
.meta-themes-collapse__hint::before {
  content: "開いて確認";
}
.meta-themes-collapse[open] .meta-themes-collapse__hint::before {
  content: "閉じる";
}
.meta-themes-collapse__body {
  padding: 16px 22px 20px;
  background: var(--surface-2, #f7f7f7);
  border-top: 1px solid var(--brand-100);
}
.meta-themes-collapse__body .meta-themes-section__lead {
  margin: 0 0 14px;
}
.meta-theme-card {
  padding: 16px 18px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
}
.meta-theme-card__title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.meta-theme-card__description {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.meta-theme-card__related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
}
.meta-theme-card__related-label {
  font-size: 13px;
  color: var(--text-secondary);
}
.meta-theme-card__related-btn {
  padding: 3px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--surface-2, #f7f7f7);
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.meta-theme-card__related-btn:hover {
  background: var(--surface-3, #f0f0f0);
  border-color: var(--text-secondary);
  color: var(--text);
}
.meta-theme-card__details {
  margin: 4px 0 0;
}
.meta-theme-card__details > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.meta-theme-card__details > summary::-webkit-details-marker {
  display: none;
}
.meta-theme-card__details > summary::before {
  content: "▶";
  display: inline-block;
  font-size: 13px;
  transition: transform 0.15s ease;
}
.meta-theme-card__details[open] > summary::before {
  transform: rotate(90deg);
}
.meta-theme-card__details > summary:hover {
  color: var(--text);
}

/* V-12 A1: メタテーマ生成中のローディング表示 */
.meta-themes-loading {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--surface-2, #f7f7f7);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.meta-theme-card__reasoning {
  margin: 8px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  background: var(--surface-2, #f7f7f7);
  border-radius: var(--r-sm, 6px);
}

/* メタテーマから関連発見へジャンプしたときの一時ハイライト */
.finding-card--highlighted {
  outline: 2px solid var(--text);
  outline-offset: -2px;
  transition: outline-color 0.3s ease;
}
.ai-issue-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text, #111827);
}
.ai-issue-section__icon {
  color: var(--text-secondary, #6b7280);
  flex-shrink: 0;
}
.ai-issue-section__desc {
  margin: 0 0 12px 0;
  color: var(--text-secondary, #6b7280);
  font-size: 15px;
}
.ai-issue-section .ai-issue-grid {
  margin-top: 0;
}

/* 2026-10-26: 確かめが必要な変化（課題の判定とは別の枠。見出しと文だけで、色の囲みは付けない） */
.needs-check-section__list {
  margin: 0;
  padding-left: 20px;
}
.needs-check-section__list li {
  margin: 0 0 12px 0;
}
.needs-check-section__list p {
  margin: 0;
  font-size: 15px;
}
.needs-check-section__list .needs-check-section__note {
  margin-top: 4px;
  color: var(--text-secondary, #6b7280);
  font-size: 14px;
}

/* 視点指定抽出タブ */
.viewpoint-history-root {
  margin-bottom: 16px;
}
.viewpoint-history-empty {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 8px;
}
.viewpoint-history-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.viewpoint-history-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-subtle);
}
.viewpoint-history-item__row {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
}
.viewpoint-history-item__actions {
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
}
.viewpoint-history-item__other.btn--sm {
  font-size: 13px;
  padding: 6px 8px;
  line-height: 1.2;
  white-space: nowrap;
  border: none;
  border-radius: 0;
  min-width: 0;
}
.viewpoint-history-item__meta {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 4px 12px 8px 12px;
  line-height: 1.3;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.viewpoint-history-item__body {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.viewpoint-history-item__body:hover {
  background: var(--surface);
}
.viewpoint-history-item__text {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}
.viewpoint-dataset-badge {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.viewpoint-history-item__del {
  flex-shrink: 0;
  width: 36px;
  border: none;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.viewpoint-history-item__del:hover {
  background: var(--border);
  color: var(--text);
}
.viewpoint-history-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}
.viewpoint-dataset-pick-dialog {
  max-width: min(92vw, 480px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.viewpoint-dataset-pick-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.viewpoint-dataset-pick-dialog__inner {
  padding: 20px;
}
.viewpoint-dataset-pick-dialog__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}
.viewpoint-dataset-pick-dialog__lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.viewpoint-dataset-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(50vh, 320px);
  overflow: auto;
  margin-bottom: 12px;
}
.viewpoint-dataset-pick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.viewpoint-dataset-pick-item:hover {
  background: var(--bg-subtle);
  border-color: var(--text-tertiary);
}
.viewpoint-dataset-pick-item__label {
  font-weight: 600;
}
.viewpoint-dataset-pick-item__meta {
  font-size: 13px;
  color: var(--text-tertiary);
}
.viewpoint-dataset-pick-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.quality-score-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.viewpoint-form-group {
  margin-bottom: 12px;
}
.viewpoint-textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 96px;
}
.viewpoint-char-counter {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: right;
  margin-top: 4px;
}
.viewpoint-result-block {
  margin-top: 16px;
}
.viewpoint-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.viewpoint-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  line-height: 1.35;
}
.settings-viewpoint-count {
  font-size: 14px;
  margin: 8px 0 12px;
}

.viewpoint-process-panel {
  margin-bottom: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.viewpoint-process-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.process-step {
  display: flex;
  gap: 12px;
  padding-left: 6px;
  border-left: 3px solid var(--border-strong, var(--border));
}
.process-step__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.process-step__content {
  flex: 1;
  min-width: 0;
}
.process-step__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}
.process-step__body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
}
.process-step__body--muted {
  color: var(--text-secondary);
}
.viewpoint-focus-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.viewpoint-focus-list--excluded {
  color: var(--text-secondary);
}
.viewpoint-excluded-block {
  margin-top: 8px;
}
.viewpoint-excluded-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.viewpoint-material-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 4px;
  margin: 0;
  font-size: 13px;
}
.viewpoint-material-grid dt {
  color: var(--text-secondary);
}
.viewpoint-material-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 600;
}
.viewpoint-material-top {
  margin-top: 10px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.viewpoint-material-top__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.viewpoint-material-top__list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
}
.viewpoint-material-top__id {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  background: var(--bg-muted);
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
}

.viewpoint-plan-toggle {
  margin-top: 8px;
}
.viewpoint-plan-toggle__label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}
.viewpoint-plan-toggle__label input {
  margin-top: 3px;
}
.viewpoint-plan-toggle__hint {
  margin: 6px 0 0 28px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.viewpoint-progress-root {
  margin-top: 14px;
}

/* === 進捗トラッカー（progress-tracker.js）=== */

/* キーフレーム */
/* 波紋: <span> の border ring を中央起点に拡大しながらフェードアウト。
 * HTML 要素なので transform-origin はデフォルトで center、確実に動く。 */
@keyframes hrbi-progress-ripple {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  20%  { transform: translate(-50%, -50%) scale(0.9); opacity: 0.7; }
  100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}
@keyframes hrbi-progress-bar-shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
@keyframes hrbi-progress-backdrop-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* モーダル背景: 画面全体を半透明で覆い、他操作をブロック */
.hrbi-progress-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 22, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: hrbi-progress-backdrop-fade 0.2s ease-out;
}

/* トラッカー本体（インライン版・モーダル版共通） */
.hrbi-progress-tracker {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--surface);
}
.hrbi-progress-tracker--modal {
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 20px 24px;
}

/* ヘッダ: タイトル + カウンタ + バー */
.hrbi-progress-tracker__header {
  margin-bottom: 14px;
}
.hrbi-progress-tracker__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.hrbi-progress-tracker__counter {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.hrbi-progress-tracker__counter-num {
  font-weight: 700;
  color: var(--brand);
}
.hrbi-progress-tracker__elapsed-total {
  margin-left: 4px;
  color: var(--text-tertiary);
}
.hrbi-progress-tracker__bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
  position: relative;
}
.hrbi-progress-tracker__bar-fill {
  height: 100%;
  width: 0%;
  background:
    linear-gradient(90deg,
      var(--brand) 0%,
      color-mix(in srgb, var(--brand) 60%, white 40%) 50%,
      var(--brand) 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
  animation: hrbi-progress-bar-shimmer 1.8s linear infinite;
}

/* ツールバー（中止ボタン） */
.hrbi-progress-tracker__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}
.hrbi-progress-tracker__cancel {
  font-size: 0.86rem;
}

/* ステップリスト */
.hrbi-progress-tracker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hrbi-progress-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
}
.hrbi-progress-step__main {
  flex: 1;
  min-width: 0;
}
.hrbi-progress-step__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.hrbi-progress-step__label {
  font-weight: 500;
}
.hrbi-progress-step__elapsed {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hrbi-progress-step__detail {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ドット（pending / running / completed / aborted / error） */
.hrbi-progress-step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--border-strong);
  box-sizing: border-box;
}

/* 波紋リング（<span>。pending では非表示、running で拡大表示）
 * dot の中央 (50%, 50%) に絶対配置し、translate(-50%, -50%) で自身の中心を起点に。
 * scale() は HTML 要素のデフォルト transform-origin（center）で動く。 */
.hrbi-progress-step__ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: transparent;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
}
.hrbi-progress-step__ripple--2 {
  /* 半周期ずらして連続感を出す */
}
.hrbi-progress-step__check {
  position: absolute;
  width: 18px;
  height: 18px;
  display: none;
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hrbi-progress-step__pending-num {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* pending: 番号表示 */
.hrbi-progress-step--pending .hrbi-progress-step__label {
  color: var(--text-secondary);
}

/* running: SVG スピナーを回転 + ドット背景にパルス */
.hrbi-progress-step--running .hrbi-progress-step__pending-num {
  display: none;
}
.hrbi-progress-step--running .hrbi-progress-step__dot {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-color: var(--brand);
  /* dot 周囲の box-shadow パルスは廃止（SVG 内の波紋と二重になるため） */
}
.hrbi-progress-step--running .hrbi-progress-step__ripple {
  display: block;
  animation: hrbi-progress-ripple 1.6s ease-out infinite;
}
.hrbi-progress-step--running .hrbi-progress-step__ripple--2 {
  animation-delay: 0.8s;
}
.hrbi-progress-step--running .hrbi-progress-step__label {
  color: var(--brand-ink);
  font-weight: 700;
  /* ラベル点滅は廃止: 波紋と同周期で同時明滅し画面が「ちらつく」と感じられたため。
   * running の識別は太字 + ブランドカラー + 経過秒数で十分伝わる。 */
}
.hrbi-progress-step--running .hrbi-progress-step__elapsed {
  color: var(--brand);
  font-weight: 600;
}

/* completed: チェックマーク表示 */
.hrbi-progress-step--completed .hrbi-progress-step__pending-num {
  display: none;
}
.hrbi-progress-step--completed .hrbi-progress-step__dot {
  background: var(--ok);
  border-color: var(--ok);
}
.hrbi-progress-step--completed .hrbi-progress-step__check {
  display: block;
}
.hrbi-progress-step--completed .hrbi-progress-step__label {
  color: var(--text-secondary);
}

/* aborted / error */
.hrbi-progress-step--aborted .hrbi-progress-step__pending-num,
.hrbi-progress-step--error .hrbi-progress-step__pending-num {
  color: var(--text-tertiary);
}
.hrbi-progress-step--aborted .hrbi-progress-step__dot,
.hrbi-progress-step--error .hrbi-progress-step__dot {
  background: var(--bg-muted);
  border-color: var(--text-tertiary);
}
.hrbi-progress-step--aborted .hrbi-progress-step__label,
.hrbi-progress-step--error .hrbi-progress-step__label {
  color: var(--text-tertiary);
  text-decoration: line-through;
}

/* アニメ抑制設定（OS の prefers-reduced-motion 対応）
   バー shimmer・背景フェードは止める。波紋は「処理中」の伝達に必須なので残すが、
   速度を遅め（2.5s）にして視覚負荷を下げる。 */
@media (prefers-reduced-motion: reduce) {
  .hrbi-progress-tracker__bar-fill,
  .hrbi-progress-modal-backdrop {
    animation: none !important;
  }
  .hrbi-progress-step--running .hrbi-progress-step__ripple {
    animation-duration: 2.5s;
    animation-timing-function: ease-in-out;
  }
  .hrbi-progress-step--running .hrbi-progress-step__ripple--2 {
    animation-delay: 1.25s;
  }
}

.hrbi-plan-review-backdrop .hrbi-plan-review-modal {
  max-width: 640px;
  max-height: min(90vh, 720px);
  overflow: auto;
  text-align: left;
}
.hrbi-plan-review-modal__title {
  margin-top: 0;
}
.hrbi-plan-review-modal__body {
  font-size: 14px;
  line-height: 1.55;
}
.hrbi-plan-review-modal__sec {
  margin-bottom: 16px;
}
.hrbi-plan-review-modal__h {
  font-size: 13px;
  margin: 0 0 6px;
  color: var(--text-secondary);
}
.hrbi-plan-review-modal__ul {
  margin: 0;
  padding-left: 18px;
}
.hrbi-plan-review-modal__muted {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.hrbi-plan-review-modal__footer {
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-issue-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ai-issue-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ai-issue-card__badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--bg-muted);
  padding: 2px 7px;
  border-radius: 4px;
}
.ai-issue-card__risk {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.ai-issue-card__risk--high {
  background: var(--bg-muted);
  color: var(--text);
}
.ai-issue-card__risk--medium {
  background: var(--bg-subtle);
  color: var(--text-secondary);
}
.ai-issue-card__risk--low {
  background: var(--bg-subtle);
  color: var(--text-tertiary);
}
.ai-issue-card__cat {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-left: auto;
}
.ai-issue-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.ai-issue-card__summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}
.ai-issue-card__cta {
  margin-top: auto;
}
.btn--outline-mono {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  align-self: flex-start;
}
.btn--outline-mono:hover {
  background: var(--bg-subtle);
}
/* 後方互換 alias */
.btn--outline-purple {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  align-self: flex-start;
}
.btn--outline-purple:hover {
  background: var(--bg-subtle);
}

/* ── セクション 2: 自由記述 ── */
.custom-issue-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.custom-issue-form .btn {
  width: 100%;
  box-sizing: border-box;
}
/* 自由記述タブの 2 ボタン行（真因探索 / 分析ダッシュボード） */
.custom-issue-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* btn--outline-purple 等が持つ align-self を打ち消し、両ボタンの高さを揃える */
  align-items: stretch;
}
.custom-issue-form__actions .btn {
  flex: 1 1 200px;
  width: auto;
  align-self: stretch;
}
/* セカンダリ（btn--ghost）は枠なしでボタンに見えないため、ここでは全周ボーダー + 薄背景に上書き。
   finding-card__btn-secondary と同じ視覚にして 2 択 CTA の UI を統一する。 */
.custom-issue-form__actions .btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.custom-issue-form__actions .btn--ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}
.custom-issue-form__input {
  width: 100%;
  max-width: none; /* 全体 textarea の max-width:420px を打ち消し、下のボタンと同じ幅に */
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s;
  outline: none;
}
.custom-issue-form__input:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}
.custom-issue-form__input::placeholder {
  color: #aaa;
}

/* ── セクション 3: プリセット ── */
.preset-issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.preset-issue-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 16px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
}
.preset-issue-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}
.preset-issue-card__icon {
  width: 22px;
  height: 22px;
  margin-bottom: 4px;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.preset-issue-card__icon svg {
  width: 100%;
  height: 100%;
}
.preset-issue-card__cat {
  font-size: 13px;
  color: #888;
  font-weight: 500;
}
.preset-issue-card__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}
.preset-issue-card__count {
  font-size: 13px;
  color: #aaa;
  margin-top: 4px;
}

/* Plotly 描画エリア（documents/09_charts_dashboard.html の .chart-card / .chart-body に準拠） */
.chart-box {
  min-height: 320px;
  margin-top: 12px;
  padding: 12px 10px 16px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
}
/* グラフを描画できず案内文のみ表示するとき（テンプレ未対応・データ0件など）は
   min-height を大幅に縮小し、巨大な空白カードにならないようにする。 */
.chart-box.chart-box--message {
  min-height: 0;
  display: flex;
  align-items: center;
}
.chart-box--message .chart-empty-message {
  padding: 20px 10px;
  text-align: center;
  margin: 0;
  width: 100%;
}
.chart-box .js-plotly-plot .plotly .modebar {
  opacity: 0.85;
}
.chart-box .js-plotly-plot .plotly .modebar-btn {
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.modal-backdrop[hidden] {
  display: none !important;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}
.modal h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 600;
}
.modal p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 20px;
}

/* 取込前のシート選択 / ヘッダー行選択モーダル */
.file-import-modal.modal {
  max-width: 880px;
  width: min(880px, calc(100vw - 32px));
}
.file-import-modal__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}
.file-import-modal__hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.file-import-modal__sheet-select {
  margin: 16px 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.file-import-modal__sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.file-import-modal__sheet-tab {
  appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.file-import-modal__sheet-tab:hover {
  border-color: var(--text-secondary);
}
.file-import-modal__sheet-tab.is-active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
  /* 色覚特性・高コントラストモードでも区別できるよう太字を併用（UX レビュー §5） */
  font-weight: 600;
}
.file-import-modal:focus {
  /* tabindex=-1 でフォーカスを受けるが、視覚的なフォーカス枠は出さない（モーダル全体への意図せぬ装飾を防ぐ） */
  outline: none;
}
.file-import-modal__preview-section {
  margin: 16px 0 8px;
}
.file-import-modal__preview {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.file-import-modal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.file-import-modal__table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.file-import-modal__table tbody td {
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  vertical-align: top;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-import-modal__rownum-col,
.file-import-modal__rownum {
  width: 36px;
  text-align: right;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.file-import-modal__select-col,
.file-import-modal__select-cell {
  width: 84px;
  text-align: center;
}
.file-import-modal__row {
  cursor: pointer;
  transition: background 0.1s ease;
}
.file-import-modal__row:hover {
  background: var(--surface-2);
}
.file-import-modal__row.is-selected {
  background: var(--accent-soft);
}
.file-import-modal__row.is-selected td {
  font-weight: 600;
}
.file-import-modal__current {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.file-import-modal__empty {
  margin: 0;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* wide → long 変換オプション（ヘッダー行確定後に動的表示） */
.file-import-modal__wide-section {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.file-import-modal__wide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  margin: 4px 0 0;
}
.file-import-modal__wide-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.file-import-modal__wide-list-title,
.file-import-modal__wide-preview-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.file-import-modal__wide-preview-title {
  margin-top: 12px;
}
.file-import-modal__wide-list {
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}
.file-import-modal__wide-list li {
  margin-bottom: 4px;
}
.file-import-modal__wide-preview {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.file-import-modal__wide-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.file-import-modal__wide-preview-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.file-import-modal__wide-preview-table tbody td {
  border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 課題選択: AI抽出アクション行 + ロジック説明モーダル */
.issue-ai-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.issue-ai-actions .btn--ai {
  flex: 1 1 220px;
}
.issue-logic-btn {
  flex: 0 0 auto;
  align-self: center;
}

.issue-logic-modal-root[hidden] {
  display: none !important;
}

.issue-logic-modal.modal {
  max-width: 720px;
  width: 100%;
  max-height: min(90vh, 900px);
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

.issue-logic-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.issue-logic-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.issue-logic-modal__close-x {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: -8px -8px 0 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-md, 8px);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.issue-logic-modal__close-x:hover {
  background: var(--surface-muted, rgba(0, 0, 0, 0.06));
  color: var(--text);
}

.issue-logic-modal__body {
  padding: 16px 24px 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.issue-logic-modal__lead {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.issue-logic-modal__steps {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.issue-logic-modal__step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface-muted, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.issue-logic-modal__step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent, #6b4cff);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.issue-logic-modal__step-body {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.issue-logic-modal__step-title {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text);
}

.issue-logic-modal__step-body p {
  margin: 0;
  color: inherit;
}

.issue-logic-modal__bullets {
  margin: 8px 0 0;
  padding-left: 1.2em;
  color: inherit;
}
.issue-logic-modal__bullets li {
  margin-bottom: 6px;
}
.issue-logic-modal__bullets li:last-child {
  margin-bottom: 0;
}

/* 検出種のサブカテゴリ見出し（単一時点 / 時系列） */
.issue-logic-modal__sub-title {
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* ステップ本文の補足段落（カードの後に追加情報を出す場合） */
.issue-logic-modal__step-suffix {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.issue-logic-modal__notes {
  margin: 0;
  padding: 14px 16px 14px 1.4em;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--surface-muted, rgba(0, 0, 0, 0.03));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.issue-logic-modal__notes li {
  margin-bottom: 10px;
}
.issue-logic-modal__notes li:last-child {
  margin-bottom: 0;
}

.issue-logic-modal__code {
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.issue-logic-modal__footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.3s ease;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(2px);
}
.loading-overlay__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  max-width: 320px;
  line-height: 1.5;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--bg-muted);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-mono);
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.badge.ok,
.badge--ok {
  background: var(--ok-50);
  color: var(--ok);
  border-color: transparent;
}
.badge.warn,
.badge--warn {
  background: var(--warn-50);
  color: var(--warn);
  border-color: transparent;
}
.badge.err,
.badge--err {
  background: var(--err-50);
  color: var(--err);
  border-color: transparent;
}

/* アップロード: 取り込み結果 */
.import-result-wrap {
  margin-top: 8px;
}
.import-result-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0 16px;
}
.import-result-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
}
.import-result-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.import-result-banner {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.import-result-banner--err {
  background: rgba(201, 52, 0, 0.06);
  border-color: rgba(201, 52, 0, 0.35);
}
.import-result-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
}
.import-result-item {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.import-result-item--ok {
  border-color: rgba(52, 120, 80, 0.35);
  background: rgba(52, 120, 80, 0.06);
}
.import-result-item--err {
  border-color: rgba(201, 52, 0, 0.4);
  background: rgba(201, 52, 0, 0.06);
}
.import-result-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 16px;
  justify-content: space-between;
}
.import-result-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(52, 120, 80, 0.2);
  color: #1e6b3d;
  font-weight: 700;
  font-size: 14px;
}
.import-result-icon--err {
  background: rgba(201, 52, 0, 0.2);
  color: #a32;
}
.import-result-sub {
  margin: 10px 0 0 38px;
  padding-left: 1em;
  font-size: 14px;
  color: var(--text-secondary);
}
.import-result-sub--warn {
  list-style: disc;
}
.import-result-error-msg {
  margin: 6px 0 0;
  color: #a32;
  font-size: 14px;
  line-height: 1.5;
}
.import-result-actions {
  margin-top: 16px;
}

/* アップロード: 列説明（Editorial .drop-desc 内の段落） */
.upload-zone-hint-line {
  margin: 0 0 6px;
}
.upload-zone-hint-line:last-of-type {
  margin-bottom: 0;
}
.upload-zone-hint-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.upload-zone-code {
  font-size: 13px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
}

/* マッピング確認テーブル */
.mapping-table .mapping-row--matched td {
  vertical-align: top;
}
.mapping-row--missing-optional .mapping-col-label,
.mapping-row--missing-optional .mapping-col-source {
  color: var(--text-secondary);
}
.mapping-row--missing-required .mapping-col-label {
  color: #a32;
  font-weight: 600;
}
.mapping-unmapped {
  color: var(--text-secondary);
  font-style: italic;
}
.mapping-req {
  color: #a32;
  font-weight: 700;
}
.mapping-ai-badge {
  margin-left: 6px;
  vertical-align: middle;
}
.mapping-sensitive-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 13px;
  font-weight: 600;
  color: #b55a00;
  background: #fff4e5;
  border: 1px solid #f5c26b;
  border-radius: 10px;
  vertical-align: middle;
}
.mapping-row--sensitive td {
  background: #fffbf0;
}
.import-result-term-warn {
  margin: 10px 0 4px;
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px solid #f5c26b;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}
/* 見出しの strong のみ block。li 内の列名 strong は inline を維持して鍵括弧内で折り返さないように */
.import-result-term-warn > strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}
.mapping-block,
.mapping-history-block {
  margin-bottom: 28px;
}
.mapping-block-title,
.mapping-history-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.mapping-history-file {
  color: var(--text-secondary);
  font-weight: normal;
  font-size: 13px;
}
.mapping-history-meta,
.mapping-block-meta {
  margin: 0 0 10px !important;
}
.mapping-history-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
}
.mapping-history-year-label {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.mapping-history-year-label__text {
  display: inline-block;
  white-space: nowrap;
}
/* Phase 1: 画面内プルダウン廃止後の年度バッジ表示 */
/* （旧 .mapping-history-fy-select は廃止済み） */
.mapping-history-year-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: var(--surface-2, #fafafa);
  font-size: 0.95rem;
  color: var(--text, #222);
}
.mapping-history-year-hint {
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
}
.mapping-history-block--empty {
  padding: 16px 0;
}

.mapping-file-label {
  color: var(--text-secondary);
  font-size: 13px;
  margin-right: 4px;
}
.mapping-edit-intro strong {
  font-weight: 600;
}
/* マッピング画面上部の説明はテーブル幅いっぱいに（.theme-editorial の .subtitle 52ch 制限を外す） */
.mapping-edit-card .mapping-edit-intro,
.mapping-edit-card .mapping-edit-warn,
.mapping-edit-card .mapping-edit-meta {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.mapping-batch-detail {
  width: 100%;
  max-width: 100%;
}
.mapping-tabs {
  width: 100%;
}
.mapping-tablist {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 8px;
  margin: 0 0 16px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}
.mapping-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 10px;
  margin: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.mapping-tab[hidden] {
  display: none;
}
.mapping-tabs__toggle-hidden {
  margin: 4px 0 12px;
  padding: 4px 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.mapping-intro-hint {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-tertiary, var(--text-secondary));
}
.mapping-tab:hover {
  color: var(--text);
  background: var(--bg-muted);
}
.mapping-tab.is-active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--text);
}
.mapping-tab-aux {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-muted);
}
.mapping-tab-aux--warn {
  color: #92400e;
  background: #fff4e0;
}
.mapping-tabpanel[hidden] {
  display: none !important;
}
.mapping-block-title--in-tab {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.mapping-status-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  vertical-align: middle;
}
.mapping-status-badge--muted {
  color: var(--text-tertiary);
  background: var(--bg-muted);
}
.mapping-status-badge--warn {
  color: #92400e;
  background: #fff4e0;
  border: 1px solid #f5c26b;
}
.mapping-table-wrap {
  width: 100%;
}
.mapping-table {
  table-layout: fixed;
  width: 100%;
}
.mapping-table thead th:first-child,
.mapping-table tbody td.mapping-col-label {
  width: 40%;
  min-width: 280px;
  box-sizing: border-box;
  vertical-align: top;
}
.mapping-table thead th:last-child,
.mapping-table tbody td.mapping-col-source {
  width: 60%;
  box-sizing: border-box;
}
.mapping-edit-warn {
  padding: 12px 14px;
  background: #fff8f0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  margin-bottom: 16px !important;
  line-height: 1.55;
}
.mapping-edit-actions {
  margin-top: 20px;
  flex-wrap: wrap;
}
.mapping-select {
  width: 100%;
  max-width: min(100%, 360px);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}
.mapping-select:hover:not(:disabled) {
  border-color: var(--border-strong);
}
.mapping-select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}
.mapping-select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background: var(--bg-muted);
}
.mapping-hard-warn {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #a32;
}

/* ダッシュボード: 仮説判定バッジ */
.verdict-supported {
  background: var(--text);
  color: #fff;
}
.verdict-rejected {
  background: var(--bg-muted);
  color: var(--text-secondary);
}

.dashboard-header-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
/* 課題文がボタン列の左側で横幅いっぱい使えるようにする */
.dashboard-header-card__top > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.dashboard-header-card__h {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}
.dashboard-header-card__issue-text {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dashboard-header-card__actions {
  margin: 0;
  flex-shrink: 0;
}

.hypothesis-report-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 12px;
  margin-bottom: 14px;
}
.hypothesis-report-card__id {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.hypothesis-report-card__title {
  flex: 1 1 100%;
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
}
.hypothesis-report-card__meta {
  margin: 0 0 16px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.hypothesis-report-card__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}
.hypothesis-report-card__row:last-child {
  margin-bottom: 0;
}
.hypothesis-report-card__row dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-secondary);
}
.hypothesis-report-card__row dd {
  margin: 0;
  color: var(--text);
}
.hypothesis-report-card__row--keys dt {
  font-size: 13px;
  font-weight: 600;
}
.hypothesis-report-card__row--keys dd {
  font-size: 13px;
}
.hypothesis-report-card__row--keys code {
  font-size: 13px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-muted);
  word-break: break-all;
}

.interpretation {
  margin: 16px 0 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-subtle);
  border-radius: var(--radius);
}
.interpretation strong {
  color: var(--text);
}

.hypothesis-report-card--extra {
  margin-top: 16px;
  border: 1px dashed var(--border-strong);
}

.chart-box--tall {
  min-height: 480px;
}

.chart-alt-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.chart-alt-btn {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chart-alt-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
  border-color: var(--border-strong);
}
.chart-alt-btn.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 600;
}

.chart-annotation {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pivot-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}
.pivot-table-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.pivot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pivot-table th {
  background: var(--bg-subtle);
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.pivot-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
}
.pivot-table tr:last-child td {
  border-bottom: none;
}
.pivot-table tr:hover td {
  background: var(--bg-subtle);
}

/* AI施策提案（AI が書く施策の候補 + トラッキング連携） */
.sim-api-missing {
  margin-top: 12px;
}
.sim-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.sim-ai-hint {
  margin: 8px 0 0;
}
.sim-ai-hint:empty {
  display: none;
}
.sim-empty-hint {
  margin-top: 20px;
}
.sim-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
}
.sim-sec-head--first {
  margin-top: 20px;
}
.sim-sec-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
}
.sim-sec-head__link {
  font-size: 13px;
  color: var(--brand);
  white-space: nowrap;
}
.sim-basis {
  margin-top: 10px;
}
.sim-basis__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  font-size: 15px;
  line-height: 1.75;
}
.sim-basis__item + .sim-basis__item {
  margin-top: 6px;
}
.sim-basis__lv {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sim-basis .sim-note {
  margin-top: 6px;
}
.sim-run-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.sim-run-row .sim-note {
  flex: 1;
}
.sim-run-row .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.sim-group-label {
  margin: 22px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.sim-basis__no {
  margin-right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sim-act {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-top: 10px;
  background: var(--surface);
}
.sim-act__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sim-act__name {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
}
.sim-act__head .btn {
  flex-shrink: 0;
  white-space: nowrap;
}
.sim-act__meta {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.sim-act__body {
  display: grid;
  grid-template-columns: 11.5em 1fr;
  column-gap: 16px;
  row-gap: 10px;
  margin: 14px 0 0;
}
.sim-act__body dt {
  padding-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.sim-act__body dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}
.sim-act__body ul {
  margin: 0;
  padding-left: 1.2em;
}
.sim-act__body li + li {
  margin-top: 2px;
}
.sim-foot-note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
@media (max-width: 1180px) {
  .sim-act__body {
    grid-template-columns: 1fr;
    row-gap: 2px;
  }
  .sim-act__body dd {
    margin-bottom: 8px;
  }
}

.hidden {
  display: none !important;
}

/* ==============================================
   Exec Summary（3行サマリー）
   ============================================== */

.exec-summary__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exec-summary__line {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}
.exec-summary__line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background: var(--text);
  border-radius: 50%;
}

/* ==============================================
   仮説セクション（支持/棄却）
   ============================================== */
.hyp-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: var(--space);
}
.hyp-section--pending {
  margin-top: 8px;
}
.hyp-section--supported .hyp-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.hyp-section--supported .hyp-section__heading {
  margin: 0;
  font-size: 17px;
}
.hyp-section[open] {
  padding-bottom: 22px;
}
.hyp-section__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  user-select: none;
}
.hyp-section__summary::-webkit-details-marker {
  display: none;
}
.hyp-section__summary::before {
  content: "▸";
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 0.15s;
  width: 14px;
}
.hyp-section[open] > .hyp-section__summary::before {
  transform: rotate(90deg);
}
.hyp-section__heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.hyp-section__count {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
}
.hyp-section__count--ok {
  background: var(--text);
  color: #fff;
}
.hyp-section__count--muted {
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.hyp-section__lead {
  margin: 10px 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.hyp-section__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}
/* V-13 案A: 支持・棄却セクションの見出し行に添える開いている理由の注記 */
.hyp-section__open-note {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}
/* V-13 案A: 支持0件・判定保留0件のときの1行バー表示（セクションの主従を明示） */
.section-empty-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.section-empty-bar strong {
  color: var(--text);
}

/* ==============================================
   仮説カード（結論ファースト）
   ============================================== */
.hyp-card {
  margin-bottom: 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hyp-card--supported {
  /* §10 準拠: 全周ボーダー + 背景色で識別する（左ラインのみの色付け禁止） */
  border-color: var(--text);
  background: var(--surface-2);
}
.hyp-card--weak {
  /* II-4: 弱い支持。規約 §10 準拠で全周ボーダー + 背景色で識別する
   * （左ラインのみの色付け禁止のため、border-left の transparent を維持） */
  border-color: var(--brand);
  background: var(--surface-2);
}
.hyp-card--rejected {
  /* §10 準拠: 全周ボーダー + 背景色で識別する */
  border-color: var(--border-strong);
  background: var(--bg-muted);
  opacity: 0.92;
}
.hyp-card--pending {
  /* §10 準拠: 全周ボーダー + 背景色で識別する */
  border-color: var(--text-secondary);
  background: var(--bg-subtle);
  opacity: 0.96;
}
.hyp-card--compact {
  padding: 16px 20px;
}
.hyp-card__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.hyp-card__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hyp-card__badge--ai {
  background: var(--text);
  color: #fff;
}
/* Phase 5: 仮説の役割（core/supporting/counter）バッジ。モノトーン濃淡で重要度を表現 */
.hyp-card__badge--role {
  background: var(--text);
  color: #fff;
}
.hyp-card__badge--role-core {
  background: var(--text);
  color: #fff;
}
.hyp-card__badge--role-supporting {
  background: var(--bg-muted);
  color: var(--text);
  border: 1px solid var(--border);
}
.hyp-card__badge--role-counter {
  background: transparent;
  color: var(--text);
  border: 1px dashed var(--text-secondary);
}
/* Phase 5: 仮説の階層（structural/collective/individual）バッジ */
.hyp-card__badge--layer {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-weight: 500;
}
/* Phase 5: 理論枠組みバッジ（最も控えめ） */
.hyp-card__badge--theory {
  background: transparent;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0;
  padding: 2px 0;
}
.hyp-card__badge--theory::before {
  content: "・";
  margin-right: 2px;
}

/* Phase 6: rejected/inconclusive 仮説カード内の insight ブロック */
.hyp-card__insight {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 6px);
  padding: 10px 14px;
  margin: 8px 0 10px;
}
.hyp-card__insight--rejected {
  border-color: var(--border-strong);
}
.hyp-card__insight--inconclusive {
  border-color: var(--border-strong);
  border-style: dashed;
}
.hyp-card__insight-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.hyp-card__insight-row {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.hyp-card__insight-row strong {
  color: var(--text);
  font-weight: 700;
  margin-right: 4px;
}
.hyp-card__insight-list {
  margin: 4px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hyp-card__insight-list li {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Phase 5: 「この 3 件を選んだ理由」バナー */

.hyp-card__id {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  font-family: var(--font-mono), ui-monospace, SFMono-Regular, Menlo, monospace;
}
.hyp-card__title {
  margin: 4px 0 10px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.hyp-card--compact .hyp-card__title {
  font-size: 15px;
}
.hyp-card__plain-result {
  margin: 2px 0 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
}
.hyp-card--compact .hyp-card__plain-result {
  font-size: 15px;
}
.hyp-card__plain-result--rejected {
  color: var(--text-secondary);
}
.hyp-card__plain-result--inconclusive {
  color: var(--text-secondary);
}
/* V-13 案A: 「詳しく見る」内の小セクション共通ボックス（学べること以外の 2 種で使用） */
.hyp-card__subsection {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
.hyp-card__subsection:first-child {
  margin-top: 0;
}
.hyp-card__subsection-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}
.hyp-card__ai-comment-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
}
.hyp-card__plain-result-ai-note {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #6b5ce7, #a855f7);
  color: #fff;
  border-radius: 4px;
  vertical-align: middle;
  line-height: 1.8;
}
.hyp-card__conclusion {
  margin: 0 0 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-subtle);
  border-radius: var(--radius);
}
.hyp-card__conclusion-label {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  background: var(--text);
  color: #fff;
  border-radius: 4px;
  vertical-align: middle;
}
.hyp-card--rejected .hyp-card__conclusion-label {
  background: var(--text-secondary);
}
.hyp-card__details {
  margin-top: 12px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
/* details/summary 化（哲学③: 統計用語は第3層に閉じ込める）。
 * 開閉インジケータは .hyp-section__summary と同じ transform rotate パターンに統一。 */
.hyp-card__details-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hyp-card__details-kicker::-webkit-details-marker {
  display: none;
}
.hyp-card__details-kicker::before {
  content: "▸";
  display: inline-block;
  font-size: 13px;
  color: var(--text-tertiary);
  transition: transform 120ms ease;
}
.hyp-card__details[open] > .hyp-card__details-kicker::before {
  transform: rotate(90deg);
}
.hyp-card__details-kicker:hover {
  color: var(--text-primary);
}
.hyp-card__meta {
  margin-top: 10px;
}
.hyp-card__drill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}
.hyp-card__drill-btn {
  flex: 0 0 auto;
}
.hyp-card__drill-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 深堀モーダル */
.drill-modal-backdrop {
  z-index: 1200;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow: auto;
}
.drill-modal {
  max-width: 880px;
  width: 100%;
  max-height: 86vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}
.drill-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-elevated, #fff);
  z-index: 2;
}
.drill-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.drill-modal__close {
  font-size: 22px;
  line-height: 1;
  padding: 2px 10px;
}
.drill-modal__body {
  padding: 14px 16px 20px;
  flex: 1;
  min-height: 120px;
}
.drill-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 32px 12px;
}
.drill-loading--active {
  animation: pulse-soft 1.2s ease-in-out infinite;
}
@keyframes pulse-soft {
  0%,
  100% {
    opacity: 0.65;
  }
  50% {
    opacity: 1;
  }
}
.drill-empty,
.drill-running {
  color: var(--text-secondary);
  line-height: 1.6;
}
.drill-proposal {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: var(--bg-muted);
}
.drill-proposal__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.drill-proposal__why {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.drill-proposal__result {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.drill-plain {
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.drill-chart-box {
  min-height: 200px;
  margin-top: 8px;
  padding: 10px 8px 12px;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
}
.theme-editorial .drill-chart-box {
  border-radius: 0;
}
.drill-no-chart {
  margin-top: 8px;
}
.drill-table-wrap {
  overflow: auto;
  margin: 10px 0;
}
.drill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.drill-table th,
.drill-table td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
}
.drill-table th {
  background: var(--bg-muted);
}

/* ==============================================
   強さ ★★★★ 表示
   ============================================== */
.evidence-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.evidence-star {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
.evidence-star--on {
  background: var(--text);
  border-color: var(--text);
}

/* ==============================================
   用語ツールチップ
   ============================================== */
.term-tip {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  cursor: help;
  border-bottom: 1px dotted var(--text-secondary);
}
.term-tip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-muted);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
}
.term-tip__body {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 200px;
  max-width: 280px;
  padding: 8px 10px;
  background: var(--brand-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  border-radius: var(--r-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
  white-space: normal;
  letter-spacing: 0;
}
.term-tip:hover .term-tip__body,
.term-tip:focus .term-tip__body,
.term-tip:focus-within .term-tip__body {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ==============================================
   グラフ切替ポップオーバー
   ============================================== */
.chart-alt-popover {
  margin: 10px 0 0;
}
.chart-alt-popover__summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  user-select: none;
}
.chart-alt-popover__summary::-webkit-details-marker {
  display: none;
}
.chart-alt-popover__summary::after {
  content: "▾";
  font-size: 13px;
  transition: transform 0.15s;
}
.chart-alt-popover[open] > .chart-alt-popover__summary::after {
  transform: rotate(180deg);
}
.chart-alt-popover__summary:hover {
  background: var(--bg-muted);
  color: var(--text);
}
.chart-alt-popover__body {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Editorial テーマ（全画面共通・参照 HTML の Variation B に準拠）
   セリフ見出し / モノラベル / フラット角 / プライマリは var(--text) ベース
   ═══════════════════════════════════════════════════════════════════════════ */
.theme-editorial .app-main {
  padding-bottom: 160px;
}

.theme-editorial .card {
  border-radius: 0;
  box-shadow: none;
  padding: 28px 32px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* 結論カードはダーク背景＋白文字（.theme-editorial .card の白背景で上書きされないようにする） */

.theme-editorial .card h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.theme-editorial .card .subtitle {
  font-size: 14px;
  line-height: 1.55;
  max-width: 100ch;
}

.theme-editorial .btn {
  border-radius: 0;
}

.theme-editorial .btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.theme-editorial .btn--primary:hover:not(:disabled) {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}

.theme-editorial .btn--secondary {
  border-radius: 0;
}

.theme-editorial .form-group label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}

.theme-editorial .card input[type="text"],
.theme-editorial .card input[type="password"],
.theme-editorial .card input[type="number"],
.theme-editorial .card input[type="date"],
.theme-editorial .card textarea,
.theme-editorial .card select {
  border-radius: 0;
}

.theme-editorial .hero h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

/* 節見出し 20px。.theme-editorial .card h2（28px）に勝てるよう、h2 まで含めて詳細度を合わせる */
.theme-editorial .card h2.how-card__title,
.theme-editorial .card h2.menu-overview__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.theme-editorial .how-step {
  border-radius: 0;
}

.theme-editorial .how-step__num {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-transform: none;
  line-height: 1;
  color: var(--text-tertiary);
}

.theme-editorial .how-step__title {
  font-weight: 500;
}

.theme-editorial .table-wrap {
  border-radius: 0;
}

.theme-editorial table.data thead th {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: var(--surface);
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.theme-editorial table.data tbody td {
  border-bottom: 1px solid #f2f0ea;
}

.theme-editorial .modal {
  border-radius: 0;
}

.theme-editorial .app-sidebar a.nav-item {
  border-radius: 0;
}

.theme-editorial .issue-select-header__title,
.theme-editorial .topic-coverage-page__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.theme-editorial .issue-select-header__lead,
.theme-editorial .topic-coverage-page__lead {
  font-size: 14px;
  max-width: 100ch;
  line-height: 1.55;
}

/* 画面名 28px・本文 15px（課題選択・定番グラフ）。「分析できる範囲」画面は共有クラスのため対象外 */
.theme-editorial .issue-select-header__title,
.theme-editorial .std-charts-page .topic-coverage-page__title {
  font-size: 28px;
  line-height: 1.4;
}
.theme-editorial .issue-select-header__lead,
.theme-editorial .std-charts-page .topic-coverage-page__lead {
  font-size: 15px;
  line-height: 1.7;
}

.theme-editorial .issue-select-tablist {
  border-radius: 0;
}

.theme-editorial .issue-method-section {
  border-radius: 0;
  box-shadow: none;
}

.theme-editorial .issue-method-section__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.theme-editorial .btn--ai {
  border-radius: 0;
}

.theme-editorial .ai-issue-card {
  border-radius: 0;
}

.theme-editorial .ai-issue-card__name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 17px;
}

.theme-editorial .btn--outline-mono,
.theme-editorial .btn--outline-purple {
  border-radius: 0;
}

.theme-editorial .custom-issue-form__input {
  border-radius: 0;
}

.theme-editorial .preset-issue-card {
  border-radius: 0;
}

.theme-editorial .chart-box {
  border-radius: 0;
  padding: 16px 12px 20px;
}

.theme-editorial .import-result-item {
  border-radius: 0;
}

.theme-editorial .mapping-block-title,
.theme-editorial .mapping-history-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.theme-editorial .mapping-select {
  border-radius: 0;
}

.theme-editorial .mapping-edit-warn {
  border-radius: 0;
}

.theme-editorial .mapping-edit-card .mapping-edit-intro,
.theme-editorial .mapping-edit-card .mapping-edit-warn,
.theme-editorial .mapping-edit-card .mapping-edit-meta {
  max-width: none;
}

.theme-editorial .mapping-tab {
  border-radius: 0;
}
.theme-editorial .mapping-tab.is-active {
  border-bottom-color: var(--text);
}

.theme-editorial .dashboard-header-card__h {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.theme-editorial .dashboard-header-card__issue-text {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

.theme-editorial .hyp-section {
  border-radius: 0;
  box-shadow: none;
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.theme-editorial .hyp-section__heading {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.theme-editorial .hyp-section__lead {
  font-size: 13px;
}

.theme-editorial .hyp-card.card {
  border-radius: 0;
  box-shadow: none;
}

/* II-4: theme-editorial 配下でも weakly_supported カードの色味を維持する。
 * .theme-editorial .card（specificity 2）が単純な .hyp-card--weak（specificity 1）を
 * 上書きしてしまうため、同じ specificity 2 で再上書きする */
.theme-editorial .hyp-card--weak.card {
  border: 1px solid var(--brand);
  background: var(--surface-2);
}

.theme-editorial .hyp-card__title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.theme-editorial .hyp-card--compact .hyp-card__title {
  font-size: 18px;
}

.theme-editorial .hyp-card__plain-result {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

.theme-editorial .hyp-card--compact .hyp-card__plain-result {
  font-size: 16px;
  font-weight: 700;
}

.theme-editorial .hyp-card__subsection {
  border-radius: 0;
}

.theme-editorial .hypothesis-report-card__meta {
  border-radius: 0;
}

.theme-editorial .row-actions {
  gap: 10px;
}

.theme-editorial .import-result-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.015em;
}

.theme-editorial .import-result-banner {
  border-radius: 0;
}

/* 時点指定（アップロード） */
/* ---- upload: フロー（年度 → ファイル） ---- */
.upload-flow {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}
.upload-flow__step {
  display: flex;
  gap: 12px;
  flex: 1 1 220px;
  min-width: 0;
}
.upload-flow__step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-flow__step-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 14px;
}
.upload-flow__step-desc {
  margin: 0;
}
.upload-flow__year-row {
  margin-top: 4px;
}
.upload-flow__year-select {
  min-width: 160px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
}
.upload-flow__status {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
}
.upload-flow__status--warn {
  color: #856404;
  font-weight: 600;
}
.upload-flow__connector {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 0 4px;
}
@media (max-width: 720px) {
  .upload-flow__connector {
    width: 100%;
    justify-content: center;
    transform: rotate(90deg);
  }
}

/* ---- upload: 旧年度バー（互換・未使用） ---- */
.upload-period-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.upload-period-bar__field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.upload-period-bar__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.upload-period-bar__select {
  min-width: 120px;
  max-width: 200px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.upload-period-bar__badge-wrap {
  flex: 1;
  min-width: 0;
}
.upload-period-bar__badge {
  display: inline-block;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.upload-period-bar__badge--ok {
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.upload-period-bar__badge--warn {
  background: #fff3cd;
  color: #856404;
  font-weight: 600;
}
/* hint toggle */
.upload-hint-toggle {
  margin-top: 12px;
}
.upload-hint-wrap {
  margin-top: 6px;
}
/* period-specification は旧スタイルとして残す（参照なし） */
.period-specification {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-elevated, var(--surface));
}
.period-specification__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}
.text-danger {
  color: #c0392b;
}

.mapping-year-pill {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  line-height: 1.4;
}
.mapping-year-pill a {
  color: var(--brand);
  font-weight: 600;
}

.dataset-list-table .dataset-list-meta {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.dataset-list-badge {
  display: inline-block;
  min-width: 3.5em;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-muted);
  color: var(--text-tertiary);
}
.dataset-list-badge--on {
  background: #e8f4fd;
  color: #0b5;
  border: 1px solid #9dc;
}
.dataset-list-badge--user {
  background: var(--surface-2, #fafafa);
  color: var(--text-secondary, #555);
  border: 1px solid var(--border, #e5e7eb);
}
.dataset-list-row--user-ds {
  background: var(--surface-2, #fafafa);
}
.dataset-list-userds-label {
  font-weight: 500;
}
.dataset-list-userds-file {
  color: var(--text-tertiary, #888);
  font-size: 13px;
  margin-left: 8px;
}
.dataset-list-row--pending-del {
  background: #fff8e6 !important;
}
.dataset-list-row--joinstats td {
  padding-top: 0;
  padding-bottom: 8px;
  background: var(--surface-2, #fafafa);
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.dataset-joinstats {
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface, #fff);
  border-radius: var(--r-md, 8px);
  padding: 8px 12px;
  font-size: 0.86rem;
  color: var(--text-secondary, #555);
}
.dataset-joinstats--warn {
  border-color: var(--warn);
  background: var(--warn-50);
  color: var(--text);
}
.dataset-list-actions {
  white-space: normal;
  vertical-align: top;
}
.dataset-list-actions .btn--sm {
  font-size: 13px;
  padding: 4px 8px;
}
.dataset-list-delwrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
/* [hidden] は display:flex より弱いため、非表示が効かず確認行が常時表示されるのを防ぐ */
.dataset-list-delwrap[hidden] {
  display: none !important;
}
.dataset-list-del-confirm {
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 4px;
}
.app-header__cmp-btn {
  font-size: 13px;
  white-space: nowrap;
}

/* 比較モード時、グローバルヘッダーに表示する比較対象バッジ */
.app-header__cmp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--brand-100);
  white-space: nowrap;
}
.app-header__cmp-badge-icon {
  color: var(--brand);
  flex-shrink: 0;
}
.app-header__cmp-badge-label {
  color: var(--text-secondary);
  font-weight: 600;
}
.app-header__cmp-badge-base,
.app-header__cmp-badge-comp {
  color: var(--brand-ink);
  font-weight: 700;
}
.app-header__cmp-badge-sep {
  color: var(--text-secondary);
  font-weight: 400;
}

.quality-badge {
  display: inline-block;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.quality-badge--ok {
  background: rgba(30, 132, 73, 0.15);
  color: #1e8449;
}
.quality-badge--mid {
  background: rgba(200, 150, 0, 0.2);
  color: #8a6d0b;
}
.quality-badge--low {
  background: rgba(192, 57, 43, 0.15);
  color: #a93226;
}

/* ============================================================
 * 気づき拡張 v1: 発見カード（finding-card.js）
 * 仕様書: documents/20260425/insight-enhancement-v1-spec.md §5
 * ============================================================ */

.finding-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.finding-card + .finding-card {
  margin-top: 12px;
}
/* Grid 内では gap で間隔を取るため、隣接マージンを無効化（右列の上揃え） */
.ai-issue-grid > .finding-card + .finding-card,
.ai-issue-grid > .finding-card {
  margin-top: 0;
}

.finding-card__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
/* confidence バッジ（リスク色ドット + 落ち着いた枠） */
.finding-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.finding-card__badge--confidence-high {
  border-color: var(--text-secondary);
  color: var(--text);
}
.finding-card__badge--confidence-medium {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.finding-card__badge--confidence-low {
  border-color: var(--border);
  color: var(--text-tertiary);
}
/* リスク水準を示す小さな色ドット */
.finding-card__risk-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.finding-card__risk-dot--high {
  background: var(--err);
}
.finding-card__risk-dot--medium {
  background: var(--warn);
}
.finding-card__risk-dot--low {
  background: var(--text-tertiary);
}
/* 種別タグ（プレーンなテキスト） */
.finding-card__type-tag {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 2px 0;
  letter-spacing: 0.02em;
}
.finding-card__type-tag::before {
  content: "・";
  margin-right: 2px;
  color: var(--text-tertiary);
}
.finding-card__category {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 2px 8px;
  background: var(--bg-muted);
  border-radius: 4px;
}
/* Phase 3: トピック自動推定（issue.topic_name）バッジ。
   issue_category とは排他表示なので、見た目は __category と同一に統一。 */
.finding-card__topic {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 2px 8px;
  background: var(--bg-muted);
  border-radius: 4px;
}

.finding-card__headline {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  letter-spacing: 0.01em;
}

/* V-12 B2: 経営説明ワンポイント（§10 準拠: 全周ボーダー + 背景色） */
.finding-card__oneliner {
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f7f7f7);
  border-radius: var(--r-md, 8px);
}
.finding-card__oneliner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.finding-card__oneliner-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.finding-card__oneliner-copy {
  flex: 0 0 auto;
  padding: 3px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.finding-card__oneliner-copy:hover:not(:disabled) {
  background: var(--surface-3, #f0f0f0);
  border-color: var(--text-secondary);
}
.finding-card__oneliner-copy:disabled {
  cursor: default;
  opacity: 0.7;
}
.finding-card__oneliner-text {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
  color: var(--text);
}
.finding-card__oneliner-note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary, #888);
}

.finding-card__interpretation {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}
.finding-card__interpretation--missing {
  color: var(--text-tertiary);
  font-style: italic;
}

.finding-card__details {
  margin: 0;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.finding-card__details > summary {
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.finding-card__details > summary::-webkit-details-marker {
  display: none;
}
.finding-card__details[open] > summary {
  margin-bottom: 8px;
}
.finding-card__details-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.finding-card__detail-section h5 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.finding-card__detail-section ol,
.finding-card__detail-section ul {
  margin: 0;
  padding-left: 1.4em;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}
.finding-card__breakdown {
  font-size: 13px;
}
.finding-card__breakdown th,
.finding-card__breakdown td {
  border-bottom: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
}
.finding-card__breakdown th {
  background: var(--surface-2);
  color: var(--text-secondary);
}
.finding-card__scope-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.finding-card__scope-total {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 6px 0 0;
}
.finding-card__evidence {
  font-size: 13px;
  line-height: 1.7;
}
.finding-card__evidence-tail {
  color: var(--text-tertiary);
  font-size: 13px;
}
.finding-card__technical-details {
  margin-top: 4px;
  padding: 8px 12px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.finding-card__technical-details > summary {
  cursor: pointer;
  font-weight: 600;
}
.finding-card__stats {
  margin: 4px 0 4px;
  padding-left: 1.4em;
}

.finding-card__guides {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}
/* 「次のアクション」「判断できないこと」を共通デザイン・背景なし */
.finding-card__guide {
  background: transparent;
  border: 0;
  padding: 0;
}
.finding-card__guide h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* A. / B. のラベル（背景なし・テキストのみ） */
.finding-card__guide-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  min-width: 18px;
}
.finding-card__guide ul {
  margin: 0;
  padding-left: 4px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  list-style: none;
}
.finding-card__guide li {
  position: relative;
  padding-left: 12px;
}
/* 箇条書きドット（小さく・左寄せ） */
.finding-card__guide li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.75em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--brand);
}
.finding-card__guide--limit li::before {
  background: var(--err);
}

.finding-card__action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
/* クリック可能を視認できる枠付きボタン（btn--ghost に上書き） */
.finding-card__btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.finding-card__btn-secondary:hover {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}
.finding-card__btn-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
}
/* finding-card のアクション行は左からプライマリを並べる（2 ボタン時の読み順を担保）。
   1 ボタン時に右寄せにしたければ親側で justify-content を切り替える。 */

/* ============================================================
 * 課題選択画面 案A（デザイン改善版）: compact 表示専用
 * 統一チップ / 凡例 / CTA 主従化。既存クラスは変更しない（追加のみ）。
 * ============================================================ */
/* 統一チップ: リスク / 確かさ / 種類 / テーマ を同じ形・「項目名: 値」形式で並べる */
.fc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.fc-chip strong {
  font-weight: 600;
  color: var(--text);
}

/* V-13 案A（仮説検証画面）: 判定チップの視覚分化（§10 準拠: 全周ボーダー+背景、塗りつぶしはしない） */
.fc-chip--verdict-supported {
  border-color: var(--brand);
  color: var(--brand-ink);
}
.fc-chip--verdict-supported strong {
  color: var(--brand-ink);
}
.fc-chip--verdict-weak {
  border-color: var(--brand-100);
  color: var(--brand-ink);
}
.fc-chip--verdict-rejected {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-tertiary);
}
.fc-chip--verdict-rejected strong {
  color: var(--text-tertiary);
}
.fc-chip--mini {
  height: 24px;
  padding: 0 8px;
  font-size: 13px;
}

/* カードの見方（凡例）。結果グリッドの直前に1回だけ表示する。枠・背景なしのプレーン表示（2026-07-11 ユーザー指定） */
.fc-chip-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 20px 0 16px;
  padding: 0 2px;
  font-size: 13px;
  color: var(--text-secondary);
}
.fc-chip-legend__title {
  font-weight: 700;
  color: var(--text);
}
.fc-chip-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* CTA ボタンの主従化: 同じ形・同じ太さ・同じ矢印のまま、塗りだけで主従を区別する */
.finding-card__cta--primary,
.finding-card__cta--secondary {
  font-weight: 600;
  border-radius: 8px;
  border-width: 1.5px;
  border-style: solid;
}
.finding-card__cta--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.finding-card__cta--primary:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}
.finding-card__cta--secondary {
  background: var(--surface);
  color: var(--brand);
  border-color: var(--brand);
}
.finding-card__cta--secondary:hover {
  background: var(--brand-50);
}

/* 簡易★ 表示（plain-language.js） — stats-tooltip の evidence-stars と独立 */
.plain-stars {
  font-size: 13px;
  letter-spacing: 1px;
}

/* ============================================================
 * 該当データ一覧モーダル / 経営要約モーダル
 * ============================================================ */

.hrbi-affected-rows-modal__table th,
.hrbi-affected-rows-modal__table td {
  padding: 4px 8px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.hrbi-affected-rows-modal__table th {
  background: var(--surface-2);
  color: var(--text-secondary);
}

.hrbi-exec-summary-modal h3 {
  margin: 0 0 6px;
}
.hrbi-exec-summary-modal__sec {
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: 8px;
}
.hrbi-exec-summary-modal__sec h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.hrbi-exec-summary-modal__sec p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}
.hrbi-exec-summary-modal__error {
  color: var(--err);
  font-size: 13px;
}
/* V-9 Phase 6: 組織背景セクション。データ事実セクションと視覚的に区別するため、
   全周ボーダー + brand 系の薄い背景色（§10 準拠：左ライン強調を使わない）。
   レビュー反映: ボーダーは brand-100 寄りで落ち着かせ、データ事実セクションより
   組織知の方が「正しい情報」と誤読されないよう主張を控える。 */
.hrbi-exec-summary-modal__sec--org-context {
  background: var(--brand-50, #e8effa);
  border: 1px solid var(--brand-100, #c9d8ee);
  border-radius: 8px;
}
.hrbi-exec-summary-modal__org-context-note {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
}
.hrbi-exec-summary-modal__org-context-source {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.hrbi-exec-summary-modal__org-context-source summary {
  cursor: pointer;
}
.hrbi-exec-summary-modal__org-context-source ul {
  margin: 6px 0 0;
  padding-left: 20px;
}
.hrbi-exec-summary-modal__org-context-source li {
  margin: 2px 0;
  line-height: 1.6;
}

/* =========================================================================
 * トピック充足度パネル（hypothesis-improvement-v1-spec.md §1.3）
 * デザイン規範: issue-method-section と揃える（濃紺ヘッダ + 薄背景本体）。
 * カラフルアイコンは使わず、左ドット濃淡のみで階層表現。
 * ========================================================================= */
.topic-coverage-root:empty {
  display: none;
}
/* 「分析できる範囲」画面（独立ページ） */
.topic-coverage-page {
  width: 100%;
  padding-bottom: 64px;
}
.topic-coverage-page__header {
  margin-bottom: 24px;
}
.topic-coverage-page__title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.topic-coverage-page__lead {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}
.topic-coverage-page__empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
}
.topic-coverage-page__empty p {
  margin: 0 0 12px;
}
.topic-coverage-page__empty p:last-child {
  margin: 16px 0 0;
}
.topic-coverage-panel.issue-method-section {
  margin-bottom: 24px;
}
.topic-coverage-panel__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* レベル別グループ（details/summary） */
.topic-coverage-group {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topic-coverage-group:first-child {
  border-top: none;
}
.topic-coverage-group:last-child {
  border-bottom: none;
}
.topic-coverage-group__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-subtle);
  transition: background 0.15s ease;
}
.topic-coverage-group__summary:hover {
  background: var(--bg-muted);
}
.topic-coverage-group__summary::-webkit-details-marker {
  display: none;
}
.topic-coverage-group__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
}
.topic-coverage-group--full .topic-coverage-group__dot   { background: #14161a; }
.topic-coverage-group--partial .topic-coverage-group__dot { background: #6a6f77; }
.topic-coverage-group--limited .topic-coverage-group__dot { background: #b3b6bc; }
.topic-coverage-group--unavailable .topic-coverage-group__dot {
  background: transparent;
  border: 1px solid #b3b6bc;
}
.topic-coverage-group__label {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.topic-coverage-group__count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: 999px;
}
.topic-coverage-group__intro {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 4px;
}
.topic-coverage-group__chevron {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.topic-coverage-group[open] .topic-coverage-group__chevron {
  transform: rotate(-135deg);
}
.topic-coverage-group__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
  padding: 12px 28px 18px;
  background: var(--surface);
}

/* 各トピックカード（モノトーン、絵文字なし、左帯で階層表現） */
.topic-coverage-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 6px);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font: inherit;
  color: inherit;
}
.topic-coverage-card:hover {
  background: var(--bg-subtle);
  border-color: var(--text);
}
.topic-coverage-card--unavailable {
  background: var(--surface-2);
}
.topic-coverage-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.005em;
}
.topic-coverage-card--unavailable .topic-coverage-card__name {
  color: var(--text-secondary);
}
.topic-coverage-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}
/* 充足度ゲージ（モノトーン濃淡）。レベルごとに fill 色を切り替える */
.topic-coverage-card__gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}
.topic-coverage-card__gauge-track {
  flex: 1;
  height: 6px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.topic-coverage-card__gauge-fill {
  height: 100%;
  background: var(--text);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.topic-coverage-card--full .topic-coverage-card__gauge-fill    { background: #14161a; }
.topic-coverage-card--partial .topic-coverage-card__gauge-fill { background: #6a6f77; }
.topic-coverage-card--limited .topic-coverage-card__gauge-fill { background: #b3b6bc; }
.topic-coverage-card--unavailable .topic-coverage-card__gauge-fill { background: #d6d8dc; }
.topic-coverage-card__gauge-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}
.topic-coverage-card--unavailable .topic-coverage-card__gauge-value {
  color: var(--text-tertiary);
}

/* ── 詳細モーダル（モノトーン） ── */
.topic-detail-modal-backdrop {
  z-index: 1100;
}
.topic-detail-modal.modal {
  max-width: 560px;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(85vh, 720px);
}
.topic-detail-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.topic-detail-modal__title-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.topic-detail-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}
.topic-detail-modal__level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.topic-detail-modal__level--full    .topic-coverage-group__dot { background: #14161a; }
.topic-detail-modal__level--partial .topic-coverage-group__dot { background: #6a6f77; }
.topic-detail-modal__level--limited .topic-coverage-group__dot { background: #b3b6bc; }
.topic-detail-modal__level--unavailable .topic-coverage-group__dot {
  background: transparent;
  border: 1px solid #b3b6bc;
}
.topic-detail-modal__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
}
.topic-detail-modal__close:hover {
  background: var(--bg-muted);
}
.topic-detail-modal__body {
  padding: 18px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.topic-detail-modal__desc {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.topic-detail-modal__section {
  margin: 0 0 20px;
}
.topic-detail-modal__section:last-child {
  margin-bottom: 0;
}
.topic-detail-modal__section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.topic-detail-modal__status,
.topic-detail-modal__hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
/* 詳細モーダル内の充足度ゲージ（カード版より太め） */
.topic-detail-modal__gauge {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.topic-detail-modal__gauge-track {
  flex: 1;
  height: 10px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.topic-detail-modal__gauge-fill {
  height: 100%;
  background: var(--text);
  border-radius: 999px;
}
.topic-detail-modal__gauge-fill--full        { background: #14161a; }
.topic-detail-modal__gauge-fill--partial     { background: #6a6f77; }
.topic-detail-modal__gauge-fill--limited     { background: #b3b6bc; }
.topic-detail-modal__gauge-fill--unavailable { background: #d6d8dc; }
.topic-detail-modal__gauge-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 44px;
  text-align: right;
}
.topic-detail-modal__cols {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 6px);
  padding: 10px 12px;
}
.topic-detail-modal__cols-title {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.topic-detail-modal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.topic-detail-modal__list--missing {
  flex-direction: column;
  gap: 6px;
}
.topic-detail-modal__list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.topic-detail-modal__list-tag {
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.03em;
  min-width: 100px;
}
.topic-detail-modal__list code {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  background: var(--bg-muted);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--text);
}
.topic-detail-modal__muted {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}
.topic-detail-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
}

/* === Phase B-2: アップロードモード選択画面 === */
.upload-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .upload-mode-grid {
    grid-template-columns: 1fr;
  }
}
.upload-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 28px 28px 24px;
  background: var(--surface, #fff);
  border: 2px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.05s ease;
  font: inherit;
  color: inherit;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
.upload-mode-card:hover {
  border-color: var(--brand);
  background: var(--brand-50);
  box-shadow: 0 6px 16px rgba(43, 74, 110, 0.12);
  transform: translateY(-1px);
}
.upload-mode-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.upload-mode-card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.upload-mode-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
}
.upload-mode-card__icon svg {
  width: 26px;
  height: 26px;
}
.upload-mode-card__title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: 0.01em;
}
.upload-mode-card__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary, #555);
  margin-bottom: 20px;
}
.upload-mode-card__hl {
  display: block;
  margin-top: 6px;
  color: var(--text);
}
.upload-mode-card__cta {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.upload-mode-card:hover .upload-mode-card__cta {
  color: var(--brand-ink);
}

/* === 種類指定モード画面の取り込み先年度（読み取り専用カード） ===
 * 規約 §10: 全周ボーダー + 背景色（左ライン強調禁止） */
.upload-fiscal-year-display {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f7f7f7);
  border-radius: var(--r-md, 8px);
}
.upload-fiscal-year-display__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.upload-fiscal-year-display__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.upload-fiscal-year-display__hint {
  font-size: 13px;
  color: var(--text-tertiary, #888);
  margin-left: auto;
}

/* === V-9: 真因探索画面（Phase 3） ===
 * 規約 §10: 全周ボーダー + 背景色（左ライン強調禁止） */

.screen-back-row {
  margin: 0;
}
.screen-back-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}
.screen-back-link:hover {
  text-decoration: underline;
}

/* 画面ヘッダー（画面名とサブタイトル） */
.screen-page-header {
  margin: 0;
}
.screen-page-header__title {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.02em;
}
.screen-page-header__subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.screen-section {
  margin: 0;
}
.screen-section__title {
  margin: 0 0 8px;
  font-size: 18px;
}
.screen-section__lead {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 「あなたが追加した切り口」の折り畳みヘッダ */
/* ============================================================================
 * Phase 7: あなたが追加した切り口（紐づけられたカスタムグラフ）
 * ========================================================================= */

.discovery-custom-charts-empty {
  margin: 12px 0 0;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.discovery-custom-charts__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.discovery-custom-charts__card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px;
  gap: 10px;
}
.discovery-custom-charts__thumb {
  width: 100%;
  height: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.discovery-custom-charts__thumb svg,
.discovery-custom-charts__thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.discovery-custom-charts__thumb--empty {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
  text-align: center;
  padding: 0 12px;
}
.discovery-custom-charts__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.discovery-custom-charts__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}
.discovery-custom-charts__axes {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.discovery-custom-charts__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.discovery-custom-charts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* 保存ダイアログ: 課題紐づけチェックボックス行 */
.save-dialog__issue-link-row {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.save-dialog__issue-link-select {
  width: 100%;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  cursor: pointer;
}

.discovery-empty {
  margin: 12px 0 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--surface-2, #f7f7f7);
  border-radius: var(--r-md, 8px);
}

/* ============================================================
 * 真因探索画面 案A: ステップナビ / 幕マーカー / AI 問い1問ずつ送り式 /
 * 切り口の折りたたみバー / 終端サマリー。既存クラスは変更せず追加のみ。
 * ============================================================ */

/* === 共通: rationale ツールチップ === */
.discovery-tooltip {
  position: fixed;
  z-index: 1500;
  max-width: 320px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  white-space: pre-wrap;
}
.discovery-tooltip[hidden] {
  display: none;
}

/* === モード選択画面の取り込み先年度プルダウン === */
.upload-fiscal-year-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2, #f7f7f7);
  border-radius: var(--r-md, 8px);
}
.upload-fiscal-year-row__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.upload-fiscal-year-row__select {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text);
  min-width: 120px;
}

/* === 社員マスタ未登録時の警告バナー（モード選択画面） ===
 * 規約: 全周ボーダー + 背景色（coding-conventions §10「左ライン強調禁止」） */
.upload-master-warning {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--warn);
  background: var(--warn-50);
  border-radius: var(--r-md, 8px);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}
.upload-master-warning strong {
  color: var(--warn);
  margin-right: 4px;
}

/* === AI 判定モードカードの無効化状態（社員マスタ未登録時） === */
.upload-mode-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  background: var(--surface-2, #f5f5f5);
  box-shadow: none;
}
.upload-mode-card.is-disabled:hover {
  border-color: var(--border);
  background: var(--surface-2, #f5f5f5);
  box-shadow: none;
  transform: none;
}
.upload-mode-card.is-disabled:active {
  transform: none;
  box-shadow: none;
}
.upload-mode-card__cta--disabled {
  color: var(--text-tertiary, #888);
  font-weight: 600;
}
.upload-mode-card.is-disabled:hover .upload-mode-card__cta--disabled {
  color: var(--text-tertiary, #888);
}

/* === Phase B-2: モード変更リンク（既存upload・AI判定モード共通） === */
.upload-mode-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.upload-mode-back {
  font-size: 13px;
  color: var(--text-muted, #555);
  text-decoration: none;
}
.upload-mode-back:hover {
  color: var(--text-color, #222);
  text-decoration: underline;
}

/* === Phase B-2-2/3: AI判定モードのファイル取り込み画面 === */
.upload-ai-step {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.upload-ai-step:first-of-type {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}
.upload-ai-step__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.upload-ai-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text-color, #222);
  color: var(--bg-1, #fff);
  font-size: 13px;
  font-weight: 600;
}
.upload-ai-step__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--text-color, #222);
}
.upload-ai-step__body {
  padding-left: 36px;
}
.upload-ai-step--analyzing .upload-ai-step__num {
  background: var(--text-muted, #555);
}
.upload-ai-warn {
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2, #fafafa);
  color: var(--text-muted, #555);
  font-size: 13px;
}
.upload-ai-error {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2, #fafafa);
  color: var(--text-color, #222);
  font-size: 13px;
}
.upload-ai-dropzone {
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-2, #fafafa);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-ai-dropzone:hover {
  border-color: var(--text-color, #222);
}
.upload-ai-dropzone:focus-visible {
  outline: 2px solid var(--text-color, #222);
  outline-offset: 2px;
}
.upload-ai-dropzone--active {
  border-color: var(--text-color, #222);
  border-style: solid;
  background: var(--bg-1, #fff);
}
.upload-ai-dropzone__label {
  margin: 8px 0 4px;
  font-size: 14px;
  color: var(--text-color, #222);
}
.upload-ai-dropzone__filename {
  font-size: 16px;
  font-weight: 700;
}
.upload-ai-dropzone__filesize {
  font-size: 14px;
  color: var(--text-secondary);
}
.upload-ai-hint {
  margin-top: 16px;
}
.upload-ai-hint__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color, #222);
  margin-bottom: 6px;
}
.upload-ai-hint textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-1, #fff);
  resize: vertical;
}
.upload-ai-hint__desc {
  margin-top: 6px;
  font-size: 13px;
}
.upload-ai-progress {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upload-ai-progress__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-color, #222);
}
.upload-ai-progress__item--done .upload-ai-progress__label {
  color: var(--text-muted, #555);
}
.upload-ai-progress__bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: var(--bg-1, #fff);
  background: var(--text-color, #222);
}
.upload-ai-progress__item--active .upload-ai-progress__bullet {
  background: transparent;
  border: 2px solid var(--text-color, #222);
  border-top-color: transparent;
  animation: upload-ai-spin 0.9s linear infinite;
}
@keyframes upload-ai-spin {
  to { transform: rotate(360deg); }
}
.upload-ai-progress__label {
  flex: 1;
}
.upload-ai-progress__time {
  font-size: 13px;
  color: var(--text-muted, #555);
  font-variant-numeric: tabular-nums;
}
.upload-ai-progress__summary {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted, #555);
}
.upload-ai-summary {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2, #fafafa);
}
.upload-ai-summary__lead {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-color, #222);
}
.upload-ai-summary__desc {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin: 0 0 10px;
}
.upload-ai-summary__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 16px;
}
.upload-ai-summary__list li {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.upload-ai-summary__list span {
  color: var(--text-muted, #555);
}
.upload-ai-summary__list strong {
  color: var(--text-color, #222);
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}
.upload-ai-q1 {
  margin-top: 20px;
}
.upload-ai-q1__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-color, #222);
}
.upload-ai-q1__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.upload-ai-q1__option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-ai-q1__option:hover {
  border-color: var(--text-color, #222);
  background: var(--bg-2, #fafafa);
}
.upload-ai-q1__option input[type="radio"] {
  margin-top: 3px;
}
.upload-ai-q1__option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.upload-ai-q1__option-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color, #222);
}
.upload-ai-q1__option-desc {
  font-size: 13px;
  color: var(--text-muted, #555);
}
.upload-ai-q1__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--text-color, #222);
  border-radius: 3px;
  color: var(--text-color, #222);
  background: var(--bg-1, #fff);
}
.upload-ai-q1__other {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2, #fafafa);
}
.upload-ai-q1__other label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-color, #222);
}
.upload-ai-q1__other textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-1, #fff);
  resize: vertical;
  margin-bottom: 8px;
}

/* === Phase B-2-4: 構造判定の救済ダイアログ === */
.structure-mismatch {
  max-width: 480px;
  padding: 24px;
}
.structure-mismatch__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}
.structure-mismatch__message {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 8px;
  color: var(--text);
}
.structure-mismatch__hint {
  /* §10 準拠: 全周ボーダー + 背景色（左ラインのみの色付け禁止） */
  font-size: 13px;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
}
.structure-mismatch__question {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin: 12px 0 16px;
}
.structure-mismatch__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.structure-mismatch__actions .btn {
  width: 100%;
}
.structure-validation__list {
  margin: 8px 0 12px;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-color, #222);
}
.structure-validation__list li {
  margin-bottom: 4px;
}

/* === Phase B-3-1: 列役割確認画面 === */
.upload-ai-confirm__summary {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2, #fafafa);
}
.upload-ai-confirm__summary-lead {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__summary-desc {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin: 0 0 10px;
}
.upload-ai-confirm__summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
}
.upload-ai-confirm__summary-list li {
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.upload-ai-confirm__summary-list span {
  color: var(--text-muted, #555);
}
.upload-ai-confirm__summary-list strong {
  color: var(--text-color, #222);
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}
.upload-ai-confirm__table-wrap {
  margin-top: 16px;
}
.upload-ai-confirm__table th,
.upload-ai-confirm__table td {
  vertical-align: top;
}
.upload-ai-confirm__col-name { min-width: 160px; }
.upload-ai-confirm__col-role { min-width: 90px; white-space: nowrap; }
.upload-ai-confirm__col-dir  { min-width: 130px; white-space: nowrap; }
.upload-ai-confirm__col-ai-eval { width: 70px; text-align: center; white-space: nowrap; }
.upload-ai-confirm__col-detail { min-width: 200px; }
.upload-ai-confirm__col-action { width: 100px; text-align: right; white-space: nowrap; }
.upload-ai-confirm__cell-ai-eval { text-align: center; }
.upload-ai-confirm__edit-btn {
  white-space: nowrap;
}
.upload-ai-confirm__ai-eval-badge {
  display: inline-block;
  min-width: 26px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted, #555);
  background: var(--bg-1, #fff);
  font-variant-numeric: tabular-nums;
}
.upload-ai-confirm__ai-eval-badge--A {
  /* A は薄め（目線を引かない） */
  color: var(--text-muted, #555);
  border-color: var(--border);
}
.upload-ai-confirm__ai-eval-badge--B {
  color: var(--text-color, #222);
  border-color: var(--text-muted, #555);
}
.upload-ai-confirm__ai-eval-badge--C {
  color: var(--text-color, #222);
  border-color: var(--text-color, #222);
  background: var(--bg-2, #fafafa);
}
.upload-ai-confirm__user-edited {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 13px;
  color: var(--text-muted, #555);
  border: 1px solid var(--border);
  border-radius: 3px;
  vertical-align: 1px;
  white-space: nowrap;
}
.upload-ai-confirm__user-edited-label {
  /* テキスト本体（モバイルでは省略可能にする想定） */
}

/* =========================================================================
 * データマップ画面（#/data-map）
 * 仕様: documents/specs/data-map-spec.md
 * §10 ルール: 強調は全周ボーダー + 背景色（左ラインだけ色付きは禁止）
 * ======================================================================= */

.data-map-page {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.data-map-page__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.data-map-page__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text-color, #222);
}
.data-map-page__lead {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0;
}
.data-map-page__year {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 12px;
  background: var(--surface-2, #fafafa);
  font-size: 13px;
  color: var(--text-color, #222);
}
.data-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #fafafa);
  font-size: 13px;
  color: var(--text-color, #222);
}
.data-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.data-map-legend__swatch {
  display: inline-block;
  /* SVG ノードのミニチュアとして対応関係を伝えるため横長に */
  width: 24px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--border, #e5e7eb);
}
.data-map-legend__swatch--builtin {
  background: var(--brand-50, #eaf1f8);
  border-color: var(--brand, #0f4c81);
}
.data-map-legend__swatch--user {
  background: var(--surface, #fff);
  border-style: dashed;
  border-color: var(--text-secondary, #666);
}
.data-map-legend__hint {
  margin-left: auto;
  color: var(--text-secondary, #666);
}

/* キャンバス: SVG（広い画面）/ リスト（狭い画面） */
.data-map-canvas {
  position: relative;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-md, 8px);
  background: var(--surface, #fff);
  overflow: hidden;
}
.data-map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
}
.data-map-svg__edges line.data-map-edge__line {
  stroke: var(--text-tertiary, #9ca3af);
  stroke-width: 1.5;
}
.data-map-edge__label-bg {
  fill: var(--surface, #fff);
  stroke: var(--border, #e5e7eb);
  stroke-width: 1;
}
.data-map-edge__label {
  font-size: 13px;
  fill: var(--text-secondary, #666);
  font-family: inherit;
}

.data-map-node {
  cursor: pointer;
  outline: none;
}
.data-map-node:focus-visible .data-map-node__rect {
  stroke: var(--brand, #0f4c81);
  stroke-width: 2.5;
}
.data-map-node__rect {
  fill: var(--surface, #fff);
  stroke: var(--border, #e5e7eb);
  stroke-width: 1.5;
  transition: fill 120ms ease, stroke 120ms ease;
}
.data-map-node--builtin .data-map-node__rect {
  fill: var(--brand-50, #eaf1f8);
  stroke: var(--brand, #0f4c81);
}
.data-map-node--user .data-map-node__rect {
  fill: var(--surface, #fff);
  stroke: var(--text-secondary, #666);
  stroke-dasharray: 5 3;
}
.data-map-node--center .data-map-node__rect {
  stroke-width: 2;
}
.data-map-node.is-active .data-map-node__rect {
  fill: var(--brand-100, #d6e4f0);
  stroke-width: 2.5;
}
.data-map-node:hover:not(.is-active) .data-map-node__rect {
  fill: var(--brand-50, #eaf1f8);
}
.data-map-node__label {
  font-size: 13px;
  font-weight: 600;
  fill: var(--text-color, #222);
  font-family: inherit;
}
.data-map-node__count {
  font-size: 13px;
  fill: var(--text-secondary, #666);
  font-family: inherit;
}

/* フォールバックリスト（狭い画面用） */
.data-map-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: none;  /* 広い画面では SVG だけ。メディアクエリで切替 */
  flex-direction: column;
  gap: 8px;
}
.data-map-list__item {
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
  cursor: pointer;
  outline: none;
}
.data-map-list__item:hover,
.data-map-list__item:focus-visible {
  background: var(--brand-50, #eaf1f8);
  border-color: var(--brand, #0f4c81);
}
.data-map-list__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.data-map-list__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface-2, #fafafa);
}
.data-map-list__badge--builtin {
  background: var(--brand-50, #eaf1f8);
  border-color: var(--brand, #0f4c81);
}
.data-map-list__badge--user {
  border-style: dashed;
}
.data-map-list__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-color, #222);
}
.data-map-list__meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary, #666);
}

@media (max-width: 800px) {
  .data-map-svg {
    display: none;
  }
  .data-map-list {
    display: flex;
  }
}

/* Empty 状態 */
.data-map-empty {
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #fafafa);
}
.data-map-empty__msg {
  font-size: 14px;
  color: var(--text-color, #222);
  margin: 0 0 6px;
}
.data-map-empty__hint {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0 0 16px;
}

/* =========================================================================
 * データマップ詳細パネル（右からスライドイン）
 * ======================================================================= */
.data-map-detail-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 50;
}
.data-map-detail-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.data-map-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 95vw);
  height: 100vh;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, #e5e7eb);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);
  transform: translateX(100%);
  transition: transform 200ms ease;
  z-index: 51;
  overflow-y: auto;
}
.data-map-detail-panel.is-open {
  transform: translateX(0);
}
.data-map-detail-panel__inner {
  padding: 18px 20px 24px;
}

.data-map-detail__header {
  position: sticky;
  top: 0;
  background: var(--surface, #fff);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.data-map-detail__kind {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid var(--border, #e5e7eb);
  background: var(--surface-2, #fafafa);
  color: var(--text-secondary, #666);
}
.data-map-detail__kind--user {
  border-style: dashed;
}
.data-map-detail__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-color, #222);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-map-detail__close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 6px;
  background: var(--surface, #fff);
  font-size: 18px;
  cursor: pointer;
  color: var(--text-color, #222);
}
.data-map-detail__close:hover {
  background: var(--surface-2, #fafafa);
}

.data-map-detail__section {
  margin-bottom: 16px;
}
.data-map-detail__section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-color, #222);
}
.data-map-detail__summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 13px;
  color: var(--text-color, #222);
}
.data-map-detail__summary dt {
  font-weight: 500;
  color: var(--text-secondary, #666);
}
.data-map-detail__summary dd {
  margin: 0;
}

.data-map-detail__col-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.data-map-detail__col-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #fafafa);
  font-size: 13px;
  /* 1 行を維持。横幅が足りないときだけ折り返す */
  flex-wrap: wrap;
}
.data-map-detail__col-name {
  flex: 0 1 auto;
  font-weight: 500;
  color: var(--text-color, #222);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.data-map-detail__col-role {
  flex: 0 0 auto;
  color: var(--text-secondary, #666);
  white-space: nowrap;
  font-size: 13px;
}
.data-map-detail__col-badges {
  margin-left: auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}
.data-map-col-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text-secondary, #555);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.data-map-col-badge .data-map-icon {
  flex-shrink: 0;
  display: block;
}
.data-map-col-badge--key {
  color: var(--text-color, #222);
  border-color: var(--border-strong, #d4d4d8);
}
.data-map-col-badge--time {
  color: var(--text-color, #222);
  border-color: var(--border-strong, #d4d4d8);
}
.data-map-col-badge--good-high {
  color: var(--ok, #047857);
  border-color: var(--ok, #047857);
  background: var(--ok-50, #ecfdf5);
}
.data-map-col-badge--good-low {
  color: var(--err, #b91c1c);
  border-color: var(--err, #b91c1c);
  background: var(--err-50, #fef2f2);
}
.data-map-col-badge--type {
  color: var(--text-tertiary, #888);
  background: var(--surface-2, #fafafa);
}

.data-map-detail__description {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-color, #222);
  padding: 10px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #fafafa);
}

.data-map-detail__derived-list,
.data-map-detail__rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.data-map-detail__derived-item {
  padding: 6px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
  font-size: 13px;
  color: var(--text-color, #222);
}
.data-map-detail__rule-item {
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
}
.data-map-detail__rule-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-color, #222);
}
.data-map-detail__rule-excerpt {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-secondary, #666);
}

.data-map-detail__context {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #fafafa);
  font-size: 13px;
  color: var(--text-secondary, #666);
  white-space: pre-wrap;
  word-break: break-word;
}

.data-map-detail__tech {
  margin: 16px 0;
  padding: 8px 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #fafafa);
  font-size: 13px;
}
.data-map-detail__tech > summary {
  cursor: pointer;
  color: var(--text-secondary, #666);
  font-weight: 500;
}
.data-map-detail__tech-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 8px 0 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 13px;
  color: var(--text-color, #222);
}
.data-map-detail__tech-list dt {
  color: var(--text-secondary, #666);
}
.data-map-detail__tech-list dd {
  margin: 0;
  word-break: break-all;
}

/* === Phase B-1.4: 補足由来の業務ルール一覧 === */
/* 哲学②: AI 抽出された rules は「答え」ではなく「集計の軸」として提示。 */
/* 全周ボーダー + 背景色（§10 ルール: 左ラインだけ色付きは禁止）。 */
.upload-ai-confirm__rules {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #fafafa);
}
.upload-ai-confirm__rules-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__rules-hint {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0 0 12px;
}
.upload-ai-confirm__rules-status {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0;
}
.upload-ai-confirm__rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upload-ai-confirm__rule-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
}
.upload-ai-confirm__rule-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__rule-checkbox {
  /* デフォルトのまま */
}
.upload-ai-confirm__rule-text {
  font-weight: 500;
}
.upload-ai-confirm__rule-excerpt {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin-left: 24px;
}

/* === 値正規化 Phase 2: 「似た値の統合確認」セクション（マッピング画面 / AI 確認画面で共用） === */
/* 全周ボーダー + 背景色（§10 ルール: 左ラインだけ色付きは禁止）。絵文字は使わない（L2）。 */
.alias-confirm {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #fafafa);
}
.alias-confirm__title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-color, #222);
}
.alias-confirm__hint {
  font-size: 13px;
  color: var(--text-secondary, #666);
  margin: 0 0 12px;
}
.alias-confirm__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alias-confirm__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
}
/* チェック ON の項目は「統合される」ことが一目で分かるよう全周ボーダー + 薄背景で強調（§10） */
.alias-confirm__item--checked {
  border-color: var(--brand);
  background: var(--brand-50);
}
.alias-confirm__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.alias-confirm__column-badge {
  font-weight: 500;
  color: var(--text-color, #222);
}
.alias-confirm__ai-badge {
  font-size: 13px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #fafafa);
  color: var(--text-secondary, #666);
}
.alias-confirm__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-left: 24px;
}
.alias-confirm__canonical-row,
.alias-confirm__variants-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.alias-confirm__canonical-input {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  min-width: 120px;
}
.alias-confirm__variants {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.alias-confirm__variant {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  background: var(--surface-2, #faf9f5);
  font-size: 13px;
}
.alias-confirm__variant-value {
  font-weight: 600;
  color: var(--brand);
}
.alias-confirm__variant-count {
  font-size: 13px;
  color: var(--text-secondary, #666);
}
.alias-confirm__reason {
  font-size: 13px;
  color: var(--text-tertiary, #999);
  margin-left: 2px;
}
.alias-confirm__reason::before {
  content: "・";
  margin-right: 2px;
}
.alias-confirm__canonical-label,
.alias-confirm__variants-label {
  color: var(--text-secondary, #666);
  font-size: 13px;
  white-space: nowrap;
}
.alias-confirm__actions {
  margin-top: 12px;
}

/* === 値正規化 Phase 2 ステージD: 表記ゆれ統合内容の参照モーダル === */
.alias-dict-modal__body {
  margin-top: 16px;
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.alias-dict-modal__group-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-color, #222);
}
.alias-dict-modal__entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.alias-dict-modal__entry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
  background: var(--surface-2, #fafafa);
}
.alias-dict-modal__entry-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.alias-dict-modal__canonical {
  font-weight: 600;
  color: var(--text-color, #222);
}
.alias-dict-modal__arrow {
  color: var(--text-tertiary, #999);
}
.alias-dict-modal__variants {
  color: var(--text-secondary, #666);
}
.alias-dict-modal__entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary, #666);
}
.alias-dict-modal__source-badge {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm, 6px);
  background: var(--surface, #fff);
}
.alias-dict-modal__delete-btn {
  margin-left: auto;
}
.alias-dict-modal__applied {
  font-size: 13px;
  color: var(--text-tertiary, #999);
}

/* === Phase B-3-3: 保存設定 === */
.upload-ai-confirm__save {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2, #fafafa);
}
.upload-ai-confirm__save-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__save-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px 16px;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .upload-ai-confirm__save-grid {
    grid-template-columns: 1fr;
  }
}
.upload-ai-confirm__save-field {
  display: flex;
  flex-direction: column;
}
.upload-ai-confirm__save-label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__save-input {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-1, #fff);
  color: var(--text-color, #222);
}
.upload-ai-confirm__save-input:focus {
  outline: 2px solid var(--text-color, #222);
  outline-offset: -1px;
  border-color: var(--text-color, #222);
}
textarea.upload-ai-confirm__save-input {
  resize: vertical;
}
.upload-ai-confirm__save-hint {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin-top: 4px;
}
/* 年度プルダウン廃止に伴う読み取り専用表示 */
.upload-ai-confirm__save-readonly {
  font: inherit;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2, #f7f7f7);
  color: var(--text);
}

/* === 取込済みファイル一覧（テーブル × 年度のマトリクス） === */
.import-status__groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}
.import-status__group {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.import-status__group-title {
  margin: 0;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-2, #fafafa);
  border-bottom: 1px solid var(--border);
  color: var(--text-color, #222);
  display: flex;
  align-items: center;
  gap: 8px;
}
.import-status__group-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted, #555);
  background: var(--bg-1, #fff);
}

/* 直近取込パネル（ホーム画面） */
.home-recent-imports {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.home-recent-imports__title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}
.recent-imports-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recent-import-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-1, #fff);
}
.recent-import-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.recent-import-card__title {
  font-weight: 600;
  font-size: 14px;
}
.recent-import-card__tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-muted, #555);
  background: var(--bg-1, #fff);
}
.recent-import-card__when {
  font-size: 13px;
  color: var(--text-tertiary, var(--text-secondary));
}
.recent-import-card__meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.recent-import-card__effect {
  margin: 6px 0 0;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-2, #f6f6f6);
  border-radius: 3px;
}

/* ユーザー独自データの分析切り口セクション（SCR_012 拡張） */
.user-dataset-section {
  margin-top: 24px;
  padding: 18px 20px;
  background: var(--bg-1, #fff);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.user-dataset-section__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.user-dataset-section__lead {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
}
.user-dataset-section__cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-dataset-card {
  padding: 12px 14px;
  background: var(--bg-2, #f6f6f6);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}
.user-dataset-card__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}
.user-dataset-card__list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-primary);
}
.user-dataset-card__list li {
  margin: 2px 0;
}
.import-status__group-table {
  margin: 0;
  width: 100%;
}
.import-status__group-table th,
.import-status__group-table td {
  padding: 6px 12px;
  font-size: 13px;
}
/* === マッピング画面のステータスバナー === */
.mapping-status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 8px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-2, #fafafa);
  color: var(--text-color, #222);
}
.mapping-status-banner strong {
  font-size: 13px;
  font-weight: 600;
}
.mapping-status-banner--warn {
  border-color: var(--warn, #b8761f);
  background: var(--warn-50, #fdf6ec);
}
.mapping-status-banner--ok {
  color: var(--text-muted, #555);
}

.import-status__group-table {
  table-layout: auto;
}
.import-status__table-cell { width: 200px; white-space: nowrap; }
.import-status__file-cell { word-break: break-all; }
.import-status__count-cell { width: 90px; text-align: right; white-space: nowrap; }
.import-status__when-cell { width: 150px; white-space: nowrap; }
.upload-ai-confirm__row--warn {
  background: var(--bg-2, #fafafa);
}
.upload-ai-confirm__row--medium .upload-ai-confirm__cell-detail {
  color: var(--text-muted, #555);
}
/* cell-name は table-cell のままにし、子要素を inline で並べる（行高の不揃いを防ぐ） */
.upload-ai-confirm__warn-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: -2px;
  margin-right: 4px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__cell-name-text {
  font-weight: 500;
}
.upload-ai-confirm__cell-name-sub {
  display: inline-block;
  margin-left: 4px;
  font-size: 13px;
  color: var(--text-muted, #555);
}
.upload-ai-confirm__class-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #555);
  border: 1px solid var(--border);
  border-radius: 3px;
  vertical-align: 1px;
}
.upload-ai-confirm__class-badge--C {
  color: var(--text-color, #222);
  border-color: var(--text-color, #222);
}
.upload-ai-confirm__warn {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-2, #fafafa);
  font-size: 13px;
  color: var(--text-color, #222);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 値正規化 Phase 1: 突合可視化（登録前プレビュー） */
.upload-ai-confirm__join-preview {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text-color, #222);
}
.upload-ai-confirm__join-preview p {
  margin: 0;
}
.upload-ai-confirm__join-preview p + p {
  margin-top: 6px;
}
.upload-ai-confirm__join-preview--warn {
  border: 1px solid var(--warn);
  background: var(--warn-50);
}

/* === Phase B-3-2: 列役割編集モーダル === */
.role-edit-modal {
  max-width: 480px;
  padding: 22px 24px 24px;
}
.role-edit-modal__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--text-color, #222);
}
.role-edit-modal__field {
  margin-bottom: 16px;
}
.role-edit-modal__field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color, #222);
}
.role-edit-modal__input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: var(--bg-1, #fff);
  color: var(--text-color, #222);
}
.role-edit-modal__input:focus {
  outline: 2px solid var(--text-color, #222);
  outline-offset: -1px;
  border-color: var(--text-color, #222);
}
.role-edit-modal__radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.role-edit-modal__radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.role-edit-modal__radio:hover {
  background: var(--bg-2, #fafafa);
}
.role-edit-modal__radio input[type="radio"] {
  margin-top: 3px;
}
.role-edit-modal__radio-body {
  display: flex;
  flex-direction: column;
}
.role-edit-modal__radio-label {
  font-size: 13px;
  color: var(--text-color, #222);
}
.role-edit-modal__radio-desc {
  font-size: 13px;
  color: var(--text-muted, #555);
  margin-top: 2px;
}
.role-edit-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* === Phase E: 保存領域使用量バー（SCR_012） === */
.storage-usage {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.storage-usage--warn {
  border-color: var(--warn);
  background: var(--warn-50);
}
.storage-usage--danger {
  border-color: var(--err);
  background: var(--err-50);
}
.storage-usage__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.92rem;
}
.storage-usage__label {
  color: var(--text-secondary);
}
.storage-usage__pct strong {
  font-size: 1.05rem;
}
.storage-usage--warn .storage-usage__pct {
  color: var(--warn);
}
.storage-usage--danger .storage-usage__pct {
  color: var(--err);
}
.storage-usage__bar {
  margin-top: 8px;
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.storage-usage__fill {
  height: 100%;
  background: var(--ok);
  transition: width 0.3s ease;
}
.storage-usage--warn .storage-usage__fill {
  background: var(--warn);
}
.storage-usage--danger .storage-usage__fill {
  background: var(--err);
}
.storage-usage__msg {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}
.storage-usage--warn .storage-usage__msg,
.storage-usage--danger .storage-usage__msg {
  color: var(--text);
}

.eviction-notice {
  margin: 8px 0 4px;
  padding: 10px 12px;
  border: 1px solid var(--warn);
  background: var(--warn-50);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
}

/* === 施策提案画面: 支持した仮説がまだ無いときの案内・優先度を下げる方向性 === */
.sim-source-context {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.sim-source-context--empty {
  background: var(--warn-50);
  border-color: var(--warn);
}
.sim-source-context__back {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--brand);
  text-decoration: none;
}
.sim-source-context__back:hover {
  text-decoration: underline;
}
/* II-4: weakly_supported バッジ（弱い支持・検討材料）。規約 §10: 全周ボーダー + 背景色 */
.rpt-finding__weak-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  vertical-align: middle;
}
.rpt-finding--weak {
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 8px;
}

/* === Phase B-6: 反証仮説の「優先度が下がる方向性」（施策提案画面の最後の節） === */
.sim-deprio-card__list {
  margin: 8px 0 0;
  padding-left: 1.2em;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* === カスタムグラフ拡張（案①: 軸1+2+3-A/B） === */
/* hidden 属性が CSS の display: flex / block で上書きされないようにする */
.custom-chart-output[hidden],
.custom-rationale[hidden],
.custom-alternatives[hidden],
.custom-readings[hidden],
.custom-table-wrap[hidden],
.custom-limitations[hidden],
.custom-next-questions[hidden],
.custom-actions[hidden] {
  display: none !important;
}
.custom-chart-output {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === Tier ヘッダー（グラフ仕様） — タイトル + 軸の説明だけのシンプルな帯 === */
.custom-rationale {
  padding: 10px 12px;
  background: var(--brand-50);
  border-radius: var(--r-md);
  border: none;
}
.custom-rationale__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.custom-rationale__pill {
  display: inline-block;
  padding: 4px 10px;
  background: var(--brand);
  color: white;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}
.custom-rationale__axes {
  font-size: 1rem;
  color: var(--text);
}
.custom-rationale__why {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Tier 1: グラフから読み取れること（最重要・目を引く） === */
.custom-readings {
  padding: 18px 20px;
  background: var(--brand-50);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--border));
  border-radius: var(--r-md);
}
.custom-readings__title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.custom-readings__list {
  margin: 0;
  padding-left: 1.4em;
  line-height: 1.75;
  font-size: 1rem;
  color: var(--text);
}
.custom-readings__list li {
  margin-bottom: 6px;
}
.custom-readings__note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* === Tier 2: このグラフだけでは言えないこと（補助・控えめ） — 枠なし、見出し+リストのみ === */
.custom-limitations {
  padding: 0 4px;
  border: none;
  background: none;
}
.custom-limitations__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.custom-limitations__list {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.custom-limitations__list li {
  margin-bottom: 4px;
}

/* === Tier 3: グラフの元になった数値（折りたたみ） — 枠なし、summary だけのテキストリンク調 === */
.custom-table-wrap {
  border: none;
  background: none;
  padding: 0 4px;
}
.custom-table-wrap > summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 4px 0;
  font-weight: 600;
  list-style: none;
}
.custom-table-wrap > summary::-webkit-details-marker { display: none; }
.custom-table-wrap > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 100ms ease;
  margin-right: 4px;
}
.custom-table-wrap[open] > summary::before {
  content: "▾ ";
}
.custom-table-scroll {
  margin-top: 10px;
  overflow-x: auto;
}
.custom-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.9rem;
}
.custom-table th,
.custom-table td {
  border: 1px solid var(--border);
  padding: 6px 10px;
  text-align: left;
}
.custom-table th {
  background: var(--surface-2);
  font-weight: 600;
  white-space: nowrap;
}
.custom-table tbody tr:nth-child(even) td {
  background: var(--surface-2);
}

/* === Tier 4: 別の見方 / 次の問い（次の一歩への誘導） — 枠なし、見出し+中身のみ === */
.custom-alternatives,
.custom-next-questions {
  padding: 0 4px;
  border: none;
  background: none;
}
/* セクション見出し共通スタイル: 「グラフから読み取れること」と統一したフォント + アイコン */
.custom-section-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.custom-section-title__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.custom-alternatives__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-alternatives__btn {
  text-align: left;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  line-break: strict;
  white-space: normal;
}
.custom-alternatives__btn strong {
  font-size: 0.95rem;
  line-height: 1.4;
}
.custom-alternatives__btn--restore {
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.custom-alternatives__reason {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
/* 旧: 個別タイトルクラス。今は .custom-section-title に統合済みなので残す必要なし。
 * もし旧スタイルが残っていても上書き合致できるよう、最小フォールバックだけ残す。 */
.custom-next-questions__title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.custom-next-questions__list {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.custom-next-questions__list li {
  margin-bottom: 14px;
}
.custom-next-questions__list li:last-child {
  margin-bottom: 0;
}
.custom-next-questions__question {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text);
}
.custom-next-questions__prompt {
  margin-left: -0.3em;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.custom-next-questions__prompt-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.custom-next-questions__prompt-text {
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  white-space: normal;
  line-break: strict;
  word-break: break-all;
}
.custom-next-questions__try-btn {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.custom-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.custom-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
/* === 探索ツリー UI（パンくず + サイドパネル + 開くボタン） === */
.custom-chart-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.custom-chart-tree-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--brand-50);
  border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--border));
  color: var(--brand);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.custom-chart-tree-btn:hover {
  background: color-mix(in srgb, var(--brand) 15%, var(--surface));
  border-color: var(--brand);
}
.custom-chart-tree-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.custom-chart-tree-btn__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}
.custom-chart-breadcrumb {
  margin: 8px 0 4px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 0.85rem;
}
.custom-chart-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  text-align: left;
}
.custom-chart-breadcrumb__item:hover:not(.custom-chart-breadcrumb__item--current) {
  background: var(--surface);
  border-color: var(--border);
}
.custom-chart-breadcrumb__item--current {
  background: var(--brand-50);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
  font-weight: 600;
  cursor: default;
}
.custom-chart-breadcrumb__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.custom-chart-breadcrumb__item--current .custom-chart-breadcrumb__icon {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.custom-chart-breadcrumb__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.custom-chart-breadcrumb__sep {
  color: var(--text-tertiary);
  user-select: none;
}

/* スライドインパネル（データマップ画面と同じパターン） */
.custom-chart-tree-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 95vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);
  transform: translateX(100%);
  transition: transform 200ms ease;
  z-index: 51;
  overflow-y: auto;
}
.custom-chart-tree-panel.is-open {
  transform: translateX(0);
}
.custom-chart-tree-panel__inner {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.custom-chart-tree-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.custom-chart-tree-panel__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.custom-chart-tree-panel__close {
  padding: 4px 10px;
  font-size: 1.2rem;
  line-height: 1;
}
.custom-chart-tree-panel__hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}
.custom-chart-tree-panel__body {
  flex: 1;
}
.custom-chart-tree-panel__footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.custom-chart-tree-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 50;
}
.custom-chart-tree-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ツリー描画（インデント） */
.custom-chart-tree__root,
.custom-chart-tree__children {
  list-style: none;
  margin: 0;
  padding: 0;
}
.custom-chart-tree__children {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 1px dashed var(--border);
}
.custom-chart-tree__item {
  margin: 4px 0;
}
.custom-chart-tree__node {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  line-height: 1.4;
}
.custom-chart-tree__node:hover {
  background: var(--surface-2);
}
.custom-chart-tree__node--current {
  background: var(--brand-50);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
  font-weight: 600;
}
.custom-chart-tree__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.custom-chart-tree__node--current .custom-chart-tree__icon {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.custom-chart-tree__name {
  font-size: 0.9rem;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Phase 7: 真因探索からの遷移時のみ表示される戻りナビ */
.custom-chart-issue-back {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.custom-chart-issue-back__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, #1a56db);
  text-decoration: none;
}
.custom-chart-issue-back__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.custom-chart-gallery-link {
  font-size: 0.86rem;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
.custom-chart-gallery-link:hover {
  text-decoration: underline;
}
.custom-chart-intro {
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.custom-chart-intro__lead {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}
.custom-chart-intro__points {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.custom-chart-intro__points li {
  margin-bottom: 3px;
}
.custom-chart-intro__points a {
  color: var(--brand);
  text-decoration: none;
}
.custom-chart-intro__points a:hover {
  text-decoration: underline;
}
.custom-chart-intro__examples {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.custom-chart-intro__examples span {
  font-weight: 600;
  color: var(--text-secondary);
}
/* Phase 3-2: カスタムグラフの「データの範囲」セレクタ */
.custom-chart-scope {
  margin: 12px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2, #fafafa);
  display: flex;
  flex-wrap: wrap;  /* ヒント文を改行させるため必須 */
  align-items: center;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--text);
}
.custom-chart-scope__label {
  font-weight: 600;
  color: var(--text);
}
.custom-chart-scope__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.custom-chart-scope__opt.is-disabled {
  cursor: not-allowed;
  color: var(--text-tertiary, #9ca3af);
}
.custom-chart-scope__opt input[type="radio"] {
  cursor: pointer;
}
.custom-chart-scope__opt.is-disabled input[type="radio"] {
  cursor: not-allowed;
}
.custom-chart-scope__hint {
  flex-basis: 100%;
  font-size: 13px;
  color: var(--text-secondary, #6b7280);
  margin-top: 2px;
}
.custom-chart-scope__hint code {
  background: var(--surface);
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
}

.custom-chart-preflight {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  line-height: 1.55;
}
.custom-chart-preflight--warn {
  background: var(--warn-50);
  border: 1px solid var(--warn);
  color: var(--text);
}
.custom-chart-preflight a {
  color: var(--brand);
  text-decoration: underline;
}
.custom-chart-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.custom-chart-hint a {
  color: var(--brand);
  text-decoration: none;
}
.custom-chart-hint a:hover {
  text-decoration: underline;
}

/* === グラフギャラリー画面 === */
.chart-gallery-card {
  padding: 24px 28px;
}
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 16px 0 8px;
  border-bottom: 1px solid var(--border);
}
.gallery-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.92rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}
.gallery-tab:hover {
  color: var(--text);
}
.gallery-tab--active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.gallery-cat-desc {
  margin: 0 0 16px;
  font-size: 0.86rem;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}
.gallery-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gallery-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(43, 74, 110, 0.08);
}
.gallery-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.gallery-card__title {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.gallery-card__desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  min-height: 2.6em;
}
.gallery-card__chart {
  height: 240px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.gallery-card__actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

/* === テンプレート管理画面（タブ + グラフ一覧 + ボード一覧）=== */
.tpl-card {
  padding: 24px 28px;
}
.tpl-tabs {
  display: flex;
  gap: 4px;
  margin: 16px 0 8px;
  border-bottom: 1px solid var(--border);
}
.tpl-tab {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}
.tpl-tab:hover { color: var(--text); }
.tpl-tab--active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.tpl-body {
  margin-top: 12px;
}
.tpl-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tpl-toolbar input[type="search"] {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-family: inherit;
}
.tpl-tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.tpl-tag-filter__label {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-right: 4px;
}
.tpl-tag-chip {
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.tpl-tag-chip:hover { border-color: var(--brand); color: var(--brand); }
.tpl-tag-chip--on {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.tpl-tag-chip-clear {
  padding: 3px 10px;
  background: transparent;
  border: none;
  font-size: 0.82rem;
  color: var(--err);
  cursor: pointer;
  text-decoration: underline;
}
.tpl-count {
  margin: 0 0 12px;
  font-size: 0.86rem;
}
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
}
.tpl-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
}
.tpl-empty p { margin: 6px 0; }

.tpl-chart-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tpl-chart-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(43, 74, 110, 0.08);
}
.tpl-chart-card__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tpl-pin {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-tertiary);
  padding: 0;
  line-height: 1;
}
.tpl-pin--on { color: var(--warn); }
.tpl-chart-card__title-block { flex: 1; min-width: 0; }
.tpl-chart-card__name {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.tpl-chart-card__type {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.tpl-chart-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tpl-chart-card__tag {
  padding: 2px 8px;
  background: var(--brand-50);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--brand-ink);
}
.tpl-chart-card__desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.tpl-chart-card__req {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-style: italic;
}
.tpl-chart-card__req span {
  color: var(--text-secondary);
  font-style: normal;
}
.tpl-chart-card__thumb {
  height: 200px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
}
.tpl-thumb__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 12px;
}
.tpl-chart-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.tpl-chart-card__snap-badge {
  background: var(--ok-50);
  color: var(--ok);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.tpl-chart-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tpl-chart-card__del { color: var(--err); }

/* === ボード関連 === */
.tpl-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.tpl-board-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tpl-board-card__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.tpl-board-card__name {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}
.tpl-board-card__desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.tpl-board-card__count {
  margin: 0;
  font-size: 0.86rem;
  color: var(--brand);
  font-weight: 600;
}
.tpl-board-card__meta {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.tpl-board-card__actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* === 保存ダイアログ === */
.save-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 22, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.save-dialog {
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.save-dialog--wide {
  width: min(800px, 100%);
}
.save-dialog__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--brand-ink);
}
.save-dialog__sub {
  margin: 0 0 16px;
}
.save-dialog__tag-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.save-dialog__tag-chip {
  display: inline-block;
  margin: 2px 4px 0 0;
  padding: 2px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.save-dialog__tag-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.save-dialog__snapshot-row {
  background: var(--bg-subtle);
  padding: 12px;
  border-radius: var(--r-sm);
}
.save-dialog__checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 0.92rem;
}
.save-dialog__hint {
  margin: 4px 0 0 24px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}
.save-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.tpl-board-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.tpl-board-pick__btn {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.tpl-board-pick__btn:hover {
  border-color: var(--brand);
  background: var(--brand-50);
}
.tpl-board-pick__btn span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.tpl-snap-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}
.tpl-snap-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}
.tpl-snap-item summary {
  cursor: pointer;
  font-size: 0.9rem;
}
.tpl-snap-body {
  margin-top: 8px;
}
.tpl-snap-img {
  background: var(--surface-2);
  border-radius: var(--r-sm);
  padding: 8px;
  margin-bottom: 8px;
}
.tpl-snap-img svg,
.tpl-snap-img img {
  max-width: 100%;
  height: auto;
}

/* === ボード詳細画面 === */
.board-detail-card {
  padding: 24px 28px;
}
.board-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.board-detail-back {
  font-size: 0.86rem;
  color: var(--brand);
  text-decoration: none;
}
.board-detail-back:hover { text-decoration: underline; }
.board-detail-actions {
  display: flex;
  gap: 8px;
}
.board-detail-title {
  margin: 0 0 8px;
  font-size: 1.4rem;
  cursor: text;
}
.board-detail-title:hover { color: var(--brand); }
.board-detail-charts {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 16px;
}
.board-chart-block {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
}
.board-chart-block__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.board-chart-block__num {
  background: var(--brand);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.86rem;
  flex-shrink: 0;
}
.board-chart-block__title {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
  min-width: 0;
}
.board-chart-block__actions {
  display: flex;
  gap: 4px;
}
.board-chart-block__desc {
  margin: 0 0 8px;
  font-size: 0.86rem;
}
.board-chart-block__chart {
  height: 420px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  overflow: hidden;
}

/* ─────────────────────────────────────────────
 *  施策トラッキング画面
 *  - 強調枠は全周ボーダー + 背景色（左ライン強調NG）
 *  - 経営報告に耐えるカードレイアウト
 * ───────────────────────────────────────────── */

.trk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.trk-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.trk-filter__label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-right: 4px;
}
.trk-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.trk-filter-btn:hover {
  background: var(--surface-2);
  border-color: var(--text-tertiary);
}
.trk-filter-btn--active {
  background: var(--text-primary);
  color: var(--surface);
  border-color: var(--text-primary);
}
.trk-filter-btn__count {
  font-size: 0.82rem;
  padding: 1px 7px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: inherit;
  min-width: 16px;
  text-align: center;
}
.trk-filter-btn:not(.trk-filter-btn--active) .trk-filter-btn__count {
  background: var(--surface-2);
  color: var(--text-tertiary);
}

.trk-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 26px;
}
.trk-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.trk-card__title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.trk-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}
.trk-status--planning {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.trk-status--in-progress {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
.trk-status--paused {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}
.trk-status--done {
  background: #d1fae5;
  color: #065f46;
  border-color: #6ee7b7;
}
.trk-status--cancelled {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.trk-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 22px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.trk-card__meta-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.trk-card__meta-key {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  min-width: 72px;
}
.trk-card__meta-val {
  color: var(--text-primary);
  font-weight: 500;
  word-break: break-all;
}
.trk-card__desc {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.7;
}

.trk-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.trk-section__title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.trk-section__sub {
  margin: 0 0 8px;
}
.trk-section__caveat {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}
.trk-section__empty {
  margin: 4px 0;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.trk-chart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px;
  min-height: 240px;
}

.trk-notes {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trk-note {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.trk-note:last-child {
  border-bottom: none;
}
.trk-note__time {
  color: var(--text-tertiary);
  font-size: 0.82rem;
  white-space: nowrap;
}
.trk-note__text {
  margin: 0;
  color: var(--text-primary);
  word-break: break-word;
}
.trk-note__del {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0 6px;
  font-size: 1rem;
  border-radius: var(--r-xs);
}
.trk-note__del:hover {
  background: var(--surface-2);
  color: #991b1b;
}
.trk-notes-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.trk-notes-input input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 0.88rem;
  font-family: inherit;
}
.trk-notes-input input:focus {
  outline: none;
  border-color: var(--brand);
}

.trk-boards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.trk-board-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 4px 4px 10px;
  font-size: 0.85rem;
}
.trk-board-chip a {
  color: var(--text-primary);
  text-decoration: none;
}
.trk-board-chip a:hover {
  text-decoration: underline;
}
.trk-board-chip__del {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0 6px;
  border-radius: var(--r-xs);
}
.trk-board-chip__del:hover {
  background: var(--surface);
  color: #991b1b;
}

.trk-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.trk-empty {
  padding: 36px 24px;
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  color: var(--text-secondary);
}
.trk-empty p {
  margin: 4px 0;
}

/* ─── ダイアログ ─── */

.trk-dlg-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.trk-dlg {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 24px 28px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.trk-dlg--narrow {
  max-width: 480px;
}
.trk-dlg__title {
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.trk-dlg .form-group {
  margin-bottom: 14px;
}
.trk-dlg label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.trk-dlg input[type="text"],
.trk-dlg input[type="date"],
.trk-dlg textarea,
.trk-dlg select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-primary);
}
.trk-dlg input:focus,
.trk-dlg textarea:focus,
.trk-dlg select:focus {
  outline: none;
  border-color: var(--brand);
}
.trk-dlg textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.6;
}
.trk-dlg .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 520px) {
  .trk-dlg .form-row {
    grid-template-columns: 1fr;
  }
}
.trk-dlg .form-hint {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.trk-required {
  color: #dc2626;
}
.trk-dlg__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ─── ステータス変更メニュー ─── */

.trk-status-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  padding: 4px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.trk-status-menu__item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 12px;
  font-size: 0.88rem;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--r-sm);
  font-family: inherit;
}
.trk-status-menu__item:hover {
  background: var(--surface-2);
}
.trk-status-menu__item--active {
  background: var(--brand);
  color: var(--surface);
  font-weight: 600;
}
.trk-status-menu__item--active:hover {
  background: var(--brand);
}

/* ─── ボード選択ピッカー ─── */

.trk-board-picker {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 340px;
  overflow-y: auto;
}
.trk-board-picker__btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.trk-board-picker__btn:hover {
  background: var(--surface);
  border-color: var(--brand);
}
.trk-board-picker__btn strong {
  color: var(--text-primary);
}
.trk-board-picker__btn .subtitle {
  margin: 0;
  font-size: 0.82rem;
}

/* ============================================================================
 * Phase 9: 真因探索レポート専用画面（#/report-discovery）
 *
 * A4 1〜2 ページの「レポート」として見せられる縦長レイアウト。
 * 規約 §10 準拠: 全周ボーダー + 背景色（左ライン only は使わない）。
 * 印刷時はツールバーを非表示にして A4 出力に最適化（@media print）。
 * ========================================================================= */

.report-discovery {
  /* 用紙は最大 1000px で中央に置く（見本 2026-10-09 のレポート画面。1 行が長くなりすぎないようにする） */
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.report-discovery__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}
/* 画面名と課題名（読み手の選択欄より上。レポートが未作成でも出す） */
.report-discovery__title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.5;
}
.report-discovery__lead {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* V-12 B1 / V-22 段 6: 操作の枠（上段: ラベル・選択肢・右寄せの「レポートを作成」。注記の後に、
   下段: 右寄せの「印刷 / PDF 保存」「AI施策提案へ進む」と、押せない理由をボタンの左に 1 行） */
.report-audience-selector {
  margin: 0 0 16px;
  padding: 16px 20px;
  background: var(--surface-2, #f7f7f7);
  border: 1px solid var(--border);
  border-radius: var(--r-md, 8px);
}
.report-audience-selector__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.report-audience-selector__label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.report-audience-selector__options {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.report-audience-selector__option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm, 6px);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.report-audience-selector__option:hover {
  background: var(--surface-3, #f0f0f0);
  border-color: var(--text-secondary);
}
.report-audience-selector__option:has(input:checked) {
  background: var(--brand-50, #eef4ff);
  border-color: var(--text);
  color: var(--text);
  font-weight: 600;
}
.report-audience-selector__option input[type="radio"],
.report-audience-selector__option input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
}
/* 生成中で選択できない読み手は、押せない見た目にする */
.report-audience-selector__option:has(input:disabled) {
  opacity: 0.6;
  cursor: default;
  color: var(--text-secondary);
}
.report-audience-selector__option-done {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}
.report-audience-selector__actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.report-audience-selector__note,
.report-audience-selector__busy {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.report-audience-selector__outputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.report-audience-selector__reason {
  flex: 1 1 200px;
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  text-align: right;
}
.report-audience-selector__reason:empty {
  display: none;
}
.report-audience-selector__output-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
/* この画面のボタンは 15px・高さ 40px の 1 種類にそろえる（.btn の既定は 13px） */
.report-audience-selector .btn,
.report-discovery__audience-failed .btn,
.report-angles__actions .btn {
  height: 40px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
/* 読み手ごとのパネル（タブで切り替える。隠すパネルは display:none にする） */
.report-discovery__audience {
  display: block;
}
.report-discovery__audience[hidden] {
  display: none;
}
.report-discovery__audience-failed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.report-discovery__back {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand, #1a56db);
  text-decoration: none;
}
.report-discovery__back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* レポート本紙 — A4 を意識した白背景の用紙風カード。
 * 報告書らしさを出すため本文は明朝体（--font-serif）。
 * Word ドキュメント風の落ち着いた配色を採用し、派手な色枠は避ける。 */
.report-discovery__paper {
  /* 用紙の右上に「この読み手を作り直す」を置くための基準 */
  position: relative;
  background: #fff;
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  padding: 52px 72px 60px;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.8;
  font-size: 15px;
}

/* 本文 — 報告書風の素朴な縦並び。色付き枠は使わず罫線とインデントで構造を示す */
.report-discovery__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.report-discovery__loading {
  margin: 24px 0;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #555;
  border: 1px dashed #ccc;
  background: transparent;
  font-family: var(--font-serif);
}
.report-discovery__error {
  margin: 16px 0;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--err);
  border: 1px solid var(--err);
  background: var(--err-50, #fdecec);
  font-family: var(--font-serif);
}
.report-discovery__fallback-banner {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #6b4500;
  border: 1px solid #6b4500;
  background: transparent;
  font-family: var(--font-serif);
}

/* フッタ — 二重罫線で締める */
/* 用紙の下の次の一歩（AI施策提案へ進む → と押せない理由。印刷には出さない） */
.report-discovery__next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 20px 0 8px;
}
.report-discovery__next-reason {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.report-discovery__next-reason:empty {
  display: none;
}
.report-discovery__footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 3px double #1a1a1a;
}
.report-discovery__footer-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: #555;
  font-family: var(--font-serif);
  text-align: center;
}

/* ============================================================================
 * 印刷対応（A4 想定）
 * ========================================================================= */
@media print {
  /* ブラウザ印刷時に余計なナビ・ツールバーを非表示。
   * `.sidebar` `.header` は他画面でも使われている広いクラス名のためここでは使わず、
   * セマンティックタグ（aside / nav）と画面固有クラス（report-discovery__toolbar）に限定する。 */
  body > aside,
  body > nav,
  .app-sidebar,
  .app-header,
  .sidebar,
  .toast-container,
  .toast,
  #loading-root,
  .report-discovery__toolbar,
  .report-discovery__title,
  .report-discovery__lead,
  .report-audience-selector,
  .report-discovery__next,
  .report-angles,
  .report-discovery__tabrow,
  .report-discovery__regen,
  .report-discovery__empty,
  .report-discovery__retry-btn {
    display: none !important;
  }

  /* 実際のレイアウトは .app-shell（サイドバー 248px の列 + 本文）。サイドバーを消したあとの列と余白も解く */
  .app-shell {
    display: block;
    min-height: 0;
  }
  .app-content {
    display: block;
    min-height: 0;
  }
  .app-main,
  .theme-editorial .app-main {
    padding: 0 !important;
    width: auto !important;
  }

  .report-discovery {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .report-discovery__paper {
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 14mm 18mm;
    background: #fff;
    color: #000;
    font-size: 13px;
    line-height: 1.75;
  }

  /* 棒・印・表の地色は印刷でも保つ */
  .rd-bars__bar,
  .rd-mark,
  .rd-summary__n,
  .rd-table th,
  .rd-table__subhead td,
  .rd-simplified {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* 要旨の項目・表の行・棒の行は途中で改ページしない。見出しだけが頁末に残らないようにする */
  .rd-summary__item,
  .rd-table tr,
  .rd-bars__row {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .rd-sec__title,
  .rd-sec__sub,
  .rd-head {
    break-after: avoid;
    page-break-after: avoid;
  }

  /* 印刷時の文字の大きさ（本文 13px 以上） */
  .rd-head__title { font-size: 20px; }
  .rd-sec__title { font-size: 15px; }
  .rd-sec__sub { font-size: 13px; }
  .rd-table,
  .rd-table th,
  .rd-table td,
  .rd-bars__label,
  .rd-bars__value,
  .rd-summary__k,
  .rd-summary__t { font-size: 13px; }
}

/* =========================================================================
 * 人的資本サマリー画面（#/hc-summary、Stage 2）
 * .card / .fc-chip-legend / .meta-themes-collapse の折りたたみパターンを流用。
 * 左ラインアクセントは使わず、全周ボーダー+背景で強調する（coding-conventions §10）。
 * ========================================================================= */
.hc-summary-page {
  width: 100%;
  padding-bottom: 64px;
}
.hc-summary-page__header {
  margin-bottom: 4px;
}
/* 画面名 28px・本文 15px（V-22 の文字の基準。定番グラフの画面名と同じ見た目） */
.hc-summary-page__title {
  font-family: var(--font-serif, inherit);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.hc-summary-page__lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}
.hc-summary-page__meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}
.hc-summary-empty {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
}
.hc-summary-empty p {
  margin: 0 0 12px;
}
.hc-summary-empty p:last-child {
  margin: 16px 0 0;
}

/* V-25: カードをやめ、分野ごとに 1 つの表（見出し＋横罫 1 本・列の幅は全分野で共通の colgroup） */
.hc-summary-section {
  margin-top: 26px;
}
.hc-summary-section__title {
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-serif, inherit);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
}
.hc-summary-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
}
.hc-summary-table th,
.hc-summary-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.hc-summary-table__group th {
  padding: 8px 12px 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
}
.hc-summary-table__ind {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}
.hc-summary-table__val {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.hc-summary-table__num {
  margin-right: 2px;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hc-summary-table__sub {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
}
.hc-summary-table__ref,
.hc-summary-table__na {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.hc-summary-table__more {
  text-align: right;
}
.hc-summary-table__toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 0;
  background: transparent;
  padding: 0 4px;
  margin-top: -6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--brand);
  white-space: nowrap;
  cursor: pointer;
}
.hc-summary-table__toggle:hover {
  text-decoration: underline;
}
.hc-summary-table__row.is-open > th,
.hc-summary-table__row.is-open > td {
  background: var(--surface-2);
  border-bottom-color: transparent;
}
.hc-summary-table__detail > td {
  padding: 2px 12px 14px;
  background: var(--surface-2);
}
.hc-summary-detail {
  display: grid;
  grid-template-columns: 12em minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.hc-summary-detail dt {
  font-weight: 700;
  color: var(--text);
}
.hc-summary-detail dd {
  margin: 0;
}
.hc-summary-detail ol,
.hc-summary-detail ul {
  margin: 0;
  padding-left: 1.3em;
}
.hc-summary-detail__table {
  border-collapse: collapse;
  font-size: 13px;
}
.hc-summary-detail__table td {
  padding: 3px 16px 3px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.hc-summary-detail__table td:first-child {
  color: var(--text);
}
@media (max-width: 900px) {
  .hc-summary-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* データギャップ（指標を準備中の観点）: meta-themes-collapse と同型の折りたたみバー */
.hc-gap-collapse {
  margin: 28px 0 0;
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-md);
  overflow: hidden;
}
.hc-gap-collapse__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.hc-gap-collapse__summary::-webkit-details-marker {
  display: none;
}
.hc-gap-collapse__summary::before {
  content: "▶";
  font-size: 13px;
  color: var(--brand);
  flex-shrink: 0;
}
.hc-gap-collapse[open] > .hc-gap-collapse__summary::before {
  content: "▼";
}
.hc-gap-collapse__summary:hover {
  background: var(--brand-100);
}
.hc-gap-collapse__label {
  font-weight: 700;
  color: var(--brand-ink);
}
.hc-gap-collapse__hint {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-tertiary);
}
.hc-gap-collapse__hint::before {
  content: "開いて確認";
}
.hc-gap-collapse[open] .hc-gap-collapse__hint::before {
  content: "閉じる";
}
.hc-gap-collapse__body {
  padding: 4px 20px 16px;
  background: var(--surface);
  border-top: 1px solid var(--brand-100);
}
.hc-gap-item {
  margin: 10px 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.hc-gap-item strong {
  color: var(--text);
}

/* =========================================================================
 * AI の利用状況画面（#/ai-usage）
 * 全周 1px 枠 + 淡い背景。左ラインだけ色付きの強調は使わない（coding-conventions §10）。
 * ========================================================================= */
.ai-usage-page {
  width: 100%;
  padding-bottom: 64px;
}
.ai-usage-page__header {
  margin-bottom: 20px;
}
.ai-usage-page__title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.ai-usage-page__lead {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}
/* .card h2 のテーマ指定（明朝・28px）より強く当てて、ページ見出しより小さいカード見出しにする */
.card h2.ai-usage-card__title {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: normal;
  margin: 0 0 12px;
}
.ai-usage-card__note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0 0;
}
table.data .ai-usage-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ai-usage-empty {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.ai-usage-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}
.ai-usage-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 24px;
  font-size: 13px;
  color: var(--text-secondary);
}
.ai-usage-state p {
  margin: 0;
}
.ai-usage-state--error {
  border-color: var(--err);
  background: var(--err-50);
  color: var(--text);
}
.ai-usage-state__title {
  font-weight: 600;
  margin-bottom: 6px;
}

/* 今月の AI 利用量のゲージ（保存領域のゲージ .storage-usage と同じ作り。状態は ok / warn / reached） */
.ai-usage-gauge {
  margin: 12px 0 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.ai-usage-gauge--warn {
  border-color: var(--warn);
  background: var(--warn-50);
}
.ai-usage-gauge--reached {
  border-color: var(--err);
  background: var(--err-50);
}
.ai-usage-gauge__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.ai-usage-gauge__pct {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.ai-usage-gauge--warn .ai-usage-gauge__pct {
  color: var(--warn);
}
.ai-usage-gauge--reached .ai-usage-gauge__pct {
  color: var(--err);
}
.ai-usage-gauge__label {
  font-size: 14px;
  color: var(--text-secondary);
}
.ai-usage-gauge__bar {
  position: relative;
  margin-top: 10px;
  height: 10px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.ai-usage-gauge__fill {
  height: 100%;
  background: var(--ok);
  transition: width 0.3s ease;
}
.ai-usage-gauge--warn .ai-usage-gauge__fill {
  background: var(--warn);
}
.ai-usage-gauge--reached .ai-usage-gauge__fill {
  background: var(--err);
}
/* 80％の目盛り（バーの上に重ねる縦線。色付きの左罫ではなく、目盛り） */
.ai-usage-gauge__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: var(--text-secondary);
}
.ai-usage-gauge__scale {
  position: relative;
  height: 20px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ai-usage-gauge__scale > span {
  position: absolute;
  top: 0;
  white-space: nowrap;
}
.ai-usage-gauge__scale-0 {
  left: 0;
}
.ai-usage-gauge__scale-warn {
  transform: translateX(-50%);
}
.ai-usage-gauge__scale-100 {
  right: 0;
}
.ai-usage-gauge__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text);
}
.ai-usage-gauge__msg {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}

/* 画面上部の AI の利用上限の注意（80％以上で 1 行・到達で 1 行）。枠・地色・左罫は使わず、アイコンと文字色で示す。
   置き場 #app-ai-cap-notice は中身が無いとき高さ 0（余白は中の .ai-cap-notice が持つ） */
#app-ai-cap-notice {
  flex-shrink: 0;
}
.ai-cap-notice {
  display: flex;
  /* 文が折り返したとき、アイコンを 1 行目に合わせる */
  align-items: flex-start;
  /* 折り返さない: 文（.ai-cap-notice__text）が長くても、アイコンの右で文の中だけが折り返し、アイコンが 1 行だけで残らない */
  flex-wrap: nowrap;
  gap: 4px 8px;
  /* 左右は .app-main と同じ 40px */
  padding: 12px 40px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
.ai-cap-notice__icon {
  flex-shrink: 0;
  /* 文の 1 行目の縦中心に合わせる: (13px × line-height 1.6 = 20.8px − アイコン 16px) ÷ 2 = 2.4px */
  margin-top: 2.4px;
  color: var(--warn);
}
.ai-cap-notice--reached,
.ai-cap-notice--reached .ai-cap-notice__icon {
  color: var(--err);
}
.ai-cap-notice__link {
  color: var(--brand);
  text-decoration: underline;
  white-space: nowrap;
}
@media print {
  #app-ai-cap-notice {
    display: none !important;
  }
}

/* 保存済みのグラフから選ぶ: 追加済みの行（行は消さず押せなくする） */
.tpl-board-pick__btn:disabled {
  cursor: default;
  background: var(--surface-2, #f7f7f7);
  border-color: var(--border);
}
.tpl-board-pick__btn:disabled strong {
  color: var(--text-secondary);
}
.tpl-board-pick__btn .tpl-board-pick__done {
  color: var(--text-secondary);
  font-weight: 600;
}

/* 真因探索レポート: 読み手ごとのタブ行（タブだけ。印刷ボタンは操作の枠の下段へ移した・V-22 段 6） */
.report-discovery__tabrow {
  /* 作成後にここまで画面を送るとき、上部に固定された見出し帯の下に隠れないようにする */
  scroll-margin-top: calc(var(--header-h) + 12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  border-bottom: 1px solid var(--border-strong);
}
.report-discovery__tabrow:empty {
  display: none;
}
/* タブ行が無い（レポート未作成）ときは、用紙の上辺に枠線を戻す */
.report-discovery__tabrow:empty + .report-discovery__paper {
  border-top: 1px solid var(--border-strong);
}
.report-discovery__tabrow + .report-discovery__paper {
  border-top: 0;
}
.report-discovery__empty {
  margin: 8px 0;
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #555;
  border: 1px dashed #ccc;
  font-family: var(--font-serif);
}
.report-discovery__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.report-discovery__tab {
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--r-md, 8px) var(--r-md, 8px) 0 0;
  cursor: pointer;
}
.report-discovery__tab:hover {
  background: var(--surface-3, #f0f0f0);
}
.report-discovery__tab[aria-selected="true"] {
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border-color: var(--border-strong);
  margin-bottom: -1px;
}
/* 用紙の右上の小さな文字ボタン「この読み手を作り直す」（その読み手だけを作り直す。印刷には出さない） */
.report-discovery__regen {
  position: absolute;
  top: 12px;
  right: 20px;
  appearance: none;
  margin: 0;
  padding: 4px 6px;
  min-height: 32px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-secondary);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.report-discovery__regen:hover {
  color: var(--text);
}
.report-discovery__regen:disabled {
  color: var(--text-tertiary, #9a9a9a);
  cursor: default;
}

/* ===== 定番グラフ画面（#/standard-charts） ===== */
.std-charts-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.std-charts-chip strong {
  font-weight: 600;
  color: var(--text);
}
.std-charts-tabs-wrap {
  margin: 0 0 22px;
}
.std-charts-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.std-charts-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
}
.std-charts-tab:hover {
  background: var(--brand-50);
}
.std-charts-tab--on,
.std-charts-tab--on:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 700;
}
.std-charts-tab--off,
.std-charts-tab--off:hover {
  background: var(--surface-2);
  border-style: dashed;
  color: var(--text-tertiary);
  cursor: not-allowed;
}
.std-charts-tab-reasons {
  margin: 8px 0 0;
}
.std-charts-tab-reasons:empty {
  display: none;
}
.std-charts-tab-reason {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.std-charts-tab-reason strong {
  color: var(--text);
  font-weight: 600;
}
/* 画面名とデータセットのチップを 1 行に */
.std-charts-titlerow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 4px;
}
.std-charts-titlerow .topic-coverage-page__title {
  margin: 0;
}
.std-charts-theme__title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-serif, inherit);
}
.std-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
  align-items: stretch;
}
.std-charts-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.std-charts-card--wide {
  grid-column: 1 / -1;
}
.std-charts-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}
.std-charts-card__body {
  flex: 1;
  min-width: 0;
}
.std-charts-plot {
  width: 100%;
}
.std-charts-plot-msg {
  margin: 0;
  padding: 24px 0;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.std-charts-baseline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text);
}
.std-charts-baseline__line {
  display: block;
  width: 26px;
  height: 0;
  border-top: 1.5px dashed #14161a;
}
.std-charts-card__notes p,
.std-charts-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.std-charts-card__notes {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* 折りたたみは縦に 1 つずつ並べる（横並びだと、開いた方が次の行へ回り込んで順番が入れ替わって見える） */
.std-charts-folds {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}
.std-charts-fold summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--brand);
  cursor: pointer;
  list-style: none;
}
.std-charts-fold summary::-webkit-details-marker {
  display: none;
}
.std-charts-fold summary::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--brand);
  border-bottom: 1.5px solid var(--brand);
  transform: rotate(-45deg);
}
.std-charts-fold[open] summary::before {
  transform: rotate(45deg);
}
.std-charts-fold ol {
  margin: 8px 0 0;
  padding-left: 1.4em;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}
.std-charts-fold .std-charts-card__notes {
  margin: 8px 0 0;
  gap: 4px;
}
.std-charts-fold__sub {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.std-charts-fold__sub + ol {
  margin-top: 4px;
}
.std-charts-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 13px;
}
.std-charts-table th,
.std-charts-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.std-charts-table thead th {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-strong);
}
.std-charts-table tbody th {
  font-weight: 700;
  text-align: left;
}
.std-charts-table thead th:first-child {
  text-align: left;
}
.std-charts-mask {
  font-size: 13px;
  color: var(--text-secondary);
}
.std-charts-card__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.std-charts-textbtn {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  padding: 8px 6px;
  cursor: pointer;
}
.std-charts-textbtn:hover {
  text-decoration: underline;
}
.std-charts-na {
  margin-top: 20px;
}
/* 表示できないグラフ: 枠を付けず、グラフの下に 1 行ずつ */
.std-charts-na__line {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.std-charts-na__line strong {
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 900px) {
  .std-charts-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 定番グラフ: 基準より高い・低いの色の凡例 */
.std-charts-swatch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}
.std-charts-swatch__box {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ============================================================================
 * V-22（2026-10-10）: 真因探索・仮説検証画面の削減と、文字の基準
 *   画面名 28 > 節見出し 20 > カード見出し 17 > 本文 15（行間 1.7 以上）> 補足 13。13px 未満は使わない。
 *   見本: documents/mockups/2026-10-09-v22-screens-mockup.html
 *   規約 §10: 強調は全周 1px の枠か、見出し + 横罫 1 本。左だけ太い色付き罫は使わない。
 * ========================================================================= */
.v22-screen {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 0 48px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.v22-back {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
}
.v22-back a {
  color: var(--text-secondary);
  text-decoration: none;
}
.v22-back a:hover {
  text-decoration: underline;
}
.v22-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.v22-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.v22-title-row .v22-title {
  margin: 0;
}
.v22-lead {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}
.v22-sec-title {
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.v22-sec-lead {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--text-secondary);
}
.v22-q-count {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
}
.v22-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 課題（名前と 1 文の要約だけ） */
.v22-issue {
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.v22-issue__name {
  margin: 0 0 2px;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 700;
}
.v22-issue__summary {
  margin: 0;
}

/* ボタン（主は塗り・副は白抜き。同じ形・同じ高さ）と小さなテキストボタン */
.v22-btn,
.v22-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  /* ほかの画面のボタン（.btn）と同じ角の丸み（2026-10-30 ユーザー指示「全体の四角いボタンにそろえる」） */
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.v22-btn:hover:not(:disabled),
.v22-choice:hover {
  background: var(--surface-2);
}
.v22-btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.v22-btn--primary:hover:not(:disabled) {
  background: var(--brand-ink);
}
.v22-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.v22-choice.is-selected {
  background: var(--brand-50);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.v22-btn-text {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 4px;
  min-height: 32px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
}
.v22-btn-text:hover {
  color: var(--text);
}
.v22-btn-text:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.v22-btn-text[hidden] {
  display: none;
}
.v22-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* レポートを作るボタンと AI施策提案へ進むボタン（並ぶ 2 つを、広い方に合わせた同じ幅にする） */
.v22-btn-pair {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .v22-btn-pair {
    grid-auto-flow: row;
  }
}

/* 終端（ボタンと 1 行の注記） */
.v22-final {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* 真因探索: 関連データ事実の表 */
.v22-facts {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
/* 真因探索: 前年度と比べた表（集団 ／ 前年度 ／ 今年度。列幅はレポートと同じ 40・30・30） */
.v22-prior-year {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0 0 10px;
}
.v22-prior-year th,
.v22-prior-year td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  line-height: 1.7;
  text-align: left;
  vertical-align: top;
}
.v22-prior-year th {
  font-weight: 700;
  border-bottom-color: var(--border-strong);
}
.v22-prior-year .v22-prior-year__num {
  text-align: right;
}
.v22-prior-year__line {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}
.v22-prior-year__note {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.v22-facts td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  vertical-align: top;
}
.v22-facts__action {
  width: 84px;
  text-align: right;
}
.v22-facts__evidence td {
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text-secondary);
}

/* 仮説検証: 課題の事実の確認（2026-10-20 H1。表の作りは .v22-facts を使う） */
.v22-issue-facts th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  vertical-align: bottom;
  color: var(--text-secondary);
}
.v22-issue-facts__col-label {
  width: 62%;
}
.v22-issue-facts__col-value {
  width: 38%;
}
.v22-issue-facts__group th {
  padding-top: 16px;
  border-bottom: 1px solid var(--border);
}
.v22-issue-facts__verdict {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.75;
}
/* ③④: 課題の文の確かめ（表の上）と、③で AI が当てはめた内容の 1 行 */
.v22-issue-facts__premise {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.75;
}
.v22-issue-facts__mapping {
  margin: 0 0 12px;
}

/* 真因探索: AI の問い */
.v22-q__text {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 700;
}
.v22-q__why {
  display: block;
  margin: -8px 0 12px;
}
.v22-q__answers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.v22-q__memo-label {
  display: block;
  margin: 18px 0 6px;
  font-size: 14px;
  color: var(--text-secondary);
}
.v22-q__memo,
.v22-memo {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 76px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  resize: vertical;
}
.v22-q__nav {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}
.v22-q-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.v22-q-empty__text {
  margin: 0;
  color: var(--text-secondary);
}

/* 仮説検証 */
.v22-count {
  margin: 28px 0 0;
  font-size: 15px;
  font-weight: 600;
}
.v22-hyps {
  display: block;
}
/* 裏づけが弱い・判断材料が足りない仮説: 見出し＋その下の横罫 1 本 */
.v22-hyps--minor {
  margin-top: 28px;
}
.v22-hyps__heading {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
}
.v22-chart-fold .chart-box {
  margin: 8px 0 0;
}
.v22-hyp {
  margin-top: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
}
.v22-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--brand-50);
  border: 1px solid var(--brand);
  color: var(--brand-ink);
}
.v22-chip--mid {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.v22-chip--weak {
  background: var(--bg-muted);
  border-color: var(--border);
  color: var(--text-secondary);
}
.v22-hyp__title {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 700;
}
.v22-hyp__result {
  margin: 0 0 12px;
}
/* 2026-10-20 H4: なぜこの強さなのか（コードの定型文・1 文）。結果の文のすぐ下に置く */
.v22-hyp__reason {
  margin: -6px 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.v22-hyp .chart-box {
  margin-bottom: 16px;
}
/* 比較モード: 各仮説の「{比較対象年度}との比較」（見出し＋その下の横罫 1 本） */
.v22-prior {
  margin: 4px 0 8px;
}
.v22-prior__heading {
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 700;
}
.v22-prior__line {
  margin: 0 0 6px;
}
.v22-prior__line--sub {
  font-size: 14px;
}
.v22-prior__chart {
  margin: 10px 0 4px;
}
.v22-prior__chart .chart-box {
  margin: 0 0 4px;
}
.v22-prior__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.v22-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 0 4px;
  font-size: 14px;
  color: var(--text);
}
.v22-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v22-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.v22-legend__prior {
  background: #a3b4c6;
}
.v22-legend__current {
  background: var(--brand);
}
.v22-prior__more > .v22-more__body dt {
  margin-top: 6px;
  font-weight: 600;
  color: var(--text);
}
.v22-prior__more > .v22-more__body dd {
  margin: 0;
  color: var(--text-secondary);
}

/* 比較モードの帯（淡い地色＋全周 1px の細枠） */
.v22-cmp-band {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.v22-cmp-band__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.v22-cmp-band__text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.v22-cmp-band__count {
  margin: -4px 0 12px;
  font-size: 14px;
  color: var(--text);
}
.v22-cmp-band__count:empty {
  display: none;
}
/* 年度ごとに描いて並べる 2 枚のグラフ（いつものグラフと同じ幅で読めるよう、上下に積む） */
.v22-prior__pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 8px 0 4px;
}
.v22-prior__pane {
  margin: 0;
  min-width: 0;
}
.v22-prior__pane figcaption {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.v22-prior__pane .chart-box {
  margin: 0;
}
/* 2 年度のグラフを出せないときの案内（淡い地色＋全周 1px の細枠。文字は本文と同じ濃さ） */
.v22-prior__blocked {
  margin: 8px 0;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.v22-cmp-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.v22-cmp-kpi dt {
  font-size: 13px;
  color: var(--text-secondary);
}
.v22-cmp-kpi dd {
  margin: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.v22-more {
  margin-top: 14px;
}
.v22-more > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.v22-more > summary::-webkit-details-marker {
  display: none;
}
.v22-more > summary::before {
  content: "▸";
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 0.15s;
}
.v22-more[open] > summary::before {
  transform: rotate(90deg);
}
.v22-more__body {
  padding: 8px 0 0 24px;
  font-size: 14px;
  line-height: 1.7;
}
/* 「詳しく見る」の中の既存部品（学べること・AI の説明・裏づけの根拠）も 13px 未満にしない */
.v22-more__body .hyp-card__insight-kicker,
.v22-more__body .hyp-card__subsection-title {
  font-size: 13px;
}
.v22-more__body .hyp-card__insight-row,
.v22-more__body .hyp-card__insight-list li,
.v22-more__body .hyp-card__ai-comment-body,
.v22-more__body .hypothesis-report-card__row {
  font-size: 14px;
}
.v22-more__body .hyp-card__ai-comment-meta,
.v22-more__body .hypothesis-report-card__row--keys dt,
.v22-more__body .hypothesis-report-card__row--keys dd,
.v22-more__body .hypothesis-report-card__row--keys code {
  font-size: 13px;
}
.v22-hyp__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 10px 0 0;
}
.v22-hyp__tools .chart-alt-popover {
  margin: 0;
}
.v22-hyp__tools .chart-alt-popover__summary {
  padding: 0 4px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: 0;
  border-radius: 0;
  text-decoration: underline;
}
.v22-hyp__tools .chart-alt-popover__summary::after {
  content: none;
}
.v22-hyp__tools .chart-alt-btn {
  font-size: 13px;
}
.v22-memo-label {
  display: block;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.v22-memo-label .v22-memo {
  margin-top: 6px;
}
.v22-folds {
  margin-top: 20px;
}
.v22-fold {
  border-bottom: 1px solid var(--border);
}
.v22-fold > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}
.v22-fold > summary::-webkit-details-marker {
  display: none;
}
.v22-fold > summary::before {
  content: "▸";
  font-size: 13px;
  color: var(--text-secondary);
  transition: transform 0.15s;
}
.v22-fold[open] > summary::before {
  transform: rotate(90deg);
}
.v22-fold__body {
  padding: 4px 0 14px 24px;
}

/* 真因探索レポート画面: 真因探索から移した「切り口」の折りたたみと「AI施策提案へ進む」 */
.report-angles {
  margin: 0 0 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.report-angles__summary {
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.report-angles__body {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border);
}
.report-angles__lead {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.report-angles__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.report-angles__link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v22-title .quality-score-badge {
  font-size: 13px;
}
.v22-sum-note {
  margin: 4px 0 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* V-22 段 0: AI に送った内容モーダル */
.modal.ai-sent-log-modal {
  max-width: 1100px;
  width: min(1100px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.ai-sent-log-lead {
  font-size: 14px;
  margin: 0 0 8px;
}
.ai-sent-log-note {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 16px;
}
.ai-sent-log-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
}
.ai-sent-log-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  font-size: 14px;
}
.ai-sent-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.ai-sent-log-list__item + .ai-sent-log-list__item {
  border-top: 1px solid var(--border);
}
.ai-sent-log-list__btn {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  row-gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}
.ai-sent-log-list__btn:hover,
.ai-sent-log-list__btn.is-active {
  background: var(--brand-50);
}
.ai-sent-log-list__btn.is-active {
  font-weight: 600;
}
.ai-sent-log-list__btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.ai-sent-log-list__time {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.ai-sent-log-list__model {
  grid-column: 1 / -1;
  color: var(--text-secondary);
  font-size: 13px;
}
.ai-sent-log-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  max-height: 60vh;
  overflow-y: auto;
}
.ai-sent-log-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ai-sent-log-block__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.ai-sent-log-block__text {
  margin: 0;
  padding: 12px;
  max-height: 28vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.ai-sent-log-actions {
  margin-top: 16px;
}
@media (max-width: 800px) {
  .ai-sent-log-main {
    grid-template-columns: 1fr;
  }
  .ai-sent-log-list {
    max-height: 24vh;
  }
}

/* V-22: 仮説検証の「詳しく見る」内の小さな文字を 13px 以上に（共通部品は段 5 で全体を見直す） */
.v22-screen .hyp-card__ai-comment-meta small {
  font-size: 13px;
}
.v22-screen .term-tip__icon {
  width: 18px;
  height: 18px;
  font-size: 13px;
}
.v22-screen .term-tip__body {
  font-size: 13px;
}

/* V-22: 画面レビュー対応（ヘッダーとレポート画面の小さな文字・1024px 幅でのヘッダーの折り返し） */
.app-header__model-label,
.app-header__logout {
  font-size: 13px;
}
.app-header__label-short {
  display: none;
}
/* 長いラベルが 1 行に収まるのは 1240px 前後から（2026-10-20 実測: 1200px で「AI に送った内容」
   「ログアウト」がヘッダーの下に落ちた）。余裕を見て 1260px 以下は短いラベルにする。
   2026-11-06: プラン名とユーザーメニュー（人のアイコン＋氏名）が入ってからは 1360px でも落ちた（1400px で収まる）。
   長い氏名や比較中の表示の分も見て、1480px 以下を短いラベルにする */
@media (max-width: 1480px) {
  .app-header__model-label,
  .app-header__label-long {
    display: none;
  }
  .app-header__label-short {
    display: inline;
  }
  .app-header__nav {
    gap: 6px;
  }
  .app-header__row {
    padding: 0 20px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .app-header__spacer {
    display: none;
  }
  .app-header__start {
    gap: 12px;
    flex-wrap: nowrap;
  }
  .app-header__focus-select {
    min-width: 100px;
  }
}
/* V-22 段 2: 問いごとの重要の印 */
.v22-q__imp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 15px;
  cursor: pointer;
}
.v22-q__imp input {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}
.v22-q__imp-hint {
  font-size: 13px;
  color: var(--text-secondary);
}

/* =========================================================================
 * V-22 段 3-3: 真因探索レポートの本文（新しい型）
 * 本文 15px・最小 13px。左だけの色線・絵文字・グラデーションは使わない。
 * ========================================================================= */
.rd-head {
  margin: 0 0 8px;
}
.rd-head__kicker {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.rd-head__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 27px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--text);
}
.rd-head__meta {
  margin: 0;
  padding-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--text);
}
.rd-simplified {
  margin: 20px 0 0;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
}
.report-discovery__audience {
  display: block;
}
.rd-sec p {
  margin: 0 0 10px;
}
.report-discovery__audience .report-discovery__fallback-banner {
  margin: 16px 0 0;
}
.rd-sec {
  margin: 0;
}
.rd-sec__title {
  margin: 36px 0 12px;
  padding: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}
.rd-sec__sub {
  margin: 20px 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
}
.report-discovery__audience .rd-note {
  margin: 6px 0 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.rd-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

/* 要旨: 番号の丸・見出し・本文を同じ行の縦中心にそろえる */
.rd-summary {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rd-summary__item {
  display: grid;
  grid-template-columns: 28px 9.5em 1fr;
  column-gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.rd-summary__item:first-child {
  border-top: 1px solid var(--border);
}
.rd-summary__n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.rd-summary__k {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}
.rd-summary__t {
  font-size: 15px;
  line-height: 1.8;
}

/* 横棒グラフ（HTML/CSS の棒。長さは割合の最大値が基準） */
.rd-bars {
  margin: 8px 0 12px;
}
.rd-bars__row {
  display: grid;
  grid-template-columns: 15em 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 7px 0;
}
.rd-bars__label {
  font-size: 15px;
  line-height: 1.5;
}
.rd-bars__track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rd-bars__bar {
  flex: none;
  display: block;
  height: 26px;
}
.rd-bars__bar--group {
  background: var(--brand);
}
.rd-bars__bar--ref {
  background: #9aaec4;
}
.rd-bars__bar--all {
  background: #c9c5bb;
}
.rd-bars__value {
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
}
.rd-bars__count {
  color: var(--text-secondary);
}

/* 表 */
.rd-table-wrap {
  overflow-x: auto;
}
.rd-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.65;
}
.rd-table th,
.rd-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-strong);
  overflow-wrap: anywhere;
}
.rd-table th {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-top: 1px solid var(--border-strong);
}
.rd-table .rd-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rd-table__subhead td {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-2);
}
.rd-table--months th,
.rd-table--months td {
  padding: 9px 4px;
}
.rd-th-year {
  display: block;
  font-size: 13px;
  font-weight: 400;
}

/* 担当者の回答の表: 「重要」の印・突き合わせの言葉・補助の値 */
.rd-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--r-sm);
  vertical-align: 1px;
}
.rd-mark {
  display: inline-block;
  padding: 1px 8px;
  font-size: 13px;
  line-height: 1.6;
  border-radius: var(--r-sm);
}
.rd-mark--same {
  background: var(--brand-50);
  color: var(--brand-ink);
}
.rd-mark--part {
  background: #f1eee6;
  color: #4a4a44;
}
.rd-mark--none {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
/* 設問の表の「はっきりした差」の印（枠付きの文字。色は控えめ） */
.rd-notable {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  white-space: nowrap;
  vertical-align: 1px;
}
.rd-checks {
  margin-top: 6px;
}
.rd-check {
  display: block;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 箇条書き（切り口・前提） */
.rd-list {
  margin: 0;
  padding-left: 1.3em;
}
.rd-list li {
  margin: 0 0 6px;
}
.report-discovery__audience .rd-list__comment {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* 仮説検証レポート: 支持した仮説の表の下に置くグラフ画像（表の幅に収める。印刷で切らない） */
.rd-hyp-chart-row td {
  padding-top: 4px;
  padding-bottom: 14px;
}
/* 仮説とその下のグラフを 1 つのまとまりに見せる（間の罫線を消し、まとまりの下だけに線を残す） */
.rd-table--hypotheses tr:has(+ .rd-hyp-chart-row:not([hidden])) td {
  border-bottom: 0;
}
.rd-hyp-chart {
  margin: 0;
}
.rd-hyp-chart img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
/* ほかの仮説（区分ごとの件数と題名） */
.rd-hyp-others__k {
  font-weight: 700;
}
.rd-hyp-others__titles {
  margin: 4px 0 0;
  padding-left: 1.3em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.rd-hyp-others__titles li {
  margin: 0 0 2px;
}
@media print {
  .rd-hyp-chart-row,
  .rd-hyp-chart,
  .rd-hyp-chart img {
    page-break-inside: avoid;
    break-inside: avoid;
  }
}

/* 1180px 以下（サイドバーを含めた幅が狭い画面）では用紙の左右の余白を 32px にする */
@media (max-width: 1180px) {
  .report-discovery__paper {
    padding-left: 32px;
    padding-right: 32px;
  }
}
/* 720px 以下では、要旨の見出しを本文の上に積む（番号と見出しが 1 行目、本文が 2 行目） */
@media (max-width: 720px) {
  .rd-summary__item {
    grid-template-columns: 28px 1fr;
  }
  .rd-summary__t {
    grid-column: 1 / -1;
  }
  .rd-bars__row {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
}

/* 月別の表: 月が多いときは枠（.rd-table-wrap は横送り）の中で横に送り、見出しの「2025年」を折り返さない。
   印刷では紙の幅に収める */
.rd-table--months th {
  white-space: nowrap;
}
@media print {
  .rd-table--months {
    min-width: 0 !important;
  }
  .rd-table--months th {
    white-space: normal;
  }
}

/* 取込画面の下部の補足（V-22 段 6。見出し＋横罫 1 本・枠なし。ホームから移した「データ取込の特長」） */
.upload-about { margin: 28px 4px 0; }
.upload-about__title { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; color: var(--text-secondary); }
.upload-about__list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text-secondary); }
.upload-about__list li + li { margin-top: 4px; }

/* 施策トラッキング: 一覧と詳細画面（V-23） */
.trk-back { margin: 0 0 12px; font-size: 14px; }
.trk-back a { color: var(--brand); text-decoration: none; }
.trk-back a:hover { text-decoration: underline; }
.trk-table-wrap { background: var(--surface); }
table.data.trk-table { min-width: 880px; font-size: 14px; table-layout: fixed; }
/* 列幅は固定し、残りを施策名と最新の進捗メモで分ける（メモは 1 行で省略） */
/* 幅は見出しの th に付ける（列を隠したときも残りの列の幅がずれない） */
table.data.trk-table th.trk-col-status { width: 88px; }
table.data.trk-table th.trk-col-name { width: 22%; }
table.data.trk-table th.trk-col-start { width: 196px; }
table.data.trk-table th.trk-col-owner { width: 104px; }
table.data.trk-table th.trk-col-kpi { width: 108px; }
table.data.trk-table th.trk-col-updated { width: 104px; }
.trk-table__clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.trk-table th,
table.data.trk-table td { vertical-align: middle; }
table.data.trk-table th.trk-th-sort { padding: 0; }
.trk-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.trk-sort:hover { background: var(--border); }
.trk-sort--active { color: var(--brand); }
.trk-sort__mark { font-size: 13px; }
.trk-sort:not(.trk-sort--active) .trk-sort__mark { color: var(--text-tertiary); }
.trk-row { cursor: pointer; }
.trk-row:hover td { background: #f1eee7; }
.trk-table__name { font-size: 15px; }
/* 施策名は 2 行まで（全文は title）。行の高さをそろえる */
.trk-table__name a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.trk-table__name a { color: var(--text-primary); font-weight: 600; text-decoration: none; }
.trk-table__name a:hover,
.trk-table__name a:focus-visible { color: var(--brand); text-decoration: underline; }
.trk-table__nowrap { white-space: nowrap; }
/* 最新の進捗メモは 2 行まで表示し、続きは省略（全文は title） */
.trk-note-cell {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.5;
}
.trk-note-cell__date { color: var(--text-tertiary); font-size: 13px; }
/* 詳細画面: 外枠の中にもう 1 つ枠を重ねない（従来のカードの枠を外す） */
.trk-card-host--detail .trk-card { border: 0; border-radius: 0; padding: 0; background: transparent; }
/* 1180px 以下では担当・対象の指標を一覧から外し（詳細画面で見られる）、更新日と進捗メモを残す */
@media (max-width: 1180px) {
  table.data.trk-table { min-width: 600px; }
  table.data.trk-table .trk-col-owner,
  table.data.trk-table .trk-col-kpi { display: none; }
  table.data.trk-table th.trk-col-name { width: 26%; }
  /* 期間は「開始 〜」と「終了」の 2 行に折り返してよい */
  table.data.trk-table th.trk-col-start { width: 116px; }
  table.data.trk-table td:nth-child(3) { white-space: normal; }
}

/* 施策トラッキング: 課題の行と、詳細画面の見出し右端の操作（V-23） */
.trk-table__issue { margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 施策名が折り返しても、状態・操作ボタンは右上・左上に留まる（ボタン 1 行ぶんの高さに合わせて上下の余白で中心をそろえる） */
.trk-card__head { align-items: flex-start; }
.trk-card__head .trk-status { margin-top: 6px; }
.trk-card__head .trk-card__title { min-width: 0; padding-top: 7px; overflow-wrap: anywhere; }
.trk-card__head-actions { display: flex; flex-shrink: 0; gap: 8px; }
.trk-card__meta-row--wide { grid-column: 1 / -1; }
