/* ひだまり市 選挙シミュレーター ― 「一票の価値」のページのスタイル */

/* ---------- ページの上部 ---------- */
.vnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.vnav a { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.vnav a:hover { border-color: var(--ink); color: var(--ink); }
.vnav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.vnav .nos { font-family: var(--font-display); color: var(--win); letter-spacing: 0.02em; }
.vnav a[aria-current="page"] .nos { color: inherit; }
.citybar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 12px; border: 1px dashed var(--axis); border-radius: 8px; font-size: 0.8125rem; color: var(--ink-2); }
.citybar .label { font-weight: 700; }
.citybar b { color: var(--ink); font-size: 0.9375rem; }
.citybar a { font-weight: 700; color: var(--ink); white-space: nowrap; }
.control-cap { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }

/* ---------- ものさしのカード ---------- */
.measure { gap: 14px; scroll-margin-top: 120px; }
.m-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; }
.m-no { font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; line-height: 1; color: var(--win); }
.m-head h2 { font-size: 1.2rem; font-weight: 900; }
.m-q { font-size: 0.9375rem; font-weight: 700; color: var(--ink-2); }
.lv { font-size: 0.6875rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--axis); color: var(--ink-2); white-space: nowrap; }
.lv.lv3 { border-color: var(--win); color: var(--win); }
.m-what { max-width: 46em; font-size: 0.9375rem; }
.m-what b { font-weight: 700; }
.m-block { display: grid; gap: 10px; min-width: 0; }
.m-block > h3 { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 900; }
.m-block > h3::before { content: ""; width: 4px; height: 1.05em; border-radius: 2px; background: var(--ink); flex: none; }
.m-block > h3 small { font-family: var(--font-body); font-size: 0.75rem; font-weight: 400; color: var(--ink-2); }
.m-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8125rem; color: var(--ink-2); }
.m-links a { font-weight: 700; color: var(--ink); }
.caution { border-left: 4px solid var(--win); background: var(--surface-2); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 0.875rem; color: var(--ink-2); display: grid; gap: 4px; }
.caution b { color: var(--ink); }
.think { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; align-items: center; padding: 12px 14px; border-radius: 8px; background: var(--win-soft); }
.think > i { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: var(--win); color: var(--surface); display: grid; place-items: center; font-style: normal; font-weight: 900; font-family: var(--font-display); }
.think > b { color: var(--win); font-size: 0.8125rem; letter-spacing: 0.06em; }
.think > p { font-weight: 700; }
.data-help ul, .src-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.data-help li b { color: var(--ink); }
.src-list { font-size: 0.8125rem; color: var(--ink-2); }
.src-list a { overflow-wrap: anywhere; }

