/* customer / proposal 共通。既存の分析・接客用ビューには読み込まない。 */
.customer-card { min-width: 0; padding: 20px; border: 1px solid var(--line-soft); border-radius: 10px; background: white; color: var(--ink); }
.customer-card h2 { margin: 0 0 10px; font-size: 16px; color: var(--ink); line-height: 1.5; }
.customer-card h2 span { margin-right: 10px; color: var(--muted); font-size: 12px; }
.customer-answer { margin: 0 0 12px; font-size: 24px; font-weight: 700; line-height: 1.45; letter-spacing: -.025em; color: var(--ink); }
.customer-detail { font-size: 13px; line-height: 1.7; }
.customer-detail p { margin: 5px 0; }
.card-figures { display: grid; gap: 18px; margin-top: 18px; }
.card-figure { min-width: 0; margin: 0; break-inside: avoid; page-break-inside: avoid; }
.figure-conclusion { font-weight: 700; font-size: 14px; margin: 0 0 10px; line-height: 1.6; }
.card-figure figcaption { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.7; overflow-wrap: anywhere; }
.card-figure .ch-note { margin-top: 8px; }
.card-figure .ch { display: grid; gap: 6px; }
.card-figure .rb { grid-template-columns: minmax(85px, 1.2fr) minmax(40px, 1fr) auto; gap: 8px; font-size: 12px; }
.card-figure .rb-fill { border: 1px solid var(--ink); }
.card-figure .ch-svg { overflow: visible; }
.card-projects { padding-left: 20px; margin: 0; font-size: 12px; line-height: 1.8; }
.customer-card, .card-figure { overflow-wrap: anywhere; }
.customer-card h2, .customer-answer, .figure-conclusion { break-after: avoid; page-break-after: avoid; }
.card-figure svg, .customer-card table { break-inside: avoid; }
.chart-stat { margin: 10px 0; color: #1E1E1C; }
.chart-stat strong { font-size: 32px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: #5E5B55; margin-bottom: 4px; }
.stat-unit { font-size: 14px; margin-left: 6px; }
.comparison-bars { font-size: 12px; color: #1E1E1C; }
.comparison-row { margin-bottom: 14px; }
.comparison-label { margin-bottom: 6px; }
.comparison-scale { position: relative; height: 18px; width: calc(100% - var(--value-space)); }
.comparison-zero { position: absolute; top: -2px; height: 20px; border-left: 1px solid #5E5B55; }
.comparison-fill { position: absolute; top: 0; height: 16px; border-radius: 4px; }
.comparison-value { position: absolute; top: -1px; margin-left: 7px; line-height: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media print {
  .card-figure { break-inside: avoid; page-break-inside: avoid; }
  .customer-card { border-color: #aaa; box-shadow: none; }
  .card-figure svg { break-inside: avoid; }
  .customer-card * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* 固定幅で生成した地図のタイルと円を、カード幅に合わせて同率で縮小。 */
.card-map .map-box { height: auto !important; aspect-ratio: 640 / 340; }
.card-map .map-over { width: 100%; height: 100%; max-height: none; }
.card-map .map-tiles img { max-width: none; }
.card-map-station { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -160%); font-size: 12px; font-weight: 700; background: #fff; padding: 0 4px; border-radius: 3px; }
.card-map .ch-legend { font-size: 10px; line-height: 1.5; gap: 4px 8px; }
.card-map .src-line { font-size: 10px; }
.card-topic { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.rb-focus .rb-label, .rb-focus .rb-value { font-weight: 700; }
.card-appendix { margin: 20px 0; }
.card-appendix h3 { font-size: 15px; break-after: avoid; }
.card-appendix > p { font-size: 12px; line-height: 1.7; }
.appendix-figures { display: grid; gap: 20px; }
.card-map * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* 名称・数値はコンテナの最小幅を押し広げない。 */
.card-appendix, .appendix-figures, .card-figure .ch, .card-figure .rb > *, .comparison-row > * { min-width: 0; overflow-wrap: anywhere; }
.card-figure .rb { grid-template-columns: minmax(0, 1fr) minmax(30px, 1fr) minmax(0, .9fr); }
.card-figure .rb-value { white-space: normal; text-align: right; }
.card-figure .rb-label { white-space: normal; }
.card-figure .rb-track { min-width: 0; }
.card-figure .rb-fill { box-sizing: border-box; max-width: 100%; }
.card-figure .ch-svg { display: block; width: 100%; height: auto; overflow: hidden; }
.comparison-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 8px; }
.comparison-label { margin: 0; }
.comparison-value { position: static; margin: 0; white-space: normal; text-align: right; }
.comparison-scale { grid-column: 1 / -1; width: 100%; }
.card-map-station { max-width: 85%; width: max-content; overflow-wrap: anywhere; font-size: 11px; }
.topic-icon { width: 22px; height: 22px; display: inline-block; flex: 0 0 22px; vertical-align: -.3em; margin-right: 8px; color: var(--accent, #2F6B5A); }
.route-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.route-badges li { min-width: 0; max-width: 100%; box-sizing: border-box; border: 1px solid #A6D3C4; border-radius: 6px; padding: 4px 8px; background: #eff7f3; color: #1F4D40; font-size: 12px; overflow-wrap: anywhere; }
.project-event { min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line-soft); break-inside: avoid; }
.project-event p { margin: 0 0 4px; font-size: 12px; }
.ch-pyramid .ch-svg { max-height: none; }
@media print {
  .card-appendix, .card-figure { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* 2026-10-06 検収での直し
   ・寄せた地図のタイルが枠の外にはみ出し、上の見出しを隠していた → 枠の外を切り取る（印刷でも）
   ・見出しやアイコンが改ページで割れ、アイコンだけ前のページに残っていた → 見出しは割らない */
.card-map .map-box { position: relative; overflow: hidden; isolation: isolate; contain: paint; }
.card-map .map-tiles { position: absolute; inset: 0; overflow: hidden; }
.customer-card h2, .card-appendix h3 { break-inside: avoid; page-break-inside: avoid; break-after: avoid; page-break-after: avoid; }
.customer-card h2 + .card-topic, .customer-detail { break-before: avoid; page-break-before: avoid; }
@media print {
  .card-map .map-box { position: relative; overflow: hidden; }
}
/* 印刷では overflow:hidden がタイルに効かないことがあるため、clip-path でも切り取る */
.card-map .map-box, .card-map .map-tiles { clip-path: inset(0); }
