/* =====================================================================
   記事パーツ（article parts）v0.1 2026-09-25
   本ラインの style.css / pages.css のトークンを継承。単体でも動くよう fallback 付き。
   命名: .ap（共通）+ .ap-<部品名>。JS が .is-in を付けたら完成へ動く。
   PC/SP 共通: SVG は viewBox で伸縮、表は横スクロール＋先頭列固定。
   ===================================================================== */
.ap {
  --ap-c1: var(--blue, #23557d);     /* 系列色は固定順: 青 → 金 → 赤 → 緑 → 紫 → 灰青 */
  --ap-c2: var(--gold, #8c7d3c);
  --ap-c3: var(--red, #965050);
  --ap-c4: var(--green, #467846);
  --ap-c5: var(--purple, #735a82);
  --ap-c6: var(--slate, #415564);
  --ap-ink: var(--navy, #322823);
  --ap-muted: #75645a;
  --ap-grid: #efece5;
  --ap-track: var(--bg, #f8f6f1);
  --ap-surface: #fff;
  --ap-dim: #dcd7cc;                 /* 強調時の脇役（emphasis） */
  --ap-ease: cubic-bezier(.22, .61, .36, 1);
  --ap-dur: 1.1s;
  position: relative;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--ap-ink);
}
.prose .ap, .prose .ap + .ap { margin-top: 2em; }
.ap-num, .ap .num-f { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ap__ttl { font-size: 16px; font-weight: 800; line-height: 1.5; margin: 0 0 12px; letter-spacing: .02em; }
.ap__ttl small { font-weight: 600; font-size: 12px; color: var(--ap-muted); margin-left: 8px; }
.ap figcaption, .ap__cap { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--ap-muted); }
.ap a { text-decoration: none; }                                   /* quality.css の .prose a 下線を打ち消す */
.ap-data { list-style: none; padding: 0; margin: 0; }              /* 元データ（JS 前は箇条書きで読める） */
.ap.is-built > .ap-data { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ap-box { background: var(--ap-surface); border-radius: 16px 16px 0 16px; box-shadow: var(--shadow, 2px 2px 8px rgba(0,0,0,.04)); border: 1px solid rgb(35 85 125 / 5%); padding: 24px; }
.ap svg { display: block; width: 100%; height: auto; overflow: visible; }
.ap svg text { font-family: "Noto Sans JP", sans-serif; fill: var(--ap-ink); }
.ap svg .ap-axis { font-size: 11px; fill: var(--ap-muted); }
.ap svg .ap-val { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 12px; }
.ap svg .ap-gridline { stroke: var(--ap-grid); stroke-width: 1; }
.ap svg .ap-base { stroke: #d0c9bc; stroke-width: 1; }

/* 凡例（2系列以上は必ず出す） */
.ap-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 12px; font-weight: 700; color: var(--ap-muted); }
.ap-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ap-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); flex: 0 0 auto; }
.ap-legend i.is-line { height: 3px; border-radius: 2px; width: 16px; }

/* ツールチップ（共通・1個だけ） */
.ap-tip { position: fixed; z-index: 90; pointer-events: none; padding: 8px 12px; background: var(--ap-ink); color: #fff; font-size: 12px; line-height: 1.5; border-radius: 8px 8px 0 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); opacity: 0; transform: translate(-50%, -8px); transition: opacity .18s; white-space: nowrap; }
.ap-tip.is-on { opacity: 1; }
.ap-tip b { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 14px; margin-left: 6px; }
.ap [data-tip] { cursor: default; }

/* ---------------------------------------------------------------- 01 数字タイル（カウントアップ） */
.ap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.ap-stats li { background: var(--ap-surface); border-radius: 16px 16px 0 16px; box-shadow: var(--shadow, 2px 2px 8px rgba(0,0,0,.04)); border: 1px solid rgb(35 85 125 / 5%); padding: 18px 20px 16px; transform: translateY(16px); opacity: 0; transition: transform .7s var(--ap-ease), opacity .7s var(--ap-ease); }
.ap-stats.is-in li { transform: none; opacity: 1; }
.ap-stats li:nth-child(2) { transition-delay: .08s; } .ap-stats li:nth-child(3) { transition-delay: .16s; } .ap-stats li:nth-child(4) { transition-delay: .24s; }
.ap-stats__l { display: block; font-size: 12px; font-weight: 700; color: var(--ap-muted); letter-spacing: .04em; }
.ap-stats:has(> li:nth-child(4)) { grid-template-columns: repeat(2, 1fr); }   /* 4 枚は 2×2（7 桁の数字が折れない） */
.ap-stats__v { display: block; margin-top: 6px; font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 32px; line-height: 1; color: var(--ap-c1); letter-spacing: 0; }
.ap-stats__v small { font-family: "Noto Sans JP", sans-serif; font-size: 13px; font-weight: 800; margin-left: 3px; color: var(--ap-ink); }
.ap-stats li[data-tone="red"] .ap-stats__v { color: var(--ap-c3); } .ap-stats li[data-tone="green"] .ap-stats__v { color: var(--ap-c4); } .ap-stats li[data-tone="gold"] .ap-stats__v { color: var(--ap-c2); }
.ap-stats__d { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ap-muted); }
.ap-stats__d.is-up::before { content: "▲ "; color: var(--ap-c3); } .ap-stats__d.is-down::before { content: "▼ "; color: var(--ap-c1); }

/* ---------------------------------------------------------------- 02 円グラフ・ドーナツ */
.ap-donut__wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: center; }
.ap-donut svg { width: 220px; }
.ap-donut__seg { fill: none; stroke: var(--c); stroke-width: 34; stroke-dasharray: 0 1000; transition: stroke-dasharray var(--ap-dur) var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-donut.is-in .ap-donut__seg { stroke-dasharray: var(--len) 1000; }
.ap-donut__seg:hover { filter: brightness(1.12); }
.ap-donut__c { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 30px; text-anchor: middle; }
.ap-donut__cl { font-size: 11px; text-anchor: middle; fill: var(--ap-muted); font-weight: 700; }
.ap-donut__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-donut__list li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 10px; align-items: center; font-weight: 700; opacity: 0; transform: translateX(10px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-donut.is-in .ap-donut__list li { opacity: 1; transform: none; }
.ap-donut__list i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.ap-donut__list .ap-num { font-size: 15px; } .ap-donut__list .ap-pct { font-size: 12px; color: var(--ap-muted); min-width: 3.4em; text-align: right; }
.ap-donut--pie .ap-donut__seg { stroke-width: 88; }

/* ---------------------------------------------------------------- 03 横棒 */
.ap-bars__row { display: grid; grid-template-columns: var(--lw, 110px) 1fr var(--vw, 80px); align-items: center; gap: 12px; padding: 5px 0; font-weight: 700; }
.ap-bars__lbl { font-size: 13px; line-height: 1.4; }
.ap-bars__track { position: relative; height: 18px; background: var(--ap-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.ap-bars__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--c, var(--ap-c1)); border-radius: 0 4px 4px 0; transition: width var(--ap-dur) var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-bars.is-in .ap-bars__fill { width: var(--w); }
.ap-bars__val { text-align: right; font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 14px; color: var(--ap-ink); }
.ap-bars__val small { font-family: "Noto Sans JP", sans-serif; font-size: 11px; margin-left: 2px; }
.ap-bars__row.is-hi .ap-bars__lbl { color: var(--ap-c1); }
.ap-bars--emph .ap-bars__fill { background: var(--ap-dim); } .ap-bars--emph .ap-bars__row.is-hi .ap-bars__fill { background: var(--ap-c1); }
.ap-bars__row.is-hi .ap-bars__track::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(35,85,125,.15); border-radius: inherit; }
.ap-bars--multi .ap-bars__track { height: auto; background: none; display: grid; gap: 3px; border-radius: 0; overflow: visible; }
.ap-bars--multi .ap-bars__sub { position: relative; height: 12px; background: var(--ap-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.ap-bars--multi .ap-bars__val { font-size: 12px; line-height: 15px; }

/* ---------------------------------------------------------------- 04 縦棒（単系列・グループ） */
.ap-cols path.ap-col, .ap-cols rect.ap-col { fill: var(--c, var(--ap-c1)); transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform var(--ap-dur) var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-cols.is-in path.ap-col, .ap-cols.is-in rect.ap-col { transform: scaleY(1); }
.ap-cols path.ap-col:hover { filter: brightness(1.12); }
.ap-cols .ap-val { opacity: 0; transition: opacity .5s; transition-delay: calc(var(--d, 0s) + .8s); }
.ap-cols.is-in .ap-val { opacity: 1; }

/* ---------------------------------------------------------------- 05 折れ線 */
.ap-line path.ap-line__p { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-line.is-in path.ap-line__p { stroke-dashoffset: 0; }
.ap-line path.ap-line__a { fill: var(--c); opacity: 0; transition: opacity 1s; transition-delay: calc(var(--d, 0s) + .8s); }
.ap-line.is-in path.ap-line__a { opacity: .1; }
.ap-line circle.ap-dot { fill: var(--c); stroke: var(--ap-surface); stroke-width: 2; transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform .4s var(--ap-ease); transition-delay: var(--dd, 0s); }
.ap-line.is-in circle.ap-dot { transform: scale(1); }
.ap-line circle.ap-hit { fill: transparent; }
.ap-line .ap-val { opacity: 0; transition: opacity .5s; transition-delay: 1.8s; } .ap-line.is-in .ap-val { opacity: 1; }

/* ---------------------------------------------------------------- 06 100%積み上げ */
.ap-stack__row { display: grid; grid-template-columns: var(--lw, 90px) 1fr; gap: 12px; align-items: center; padding: 6px 0; }
.ap-stack__lbl { font-size: 13px; font-weight: 800; }
.ap-stack__bar { display: flex; gap: 2px; height: 30px; }
.ap-stack__seg { position: relative; flex: 0 0 0%; background: var(--c); border-radius: 2px; transition: flex-basis var(--ap-dur) var(--ap-ease); transition-delay: var(--d, 0s); overflow: hidden; }
.ap-stack.is-in .ap-stack__seg { flex-basis: var(--w); }
.ap-stack__seg:first-child { border-radius: 6px 2px 2px 6px; } .ap-stack__seg:last-child { border-radius: 2px 6px 6px 2px; }
.ap-stack__seg span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Roboto, sans-serif; font-weight: 800; font-size: 12px; color: #fff; opacity: 0; transition: opacity .4s; transition-delay: 1s; white-space: nowrap; }
.ap-stack.is-in .ap-stack__seg.is-wide span { opacity: 1; }
.ap-stack__seg:hover { filter: brightness(1.12); }

/* ---------------------------------------------------------------- 07 ビフォー・アフター比較 */
.ap-compare__head, .ap-compare__row { display: grid; grid-template-columns: 1fr 110px 44px 110px; gap: 8px; align-items: center; }
.ap-compare__head { font-size: 12px; font-weight: 800; color: var(--ap-muted); padding: 0 0 10px; border-bottom: 2px solid var(--ap-ink); }
.ap-compare__head span:nth-child(2), .ap-compare__head span:nth-child(4) { text-align: center; }
.ap-compare__head span:nth-child(4) { color: var(--ap-c1); }
.ap-compare__row { padding: 12px 0; border-bottom: 1px solid var(--ap-grid); opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-compare.is-in .ap-compare__row { opacity: 1; transform: none; }
.ap-compare__k { font-weight: 700; font-size: 14px; }
.ap-compare__k small { display: block; font-size: 11px; font-weight: 500; color: var(--ap-muted); }
.ap-compare__a, .ap-compare__b { text-align: center; font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 18px; }
.ap-compare__a { color: var(--ap-muted); } .ap-compare__b { color: var(--ap-c1); }
.ap-compare__a small, .ap-compare__b small { font-family: "Noto Sans JP", sans-serif; font-size: 11px; margin-left: 2px; }
.ap-compare__arw { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; background: var(--ap-track); display: flex; align-items: center; justify-content: center; color: var(--ap-c1); }
.ap-compare__arw svg { width: 12px; height: 12px; }
.ap-compare__row.is-down .ap-compare__b { color: var(--ap-c4); } .ap-compare__row.is-up .ap-compare__b { color: var(--ap-c3); }
.ap-compare__row--total { border-bottom: 0; border-top: 2px solid var(--ap-ink); }
.ap-compare__row--total .ap-compare__k { font-size: 15px; font-weight: 800; }
.ap-compare__row--total .ap-compare__b { font-size: 24px; }
.ap-compare__delta { display: block; font-size: 11px; font-weight: 700; color: var(--ap-muted); margin-top: 2px; }

/* ---------------------------------------------------------------- 08 リッチ表（横スクロール・先頭列固定・評価記号） */
.ap-table__scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px 16px 0 16px; box-shadow: var(--shadow, 2px 2px 8px rgba(0,0,0,.04)); background: var(--ap-surface); border: 1px solid rgb(35 85 125 / 5%); }
.ap-table__scroll::after { content: ""; position: sticky; right: 0; top: 0; }
.ap-table table { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.6; }
.ap-table th, .ap-table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--ap-grid); white-space: nowrap; }
.ap-table thead th { background: var(--sky, #fff8eb); font-weight: 800; font-size: 13px; position: sticky; top: 0; }
.ap-table tbody th { font-weight: 700; background: #fff; }
.ap-table tbody tr:last-child th, .ap-table tbody tr:last-child td { border-bottom: 0; }
.ap-table tbody tr { opacity: 0; transform: translateX(-8px); transition: opacity .5s var(--ap-ease), transform .5s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-table.is-in tbody tr { opacity: 1; transform: none; }
.ap-table tr > :first-child { position: sticky; left: 0; z-index: 1; box-shadow: 4px 0 8px -6px rgba(0,0,0,.15); }
.ap-table tbody tr:hover td, .ap-table tbody tr:hover th { background: #fcfaf7; }
.ap-table .is-hi { background: var(--sky, #fff8eb) !important; font-weight: 800; }
.ap-table td[data-rate] { text-align: center; }
.ap-table td[data-rate]::before { content: attr(data-rate); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-size: 14px; }
.ap-table td[data-rate="◎"]::before { background: var(--mint, #dbf0db); color: var(--ap-c4); }
.ap-table td[data-rate="○"]::before { background: var(--sky, #fff8eb); color: var(--ap-c1); }
.ap-table td[data-rate="△"]::before { background: #f6f1dd; color: var(--ap-c2); }
.ap-table td[data-rate="×"]::before { background: var(--pink, #faecea); color: var(--ap-c3); }
.ap-table td.ap-num, .ap-table td[data-num] { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; text-align: right; }
.ap-table__hint { display: none; font-size: 11px; color: var(--ap-muted); margin-top: 6px; }
.ap-table[data-sortable] thead th { cursor: pointer; user-select: none; }
.ap-table[data-sortable] thead th::after { content: "⇅"; margin-left: 6px; opacity: .35; font-size: 11px; }
.ap-table[data-sortable] thead th.is-asc::after { content: "↑"; opacity: 1; } .ap-table[data-sortable] thead th.is-desc::after { content: "↓"; opacity: 1; }

/* ---------------------------------------------------------------- 09 タイムライン／ステップ */
.ap-timeline { list-style: none; margin: 0; padding: 0 0 0 44px; position: relative; }
.ap-timeline::before { content: ""; position: absolute; left: 15px; top: 14px; bottom: 14px; width: 2px; background: var(--ap-grid); }
.ap-timeline::after { content: ""; position: absolute; left: 15px; top: 14px; width: 2px; height: 0; background: var(--ap-c1); transition: height 1.6s var(--ap-ease); }
.ap-timeline.is-in::after { height: calc(100% - 28px); }
.ap-timeline > li { position: relative; z-index: 1; padding: 0 0 28px; opacity: 0; transform: translateX(-10px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-timeline.is-in > li { opacity: 1; transform: none; }
.ap-timeline > li:last-child { padding-bottom: 0; }
.ap-timeline > li::before { content: attr(data-n); position: absolute; left: -44px; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--ap-c1); color: #fff; font-family: Roboto, sans-serif; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--ap-surface); }
.ap-timeline > li[data-done]::before { background: var(--ap-c4); }
.ap-timeline time, .ap-timeline__when { display: inline-block; font-size: 12px; font-weight: 800; color: var(--ap-c1); letter-spacing: .04em; margin-bottom: 4px; }
.ap-timeline h4 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.5; }
.ap-timeline p { margin: 4px 0 0; font-size: 14px; line-height: 1.8; }
.ap-timeline--h { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; padding: 0; }
.ap-timeline--h::before, .ap-timeline--h::after { left: 16px; right: calc(100% / var(--n, 4) - 16px); top: 15px; width: auto; height: 2px; bottom: auto; }
.ap-timeline--h::after { width: 0; height: 2px; transition: width 1.6s var(--ap-ease); }
.ap-timeline--h.is-in::after { height: 2px; width: calc(100% - 100% / var(--n, 4)); }
.ap-timeline--h > li { padding: 44px 0 0; }
.ap-timeline--h > li::before { left: 0; }

/* ---------------------------------------------------------------- 10 レーダー */
.ap-radar__wrap { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; }
.ap-radar svg { width: 300px; }
.ap-radar .ap-radar__web { fill: none; stroke: var(--ap-grid); stroke-width: 1; }
.ap-radar .ap-radar__axis { stroke: var(--ap-grid); stroke-width: 1; }
.ap-radar .ap-radar__poly { fill: var(--c); fill-opacity: .18; stroke: var(--c); stroke-width: 2.5; stroke-linejoin: round; transform-box: view-box; transform: scale(0); transition: transform 1s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-radar.is-in .ap-radar__poly { transform: scale(1); }
.ap-radar .ap-radar__pt { fill: var(--c); stroke: var(--ap-surface); stroke-width: 2; opacity: 0; transition: opacity .4s; transition-delay: calc(var(--d, 0s) + .9s); }
.ap-radar.is-in .ap-radar__pt { opacity: 1; }
.ap-radar .ap-radar__lbl { font-size: 12px; font-weight: 800; text-anchor: middle; }
.ap-radar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.ap-radar__list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--ap-grid); }
.ap-radar__list .ap-num { font-size: 15px; }

/* ---------------------------------------------------------------- 11 半円ゲージ・メーター */
.ap-gauge { display: inline-grid; justify-items: center; text-align: center; }
.ap-gauge svg { width: 220px; }
.ap-gauge__track { fill: none; stroke: var(--ap-track); stroke-width: 18; stroke-linecap: round; }
.ap-gauge__fill { fill: none; stroke: var(--c, var(--ap-c1)); stroke-width: 18; stroke-linecap: round; stroke-dasharray: 0 1000; transition: stroke-dasharray 1.4s var(--ap-ease); }
.ap-gauge.is-in .ap-gauge__fill { stroke-dasharray: var(--len) 1000; }
.ap-gauge__v { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 40px; text-anchor: middle; }
.ap-gauge__v tspan { font-family: "Noto Sans JP", sans-serif; font-size: 14px; }
.ap-gauge__l { font-size: 12px; font-weight: 800; text-anchor: middle; fill: var(--ap-muted); }
.ap-gauge__mm { font-size: 10px; fill: var(--ap-muted); font-family: Roboto, sans-serif; font-weight: 800; }
.ap-gauges { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 32px; }
.ap-meter { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: end; }
.ap-meter__l { font-size: 13px; font-weight: 800; } .ap-meter__v { font-family: Roboto, sans-serif; font-weight: 800; font-size: 20px; color: var(--ap-c1); }
.ap-meter__t { grid-column: 1 / -1; height: 10px; border-radius: 5px; background: var(--ap-track); overflow: hidden; }
.ap-meter__f { height: 100%; width: 0; border-radius: 5px; background: var(--c, var(--ap-c1)); transition: width 1.2s var(--ap-ease); }
.ap-meter.is-in .ap-meter__f { width: var(--w); }

/* ---------------------------------------------------------------- 12 ランキング */
.ap-rank { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; gap: 8px; }
.ap-rank li { counter-increment: r; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; background: var(--ap-surface); border-radius: 12px 12px 0 12px; box-shadow: var(--shadow, 2px 2px 8px rgba(0,0,0,.04)); border: 1px solid rgb(35 85 125 / 5%); opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-rank.is-in li { opacity: 1; transform: none; }
.ap-rank li::before { content: counter(r); width: 32px; height: 32px; border-radius: 50%; background: var(--ap-track); color: var(--ap-ink); font-family: Roboto, sans-serif; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ap-rank li:nth-child(1)::before { background: #d9b84a; color: #fff; } .ap-rank li:nth-child(2)::before { background: #bbb6ac; color: #fff; } .ap-rank li:nth-child(3)::before { background: #b98a5c; color: #fff; }
.ap-rank__n { font-weight: 800; font-size: 15px; } .ap-rank__n small { display: block; font-size: 11px; font-weight: 500; color: var(--ap-muted); }
.ap-rank__v { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 20px; color: var(--ap-c1); } .ap-rank__v small { font-family: "Noto Sans JP", sans-serif; font-size: 11px; margin-left: 2px; color: var(--ap-ink); }
.ap-rank__bar { grid-column: 2 / -1; height: 6px; border-radius: 3px; background: var(--ap-track); overflow: hidden; margin-top: -4px; }
.ap-rank__bar i { display: block; height: 100%; width: 0; background: var(--ap-c1); border-radius: 3px; transition: width 1.2s var(--ap-ease); transition-delay: calc(var(--d, 0s) + .3s); }
.ap-rank.is-in .ap-rank__bar i { width: var(--w); }

/* ---------------------------------------------------------------- 13 ヒートマップ表 */
.ap-heat td[data-v] { text-align: center; font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; background: var(--bg-c, transparent); color: var(--fg-c, var(--ap-ink)); transition: background .6s, color .6s; transition-delay: var(--d, 0s); }
.ap-heat:not(.is-in) td[data-v] { background: transparent !important; color: var(--ap-muted) !important; }
.ap-heat__scale { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--ap-muted); font-weight: 700; }
.ap-heat__scale i { flex: 0 0 140px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--ap-s0), var(--ap-s1)); }

/* ---------------------------------------------------------------- 14 都道府県マップ（色分け／ピック） */
.ap-jpmap__wrap { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; }
.ap-jpmap .jmap { width: 100%; }
.ap-jpmap .jmap__pref path { fill: var(--fill, #f0ede8); stroke: #fff; stroke-width: 1; transition: fill .6s var(--ap-ease), transform .3s; transition-delay: var(--d, 0s); }
.ap-jpmap:not(.is-in) .jmap__pref path { fill: #f0ede8 !important; }
.ap-jpmap .jmap__pref:hover path { filter: brightness(1.1); }
.ap-jpmap .jmap__pref.is-pick path { fill: var(--fill, var(--ap-c1)); }
.ap-jpmap .jmap__pref.is-dim path { fill: #f0ede8; }
.ap-jpmap .jmap__line { display: none; }
.ap-jpmap .jmap__pref text, .ap-jpmap .jmap__pref rect, .ap-jpmap .jmap__pref circle { display: none; }   /* 本ラインの県名ラベルは記事内では消す */
.ap-jpmap__side { font-size: 13px; }
.ap-jpmap__scale { display: grid; gap: 4px; margin-top: 8px; }
.ap-jpmap__scale i { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--ap-s0), var(--ap-s1)); }
.ap-jpmap__scale span { display: flex; justify-content: space-between; font-family: Roboto, sans-serif; font-weight: 800; font-size: 11px; color: var(--ap-muted); }
.ap-jpmap__top { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-weight: 700; }
.ap-jpmap__top li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 6px; background: var(--ap-track); }
.ap-jpmap__top li:hover, .ap-jpmap__top li.is-on { background: var(--sky, #fff8eb); }
.ap-jpmap__top .ap-num { color: var(--ap-c1); }
.ap-jpmap__picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-jpmap__picks li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px 10px 0 10px; background: var(--ap-surface); box-shadow: var(--shadow); border: 1px solid rgb(35 85 125 / 5%); font-weight: 700; }
.ap-jpmap__picks i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: 0 0 auto; }
.ap-jpmap__picks small { display: block; font-size: 11px; font-weight: 500; color: var(--ap-muted); }

/* ---------------------------------------------------------------- 15 エリア分岐図（県 → エリア → 市町） */
.ap-tree { display: grid; grid-template-columns: auto 1fr; gap: 0 40px; align-items: center; }
.ap-tree__root { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 120px; padding: 18px 20px; border-radius: 16px 16px 0 16px; background: var(--ap-c1); color: #fff; font-size: 18px; font-weight: 800; text-align: center; line-height: 1.4; box-shadow: var(--shadow); opacity: 0; transform: scale(.9); transition: opacity .5s var(--ap-ease), transform .5s var(--ap-ease); }
.ap-tree.is-in .ap-tree__root { opacity: 1; transform: none; }
.ap-tree__root small { display: block; font-size: 11px; font-weight: 600; opacity: .8; }
.ap-tree > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.ap-tree > ul::before { content: ""; position: absolute; left: -20px; top: 24px; bottom: 24px; width: 2px; background: var(--ap-grid); transform: scaleY(0); transform-origin: top; transition: transform .8s var(--ap-ease) .3s; }
.ap-tree.is-in > ul::before { transform: scaleY(1); }
.ap-tree > ul > li { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; opacity: 0; transform: translateX(-12px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-tree.is-in > ul > li { opacity: 1; transform: none; }
.ap-tree > ul > li::before { content: ""; position: absolute; left: -20px; top: 50%; width: 20px; height: 2px; background: var(--ap-grid); }
.ap-tree__node { display: block; padding: 12px 14px; border-radius: 12px 12px 0 12px; background: var(--ap-surface); border: 2px solid var(--c, var(--ap-c1)); font-weight: 800; font-size: 15px; line-height: 1.4; color: var(--ap-ink); transition: background .3s, color .3s; }
a.ap-tree__node:hover { background: var(--c, var(--ap-c1)); color: #fff; }
.ap-tree__node small { display: block; font-size: 11px; font-weight: 600; color: var(--ap-muted); } a.ap-tree__node:hover small { color: rgba(255,255,255,.85); }
.ap-tree__leaf { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ap-tree__leaf li { padding: 4px 10px; border-radius: 100px; background: var(--ap-track); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .4s; transition-delay: calc(var(--d, 0s) + .4s); }
.ap-tree.is-in .ap-tree__leaf li { opacity: 1; }

/* ---------------------------------------------------------------- 16 ルート・所要時間 */
.ap-route { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.ap-route::before { content: ""; position: absolute; left: calc(50% / var(--n, 4)); right: calc(50% / var(--n, 4)); top: 13px; height: 2px; background: var(--ap-grid); }
.ap-route::after { content: ""; position: absolute; left: calc(50% / var(--n, 4)); top: 13px; height: 2px; width: 0; background: var(--ap-c1); transition: width 1.6s var(--ap-ease) .2s; }
.ap-route.is-in::after { width: calc(100% - 100% / var(--n, 4)); }
.ap-route li { position: relative; z-index: 1; text-align: center; padding-top: 40px; font-weight: 800; font-size: 14px; line-height: 1.4; opacity: 0; transition: opacity .5s; transition-delay: var(--d, 0s); }
.ap-route.is-in li { opacity: 1; }
.ap-route li::before { content: ""; position: absolute; left: 50%; top: 6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ap-surface); border: 3px solid var(--ap-c1); box-sizing: border-box; }
.ap-route li:first-child::before, .ap-route li:last-child::before { background: var(--ap-c1); }
.ap-route__leg { position: absolute; left: -50%; right: 50%; top: 0; transform: translateY(-14px); font-size: 11px; font-weight: 700; color: var(--ap-muted); text-align: center; white-space: nowrap; }
.ap-route__leg b { display: block; font-family: Roboto, "Noto Sans JP", sans-serif; font-size: 13px; color: var(--ap-c1); }
.ap-route li small { display: block; font-size: 11px; font-weight: 500; color: var(--ap-muted); }

/* ---------------------------------------------------------------- 17 年間カレンダー帯 */
.ap-year__grid { display: grid; grid-template-columns: 110px repeat(12, 1fr); gap: 4px 0; align-items: center; font-size: 12px; }
.ap-year__m { text-align: center; font-family: Roboto, sans-serif; font-weight: 800; font-size: 11px; color: var(--ap-muted); padding-bottom: 6px; border-bottom: 1px solid var(--ap-grid); }
.ap-year__m.is-now { color: var(--ap-c1); }
.ap-year__l { font-weight: 800; font-size: 12px; padding: 6px 8px 6px 0; line-height: 1.3; }
.ap-year__bar { grid-column: var(--from) / var(--to); height: 22px; margin: 4px 2px; border-radius: 6px; background: var(--c, var(--ap-c1)); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-year.is-in .ap-year__bar { transform: scaleX(1); }
.ap-year__row { display: contents; }
.ap-year__row:nth-child(even) .ap-year__l { background: none; }

/* ---------------------------------------------------------------- 18 ピクトグラム（○人中○人） */
.ap-picto { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.ap-picto__ico { display: flex; flex-wrap: wrap; gap: 4px; max-width: 320px; }
.ap-picto__ico svg { width: 26px; height: 26px; color: var(--ap-dim); transition: color .4s; transition-delay: var(--d, 0s); }
.ap-picto.is-in .ap-picto__ico svg.is-on { color: var(--c, var(--ap-c1)); }
.ap-picto__v { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 32px; line-height: 1; color: var(--ap-c1); }
.ap-picto__v small { font-family: "Noto Sans JP", sans-serif; font-size: 13px; color: var(--ap-ink); margin-left: 4px; }
.ap-picto__l { font-size: 13px; font-weight: 700; margin-top: 6px; color: var(--ap-muted); }

/* ---------------------------------------------------------------- 19 メリット／デメリット */
.ap-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ap-proscons > div { border-radius: 16px 16px 0 16px; padding: 20px 22px; }
.ap-proscons__pro { background: var(--mint, #dbf0db); } .ap-proscons__con { background: #fbf3d6; }
.ap-proscons h4 { margin: 0 0 10px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ap-proscons h4::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ap-c4); } .ap-proscons__con h4::before { background: var(--ap-c2); }
.ap-proscons ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ap-proscons li { position: relative; padding-left: 24px; font-size: 14px; line-height: 1.7; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ap-ease), transform .5s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-proscons.is-in li { opacity: 1; transform: none; }
.ap-proscons li::before { position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; }
.ap-proscons__pro li::before { content: "✓"; background: var(--ap-c4); } .ap-proscons__con li::before { content: "!"; background: var(--ap-c2); }

/* ---------------------------------------------------------------- 20 タブ切替 */
.ap-tabs__nav { display: flex; gap: 6px; border-bottom: 2px solid var(--ap-grid); margin-bottom: 20px; overflow-x: auto; }
.ap-tabs__nav button { flex: 0 0 auto; padding: 10px 18px; margin-bottom: -2px; border-bottom: 2px solid transparent; font-size: 14px; font-weight: 800; color: var(--ap-muted); transition: color .3s, border-color .3s; white-space: nowrap; }
.ap-tabs__nav button:hover { color: var(--ap-c1); }
.ap-tabs__nav button[aria-selected="true"] { color: var(--ap-c1); border-bottom-color: var(--ap-c1); }
.ap-tabs__panel[hidden] { display: none; }
.ap-tabs__panel { animation: ap-fade .4s var(--ap-ease); }
@keyframes ap-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 21 FAQ（開閉） */
.ap-faq { border-bottom: 1px solid var(--ap-grid); }
.ap-faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 28px 1fr 24px; gap: 12px; align-items: center; padding: 16px 0; font-weight: 800; font-size: 15px; line-height: 1.6; }
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::before { content: "Q"; width: 28px; height: 28px; border-radius: 50%; background: var(--ap-c1); color: #fff; font-family: Roboto, sans-serif; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ap-faq summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--ap-c1); border-bottom: 2px solid var(--ap-c1); transform: rotate(45deg); transition: transform .3s; margin: -4px auto 0; }
.ap-faq[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.ap-faq__a { padding: 0 0 18px 40px; font-size: 14px; line-height: 1.9; animation: ap-fade .4s var(--ap-ease); }
.ap-faq__a > p:first-child::before { content: "A."; font-family: Roboto, sans-serif; font-weight: 800; color: var(--ap-c3); margin-right: 6px; }

/* ---------------------------------------------------------------- 22 スコアカード（複数エリアの◎○△を横並び） */
.ap-score { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 12px; }
.ap-score__col { background: var(--ap-surface); border-radius: 16px 16px 0 16px; box-shadow: var(--shadow); border: 1px solid rgb(35 85 125 / 5%); padding: 18px; opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ap-ease), transform .6s var(--ap-ease); transition-delay: var(--d, 0s); }
.ap-score.is-in .ap-score__col { opacity: 1; transform: none; }
.ap-score__col.is-hi { outline: 2px solid var(--ap-c1); }
.ap-score__h { font-size: 16px; font-weight: 800; margin: 0 0 4px; } .ap-score__h small { display: block; font-size: 11px; font-weight: 500; color: var(--ap-muted); }
.ap-score__total { font-family: Roboto, "Noto Sans JP", sans-serif; font-weight: 800; font-size: 32px; color: var(--ap-c1); line-height: 1; margin: 8px 0 12px; } .ap-score__total small { font-family: "Noto Sans JP", sans-serif; font-size: 12px; color: var(--ap-ink); }
.ap-score dl { margin: 0; display: grid; gap: 6px; }
.ap-score dl div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 4px 0; border-bottom: 1px solid var(--ap-grid); }
.ap-score dd { margin: 0; }
.ap-score dd i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ap-grid); margin-left: 3px; }
.ap-score dd i.is-on { background: var(--ap-c1); }

/* ---------------------------------------------------------------- SP */
@media (max-width: 767px) {
  .ap { font-size: 13px; }
  .ap-donut__wrap, .ap-radar__wrap, .ap-jpmap__wrap { grid-template-columns: 1fr; justify-items: center; }
  .ap-donut svg { width: 200px; } .ap-radar svg { width: 260px; }
  .ap-donut__list, .ap-radar__list, .ap-jpmap__side { width: 100%; }
  .ap-bars__row { grid-template-columns: var(--lw-sp, 84px) 1fr var(--vw-sp, 64px); gap: 8px; }
  .ap-bars__lbl { font-size: 12px; } .ap-bars__val { font-size: 13px; }
  .ap-stack__row { grid-template-columns: 1fr; gap: 4px; }
  .ap-compare__head, .ap-compare__row { grid-template-columns: 1fr 76px 28px 76px; gap: 4px; }
  .ap-compare__a, .ap-compare__b { font-size: 15px; } .ap-compare__row--total .ap-compare__b { font-size: 20px; }
  .ap-compare__arw { width: 22px; height: 22px; }
  .ap-table th, .ap-table td { padding: 10px 12px; font-size: 13px; }
  .ap-table__hint { display: block; }
  .ap-timeline--h { grid-auto-flow: row; grid-auto-columns: auto; padding-left: 44px; gap: 0; }
  .ap-timeline--h::before, .ap-timeline--h::after { left: 15px; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; }
  .ap-timeline--h.is-in::after { width: 2px; height: calc(100% - 28px); }
  .ap-timeline--h::after { height: 0; width: 2px; } .ap-timeline--h.is-in::after { width: 2px; height: calc(100% - 28px); }
  .ap-timeline--h > li { padding: 0 0 24px; } .ap-timeline--h > li::before { left: -44px; }
  .ap-tree { grid-template-columns: 1fr; gap: 24px 0; }
  .ap-tree__root { justify-self: start; }
  .ap-tree > ul { padding-left: 20px; } .ap-tree > ul::before { left: 0; top: -14px; }
  .ap-tree > ul > li { grid-template-columns: 1fr; gap: 8px; } .ap-tree > ul > li::before { left: -20px; }
  .ap-route { grid-auto-flow: row; padding-left: 36px; }
  .ap-route::before, .ap-route::after { left: 13px; right: auto; top: 8%; bottom: 8%; width: 2px; height: auto; }
  .ap-route::after { height: 0; width: 2px; transition-property: height; } .ap-route.is-in::after { width: 2px; height: 84%; }
  .ap-route::before, .ap-route::after { left: 13px; }
  .ap-route li { text-align: left; padding: 0 0 28px; } .ap-route li:last-child { padding-bottom: 0; }
  .ap-route li::before { left: -36px; top: 2px; margin: 0; }
  .ap-route__leg { position: static; transform: none; text-align: left; margin-top: 2px; white-space: normal; }
  .ap-route__leg b { display: inline; margin-left: 4px; }
  .ap-year__grid { grid-template-columns: 70px repeat(12, 1fr); }
  .ap-year__l { font-size: 11px; } .ap-year__bar { font-size: 0; height: 16px; padding: 0; }
  .ap-picto { grid-template-columns: 1fr; } .ap-picto__ico svg { width: 22px; height: 22px; }
  .ap-proscons { grid-template-columns: 1fr; }
  .ap-score { grid-template-columns: 1fr; }
  .ap-stats { grid-template-columns: 1fr 1fr; } .ap-stats__v { font-size: 28px; }
  .ap-gauge svg { width: 180px; }
}
/* 2026-10-18 地域どうしの比較（data-places）：左右を同じ重みで見せる。前後の比較ではないので右だけを強調しない */
.ap-compare[data-places] .ap-compare__head span:nth-child(4) { color: var(--ap-muted); }
.ap-compare[data-places] .ap-compare__a, .ap-compare[data-places] .ap-compare__b { color: var(--ap-ink); font-weight: 800; }
.ap-compare[data-places] .ap-compare__arw { color: var(--ap-grid); }
