
:root {
  --paper: #FAF7F0;
  --surface: #FFFFFF;
  --ink: #1E2530;
  --ink2: #5A6370;
  --rule: #E3DED3;
  --act: #2C5282;
  --act-weak: #E8EEF6;
  --cost: #B4532A;
  --wage: #6B5BA8;
  --remain: #2E7D5B;
  --other: #9AA1AA;
  --pending: #C9A227;
  --pending-weak: #FBF5E0;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans CJK JP", "Noto Sans JP", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) {
  body { font-size: 18px; }
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
a { color: var(--act); }
h1, h2, h3 { font-weight: 700; letter-spacing: .02em; }
h1 { font-size: 27px; line-height: 1.5; margin: 0 0 20px; }
@media (min-width: 768px) {
  h1 { font-size: 33px; }
}
h2 { font-size: 22px; line-height: 1.5; margin: 0 0 12px; }
h3 { font-size: 19px; line-height: 1.5; }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; border-radius: 4px; }
h1:focus, h2:focus, main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; border: 1px solid var(--act); }
.muted { color: var(--ink2); }
.small { font-size: 15px; }

/* 動きを減らす */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* フッターの動きの設定 */
.pb-toggle { min-height: 40px; border: 1px solid var(--ink2); background: var(--surface); border-radius: 8px; padding: 4px 12px; font-size: 14px; cursor: pointer; }
.pb-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--rule); }
.hd-inner { max-width: 1040px; margin: 0 auto; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; }
.brand { font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.nav { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 15px; }
.nav a { color: var(--ink2); text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.mprogress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--act); z-index: 50; display: none; }
body.has-rail .mprogress { display: block; }
@media (min-width: 1100px) {
  body.has-rail .mprogress { display: none; }
}

/* レイアウト */
.layout { max-width: 1000px; margin: 0 auto; padding: 32px 16px 96px; display: grid; grid-template-columns: minmax(0, 680px); justify-content: center; column-gap: 56px; }
@media (min-width: 1100px) {
  .layout.has-rail { grid-template-columns: minmax(0, 680px) 190px; }
}
.wide { max-width: 1040px; margin: 0 auto; padding: 40px 16px 96px; }
.rail { display: none; }
@media (min-width: 1100px) {
  .rail { display: block; position: sticky; top: 32px; align-self: start; }
}
.rail p { font-size: 13px; color: var(--ink2); font-weight: 700; margin: 0 0 8px; letter-spacing: .06em; }
.rail ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.rail button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; color: var(--ink2); cursor: pointer; line-height: 1.5; }
.rail button:hover { color: var(--ink); }
.rail button.on { color: var(--ink); font-weight: 700; border-left-color: var(--ink); }

.eyebrow { font-size: 14px; color: var(--ink2); font-weight: 700; letter-spacing: .06em; margin: 0 0 8px; }
.scope { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 16px 0 4px; margin-bottom: 32px; }
.scope-list { margin: 4px 0 8px; padding-left: 1.4em; }
.section { margin: 72px 0 0; scroll-margin-top: 24px; }
.section.first { margin-top: 0; }
.stage { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 24px; }
@media (max-width: 639px) {
  .stage { padding: 16px; }
}
.stage-h { font-size: 20px; margin-bottom: 16px; }
.gate-note { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink2); font-size: 15px; background: var(--surface); }

