.pm-outer { max-width: 1280px; margin: 0 auto; padding: 0 1.2rem; }
.breadcrumb { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.pm-title { font-family: var(--font-accent); font-size: 1.5rem; color: var(--color-primary); margin: 0 0 0.4rem; }
.pm-intro { font-size: 0.86rem; color: var(--color-text-light); line-height: 1.7; margin-bottom: 1.2rem; max-width: 880px; }

.pm-disclaimer {
  background: #faf5e8;
  border-left: 3px solid #c89026;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  color: #6b5a2e;
  margin-bottom: 1rem;
}
.pm-disclaimer strong { color: #4a3e1f; }
.pm-disclaimer a { color: #4a3e1f; }

.pm-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-border);
}
.pm-tab {
  padding: 0.4rem 1rem;
  font-size: 0.84rem;
  color: var(--color-text-light);
  cursor: pointer;
  user-select: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.pm-tab:hover { color: var(--color-primary); }
.pm-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.pm-filters {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1rem;
}
.pm-filter-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem; margin-bottom: 0.5rem; }
.pm-filter-row:last-child { margin-bottom: 0; }
.pm-filter-label { font-size: 0.74rem; color: var(--color-text-light); width: 64px; flex-shrink: 0; font-weight: 600; letter-spacing: 0.03em; }
.pm-chip {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-light);
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.pm-chip:hover { background: var(--color-bg-dark); }
.pm-chip.active {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.pm-party-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pm-reset {
  margin-left: auto;
  font-size: 0.78rem;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-light);
  padding: 0.2rem 0.7rem;
  cursor: pointer;
}
.pm-reset:hover { background: var(--color-bg-dark); }

.pm-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.pm-count strong { color: var(--color-primary); font-family: var(--font-accent); }

.pm-view { margin-bottom: 1.5rem; }

/* ガントチャート */
.pm-gantt-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  padding: 0.5rem 0;
}
.pm-gantt { display: block; }
.pm-gantt .pm-axis line,
.pm-gantt .pm-axis path { stroke: #d8d4cc; }
.pm-gantt .pm-axis text { font-size: 10px; fill: #7a7268; }
.pm-gantt .pm-grid line { stroke: #ece8df; stroke-dasharray: 2,2; }
.pm-gantt .pm-grid-decade line { stroke: #c4bdb0; }
.pm-gantt .pm-row-label {
  font-size: 10px;
  fill: var(--color-text);
  font-family: var(--font-primary);
}
.pm-gantt .pm-row-ordinal {
  font-size: 9px;
  fill: var(--color-text-muted);
}
.pm-gantt .pm-bar {
  cursor: pointer;
  stroke: rgba(0,0,0,0.15);
  stroke-width: 0.5;
  transition: opacity 0.15s;
}
.pm-gantt .pm-bar:hover { opacity: 0.78; }
.pm-gantt .pm-bar.active { stroke: var(--color-primary); stroke-width: 2; }
.pm-gantt .pm-era-band {
  fill: rgba(200,144,38,0.05);
}
.pm-gantt .pm-era-label {
  font-size: 11px;
  fill: #c89026;
  font-family: var(--font-accent);
  letter-spacing: 0.1em;
}

/* 派閥色 (和風カラー) */
.pm-fac-hanbatsu { fill: #c75c3c; }       /* 朱色: 藩閥 */
.pm-fac-seiyukai { fill: #2b4f74; }       /* 群青: 立憲政友会 */
.pm-fac-minseito { fill: #4d6b3d; }       /* 苔色: 立憲民政党 */
.pm-fac-military { fill: #6b6b6b; }       /* 鈍色: 軍部 */
.pm-fac-keiseikai { fill: #6b3a7a; }      /* 桔梗: 自民党 経世会 */
.pm-fac-kochikai { fill: #7a8b3a; }       /* 若竹: 自民党 宏池会 */
.pm-fac-seiwakai { fill: #893f5c; }       /* 蘇芳: 自民党 清和政策研究会 */
.pm-fac-heiseiken { fill: #4d5d8a; }      /* 紺青: 自民党 平成研 */
.pm-fac-jiminto-other { fill: #5a6b7a; }  /* 鼠青: 自民党 その他派閥 */
.pm-fac-shakaito { fill: #ad7c2f; }       /* 朽葉: 日本社会党 */
.pm-fac-minshuto { fill: #8a8d3d; }       /* 鶯: 民主党 */
.pm-fac-other { fill: #9a9a9a; }          /* 灰: その他 */

/* 凡例 */
.pm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.74rem;
  padding: 0.5rem 0.2rem;
  color: var(--color-text-light);
}
.pm-legend-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.pm-legend-swatch { width: 14px; height: 10px; display: inline-block; border: 1px solid rgba(0,0,0,0.15); }

/* テーブル */
.pm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  max-height: 70vh;
  overflow-y: auto;
}
.pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 900px;
}
.pm-table thead {
  background: var(--color-primary);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 1;
}
.pm-table th {
  padding: 0.45rem 0.55rem;
  text-align: left;
  font-weight: 500;
  font-family: var(--font-primary);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}
.pm-table th.sortable { cursor: pointer; }
.pm-table th.sortable:hover { background: var(--color-primary-dark); }
.pm-table th.sortable::after { content: " ↕"; font-size: 0.7rem; opacity: 0.4; }
.pm-table th.sortable.asc::after { content: " ↑"; opacity: 1; }
.pm-table th.sortable.desc::after { content: " ↓"; opacity: 1; }
.pm-table td {
  padding: 0.5rem 0.55rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.pm-table tbody tr:nth-child(even) { background: var(--color-bg); }
.pm-table tbody tr:hover { background: var(--color-bg-alt); cursor: pointer; }
.pm-name { font-family: var(--font-accent); color: var(--color-primary); font-weight: 500; }
.pm-name-kana { font-size: 0.72rem; color: var(--color-text-muted); margin-left: 0.3rem; }
.pm-num { text-align: right; font-variant-numeric: tabular-nums; }

/* 詳細パネル */
.pm-detail {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: min(420px, calc(100vw - 2rem));
  max-height: 75vh;
  overflow-y: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 1rem 1.2rem;
  font-size: 0.84rem;
  z-index: 100;
}
.pm-detail-close {
  position: absolute;
  top: 0.4rem;
  right: 0.6rem;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0.2rem 0.5rem;
  line-height: 1;
}
.pm-detail-close:hover { color: var(--color-primary); }
.pm-detail-name { font-family: var(--font-accent); font-size: 1.2rem; color: var(--color-primary); margin: 0 0 0.2rem; }
.pm-detail-kana { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 0.6rem; }
.pm-detail-meta {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 0.8rem;
  line-height: 1.6;
}
.pm-detail-meta dt { font-weight: 600; color: var(--color-text); display: inline-block; min-width: 5em; }
.pm-detail-meta dd { display: inline; margin: 0 0 0.3em 0; }
.pm-detail-meta dd::after { content: ""; display: block; }
.pm-detail-summary {
  font-size: 0.86rem;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0.6rem 0 0.8rem;
  padding: 0.6rem 0.8rem;
  background: var(--color-bg);
  border-left: 3px solid var(--color-primary);
}
.pm-detail-h3 {
  font-size: 0.8rem;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-weight: 600;
  margin: 0.6rem 0 0.3rem;
  letter-spacing: 0.03em;
}
.pm-detail-list {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin: 0 0 0.6rem;
  padding-left: 1.2em;
  line-height: 1.6;
}
.pm-detail-list li { margin-bottom: 0.15rem; }
.pm-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.76rem;
}
.pm-detail-nav a {
  color: var(--color-primary);
  text-decoration: none;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--color-border);
}
.pm-detail-nav a:hover { background: var(--color-bg-dark); }
.pm-detail-source {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  margin-top: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}
.pm-detail-source a { color: var(--color-primary); }

/* メタ section */
.pm-meta-section {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.pm-h2 {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--color-primary);
  margin: 1rem 0 0.5rem;
}
.pm-meta-list {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 1.7;
  padding-left: 1.4em;
}
.pm-meta-list li { margin-bottom: 0.2rem; }
.pm-meta-list a { color: var(--color-primary); }

@media (max-width: 768px) {
  .pm-outer { max-width: 100%; }
  .pm-detail { right: 0.5rem; left: 0.5rem; width: auto; }
  .pm-filter-label { width: 100%; margin-bottom: 0.2rem; }
}
