@charset "UTF-8";

/* =========================================================
   地方自治体議員選挙のページ（page-election-local.php）とトップの地方自治体選挙情報の枠（front-page.php）
   - le- で始まるクラスはこの 2 ページ専用（inc/local-elections.php がこの 2 ページでだけ読む）
   - 色はサイトの紺 #003f82・黄 #FFC000・薄いグレー #F1F2EE
   - 都道府県・市郡・区町村のボタンは、議員の都道府県インデックス（add.css の .local_list-count）と
     同じ様式：名前の右に人数の数字、0 人はグレーで押せない
   ========================================================= */

/* ---------- ダッシュボード ---------- */
.le-dashboard {
  margin: 80px 0;
}
.le-dashboard_stats {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.le-dashboard_stat {
  flex: 0 1 420px;
  padding: 24px 16px;
  border: 5px solid #FFC000;
  text-align: center;
}
.le-dashboard_stat dt {
  font-size: 18px;
  font-weight: 700;
}
.le-dashboard_stat dd {
  font-size: 18px;
  font-weight: 700;
}
.le-dashboard_stat .le-dashboard_breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1em;
  margin-top: 8px;
  font-weight: 400;
}
.le-dashboard_num {
  margin-right: .1em;
  color: #003f82;
  font-family: "Montserrat", sans-serif;
  font-size: 56px;
  line-height: 1.2;
}
.le-dashboard_flash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 32px;
  font-size: 18px;
}
/* 速報は赤地に白文字（サイトの赤 #d80c18。白文字で 5.1:1） */
/* バッジの字は都道府県のバッジ（.le-upcoming_pref）と同じ大きさ */
.le-dashboard_flash_label {
  padding: 1px 8px;
  background-color: #d80c18;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.le-dashboard_flash_label.is-result {
  background-color: #FFC000;
  color: #000;
}
.le-dashboard_flash a {
  color: #003f82;
  font-weight: 700;
  text-decoration: underline;
}
.le-dashboard_flash a:hover {
  text-decoration: none;
}
.le-dashboard .c-btn_wrap {
  margin-top: 32px;
}

/* ---------- 投票日が近い地方自治体選挙（日付の列＋選挙名・予定候補者の列） ---------- */
/* 地は規定の薄いグレー（地域検索の帯 .local と同じ #F1F2EE。2026-11-05）。.member の上下の余白の代わりに、帯の中に余白を取る */
.le-upcoming {
  margin: 0;
  padding: 100px 0;
  background-color: #F1F2EE;
}
@media screen and (max-width: 767px) {
  .le-upcoming {
    margin: 0;
    padding: 13.3333333333vw 0;
  }
}
.le-upcoming_note {
  margin-bottom: 24px;
  text-align: center;
}
/* 1 件を基本 1 行に（日付・都道府県・選挙名に続けて氏名）。氏名が多いときだけ折り返す（2026-11-06）。
   枠・行・日付・選挙名の様式は「最近の選挙結果」（.le-results_list）と共通。片方だけ変えない */