/* ボタン類 */
.btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--act); background: var(--surface); color: var(--act); font-size: 16px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--act-weak); }
.textlink { background: none; border: none; color: var(--act); font-size: 15px; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.src { background: none; border: none; color: var(--act); font-size: 14px; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.seg-group { display: inline-flex; border: 1px solid var(--act); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg-group button { min-height: 44px; padding: 6px 16px; border: none; background: transparent; color: var(--act); font-size: 16px; cursor: pointer; }
.seg-group button + button { border-left: 1px solid var(--act); }
.seg-group button[aria-pressed="true"] { background: var(--act); color: #fff; }
.seg-group button:disabled { color: #9AA6B8; cursor: not-allowed; }
.seg-group button[aria-pressed="true"]:disabled { background: #9AA6B8; color: #fff; }
.seg-group.small button { min-height: 40px; font-size: 14px; padding: 4px 10px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.choice { min-height: 44px; padding: 8px 16px; border: 1px solid var(--act); background: var(--surface); color: var(--act); border-radius: 8px; font-size: 16px; cursor: pointer; }
.choice:hover { background: var(--act-weak); }
.choice[aria-pressed="true"] { background: var(--act); color: #fff; }
.disclosure { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; cursor: pointer; font-size: 17px; font-weight: 600; color: var(--ink); text-align: left; }
.disclosure:hover { border-color: var(--act); }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--act); border-bottom: 2px solid var(--act); transform: rotate(-45deg); transition: transform .25s; flex: none; }
.disclosure[aria-expanded="true"] .chev { transform: rotate(45deg); }
.disc-body { padding: 16px 4px 0; }

/* 確認前の帯 */
.pending { border-left: 4px solid var(--pending); background: var(--pending-weak); border-radius: 0 8px 8px 0; padding: 10px 14px; font-size: 15px; line-height: 1.7; margin: 16px 0; }
.pending-tag { display: inline-block; font-size: 13px; font-weight: 700; color: #5C470C; background: #F0DE9C; border-radius: 4px; padding: 1px 8px; margin-right: 8px; line-height: 1.6; }
.status-tag { display: inline-block; font-size: 13px; font-weight: 700; border: 1px solid var(--ink2); border-radius: 4px; padding: 0 8px; margin-right: 8px; }
.line-dash { display: inline-block; width: 36px; border-top: 2px dashed var(--ink2); vertical-align: middle; margin-right: 8px; }

/* 共通の記事へのリンク */
.entries { display: grid; gap: 16px; margin: 32px 0 56px; }
@media (min-width: 860px) {
  .entries.three { grid-template-columns: repeat(3, 1fr); }
}
.entry { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 20px; color: var(--ink); text-decoration: none; transition: border-color .2s; }
.entry:hover { border-color: var(--act); }
.e-label { font-size: 14px; color: var(--ink2); font-weight: 700; letter-spacing: .04em; }
.e-q { font-size: 19px; font-weight: 700; line-height: 1.6; }
.e-sub { font-size: 15px; color: var(--ink2); line-height: 1.7; }
.e-go { margin-top: auto; color: var(--act); font-weight: 600; font-size: 15px; padding-top: 8px; }
/* トップ：問いを一覧する */
.home { padding-top:22px; padding-bottom:32px; }
.home-intro { margin-bottom:20px; }
.home-intro h1 { font-size:27px; line-height:1.45; margin:0 0 10px; letter-spacing:0; }
.home-intro h1 span { display:inline-block; }
.home-intro p { font-size:16px; line-height:1.7; color:var(--ink2); margin:0; max-width:36em; }
.home-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.home-entry { display:block; padding:14px 16px; background:var(--surface); border:1px solid var(--rule); border-radius:8px; color:var(--ink); text-decoration:none; transition:border-color .2s; }
.home-entry:hover { border-color:var(--act); }
.home-entry:focus-visible { outline:3px solid var(--act); outline-offset:3px; }
.home-label { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; line-height:1.6; font-weight:600; color:var(--ink2); }
.home-go { color:var(--act); white-space:nowrap; }
.home-entry h2 { font-size:18px; line-height:1.5; letter-spacing:0; margin:7px 0 6px; }
.home-entry p { font-size:15px; line-height:1.65; color:var(--ink2); margin:0; }
@media (min-width:760px) {
  .home { padding-top:40px; padding-bottom:56px; }
  .home-intro { margin-bottom:28px; }
  .home-intro h1 { font-size:35px; }
  .home-intro p { font-size:18px; }
  .home-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
  .home-entry { padding:20px; }
  .home-entry h2 { font-size:21px; margin:12px 0 10px; }
}

/* A：店 */
.shops { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .shops { grid-template-columns: 1fr 1fr; }
}
.shop { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; }
.shop .draw { max-height: 64px; }
.shop h3 { margin: 6px 0 2px; }
.shop .reason { margin: 0 0 10px; font-size: 16px; line-height: 1.7; }
.facts { margin: 0; display: grid; grid-template-columns: 8.5em 1fr; gap: 6px 12px; font-size: 16px; line-height: 1.6; }
.facts dt { color: var(--ink2); }
.facts dd { margin: 0; }
.assume { margin: 14px 0 0; font-size: 15px; color: var(--ink2); }

/* A：帯 */
.bar-stage { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.bar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 8px; }
.ctl-label { font-size: 15px; color: var(--ink2); }
.lock-note { font-size: 15px; margin: 4px 0 0; }
.bars { margin-top: 20px; }
.bar-row { margin-bottom: 22px; }
.bar-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; margin-bottom: 30px; }
.bar-name { font-weight: 700; }
.bar-track { position: relative; height: 40px; border-left: 1px solid var(--ink2); }
.bar { height: 100%; display: flex; }
.seg { height: 100%; flex: 0 0 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; box-shadow: inset -2px 0 0 var(--surface); transition: flex-basis .45s ease, opacity .25s; }
.seg-cost { background: var(--cost); }
.seg-wage { background: var(--wage); }
.seg-other { background: var(--other); color: var(--ink); }
.seg-remain { background: var(--remain); }
.seg.changed { box-shadow: inset 0 0 0 3px var(--ink), inset -2px 0 0 var(--surface); }
.seg.dim { opacity: .22; }
.delta { position: absolute; top: -27px; transform: translateX(-50%); font-size: 14px; font-weight: 700; background: var(--ink); color: #fff; padding: 0 8px; border-radius: 4px; line-height: 22px; white-space: nowrap; }
.bar-values { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 15px; color: var(--ink2); }
.bar-values .is-changed { color: var(--ink); font-weight: 700; }
.bar-values .dim { opacity: .4; }
@media (max-width: 639px) {
  .seg-label { display: none; }
}
.chip { display: inline-block; width: 11px; height: 11px; border-radius: 2px; margin-right: 6px; }
.c-cost { background: var(--cost); }
.c-wage { background: var(--wage); }
.c-other { background: var(--other); }
.c-remain { background: var(--remain); }
.scale { font-size: 14px; margin: 0; }

/* 答え・問い */
.callout { background: var(--paper); border-left: 4px solid var(--ink); border-radius: 0 10px 10px 0; padding: 16px 18px; margin-top: 20px; }
.callout:focus { outline: none; }
.answer-main { font-size: 19px; margin-bottom: 6px; }
.question { border: 1px solid var(--act); border-radius: 10px; padding: 16px 18px; margin-top: 20px; background: var(--act-weak); }
.q-text { font-size: 19px; font-weight: 600; margin: 0 0 4px; line-height: 1.6; }

/* A：帳簿 */
.table-wrap { overflow-x: auto; margin-top: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.ledger { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.ledger th, .ledger td { padding: 10px; border-bottom: 1px solid var(--rule); text-align: right; vertical-align: middle; }
.ledger thead th { font-size: 14px; color: var(--ink2); font-weight: 600; }
.ledger thead th:first-child, .ledger tbody th { text-align: left; }
.ledger tbody th { font-weight: 500; }
.ledger tr.hl th, .ledger tr.hl td { background: var(--act-weak); }
.row-btn { display: flex; align-items: center; background: none; border: none; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 16px; color: var(--ink); min-height: 40px; }
.row-btn:hover { background: var(--act-weak); }
.row-btn[aria-pressed="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.cell-changed { font-weight: 700; }
.cc-cost { background: #F6E6DE; }
.cc-remain { background: #DFEFE7; }
.sum-row th, .sum-row td { border-bottom: none; font-size: 14px; color: var(--ink2); }
.ok { color: var(--remain); font-weight: 700; margin-left: 4px; }
.ng { color: var(--cost); font-weight: 700; margin-left: 4px; }

/* A：使い道 */
.uses { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
@media (min-width: 640px) {
  .uses { grid-template-columns: minmax(150px, 200px) 1fr; align-items: center; }
}
.uses-source { border: 2px solid var(--remain); background: #EEF6F1; border-radius: 10px; padding: 12px 14px; font-size: 16px; line-height: 1.6; }
.uses-list { list-style: none; margin: 0 0 0 18px; padding: 0 0 0 30px; border-left: 2px dashed var(--ink2); }
.uses-list li { position: relative; padding: 6px 0; }
.uses-list li::before { content: ""; position: absolute; left: -30px; top: 28px; width: 26px; border-top: 2px dashed var(--ink2); }
.use-btn { min-height: 44px; padding: 8px 14px; border: 1px solid var(--act); border-radius: 8px; background: var(--surface); color: var(--act); font-size: 16px; cursor: pointer; }
.use-btn[aria-expanded="true"] { background: var(--act-weak); }
.use-text { margin: 6px 0 4px; font-size: 16px; line-height: 1.7; }
.dash-legend { font-size: 15px; color: var(--ink2); margin: 16px 0 0; }

/* 見方カード */
.mikata { background: var(--surface); border: 1px solid var(--ink); border-radius: 12px; padding: 22px 22px 18px; margin-top: 16px; }
.mk-label { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink2); border: 1px solid var(--rule); border-radius: 999px; padding: 0 10px; margin: 0 0 8px; }
.mikata h3 { font-size: 20px; margin: 0 0 8px; }
.mikata ul, .mikata ol { margin: 0 0 12px; padding-left: 1.3em; }
.mikata .cond { border-top: 1px solid var(--rule); padding-top: 8px; }
.mikata .after-note { border-top: 1px solid var(--rule); padding-top: 10px; color: var(--ink2); font-size: 16px; }
.u { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.u-cost { text-decoration-color: var(--cost); }
.u-sold { text-decoration-color: var(--ink2); }
.u-remain { text-decoration-color: var(--remain); }

/* 次へ */
.next-grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) {
  .next-grid { grid-template-columns: 1fr 1fr; }
}

/* B：見出し */
.headline-card { background: var(--surface); border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); padding: 14px 4px 16px; margin: 8px 0 8px; }
.hl-kicker { font-size: 13px; color: var(--ink2); margin: 0 0 4px; letter-spacing: .06em; }
.hl-text { font-size: 21px; font-weight: 700; line-height: 1.55; margin: 0; }
.scope-chip { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 4px 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font-size: 15px; cursor: pointer; margin-top: 12px; }
.scope-chip[aria-expanded="true"] { border-color: var(--act); }
.scope-note { font-size: 15px; color: var(--ink2); margin: 8px 0 0; }

/* B：路線図（横向き） */
.route { display: flex; margin: 28px 0 8px; }
.route-group { flex-grow: var(--n); flex-basis: 0; display: flex; flex-direction: column; min-width: 0; }
.route-actor { font-size: 14px; color: var(--ink2); border-top: 2px solid var(--rule); padding-top: 6px; margin: 0 6px 12px; text-align: center; line-height: 1.4; }
.route-actor.empty { border-top-style: dashed; border-top-color: transparent; color: #8A9099; }
.route-stations { display: flex; }
.station { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 2px 4px; background: none; border: none; cursor: pointer; min-height: 44px; text-align: center; border-radius: 8px; min-width: 0; }
.station:disabled { cursor: default; }
.station .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid #C4C8CE; position: relative; z-index: 1; margin-top: 4px; flex: none; transition: all .35s ease; }
.station::after { content: ""; position: absolute; top: 12px; left: 50%; width: 100%; height: 3px; background: #D9DCE0; z-index: 0; transition: background-color .35s; }
.station.last::after { display: none; }
.station.seg-done::after { background: var(--ink); }
.station.passed .dot { background: var(--ink); border-color: var(--ink); }
.station.current .dot { width: 22px; height: 22px; border: 5px solid var(--ink); margin-top: 2px; }
.st-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.st-name { font-size: 15px; font-weight: 600; line-height: 1.4; }
.station.future .st-name { color: #7E858F; }
.station.neutral .st-name { color: var(--ink2); }
.st-status { font-size: 13px; line-height: 1.5; min-height: 1.5em; }
.station.current .st-status { background: var(--ink); color: #fff; padding: 0 8px; border-radius: 999px; }
.station.future .st-status { color: #7E858F; }
.station.passed .st-status { color: var(--ink2); }
.station[aria-pressed="true"] .st-name { color: var(--act); text-decoration: underline; text-underline-offset: 4px; }
.station:not(:disabled):hover .st-name { color: var(--act); }
.station-detail { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; margin-top: 12px; }
.sd-name { font-weight: 700; font-size: 18px; margin: 0 0 4px; }

/* B：路線図（縦向き） */
@media (max-width: 700px) {
  .route { flex-direction: column; margin-top: 20px; }
  .route-group { flex-direction: row; flex-grow: 0; border-top: 1px solid var(--rule); }
  .route-group:first-child { border-top: none; }
  .route-actor, .route-actor.empty { width: 5.4em; flex: none; border-top: none; margin: 0; padding: 16px 8px 0 0; text-align: left; font-size: 13px; }
  .route-stations { flex-direction: column; flex: 1; }
  .station { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 58px; gap: 14px; text-align: left; padding: 0; }
  .station .dot { margin: 0 0 0 2px; }
  .station.current .dot { margin: 0; }
  .station::after { top: 50%; left: 9.5px; width: 3px; height: 100%; }
  .st-text { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
}

/* B：分かること */
.known-grid { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) {
  .known-grid { grid-template-columns: 1fr 1fr; }
}
.kcard { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; transition: background-color .6s; }
.kcard.known { border: 2px solid var(--ink); }
.kcard.check { background: #FDFCF9; border: 2px solid #C9D3E2; }
.kcard.flash { background: var(--act-weak); }
.kq { margin: 0; font-size: 15px; color: var(--ink2); }
.kchip { margin: 6px 0 2px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ka { margin: 0 0 4px; font-size: 20px; font-weight: 700; line-height: 1.5; }
.kr { margin: 0; font-size: 15px; line-height: 1.75; }
.kwhere { margin: 8px 0 0; font-size: 15px; line-height: 1.7; background: var(--act-weak); padding: 8px 10px; border-radius: 6px; }
.kfoot { margin: 8px 0 0; font-size: 14px; }
.mk { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; line-height: 1; flex: none; font-weight: 700; }
.mk-known { background: var(--ink); color: #fff; }
.mk-check { border: 1.5px solid var(--act); color: var(--act); background: var(--surface); }
.example-box { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--ink2); }
.example-label { font-weight: 700; margin: 0; }

/* ニュース */
.news-rows { list-style: none; padding: 0; margin: 20px 0; }
.nrow { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.nq { font-weight: 700; font-size: 18px; margin: 0; }
.nresult { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; }
.summary { background: var(--surface); border: 1px solid var(--ink); border-radius: 12px; padding: 20px 22px; margin-top: 24px; }
.summary:focus { outline: none; }
.sum-grid { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .sum-grid { grid-template-columns: 1fr 1fr; }
}
.sum-grid h3 { font-size: 16px; margin: 0 0 6px; }
.sum-grid ul { margin: 0; padding-left: 1.2em; font-size: 16px; }
.use-mikata { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 12px 16px; font-size: 16px; }
.use-mikata ul { margin: 4px 0 6px; padding-left: 1.2em; }

/* 根拠パネル */
.scrim { position: fixed; inset: 0; background: rgba(30, 37, 48, .35); z-index: 80; }
.panel { position: fixed; z-index: 90; background: var(--surface); overflow-y: auto; padding: 20px 22px 28px; box-shadow: 0 0 24px rgba(0, 0, 0, .15); }
@media (min-width: 768px) {
  .panel { top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; border-left: 1px solid var(--rule); animation: slideR .3s ease; }
}
@media (max-width: 767px) {
  .panel { left: 0; right: 0; bottom: 0; max-height: 80vh; border-radius: 16px 16px 0 0; animation: slideU .3s ease; }
}
@keyframes slideR {
  from { transform: translateX(100%); }
  to { transform: none; }
}
@keyframes slideU {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { font-size: 19px; margin: 0; }
.pdl { margin: 0; font-size: 15px; line-height: 1.75; }
.pdl dt { font-weight: 700; color: var(--ink2); font-size: 13px; margin-top: 14px; letter-spacing: .04em; }
.pdl dd { margin: 2px 0 0; }
.pdl ul { margin: 4px 0 0; padding-left: 1.2em; }
body.panel-open { overflow: hidden; }

/* フッター */
.site-footer { border-top: 1px solid var(--rule); }
.ft-inner { max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; font-size: 14px; color: var(--ink2); }

/* 読みやすさの局所修正：図の中に意味を書く */
.price-picture { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; padding:12px; background:var(--surface); border:1px solid var(--rule); border-radius:8px; }
.price-picture small { display:block; color:var(--ink2); font-size:14px; }
.price-picture strong { display:block; font-size:24px; white-space:nowrap; }
.facts { grid-template-columns:7em 1fr; }
.bar-values { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; }
.change-story { padding:12px; margin:12px 0 0; background:var(--paper); border-left:3px solid var(--ink); font-size:16px; line-height:1.7; }
.uses-list { margin:0; padding:0; border-left:none; }
.uses-list li::before { display:none; }
.route { flex-direction:column; }
.route-group { flex-direction:row; flex-grow:0; border-top:1px solid var(--rule); }
.route-group:first-child { border-top:none; }
.route-actor { width:5.4em; flex:none; border-top:none; margin:0; padding:18px 8px 0 0; text-align:left; font-size:14px; }
.route-stations { flex-direction:column; flex:1; }
.station { flex-direction:row; align-items:center; justify-content:flex-start; min-height:86px; gap:14px; text-align:left; padding:8px 0; }
.station .dot, .station.current .dot { display:flex; align-items:center; justify-content:center; width:28px; height:28px; margin:0; border-width:2px; font-size:15px; font-weight:700; color:var(--ink); background:var(--surface); }
.station.passed .dot { background:var(--ink); color:var(--surface); }
.station.current .dot { border:3px solid var(--ink); }
.station::after { top:50%; left:13px; width:2px; height:100%; }
.st-text { display:grid; grid-template-columns:1fr auto; width:100%; align-items:center; gap:2px 8px; padding-right:6px; }
.st-name { font-size:17px; }
.st-plain { grid-column:1 / -1; grid-row:2; font-size:15px; line-height:1.5; color:var(--ink2); }
.station.future .st-name, .station.future .st-status { color:var(--ink2); }
@media (max-width:400px) { .bar-values { grid-template-columns:1fr; } .route-actor { width:4.2em; } .station { gap:10px; } }


/* Local additions reuse the historical prototype's type, palette and spacing. */
main { min-height: 50vh; }
.answer { font-size: 1.05em; }
.catalog-cards { margin: 20px 0 0; }
.catalog-cards .entry { min-width: 0; }
.domain-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 32px 0; }
.domain-nav a { padding: 8px 0; font-size: 16px; text-underline-offset: 4px; }
.article-links { padding-left: 1.2em; }
.article-links li { margin: 12px 0; }
.article-links li > span { display: block; }
.article-toc { margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.article-toc h2 { font-size: 18px; }
.article-toc ol { margin: 0; padding-left: 1.4em; }
.article-toc a { display: inline-block; padding: 3px 0; }
.evidence { margin: 20px 0 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; font-size: 15px; line-height: 1.75; }
.evidence summary { color: var(--act); cursor: pointer; text-underline-offset: 4px; }
.evidence[open] summary { margin-bottom: 16px; }
.claim-record + .claim-record { border-top: 1px solid var(--rule); margin-top: 24px; padding-top: 20px; }
.claim-record { scroll-margin-top: 24px; }
.source-records { padding-left: 1.2em; margin-top: 20px; }
.source-record { padding: 16px 0; }
.source-record + .source-record { border-top: 1px solid var(--rule); }
.source-record p { margin-bottom: 0; }
.pdl dd, .entry, .path-sequence, .article-links, h1, h2, h3 { overflow-wrap: anywhere; }
.article-figure { margin: 40px 0 0; }
.article-figure figcaption { font-weight: 700; font-size: 18px; }
.figure-steps { padding-left: 1.4em; }
.figure-steps li { padding: 8px 0; }
.figure-steps li::marker { font-weight: 700; color: var(--ink); }
.figure-steps.numbered-labels { list-style: none; padding-left: 0; }
.figure-steps p { margin: 0; font-size: 16px; }
.article-figure > p { margin: 0; }
.purpose-links { margin: 24px 0 0; }
.map-rows { display: grid; gap: 24px; }
.map-row h3 { margin: 0; }
.map-row .purpose-links { margin-top: 20px; }
.map-row .e-q { font-size: 16px; }
.map-row .e-sub { font-size: 14px; }
.map-row .entry { padding: 14px; }
.map-row .pdl { font-size: 16px; }
.map-row .pdl ul { margin-top: 0; }
.path-sequence { padding-left: 1.8em; margin: 32px 0; }
.path-sequence > li { padding: 14px 4px; border-bottom: 1px solid var(--rule); }
.path-sequence > li::marker { font-weight: 700; }
.path-sequence p { margin: 4px 0 0; }
.path-position { padding: 18px 0; border-top: 1px solid var(--rule); }
.path-position > p { margin-bottom: 10px; }
.path-neighbors { display: grid; gap: 12px; }
.path-neighbors a { display: block; padding: 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); text-decoration: none; }
.path-neighbors span { display: block; }
.legacy-context { margin-bottom: 40px; }
@media (min-width:760px) {
  .catalog-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-row .purpose-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .path-neighbors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Plain URLs must remain selectable and wrap on narrow screens. */
.source-url { display: block; overflow-wrap: anywhere; word-break: break-word; color: var(--ink); font-size: 14px; user-select: text; }
#sources .source-records { margin-top: 16px; }
#sources h3 { font-size: 16px; }
