/* =================================================================
   政権担当者タイムライン 固定ページ専用スタイル
   Template: page-seiken-index.php
   ================================================================= */

.seiken-page {
  --bg:           #FDF8EE;
  --paper:        #FFFFFF;
  --ink:          #1A1818;
  --ink-soft:     #4A4544;
  --ink-mute:     #8A8480;
  --line:         #EBE4D3;
  --line-soft:    #F2ECDE;
  --brand:        #FF6B35;
  --brand-deep:   #E55321;
  --brand-soft:   #FFE6D8;
  --accent:       #2B4C7E;
  --accent-soft:  #DCE5F0;
  --sun:          #F4C842;
  --sun-soft:     #FFF3C2;
  --leaf:         #4A9B5F;
  --leaf-soft:    #E0EDE3;
  --pink:         #B83260;
  --pink-soft:    #FCE2E8;
  --brown:        #A86C3D;
  --brown-soft:   #EFE2D4;
  --slate:        #5A6374;
  --slate-soft:   #F0EEE8;

  --font-round:  'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  --font-mincho: 'Shippori Mincho', 'Noto Serif JP', serif;
  --font-gothic: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', sans-serif;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-gothic);
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
}

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

.seiken-page a {
  color: var(--brand);
  text-decoration: none;
}

.seiken-page a:hover {
  color: var(--brand-deep);
}

.seiken-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Masthead ── */
.seiken-masthead {
  padding: 26px 0 20px;
  border-bottom: 1.5px solid var(--line);
}

.seiken-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.seiken-logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.seiken-logo-face {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 4px 0 var(--brand-deep);
  flex: none;
}

.seiken-logo-face::before,
.seiken-logo-face::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  top: 17px;
}

.seiken-logo-face::before { left: 12px; }
.seiken-logo-face::after  { right: 12px; }

.seiken-logo-bulb {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sun);
}

.seiken-logo-smile {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 17px;
  height: 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.seiken-logo-word {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: 28px;
  letter-spacing: .02em;
  line-height: 1;
}

.seiken-dot { color: var(--brand); }

.seiken-logo-sub {
  display: block;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: .18em;
  margin-top: 5px;
}

.seiken-crumbs {
  font-size: 12px;
  color: var(--ink-mute);
}

.seiken-crumbs a {
  color: var(--ink-mute);
  text-decoration: none;
}

.seiken-crumbs a:hover { color: var(--brand); }

/* ── Hero ── */
.seiken-hero {
  padding: 32px 0 26px;
  border-bottom: 1px solid var(--line);
}

.seiken-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--accent);
}

.seiken-kicker-mark {
  font-family: var(--font-mincho);
  font-size: 14px;
  opacity: .7;
}

.seiken-hero h1 {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(26px, 4.5vw, 38px);
  line-height: 1.25;
  margin: 12px 0 0;
  letter-spacing: .01em;
  text-wrap: balance;
}

.seiken-lead {
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink-soft);
  margin: 14px 0 0;
  max-width: 56ch;
  text-wrap: pretty;
  line-height: 1.75;
}

.seiken-note {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 10px 0 0;
  max-width: 56ch;
  line-height: 1.85;
}

/* ── Stats strip ── */
.seiken-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 24px 0 0;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px -3px rgba(0,0,0,.07);
}

.seiken-stat {
  flex: 1 1 0;
  min-width: 110px;
  padding: 16px 20px;
  border-right: 1px solid var(--line-soft);
}

.seiken-stat:last-child { border-right: 0; }

.seiken-stat-n {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
}

.seiken-stat-n--accent { color: var(--brand); }

.seiken-stat-u {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mute);
  margin-left: 3px;
}

.seiken-stat-l {
  font-size: 11px;
  color: var(--ink-mute);
  margin-top: 6px;
  letter-spacing: .05em;
}

/* ── Toolbar ── */
.seiken-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253,248,238,.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.seiken-toolbar-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.seiken-searchrow {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.seiken-search {
  position: relative;
  flex: 1 1 260px;
}

.seiken-search-ic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border: 2px solid var(--ink-mute);
  border-radius: 50%;
  pointer-events: none;
}

.seiken-search-ic::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: var(--ink-mute);
  transform: rotate(45deg);
  border-radius: 2px;
}

.seiken-search input {
  width: 100%;
  font-family: var(--font-gothic);
  font-size: 14px;
  color: var(--ink);
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}

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

.seiken-found {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
}

.seiken-found b {
  font-family: var(--font-round);
  font-weight: 700;
  color: var(--ink);
}

/* Era jump nav */
.seiken-jump {
  margin-left: auto;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.seiken-jump a {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  white-space: nowrap;
  transition: .15s;
  display: inline-block;
}

.seiken-jump a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Era filter chips */
.seiken-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.seiken-chips-lbl {
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: .08em;
  flex-shrink: 0;
}

.seiken-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  transition: all .15s;
  white-space: nowrap;
  line-height: 1;
}

.seiken-chip .seiken-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.seiken-chip:hover {
  border-color: var(--ink-mute);
}

.seiken-chip[aria-pressed="true"] {
  color: #fff;
}

.seiken-clear-btn {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--brand-deep);
  background: var(--brand-soft);
  border: 1.5px solid #f6cdb9;
  border-radius: 999px;
  padding: 5px 11px;
  line-height: 1;
  transition: .15s;
}

.seiken-clear-btn:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Chapter sections ── */
.seiken-chapter {
  padding: 40px 0 8px;
  scroll-margin-top: 148px;
}

.seiken-chapter-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom-width: 2px;
  border-bottom-style: solid;
  margin-bottom: 4px;
}