/* ---------- 式 ---------- */
.fx { display: grid; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); min-width: 0; }
.fx-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.fx-k { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.fx-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.9375rem; min-width: 0; }
.fx-x { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 10px; border: 1px solid var(--axis); border-left-width: 4px; border-radius: 6px; background: var(--surface); font-weight: 700; white-space: nowrap; }
.fx-x.ca { border-left-color: var(--s1); } .fx-x.cb { border-left-color: var(--s2); } .fx-x.cc { border-left-color: var(--s3); } .fx-x.cd { border-left-color: var(--l1); }
.fx-o { font-weight: 700; color: var(--ink-2); font-size: 1.05rem; }
.fx-k2 { font-weight: 700; }
.fx-t { font-size: 0.8125rem; color: var(--ink-2); }
.fx-f { display: inline-grid; justify-items: center; gap: 4px; }
.fx-f > span { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.fx-f > span:first-child { padding-bottom: 5px; border-bottom: 2px solid var(--ink); }
.fx-sq { display: inline-flex; align-items: stretch; }
.fx-sq-r { font-size: 1.6rem; line-height: 1; padding-top: 2px; font-weight: 400; }
.fx-sq-in { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 4px 0 6px; border-top: 2px solid var(--ink); }
.fx-p { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fx-r { display: inline-flex; align-items: center; min-height: 30px; padding: 2px 12px; border-radius: 6px; background: var(--win); color: var(--surface); font-weight: 900; white-space: nowrap; }
.fx-r.w { background: var(--surface); color: var(--win); border: 2px solid var(--win); }
.fx-sym summary { cursor: pointer; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.fx-sym > div { display: grid; gap: 6px; padding-top: 8px; }
.fx-symline { font-family: "Times New Roman", "Hiragino Mincho ProN", serif; font-size: 1.15rem; }
.fx-symline .ov { text-decoration: overline; }
@media (max-width: 560px) { .fx-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 大きな数字 ---------- */
.bigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.big { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.big > small { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.big > b { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
.big > span { font-size: 0.8125rem; color: var(--ink-2); }
.big.hot { border-color: var(--win); background: var(--win-soft); }
.big.hot > b { color: var(--win); }
.say { font-size: 0.9375rem; display: grid; gap: 4px; }
.say b { font-weight: 700; }

/* ---------- 入力 ---------- */
.calc { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; }
.field { display: grid; gap: 3px; align-content: start; font-size: 0.8125rem; min-width: 0; }
.field label { font-weight: 700; color: var(--ink-2); }
.field .in { display: flex; align-items: center; gap: 6px; }
.field .unit { flex: none; color: var(--ink-2); }
.field .in output { flex: none; white-space: nowrap; min-width: 3.2em; }
.field .in input[type="range"] { min-width: 0; flex: 1 1 auto; }
.field small { color: var(--muted); font-size: 0.75rem; line-height: 1.4; }
.field input[aria-invalid="true"] { border-color: var(--win); outline-color: var(--win); }
.field input { font-variant-numeric: tabular-nums; text-align: right; }
.row-tools { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.pick { display: inline-flex; flex-wrap: wrap; gap: 4px; }
select.sel { min-height: 36px; padding: 4px 8px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface-2); font: inherit; color: inherit; }

/* ---------- タブ ---------- */
.vtab-wrap { display: grid; gap: 12px; min-width: 0; }
.vtabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line); }
.vtabs button { margin-bottom: -2px; padding: 6px 14px; border: 0; border-bottom: 3px solid transparent; background: none; font-weight: 700; font-size: 0.875rem; color: var(--ink-2); cursor: pointer; }
.vtabs button:hover { color: var(--ink); }
.vtabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--win); }
.vtab { display: grid; gap: 12px; min-width: 0; }

/* ---------- 投票率ごとの棒グラフ ---------- */
.tbars .tb { fill: var(--axis); }
.tbars .tb.on { fill: var(--ink); }
.tbars .tb.f0 { fill: var(--s1); } .tbars .tb.f1 { fill: var(--s2); } .tbars .tb.f2 { fill: var(--s3); }
.tbars .tb.f0.on, .tbars .tb.f1.on, .tbars .tb.f2.on { stroke: var(--ink); stroke-width: 1.5; }
.tbars .tb.dim { opacity: 0.45; }

/* ---------- 100人の図 ---------- */
.dots-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; width: min(100%, 230px); }
.dots i { aspect-ratio: 1; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--axis); }
.dots i.d-win { background: var(--win); border-color: var(--win); }
.dots i.d-other { background: var(--l2); border-color: var(--l2); }
.dots i.d-no { background: var(--surface-2); border-color: var(--axis); }
.dots-legend { display: grid; gap: 4px; font-size: 0.8125rem; color: var(--ink-2); }
.dots-legend .key i { border-radius: 50%; }
.key i.d-win { background: var(--win); } .key i.d-other { background: var(--l2); } .key i.d-no { background: var(--surface-2); border: 1px solid var(--axis); box-sizing: border-box; }

/* ---------- 横棒の比較 ---------- */
.hbars { display: grid; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(7em, 12em) minmax(0, 1fr) 7.5em; align-items: center; gap: 8px; font-size: 0.8125rem; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.hb-b { position: relative; height: 14px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.hb-b i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--l2); transition: width 0.25s ease-out; }
.hb-b i.hi { background: var(--win); }
.hb-v { text-align: right; font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) {
  .hb { grid-template-columns: minmax(0, 1fr) auto; }
  .hb-b { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- 表 ---------- */
.tbl input[type="text"] { min-height: 30px; padding: 2px 6px; }
.tbl td.in-name { min-width: 7em; }
.tbl td.in-num { width: 8em; }
.tbl td .stepper { transform: scale(0.9); transform-origin: right center; }
.tbl tr.max td, .tbl tr.min td { font-weight: 700; }
.tbl .tagmax { color: var(--win); font-size: 0.6875rem; font-weight: 700; margin-left: 4px; }
.tbl.wraptext th, .tbl.wraptext td { white-space: normal; text-align: left; vertical-align: top; }
.tbl.wraptext td:first-child { white-space: nowrap; font-weight: 700; }
.tbl .crit { color: var(--win); font-weight: 700; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }

/* ---------- 決定力（⑨⑩） ---------- */
.power { display: grid; gap: 10px; }
.pw { display: grid; grid-template-columns: minmax(6em, 10em) minmax(0, 1fr); gap: 2px 10px; align-items: center; font-size: 0.8125rem; }
.pw-name { font-weight: 700; overflow-wrap: anywhere; }
.pw-name small { display: block; font-weight: 400; color: var(--ink-2); }
.pw-bars { display: grid; gap: 3px; }
.pw-bar { display: grid; grid-template-columns: 5.6em minmax(0, 1fr) 4.2em; align-items: center; gap: 6px; }
.pw-bar span:first-child { color: var(--ink-2); font-size: 0.75rem; }
.pw-bar .bb { position: relative; height: 12px; background: var(--surface-2); border-radius: 0 4px 4px 0; }
.pw-bar .bb i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; transition: width 0.25s ease-out; }
.pw-bar .num { text-align: right; font-weight: 700; }
.pw-bar.seat .bb i { background: var(--l2); }
.pw-bar.bz .bb i { background: var(--s1); }
.pw-bar.ss .bb i { background: var(--s3); }
.legend .key i.p-seat { background: var(--l2); } .legend .key i.p-bz { background: var(--s1); } .legend .key i.p-ss { background: var(--s3); }
@media (max-width: 560px) { .pw { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 1票の旅（入口） ---------- */
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.stop { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: border-color 0.15s, transform 0.15s; min-width: 0; }
a.stop:hover { border-color: var(--ink); transform: translateY(-2px); }
.stop .step { font-size: 0.75rem; font-weight: 700; color: var(--win); letter-spacing: 0.06em; }
.stop .ico { width: 44px; height: 44px; color: var(--ink); }
.stop h3 { font-size: 1.05rem; font-weight: 900; }
.stop .nos { font-family: var(--font-display); font-weight: 900; color: var(--win); font-size: 1.1rem; }
.stop p { font-size: 0.8125rem; color: var(--ink-2); }
.stop .go { font-size: 0.8125rem; font-weight: 700; }
.journey li:not(:last-child) .stop::after { content: "→"; position: absolute; right: -12px; top: 50%; transform: translate(50%, -50%); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 0.75rem; font-weight: 700; z-index: 1; }
.journey li { display: grid; }
.journey li.extra .stop { border-style: dashed; }
@media (max-width: 880px) {
  .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .journey li:nth-child(2) .stop::after { display: none; }
}
@media (max-width: 560px) {
  .journey { grid-template-columns: minmax(0, 1fr); }
  .journey li .stop::after { right: 50% !important; top: auto !important; bottom: -12px; transform: translate(50%, 50%) rotate(90deg) !important; }
  .journey li:nth-child(2) .stop::after { display: grid; }
}

/* ---------- まちの数字（入口） ---------- */
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.vcard { display: grid; gap: 4px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; min-width: 0; }
a.vcard:hover { border-color: var(--ink); }
.vcard .no { font-family: var(--font-display); font-weight: 900; color: var(--win); }
.vcard > small { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.vcard > b { font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; line-height: 1.25; overflow-wrap: anywhere; }
.vcard > span { font-size: 0.8125rem; color: var(--ink-2); }
.city-src { font-size: 0.75rem; color: var(--muted); }

/* ---------- ○×クイズ ---------- */
.quiz { display: grid; gap: 12px; }
.qcard { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.qcard .qno { font-size: 0.75rem; font-weight: 700; color: var(--win); letter-spacing: 0.06em; }
.qcard .qtext { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; line-height: 1.45; }
.qbtns { display: flex; gap: 10px; }
.qbtns button { width: 64px; height: 56px; border-radius: 12px; border: 2px solid var(--axis); background: var(--surface); font-size: 1.6rem; font-weight: 900; cursor: pointer; line-height: 1; }
.qbtns button:hover:not(:disabled) { border-color: var(--ink); }
.qbtns button:disabled { cursor: default; }
.qbtns button.right { border-color: var(--s3); background: var(--s3); color: var(--surface); }
.qbtns button.wrong { border-color: var(--win); color: var(--win); }
.qans { display: grid; gap: 6px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-size: 0.9375rem; }
.qans .verdict { font-weight: 900; }
.qans .verdict.ok { color: var(--s3); } .qans .verdict.ng { color: var(--win); }
.qans a { font-weight: 700; font-size: 0.8125rem; }
.qscore { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; position: sticky; top: 0; z-index: 10; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 18px -12px rgba(21, 26, 35, 0.45); }
.qscore b { font-family: var(--font-display); font-size: 1.4rem; }
.qscore .bar { flex: 1 1 160px; display: flex; gap: 3px; }
.qscore .bar i { flex: 1; height: 8px; border-radius: 4px; background: var(--line); }
.qscore .bar i.ok { background: var(--s3); } .qscore .bar i.ng { background: var(--win); }

/* ---------- 小さな部品 ---------- */
.sub-h { font-size: 0.9375rem; font-weight: 900; margin-top: 4px; }
.stepper .mini-in { width: 4.2em; min-height: 30px; padding: 0 2px; border: 0; border-radius: 0; background: transparent; text-align: center; font-weight: 700; }
.tbl td .stepper output { min-width: 2.6ch; }

/* 本当にあった接戦（⑥） */
.real { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.real li { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.real li > b { font-size: 1.15rem; color: var(--win); line-height: 1.4; }
.real li > span { line-height: 1.8; }
.real li a { margin-left: .4em; white-space: nowrap; }
@media (max-width: 560px) { .real li { grid-template-columns: 1fr; gap: 4px; } .real li a { white-space: normal; } }
.qans .q-src { margin-left: 1em; font-size: .8125rem; color: var(--muted); }

/* ---------- せまい画面で、表や式がはみ出さないように ---------- */
.measure, .m-block, .vtab, .vtab-wrap { grid-template-columns: minmax(0, 1fr); }
.measure > *, .m-block > *, .vtab > *, .vtab-wrap > * { min-width: 0; }
.m-block > h3 { flex-wrap: wrap; row-gap: 2px; }
.fx-sq { max-width: 100%; min-width: 0; }
.fx-sq-in { min-width: 0; }
@media (max-width: 560px) {
  .fx-x { white-space: normal; }
  .fx-line { font-size: 0.875rem; }
}
.tbl td.in-num input { min-width: 7.5em; }
.tbl td.in-name input { min-width: 6.5em; }
#city-name { text-align: left; }

/* ---------- 式に実際の数字を入れる行（V.Calc） ---------- */
.fx + .fx { margin-top: 10px; }
.fx-title { font-size: 0.8125rem; font-weight: 900; color: var(--ink); }
.calc-row { padding-top: 10px; border-top: 1px dashed var(--axis); }
.calc-row > .fx-k { color: var(--win); }
.calc-body { display: grid; gap: 6px; min-width: 0; }
.fx-xin { padding: 0 8px 0 4px; gap: 3px; cursor: text; }
.fx-xin:focus-within { border-color: var(--win); box-shadow: 0 0 0 2px var(--win-soft); }
.fx-in { font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); background: transparent; border: 0; border-bottom: 2px dotted var(--axis);
  border-radius: 0; padding: 2px 2px; min-width: 4ch; max-width: 16ch; text-align: right; box-sizing: content-box; }
.fx-in:hover { border-bottom-color: var(--ink-2); }
.fx-in:focus { outline: none; border-bottom: 2px solid var(--win); background: var(--surface-2); }
.fx-in[aria-invalid="true"] { color: var(--win); border-bottom-color: var(--win); background: var(--win-soft); }
.fx-u { font-size: 0.8125rem; color: var(--ink-2); font-weight: 700; }
.calc-err { font-size: 0.8125rem; color: var(--win); font-weight: 700; }
.calc-pre { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.calc-pre-k { font-size: 0.75rem; color: var(--ink-2); font-weight: 700; }
.btn.sm { padding: 2px 10px; font-size: 0.75rem; min-height: 28px; }
.calc-jump { font-size: 0.8125rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.m-ex { max-width: 46em; font-size: 0.875rem; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.m-ex > b:first-child { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 0.75rem; }
@media (max-width: 560px) { .fx-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- もっと学びたい人のために（事例と年表） ---------- */
.story { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.story-btn { width: 100%; height: 100%; display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--cc, var(--ink)); border-radius: 8px; background: var(--surface); }
.story-btn:hover { border-color: var(--cc, var(--ink)); }
.story-t { font-weight: 700; font-size: 0.9375rem; }
.story-btn .go { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
.tl-tools { display: grid; gap: 10px; }
.tl-row { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.tl-k { font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
#tl-q { font: inherit; width: 100%; max-width: 28em; padding: 8px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); }
#tl-q:focus { outline: 2px solid var(--win); outline-offset: 1px; }
.chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); flex: none; }
.tl-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; color: var(--ink); padding: 1px 10px 1px 8px; border-radius: 999px; border: 1px solid var(--cc); }
.tl-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.tl { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 14px; }
.tl::before { content: ""; position: absolute; left: 6.6em; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-dec { position: relative; padding-left: 7.8em; }
.tl-dec span { display: inline-block; font-family: var(--font-display); font-weight: 900; font-size: 0.875rem; padding: 2px 12px; border-radius: 999px; background: var(--ink); color: var(--surface); }
.tl-item { display: grid; grid-template-columns: 5.6em minmax(0, 1fr); gap: 0 2.2em; position: relative; scroll-margin-top: 100px; }
.tl-item::before { content: ""; position: absolute; left: calc(6.6em - 6px); top: 16px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--cc); box-sizing: border-box; }
.tl-when { text-align: right; padding-top: 10px; display: grid; gap: 2px; align-content: start; }
.tl-year { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; line-height: 1.1; }
.tl-when small { font-size: 0.6875rem; color: var(--ink-2); line-height: 1.35; }
.tl-card { min-width: 0; display: grid; gap: 8px; padding: 12px 16px 14px; border: 1px solid var(--line); border-top: 3px solid var(--cc); border-radius: 10px; background: var(--surface); }
.tl-card h3 { font-size: 1.0625rem; font-weight: 900; line-height: 1.5; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.tl-m { font-size: 0.75rem; font-weight: 700; color: var(--ink); text-decoration: none; border: 1px solid var(--axis); border-radius: 999px; padding: 0 9px; }
.tl-m:hover { border-color: var(--ink); text-decoration: underline; }
.tl-lab { display: inline-block; margin-right: 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-2); }
.tl-pts { padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.tl-pts ul { margin: 2px 0 0; padding-left: 1.2em; display: grid; gap: 2px; font-weight: 700; font-size: 0.9375rem; }
.tl-sum { font-size: 0.9375rem; color: var(--ink-2); }
.tl-src { font-size: 0.8125rem; }
.tl-src ul { margin: 2px 0 0; padding-left: 1.2em; display: grid; gap: 2px; }
.tl-src small { color: var(--muted); }
@media (max-width: 560px) {
  .tl-row { grid-template-columns: minmax(0, 1fr); }
  .tl::before { left: 9px; }
  .tl-dec { padding-left: 26px; }
  .tl-item { grid-template-columns: minmax(0, 1fr); padding-left: 26px; gap: 4px; }
  .tl-item::before { left: 3px; top: 6px; }
  .tl-when { text-align: left; padding-top: 0; display: flex; gap: 8px; align-items: baseline; }
}
.more-card { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--win); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.more-card:hover { border-color: var(--win); }
.more-card b { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; }
.more-card .go { font-size: 0.8125rem; font-weight: 700; }
.calc-line .fx-r { white-space: normal; max-width: 100%; }
.story-btn .tl-cat { justify-self: start; }
/* 小見出しは、せまい画面でも左の線と文字が同じ行にならぶように */
.m-block > h3 { display: block; line-height: 1.6; }
.m-block > h3::before { display: inline-block; vertical-align: -0.12em; margin-right: 8px; }
.m-block > h3 small { margin-left: 8px; }
/* 式の中の入力欄は、ふつうの入力欄の見た目（parts.css）を打ち消して、下線だけにする */
.fx-x input.fx-in[type="text"] { min-height: 0; width: auto; padding: 2px 2px; border: 0; border-bottom: 2px dotted var(--axis); border-radius: 0; background: transparent; }
.fx-x input.fx-in[type="text"]:hover { border-bottom-color: var(--ink-2); }
.fx-x input.fx-in[type="text"]:focus { border-bottom: 2px solid var(--win); background: var(--surface-2); }
.fx-x input.fx-in[type="text"][aria-invalid="true"] { border-bottom-color: var(--win); background: var(--win-soft); }
/* 入口：国の選挙の1票 */
.kuni-list { display: grid; gap: 10px; }
#kuni-table th.mine, #kuni-table td.mine { background: var(--win-soft); }
#kuni-table td:first-child a { font-weight: 700; color: var(--ink); white-space: nowrap; }
/* もっと学ぶ（選挙シミュレーターの事例と研究）learn.html */
.ln-toc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.ln-toc a { display: grid; gap: 2px; align-content: start; height: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--win); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.ln-toc a:hover { border-color: var(--win); }
.ln-toc b { font-size: 0.9375rem; line-height: 1.45; }
.ln-toc small { font-size: 0.75rem; color: var(--ink-2); }
#ln-q { font: inherit; width: 100%; max-width: 28em; padding: 8px 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); }
#ln-q:focus { outline: 2px solid var(--win); outline-offset: 1px; }
.ln-topic { scroll-margin-top: 12px; }
.ln-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.8125rem; font-weight: 700; color: var(--ink-2); }
.ln-try .btn { color: var(--ink); }
.ln-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 12px; align-items: start; }
.ln-when { font-size: 0.75rem; font-weight: 700; color: var(--ink-2); }
#kuni { grid-template-columns: minmax(0, 1fr); }
#kuni > *, .kuni-list > * { min-width: 0; }