.le-upcoming_list,
.le-results_list {
  max-width: 960px;
  margin: 0 auto;
  border-top: 1px solid #cccccc;
}
.le-upcoming_item,
.le-results_list li {
  display: grid;
  gap: 0 12px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid #cccccc;
}
.le-upcoming_item {
  grid-template-columns: 112px 76px minmax(0, 1fr);
}
.le-results_list li {
  grid-template-columns: 112px minmax(0, 1fr);
}
.le-upcoming_date,
.le-results_list time {
  color: #003f82;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}
/* 都道府県は demo2 と同じくバッジ（黄の地に本文の色の太字） */
.le-upcoming_pref {
  justify-self: start;
  padding: 0 .5em;
  background-color: #FFC000;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.le-upcoming_election {
  margin-right: 1em;
  font-weight: 700;
}
.le-upcoming_body a {
  color: #003f82;
  text-decoration: underline;
}
.le-upcoming_body a:hover {
  text-decoration: none;
}
/* 氏名の途中では折り返さない（「成／島 良太」のように切れるのを防ぐ） */
.le-upcoming_people a {
  white-space: nowrap;
}

/* ---------- 新しく情報が追加された予定候補者 ---------- */
.le-fresh_note {
  margin-bottom: 40px;
  text-align: center;
}

/* ---------- お近くの候補者・予定候補者を探す ---------- */
.le-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-bottom: 32px;
  padding: 16px 20px;
  background-color: #fff;
}
.le-trail_label {
  font-weight: 700;
}
.le-trail strong {
  font-weight: 700;
}
.le-trail_link {
  padding: 0;
  border: 0;
  background: none;
  color: #003f82;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.le-trail_link:hover {
  text-decoration: none;
}
/* .btn01 と違い白地に紺の枠線。紺地だと目立ちすぎるため、この控えめな様式にしている（2026-11-07 ユーザー指示） */
.le-clear {
  min-width: 95px;
  padding: 4px 12px;
  border: 1px solid #003f82;
  background-color: #fff;
  color: #003f82;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}
.le-clear:hover {
  background-color: #003f82;
  color: #fff;
}
.le-clear-all {
  margin-left: auto;
}

.le-step + .le-step {
  margin-top: 32px;
}
.le-step_ttl {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 700;
}
.le-step_no {
  display: inline-block;
  margin-right: 12px;
  padding: 0 10px;
  background-color: #FFC000;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  vertical-align: middle;
}
.le-step_value {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background-color: #fff;
  font-size: 18px;
  font-weight: 700;
}
/* 選んだ段の「クリア」は「すべてクリア」と同じく右寄せ（2026-11-05） */
.le-step_value .le-clear {
  margin-left: auto;
}

/* 選択肢のボタン。li の寸法・地は .local .local_list li（style.css）と .local_list-count（add.css） */
.le-opts .le-opt {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background-color: #003f82;
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background-color .3s, color .3s;
}
.le-opts .le-opt:hover {
  background-color: #FFC000;
  color: #003f82;
}
/* 市・郡と区・町村は名前が長いので、幅を名前に合わせる */
.local .le-opts-wide li {
  width: auto;
  min-width: 132px;
}
.le-opts-wide .le-opt,
.local .le-opts-wide li.is-empty {
  padding: 0 14px;
}

/* 「◯◯の予定候補者を選挙ごとに見る」：一覧の見出しの罫線のすぐ下、左寄せ・太字（2026-11-05）。
   字の大きさと罫線からの間隔は、都道府県別の予定候補者一覧の日程（add.css の .member_sec_schedule_wrap）と同じ考え方：
   罫線から字までを、見出しの字から罫線までと同じにする（字面で実測して合わせた値）。見出しの margin-bottom と相殺する負の値。
   字から一覧までも日程と同じく、議員一覧の見出しの罫線から一覧まで（PC 60px／SP 375px で 25px）にそろえる（2026-11-05） */
.le-preflink {
  margin: -53px 0 52.5px;
  text-align: left;
}
.le-preflink a {
  color: #003f82;
  font-weight: 700;
  text-decoration: underline;
}
.le-preflink a:hover {
  text-decoration: none;
}

.le-result {
  margin-top: 64px;
}
.le-result_ttl {
  margin-bottom: 60px; /* 議員一覧の見出し（.member_sec_ttl）と同じ。2026-11-05 */
  border-bottom: 10px solid #FFC000;
  font-size: 30px;
  font-weight: 700;
}
.le-result .member_list li {
  background-color: #fff;
  padding: 16px;
}
.le-more_wrap {
  margin-top: 48px;
  text-align: center;
}
/* 大きさ・字は .btn01 のまま。button の既定の書体・行の高さ・字間だけ、a の .btn01 と同じにする（2026-11-07） */
.le-more {
  min-width: 338px;
  border: 0;
  font-family: inherit;
  line-height: inherit;
  letter-spacing: .6px;
  cursor: pointer;
}
.le-end {
  display: inline-block;
  min-width: 338px;
  padding: 10px 0;
  background-color: #555;
  color: #fff;
  font-weight: 700;
}

/* ---------- カード（.member_list の補足行） ----------
   バッジは地方選情報ポータル（tools/template.html の .badge・.badge-status）と同じ様式：
   推薦はグレー地に白文字（#555 で 7.46:1）、状態は灰色の罫線、新人だけ罫線と文字を赤（#cb171d で 5.71:1）。
   推薦にも地と同じ色の罫線を付けて、罫線のある状態バッジと大きさをそろえる */
.le-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 4px 0;
}
.le-badge,
.le-badge-status {
  padding: 0 .3em .1em;
  font-size: 15px;
  line-height: 1.4;
}
.le-badge {
  border: 1px solid #555;
  background-color: #555;
  color: #fff;
  font-weight: 700;
}
.le-badge-status {
  border: 1px solid #aaaaaa;
}
.le-badge-status.is-new {
  border-color: #cb171d;
  color: #cb171d;
}
.le-area {
  font-size: 15px;
  font-weight: 400;
}
.le-election {
  font-weight: 700;
}
.le-listed {
  margin-top: 4px;
  color: #555;
  font-size: 14px;
}