.seiken-chapter-no {
  font-family: var(--font-mincho);
  font-weight: 800;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mute);
  letter-spacing: .06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.seiken-chapter-title {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: clamp(20px, 3vw, 26px);
  margin: 0;
  color: var(--ink);
  line-height: 1.3;
  flex: 1;
}

.seiken-chapter-count {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Topic row ── */
.seiken-topic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 11px 16px;
  margin: 4px 0;
  border-radius: 0 12px 12px 0;
  border-left-width: 3px;
  border-left-style: solid;
}

.seiken-topic-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-round);
  font-weight: 900;
  font-size: 18px;
  color: #fff;
}

.seiken-topic-inner {
  padding-top: 3px;
  min-width: 0;
}

.seiken-topic-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .14em;
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 8px;
}

.seiken-topic-name {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.seiken-topic-role {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* ── Person row ── */
.seiken-row {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 16px 13px 4px;
  margin: 2px 0;
  border-left: 2.5px solid transparent;
  border-radius: 0 14px 14px 0;
  position: relative;
  transition: background .14s, border-left-color .14s;
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.seiken-row--linked {
  cursor: pointer;
}

.seiken-row--linked:hover {
  background: var(--paper);
  border-left-color: var(--brand);
}

.seiken-row:not(.seiken-row--linked):hover {
  background: #FDFAF6;
}

/* Avatar column */
.seiken-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
}

.seiken-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 3px 10px -3px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-round);
  font-weight: 900;
  font-size: 22px;
  flex-shrink: 0;
}

.seiken-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.seiken-avatar-fallback {
  display: none;
  position: relative;
  z-index: 0;
  line-height: 1;
}

.seiken-avatar--noimg .seiken-avatar-fallback {
  display: block;
}

.seiken-row-no {
  font-size: 10px;
  color: var(--ink-mute);
  line-height: 1;
  text-align: center;
}

/* Info column */
.seiken-row-info {
  min-width: 0;
}

.seiken-row-name {
  font-family: var(--font-round);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.4;
  text-wrap: pretty;
}

.seiken-row--linked:hover .seiken-row-name {
  color: var(--brand-deep);
}

.seiken-row-role {
  font-family: var(--font-mincho);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
  line-height: 1.65;
  text-wrap: pretty;
}

/* Status column */
.seiken-row-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.seiken-row-status-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seiken-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.seiken-badge {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 11.5px;
  padding: 5px 13px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.seiken-badge--live   { background: var(--brand);       color: #fff; }
.seiken-badge--draft  { background: var(--accent-soft);  color: var(--accent); }
.seiken-badge--none   { background: var(--line-soft);    color: var(--ink-mute); }

.seiken-badge-sub {
  font-size: 10px;
  color: var(--ink-mute);
  font-family: var(--font-mincho);
  word-break: break-all;
  text-align: right;
}

/* ── Empty state ── */
.seiken-empty {
  text-align: center;
  padding: 72px 20px;
  color: var(--ink-mute);
  font-family: var(--font-mincho);
  font-weight: 700;
  font-size: 16px;
  line-height: 2;
}

.seiken-empty small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  margin-top: 4px;
}

/* ── Footer note ── */
.seiken-footnote {
  margin: 52px 0 80px;
  padding: 26px 28px;
  background: var(--accent-soft);
  border-radius: 18px;
}

.seiken-footnote h3 {
  font-family: var(--font-round);
  font-weight: 900;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--accent);
}

.seiken-footnote p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.9;
}

.seiken-footnote b { color: var(--accent); }

/* ── Back to top ── */
.seiken-backtop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  place-items: center;
  z-index: 40;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  transition: opacity .2s;
}

.seiken-backtop svg { width: 18px; height: 18px; }
.seiken-backtop.seiken-backtop--show { display: grid; }

/* ── Responsive ── */
@media (max-width: 720px) {
  .seiken-wrap,
  .seiken-toolbar-inner { padding-left: 16px; padding-right: 16px; }

  .seiken-hero h1 { font-size: 28px; }
  .seiken-lead     { font-size: 15px; }

  .seiken-stat { min-width: 50%; border-right: none; border-bottom: 1px solid var(--line-soft); }
  .seiken-stat:nth-child(odd)  { border-right: 1px solid var(--line-soft); }
  .seiken-stat:nth-last-child(-n+2) { border-bottom: none; }

  .seiken-jump { display: none; }

  .seiken-chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  .seiken-row {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
  }

  .seiken-row-status {
    grid-column: 2;
    grid-row: 2;
    align-items: flex-start;
  }

  .seiken-avatar { width: 60px; height: 60px; font-size: 20px; }

  .seiken-chapter-no { display: none; }
}


/* ================================================================
   主な出来事マーカー (seiken-event)
   政権担当者行の直後に、その政権期の出来事を年号付きで表示する。
   章ごとのアクセント色は --seiken-event-color で受け取る。
   ================================================================ */
.seiken-event {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 4px 0 4px 58px;
  padding: 7px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--seiken-event-color, #FF6B35) 8%, #FFFFFF);
  border: 1px dashed color-mix(in srgb, var(--seiken-event-color, #FF6B35) 50%, transparent);
  font-size: 14px;
  position: relative;
}

.seiken-event::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--seiken-event-color, #FF6B35);
}

.seiken-event-year {
  flex: none;
  font-family: var(--font-round);
  font-weight: 900;
  color: var(--seiken-event-color, #FF6B35);
  font-variant-numeric: tabular-nums;
}

.seiken-event-label {
  font-weight: 700;
  min-width: 0;
}

.seiken-event-person {
  font-size: 12px;
  color: #7A7268;
}

.seiken-event-person::before {
  content: "主要人物: ";
}

@media (max-width: 560px) {
  .seiken-event {
    margin-left: 20px;
    font-size: 13px;
  }
  .seiken-event::before {
    left: -15px;
  }
}