/* 「さらに表示」で一覧の高さを伸ばす間（assets/js/local-elections.js の growFrom） */
.le-cards.is-growing {
  overflow: hidden;
  transition: height .7s cubic-bezier(.45, 0, .25, 1);
}

/* ---------- 最近の選挙結果（一覧の様式は「投票日が近い」と共通。上の .le-upcoming_list のところ） ---------- */
.le-results_list a {
  color: #003f82;
  font-weight: 700;
  text-decoration: underline;
  /* 先頭の「【」の左の空きに下線が引かれないよう、約物を詰める（2026/11/04） */
  font-feature-settings: "palt";
}
.le-results_list a:hover {
  text-decoration: none;
}
/* 「そのほかの選挙結果」：一覧の下に右寄せ・太字（demo2 と同じ置き方）。右端は一覧にそろえる */
.le-results_more {
  max-width: 960px;
  margin: 24px auto 0;
}
.le-results_more,
.topLocal_more {
  font-weight: 700;
  text-align: right;
}
.le-results_more a,
.topLocal_more a {
  color: #003f82;
  text-decoration: underline;
}
.le-results_more a:hover,
.topLocal_more a:hover {
  text-decoration: none;
}
.le-winners {
  margin: 0 auto 120px;
}

/* ---------- トップの地方自治体選挙情報の枠（front-page.php の .topLocal。枠そのものは add.css） ---------- */
/* 枠の地が薄いグレーなので、カードは白地に黄の線（ダッシュボードの見た目。2026-11-06） */
.topLocal_stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.topLocal_stats .le-dashboard_stat {
  display: flex;
  flex-direction: column;
  padding: 24px 32px 32px;
  border: 0;
  border-top: 6px solid #FFC000;
  background-color: #fff;
}
.topLocal_count {
  margin-top: 4px;
}
/* カードの中のボタンは下にそろえて、カードの幅いっぱい */
.topLocal_stats .topLocal_stat_link {
  margin-top: auto;
  padding-top: 24px;
}
/* 字の大きさは .btn01 のまま。.btn01 の左右の余白（PC 105px）では文字が 1 行に収まらないので、左右だけ詰める */
.topLocal_stat_link .btn01 {
  display: flex;
  width: 100%;
  padding-right: 16px;
  padding-left: 16px;
  box-sizing: border-box;
}
/* 700 議席の達成度ゲージ。幅は --pct（front-page.php が出す） */
.le-gauge {
  margin-top: 12px;
}
.le-gauge_bar {
  display: block;
  height: 16px;
  background-color: #F1F2EE;
}
.le-gauge_fill {
  display: block;
  width: var(--pct, 0%);
  height: 100%;
  background-color: #003f82;
}
.le-gauge_text {
  display: block;
  margin-top: 8px;
  font-weight: 400;
}
.le-gauge_text strong {
  color: #003f82;
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
}
.topLocal_card {
  margin-top: 24px;
  padding: 24px 32px;
  border-top: 6px solid #FFC000;
  background-color: #fff;
}
.topLocal_card_head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.topLocal_subttl,
.topLocal_stats .le-dashboard_stat dt {
  font-size: 20px;
  font-weight: 700;
}
.topLocal_card .le-upcoming_list {
  max-width: none;
}
/* 予定候補者の内訳の帯：新人・現職…の順に紺・黄・グレー。幅は --pct（template-parts/local-status-gauge.php が出す） */
.le-status_bar {
  display: flex;
}
.le-status_bar span {
  display: block;
  width: var(--pct, 0%);
  height: 100%;
}
.le-status_bar span:nth-child(1),
.le-status_legend span:nth-child(1)::before { background-color: #003f82; }
.le-status_bar span:nth-child(2),
.le-status_legend span:nth-child(2)::before { background-color: #FFC000; }
.le-status_bar span:nth-child(3),
.le-status_legend span:nth-child(3)::before { background-color: #7f8c99; }
.le-status_bar span:nth-child(n+4),
.le-status_legend span:nth-child(n+4)::before { background-color: #c4c9ce; }
.le-status_legend span::before {
  content: "";
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-right: .3em;
}
/* 字の様式は「そのほかの選挙結果」と共通（.le-results_more の指定）。カードの右上に置く */
.topLocal_more {
  flex: none;
}
.topLocal_box .bigBanner {
  margin-top: 24px;
}
/* 最新決定・最新結果の 2 行。PC はまとまりごと中央に置き、中は左寄せで日付・題名の頭までそろえる */
.topLocal_flash {
  margin-bottom: 32px;
}
@media screen and (min-width: 768px) {
  .topLocal_flash {
    display: grid;
    grid-template-columns: repeat(3, auto);
    align-items: center;
    gap: 12px 16px;
    width: fit-content;
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }
  .topLocal_flash .le-dashboard_flash {
    display: contents;
  }
}

/* ---------- スマートフォン ---------- */
@media screen and (max-width: 767px) {
  .topLocal_stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 3.2vw;
  }
  .topLocal_stats .le-dashboard_stat {
    padding: 4.2666666667vw 4.2666666667vw 5.3333333333vw;
    border-width: 1.0666666667vw 0 0;
  }
  /* ボタンの字は親の大きさを受け継ぐので、カードの中の字（3.4667vw）ではなく本文の大きさに戻す（ほかのボタンと同じ） */
  .topLocal_stats .topLocal_stat_link {
    padding-top: 4.2666666667vw;
    font-size: 3.7333333333vw;
  }
  .le-gauge_bar {
    height: 2.6666666667vw;
  }
  .le-gauge_text strong {
    font-size: 4.2666666667vw;
  }
  .topLocal_card {
    margin-top: 3.2vw;
    padding: 4.2666666667vw;
    border-top-width: 1.0666666667vw;
  }
  .topLocal_card_head {
    gap: 2.1333333333vw;
    margin-bottom: 2.1333333333vw;
  }
  .topLocal_subttl,
  .topLocal_stats .le-dashboard_stat dt {
    font-size: 4.2666666667vw;
  }
  /* 字は小さくせず、1 行に収まらない分は「もっと見る」を次の行の右へ回す */
  .topLocal_card_head {
    flex-wrap: wrap;
  }
  .topLocal_more {
    margin-left: auto;
  }
  .topLocal_box .bigBanner {
    margin-top: 3.2vw;
  }
  .topLocal_flash {
    margin-bottom: 5.3333333333vw;
  }
  .topLocal_flash .le-dashboard_flash {
    margin: 0;
  }
  .topLocal_flash .le-dashboard_flash + .le-dashboard_flash {
    margin-top: 3.2vw;
  }
  .le-dashboard {
    margin: 10.6666666667vw 0;
  }
  .le-dashboard_stats {
    gap: 3.2vw;
  }
  .le-dashboard_stat {
    flex: 1 1 0;
    padding: 4vw 2vw;
    border-width: 0.8vw;
  }
  .le-dashboard_stat dt,
  .le-dashboard_stat dd {
    font-size: 3.4666666667vw;
  }
  .le-dashboard_num {
    font-size: 10.6666666667vw;
  }
  .le-upcoming_note {
    margin-bottom: 4.2666666667vw;
    font-size: 3.4666666667vw;
    text-align: left;
  }
  /* SP は 1 行目に日付と都道府県、2 行目に選挙名と氏名（最近の選挙結果は 1 行目に日付、2 行目に題名） */
  .le-upcoming_item,
  .le-results_list li {
    gap: 0 2.1333333333vw;
    padding: 2.1333333333vw 0;
    font-size: 3.4666666667vw;
  }
  .le-upcoming_item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .le-results_list li {
    grid-template-columns: minmax(0, 1fr);
  }
  .le-upcoming_pref {
    font-size: 3.2vw;
  }
  .le-upcoming_body {
    grid-column: 1 / -1;
  }
  .le-dashboard_flash {
    justify-content: flex-start;
    margin-top: 5.3333333333vw;
    font-size: 3.7333333333vw;
  }
  .le-dashboard_flash_label {
    padding: .2666666667vw 2.1333333333vw;
    font-size: 3.2vw;
  }
  .le-fresh_note {
    margin-bottom: 6.4vw;
    font-size: 3.4666666667vw;
  }
  .le-trail {
    margin-bottom: 5.3333333333vw;
    padding: 3.2vw;
    font-size: 3.4666666667vw;
  }
  /* 親の字の大きさ（絞り込みの行は 3.4667vw）を受け継がず、「クリア」「すべてクリア」を同じ大きさにする */
  .le-clear {
    font-size: 3.7333333333vw;
  }
  .le-clear-all {
    margin-left: 0;
  }
  .le-step + .le-step {
    margin-top: 5.3333333333vw;
  }
  .le-step_ttl {
    margin-bottom: 2.6666666667vw;
    font-size: 4.2666666667vw;
  }
  .le-step_value {
    padding: 2.6666666667vw 3.2vw;
    font-size: 3.7333333333vw;
  }
  .local .le-opts-wide li {
    min-width: calc((100% - 4.2666666667vw) / 3);
  }
  .le-opts-wide .le-opt,
  .local .le-opts-wide li.is-empty {
    padding: 0 2.1333333333vw;
  }
  .le-preflink {
    margin: -5.4426666667vw 0 5.12vw;
  }
  .le-result {
    margin-top: 10.6666666667vw;
  }
  .le-result_ttl {
    margin-bottom: 6.6666666667vw;
    border-width: 1.3333333333vw;
    font-size: 4.8vw;
  }
  .le-result .member_list li {
    padding: 3.2vw;
  }
  .le-more,
  .le-end {
    min-width: 0;
    width: 100%;
  }
  .le-badge,
  .le-badge-status,
  .le-area,
  .le-listed {
    font-size: 3.2vw;
  }
  .le-winners {
    margin-bottom: 16vw;
  }
}

/* 地域検索の見出しの下の氏名検索。トップの「サイト内検索」（.topSearch_box）と同じ黄色の枠・余白で、幅はコンテンツの幅（2026/11/05） */
.le-namesearch {
  margin-bottom: 60px;
  padding: 92px 0 90px;
  background-color: #FFC000;
}
.le-namesearch form { justify-content: center; }
@media screen and (max-width: 767px) {
  .le-namesearch {
    margin-bottom: 8vw;
    padding: 12vw 3.3333333333vw 10.6666666667vw;
  }
}
