
/* =========================================================
 * base.css — 共通スタイル(CP1最小UI)
 * デザイン規約: Noto Sans JP(フォールバックsans-serif)・最低14px、
 * ブランドグラデ #F7A21B → #EE6A10 → #E8380D。外部フォント読込なし。
 * ========================================================= */
:root {
  --brand-grad: linear-gradient(90deg, #F7A21B 0%, #EE6A10 50%, #E8380D 100%);
  --brand-orange: #EE6A10;
  --ink: #1f1f1f;
  --muted: #666;
  --line: #ddd;
  --bg: #f7f6f4;
  --ok: #1a7f37;
  --error: #c62828;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}

header.app-header {
  background: var(--brand-grad);
  color: #fff;
  padding: 14px 24px;
}
header.app-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
header.app-header .sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

#drop-zone {
  border: 2px dashed var(--brand-orange);
  border-radius: 10px;
  background: #fff;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s;
}
#drop-zone.dragging { background: #fff3e8; }
#drop-zone strong { color: var(--brand-orange); }

#file-input { display: none; }

#summary-line { margin: 16px 0 8px; font-weight: 600; }

#file-status {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
#file-status li {
  padding: 4px 8px;
  border-left: 4px solid var(--line);
  margin-bottom: 4px;
  background: #fff;
}
#file-status li.ok { border-left-color: var(--ok); }
#file-status li.error { border-left-color: var(--error); color: var(--error); white-space: pre-wrap; }
#file-status li.pending { border-left-color: #e6a700; color: #7a5c00; white-space: pre-wrap; }
#file-status li.pending .type-select { margin-left: 8px; padding: 2px 4px; font: inherit; }

#warnings {
  display: none;
  border: 1px solid #e6a700;
  background: #fff8e1;
  color: #7a5c00;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 8px 0;
  white-space: pre-wrap;
}

#app-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 24px;
  font-size: 12.5px;
  color: #999;
}

#json-output {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  overflow: auto;
  max-height: 70vh;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  white-space: pre;
}

/* =========================================================
 * report.css — 4帳票のレンダリングスタイル
 * 色・寸法・フォントは docs/デザイン仕様書_v1_0.md(baseline/pdf実測)を正とする。
 * A4縦: .page = 210mm × 297mm。CSS px = PDF実測pt × 4/3。
 * ========================================================= */
:root {
  /* 色トークン(仕様書§2 実測値) */
  --c-red: #E8380D;            /* brand-red: 強調・引用・枠強調・セクションバー・未達 */
  --c-orange: #F97316;         /* brand-orange: 注記左帯・貴社カード枠 */
  --hero-grad: linear-gradient(115deg, #F87116 0%, #E83A0D 100%);
  --band-grad: linear-gradient(90deg, #F87016 0%, #E93B0D 100%);
  --hex-grad: linear-gradient(135deg, #F35E13 0%, #EE4E10 100%);
  --cream: #FFF4EC;
  --th-bg: #5A5A5A;
  --line: #EAEAEA;
  --line-light: #EFEFEF;
  --col-line: #EEEEEE;
  --row-bg: #F7F7F7;
  --cell-absent: #C9C9C9;
  --cell-mention: #F5A623;
  --bar-track: #F3F3F3;
  --bar-gray: #B9B9B9;
  --j-pass: #1A8A3A;
  --j-partial: #C77700;
  --ink: #141414;
  --sub: #666666;
  --foot: #676767;
  --rp-emph: #E8380D;          /* 強調色(config.colors.emphasisから上書き) */
  /* 旧トークン互換(アプリUI側で参照) */
  --rp-accent: #E8380D;
  --rp-grad: var(--hero-grad);
  --rp-line: #e2e2e2;
  --rp-sub: #777;
  --rp-cream: #FDF3E7;
}

/* 見出し・スコア数字は欧文サンズ(Outfit相当)優先 */
.report-hero h2, .report-hero .kicker,
.score-head .big, .score-side .sd .v,
.stat-cards .card .v, .tri-cards .v, .own-card .v,
.ai-cards .nums .n .v, .cat-bars .val, .grade-hex .g, .axis-card .ax-head .s {
  font-family: Outfit, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

/* ---------- タブ・操作列(画面UI: 可読性維持のため14px基調) ---------- */
#report-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 14px;
  flex-wrap: wrap;
}
#report-toolbar .tab {
  border: 1px solid var(--rp-line);
  background: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: #1f1f1f;
}
#report-toolbar .tab:disabled { color: #bbb; cursor: default; }
#report-toolbar .tab.active {
  background: var(--hero-grad);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
}
#report-toolbar #print-btn {
  margin-left: auto;
  border: none;
  background: var(--c-red);
  color: #fff;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}
#report-toolbar #print-btn:disabled { background: #ccc; cursor: default; }

.report { display: none; }
.report.active { display: block; }
.report-placeholder {
  background: #fff;
  border: 1px dashed var(--rp-line);
  border-radius: 8px;
  padding: 30px;
  color: #777;
  text-align: center;
  font-size: 14px;
}

/* 画面専用ヒント(印刷に出さない) */
.screen-only.dict-hint {
  background: #fffbe8;
  border: 1px dashed #e6a700;
  border-radius: 4px;
  color: #7a5c00;
  font-size: 12.5px;
  padding: 2mm 3mm;
  margin-bottom: 4mm;
}

/* ---------- ページ(A4縦) ---------- */
.page {
  width: 210mm;
  height: 297mm;
  background: #fff;
  box-sizing: border-box;
  position: relative;
  margin: 0 auto 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 10.5px;             /* 表本文 7.9pt */
  line-height: 1.55;
  color: var(--ink);
}
.page-body {
  flex: 1 1 auto;
  padding: 11.5mm 14.1mm 4mm;
  overflow: hidden;
}
.page-body.no-top { padding-top: 0; }

/* ページフッタ(区切り線つき) */
.page-footer {
  flex: 0 0 auto;
  padding: 0 14.1mm 10.3mm;
}
.page-footer .f-sep {
  border-top: 1px solid var(--line);
  margin-bottom: 2.4mm;
}
.page-footer .f-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;                /* 6.7pt */
  color: var(--foot);
  font-weight: 600;
  position: relative;
}
.page-footer .f-left { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-footer .f-center {
  flex: 1 1 auto; text-align: center; white-space: nowrap;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.page-footer .f-num {
  flex: 0 0 auto;
  margin-left: auto;
  width: 3.4mm; height: 3.4mm;
  border-radius: 50%;
  background: var(--hex-grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 8.5px;
}

/* ---------- 1ページ目ヘッダ(グラデ帯: 実測 高さ61.5mm) ---------- */
.report-hero {
  background: var(--hero-grad);
  color: #fff;
  height: 61.5mm;
  box-sizing: border-box;
  padding: 10.5mm 14.1mm 0;
  margin: 0 0 12.5mm;
}
.report-hero .kicker {
  font-size: 10.5px;             /* 7.9pt */
  font-weight: 700;
  letter-spacing: 0.35em;
  margin-bottom: 3mm;
}
.report-hero .client { font-size: 12px; font-weight: 500; margin-bottom: 1.2mm; }  /* 9pt */
.report-hero h2 {
  margin: 0 0 3mm;
  font-size: 28px;               /* 21pt */
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.report-hero .hero-badge {
  display: inline-block;
  background: #fff;
  color: var(--c-red);
  font-weight: 700;
  font-size: 11px;               /* 8.2pt */
  border-radius: 1mm;
  padding: 1.1mm 3mm;
  margin-bottom: 2.6mm;
}
.report-hero .hero-meta { font-size: 10px; color: #fff; }   /* 7.5pt */

/* ---------- 六角グレードバッジ ---------- */
.grade-hex {
  width: 26mm; height: 23mm;
  background: var(--hex-grad);
  clip-path: polygon(25% 2%, 75% 2%, 100% 50%, 75% 98%, 25% 98%, 0% 50%);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.grade-hex .g { font-size: 31px; font-weight: 800; line-height: 1; }   /* 23.2pt */
.grade-hex .gl { font-size: 7.5px; letter-spacing: 0.35em; margin-top: 1.2mm; text-indent: 0.35em; }
.grade-hex.small { width: 17mm; height: 15mm; }
.grade-hex.small .g { font-size: 19px; }   /* 14.2pt */
.grade-hex.small .gl { font-size: 6.5px; margin-top: 0.6mm; }

/* ---------- スコアブロック ---------- */
.score-head { display: flex; align-items: center; gap: 8mm; margin-bottom: 6.8mm; }
.score-head .score-main { flex: 1 1 auto; }
.score-head .big {
  font-size: 48px; font-weight: 800; line-height: 1.05;    /* 36pt */
}
.score-head .big .of { font-size: 17px; font-weight: 700; color: var(--sub); }  /* 12.7pt */
.score-head .score-name { font-size: 13.5px; font-weight: 700; margin: 0.8mm 0 1.6mm; }  /* 10.1pt */
.score-head .score-notes { font-size: 9.5px; color: var(--sub); line-height: 1.55; }     /* 7.1pt */
.score-side { display: flex; flex: 0 0 auto; }
.score-side .sd {
  padding: 0 6.5mm;
  border-left: 1px solid var(--line);
  text-align: center;
}
.score-side .sd .v { font-size: 26px; font-weight: 800; }   /* 19.5pt */
.score-side .sd .v .of { font-size: 13px; color: var(--sub); font-weight: 700; }
.score-side .sd .l { font-size: 9.5px; color: var(--sub); line-height: 1.4; margin-top: 1mm; }

/* ---------- 統計カード ---------- */
.stat-cards { display: flex; gap: 4.5mm; margin-bottom: 4.9mm; }
.stat-cards .card {
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 1.5mm;
  padding: 3.6mm 3.6mm 3mm;
  min-height: 22mm;
  box-sizing: border-box;
  background: #fff;
}
.stat-cards .card.emph { border: 1.1px solid var(--c-red); }
.stat-cards .card .t { font-size: 11px; font-weight: 700; margin-bottom: 1.8mm; }  /* 8.2pt */
.stat-cards .card .v { font-size: 24px; font-weight: 800; color: var(--c-red); line-height: 1.1; }  /* 18pt */
.stat-cards .card.plain .v { color: var(--ink); }
.stat-cards .card .v .of { font-size: 11px; color: var(--sub); font-weight: 700; }
.stat-cards .card .d { font-size: 8px; color: var(--sub); margin-top: 1.4mm; line-height: 1.45; font-weight: 500; }  /* 6pt・v1.1.2:実測ストローク2vs1 */

/* ---------- メッセージボックス ---------- */
.msg-box {
  border: 1.1px solid var(--c-red);
  border-radius: 2mm;
  padding: 5mm 6mm;
  margin-bottom: 4.5mm;
  background: #fff;
}
.msg-box .mt { color: var(--c-red); font-weight: 800; font-size: 12.5px; margin-bottom: 2.4mm; }  /* 9.4pt */
.msg-box .mb { font-size: 11px; line-height: 1.95; font-weight: 500; }   /* 8.2pt・PDFの広い行間。v1.1.2:実測(ストローク3vs2)によりウェイト500 */
.note-box {
  background: var(--cream);
  border-left: 2.5px solid var(--c-orange);
  padding: 5.5mm 6mm;
  margin-bottom: 4.5mm;
  font-size: 10.5px;              /* 補足 7.9pt */
  line-height: 1.95;
  font-weight: 700;               /* v1.1.2: 実測(ストローク3)により注釈本文はBold */
}
.note-box .nt { color: var(--c-red); font-weight: 800; margin-bottom: 1.2mm; font-size: 12.5px; }
strong.accent, .accent-txt { color: var(--rp-emph); }

/* ---------- セクション見出し ---------- */
.sec-title {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 0 4.2mm;
}
.sec-title .bar-title {
  border-left: 1.4mm solid var(--c-red);
  padding-left: 2.2mm;
  font-size: 13.5px;             /* 10.1pt */
  font-weight: 800;
}
.sec-title .sub-r { margin-left: auto; font-size: 9.5px; color: var(--sub); }
.page-title-row { display: flex; align-items: baseline; margin: 0 0 4.5mm; }
.page-title-row h3 { margin: 0; font-size: 15.5px; font-weight: 800; }  /* 11.6pt */
.page-title-row h3 .accent-txt { color: var(--c-red); }
.page-title-row .sub-r { margin-left: auto; font-size: 9.5px; color: var(--sub); }

/* ---------- AIモデル別カード ---------- */
.ai-cards { display: flex; gap: 4.5mm; }
.ai-cards .card {
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 1.5mm;
  padding: 4mm 5mm;
  background: #fff;
}
.ai-cards .name { font-size: 12.5px; font-weight: 700; margin-bottom: 2.6mm; }  /* 9.4pt */
.ai-cards .nums { display: flex; gap: 6mm; }
.ai-cards .nums .n { text-align: left; }
.ai-cards .nums .n .v { font-size: 18px; font-weight: 800; }   /* 13.5pt */
.ai-cards .nums .n.cite .v { color: var(--c-red); }
.ai-cards .nums .n .l { font-size: 8.5px; color: var(--sub); }  /* 6.4pt */

/* ---------- 汎用データテーブル ---------- */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;             /* 7.9pt */
}
table.data th {
  background: var(--th-bg);
  color: #fff;
  font-weight: 700;
  padding: 1.5mm 2.6mm;
  text-align: left;
  font-size: 10.5px;
}
table.data td {
  border-bottom: 1px solid var(--line);
  padding: 1.55mm 2.6mm;
  vertical-align: middle;
  background: #fff;
  font-weight: 700;               /* v1.1.2: 実測(ストローク3・インク比+56%)により表本文はBold */
}
table.data td + td { border-left: 1px solid var(--col-line); }
table.data td.num, table.data th.num { text-align: right; }
table.data td.ctr, table.data th.ctr { text-align: center; }
table.data tr.hilite td { background: var(--cream); }
table.data tr.hilite td:first-child { font-weight: 700; }
table.data tr.total td { background: var(--cream); font-weight: 700; }
/* 実測値比較テーブル(総括): 項目列は薄灰、値は中央太字 */
table.cmp td.cat { background: #FAFAFA; }
table.cmp tr.hilite td.cat { background: #F7F5F5; font-weight: 700; }
table.cmp td.ctr { font-weight: 700; }
/* ロードマップ表: 列縦罫線なし・行区切りは薄め */
table.roadmap td { border-bottom: 1px solid var(--line-light); }
table.roadmap td + td { border-left: none; }

.bar {
  display: inline-block;
  width: 100%;
  height: 1.6mm;
  background: var(--bar-track);
  border-radius: 0.4mm;
  overflow: hidden;
  vertical-align: middle;
}
.bar > i { display: block; height: 100%; background: var(--bar-gray); }
.bar.orange > i { background: var(--band-grad); }

/* ---------- カテゴリ棒グラフ(総括p2) ---------- */
.cat-bars .row { display: flex; align-items: center; gap: 4mm; margin-bottom: 5.4mm; }
.cat-bars .lbl { flex: 0 0 42mm; }
.cat-bars .lbl .l1 { font-weight: 700; font-size: 10.5px; line-height: 1.3; }  /* 7.9pt */
.cat-bars .lbl .l2 { font-size: 8.5px; color: var(--sub); }
.cat-bars .track { flex: 1 1 auto; height: 4.5mm; background: var(--bar-track); border-radius: 0.5mm; overflow: hidden; }
.cat-bars .track > i { display: block; height: 100%; background: var(--band-grad); }
.cat-bars .val { flex: 0 0 14mm; text-align: right; font-weight: 800; font-size: 13px; }
.cat-bars .val .of { font-size: 8.5px; color: var(--sub); font-weight: 700; }

/* ---------- ヒートマップ ---------- */
.hm-legend { display: flex; gap: 6mm; font-size: 9.5px; color: #555; margin-bottom: 3.4mm; }  /* 7.1pt */
.hm-legend .chip::before {
  content: '';
  display: inline-block;
  width: 2.5mm; height: 2.5mm;
  border-radius: 0.5mm;
  margin-right: 1.4mm;
  vertical-align: -0.3mm;
}
.hm-legend .chip.c-cite::before { background: var(--c-red); }
.hm-legend .chip.c-mention::before { background: var(--cell-mention); }
.hm-legend .chip.c-absent::before { background: var(--cell-absent); }

table.heatmap { width: 100%; border-collapse: collapse; font-size: 10.5px; }
table.heatmap th {
  background: var(--th-bg); color: #fff;
  padding: 1.5mm 2.6mm; text-align: left; font-size: 10px;   /* AI列名 7.5pt */
  border-bottom: 1px solid #fff;
}
table.heatmap th.ai { width: 19mm; text-align: center; }
table.heatmap td { padding: 5.5px 2.2mm; border-bottom: 1px solid #fff; }
table.heatmap td.q { background: var(--row-bg); line-height: 1.45; font-weight: 700; }  /* v1.1.2: 実測によりBold */
table.heatmap tr.band td {
  background: var(--band-grad);
  color: #fff;
  font-weight: 700;
  padding: 1.8mm 2.6mm;
}
table.heatmap tr.band .band-in { display: flex; align-items: center; gap: 1.8mm; font-size: 10.5px; }
table.heatmap tr.band .cat-chip {
  background: #fff; color: var(--c-red);
  width: 4.3mm; height: 4.3mm; border-radius: 0.7mm;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800;
}
table.heatmap tr.band .band-r { margin-left: auto; font-size: 9.5px; font-weight: 500; }  /* 7.1pt */
table.heatmap td.q .qn { color: var(--c-red); font-weight: 700; margin-right: 0.6mm; }
table.heatmap td.cell { text-align: center; padding: 1px 2px; background: #fff; }
table.heatmap td.cell span {
  display: block;
  border-radius: 0.7mm;
  font-size: 10px;                /* 7.5pt */
  font-weight: 700;
  color: #fff;
  line-height: 15.5px;
  padding: 5.5px 0;
}
td.cell .cv-cite { background: var(--c-red); }
td.cell .cv-mention { background: var(--cell-mention); }
td.cell .cv-absent { background: var(--cell-absent); }
tr.zebra td { background: inherit; }

/* ---------- 引用ソース分析 ---------- */
.src-layout { display: flex; gap: 5.5mm; align-items: flex-start; }
.src-layout .src-table { flex: 1 1 auto; }
.own-card {
  flex: 0 0 50mm;
  background: #fff;
  border: 1.1px solid var(--c-red);
  border-radius: 2mm;
  min-height: 46mm;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 5mm 4mm;
  box-sizing: border-box;
}
.own-card .t { font-weight: 700; font-size: 12px; margin-bottom: 2.6mm; }
.own-card .v { font-size: 30px; font-weight: 800; color: var(--c-red); line-height: 1.1; }  /* 22.5pt */
.own-card .d { font-size: 8.5px; color: var(--sub); margin-top: 2mm; line-height: 1.5; }    /* 6.4pt */
.own-card .p { font-size: 14px; font-weight: 800; color: var(--c-red); margin-top: 1mm; }
.own-card.top { background: var(--cream); border-color: var(--c-orange); }

/* ---------- サイト帳票 ---------- */
.radar-wrap { display: flex; gap: 5.5mm; align-items: center; margin-bottom: 4.5mm; }
.radar-wrap svg { flex: 0 0 auto; }
.radar-wrap .axes-table { flex: 1 1 auto; }

/* 評価軸詳細カード(仕様書§4.13) */
.axis-card {
  border: 1px solid var(--line);
  border-radius: 1.5mm;
  background: #fff;
  padding: 3.6mm 4.3mm 3.4mm;
  margin-bottom: 4mm;
}
.axis-card .ax-head { display: flex; align-items: center; margin-bottom: 1.2mm; }
.axis-card .ax-head .n { font-size: 12.5px; font-weight: 800; }        /* 9.4pt */
.axis-card .ax-head .s { margin-left: auto; font-size: 15px; font-weight: 800; }  /* 11.2pt */
.axis-card .ax-head .s .of { color: var(--sub); font-size: 11px; }
.axis-card .ax-bar {
  flex: 0 0 32mm;
  height: 2mm;
  margin-left: 3.5mm;
  background: #F2F2F2;
  border-radius: 0.5mm;
  overflow: hidden;
}
.axis-card .ax-bar > i { display: block; height: 100%; background: var(--band-grad); }
.axis-card .ax-desc { font-size: 9.5px; color: var(--sub); margin-bottom: 1.8mm; }  /* 7.1pt */
table.inner {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;               /* 7.1pt */
  border: 1px solid var(--line);
}
table.inner th {
  background: #F2F2F2;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 1.4mm 2.2mm;
  font-size: 9.5px;
}
table.inner th:last-child { color: var(--sub); font-weight: 500; }
table.inner td { padding: 1.3mm 2.2mm; border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
table.inner td.item { font-weight: 700; }
table.inner td.basis { color: var(--sub); }
table.inner td.num { text-align: right; font-weight: 700; }
td.judge { font-weight: 700; white-space: nowrap; }
td.judge.j-pass { color: var(--j-pass); }
td.judge.j-partial { color: var(--j-partial); }
td.judge.j-fail { color: var(--c-red); }
/* 旧axis-detailスタイルの残骸吸収 */
.axis-detail { margin-bottom: 5mm; }

/* ロードマップカード(総括p4) */
.rm-cards { display: flex; gap: 4.5mm; margin-bottom: 4.5mm; }
.rm-cards .card {
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 2mm;
  padding: 4.5mm 5mm;
  background: #fff;
}
.rm-cards .num {
  width: 3.6mm; height: 3.6mm; border-radius: 50%;
  background: var(--hex-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 2.4mm;
  font-size: 9.5px;
}
.rm-cards .t { font-weight: 800; font-size: 12.5px; margin-bottom: 1.6mm; }  /* 9.4pt */
.rm-cards .d { font-size: 9.5px; color: #555; }                              /* 7.1pt */

/* ロードマップ表(サイト) */
table.roadmap { font-size: 9.5px; line-height: 1.7; }   /* 7.1pt */
table.roadmap td { vertical-align: top; padding: 2.8mm 2.6mm; }
table.roadmap .rm-no { color: var(--c-red); font-weight: 800; font-size: 12px; }  /* 9pt */
table.roadmap .rm-title { font-weight: 700; margin-bottom: 0.8mm; font-size: 10.5px; }  /* 7.9pt */
table.roadmap .rm-tag { font-size: 8.5px; color: var(--sub); }  /* 6.4pt */

.small-note { font-size: 9.5px; color: var(--sub); }  /* 7.1pt */
.axis-note { font-size: 9.5px; color: var(--sub); }
.page-body > :last-child { margin-bottom: 0; }
.mb2 { margin-bottom: 2mm; } .mb4 { margin-bottom: 4mm; } .mb6 { margin-bottom: 5mm; }

/* ---------- 総括p1 スコア3カード ---------- */
.tri-cards { display: flex; gap: 4.5mm; margin-bottom: 5mm; }
.tri-cards .card {
  flex: 1 1 0;
  border: 1px solid var(--line);
  border-radius: 2mm;
  text-align: center;
  padding: 3.6mm 4mm;
  background: #fff;
}
.tri-cards .card.best { border: 1.1px solid var(--c-red); }
.tri-cards .t { font-weight: 800; font-size: 11.5px; margin-bottom: 2mm; }  /* 8.6pt */
.tri-cards .grade-hex { margin: 0 auto 2mm; }
.tri-cards .v { font-size: 40px; font-weight: 800; line-height: 1; }        /* 30pt */
.tri-cards .v .of { font-size: 16px; color: var(--sub); font-weight: 700; }
.tri-cards .d { font-size: 9px; color: var(--sub); margin-top: 2mm; line-height: 1.5; }  /* 6.7pt */

/* ---------- セッション注記・文章編集パネル・設定画面(画面UI) ---------- */
#session-note {
  font-size: 12.5px;
  color: #8a6d1a;
  background: #fffbe8;
  border: 1px solid #eadfa8;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
}
#edit-panel {
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
#edit-panel .ep-head {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--c-red);
}
#edit-panel .ep-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 7px 0;
  border-top: 1px solid #f0f0f0;
}
#edit-panel .ep-label { font-size: 13.5px; font-weight: 600; padding-top: 4px; }
#edit-panel textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 6px 8px;
  border: 1px solid var(--rp-line);
  border-radius: 4px;
  resize: vertical;
}
#edit-panel .ep-reset {
  font-family: inherit;
  font-size: 12.5px;
  border: 1px solid var(--rp-line);
  background: #fff;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
}

#settings-view {
  background: #fff;
  border: 1px solid var(--rp-line);
  border-radius: 8px;
  padding: 16px 20px 20px;
  font-size: 14px;
}
#settings-view .sv-note {
  font-size: 13px;
  color: #8a6d1a;
  background: #fffbe8;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
#settings-view .sv-section { margin-bottom: 18px; }
#settings-view h3 {
  font-size: 15px;
  margin: 0 0 8px;
  border-left: 4px solid var(--c-red);
  padding-left: 8px;
}
#settings-view .sv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
#settings-view .sv-row label { min-width: 180px; font-size: 14px; }
#settings-view input[type="number"] { width: 110px; }
#settings-view input, #settings-view button, #settings-view textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 5px 8px;
  border: 1px solid var(--rp-line);
  border-radius: 4px;
}
#settings-view input[type="text"] { width: 320px; }
#settings-view button { background: #fff; cursor: pointer; }
#settings-view .sv-hint { font-size: 12.5px; color: #777; margin: 4px 0 0; }
#settings-view table.sv-dict { border-collapse: collapse; margin-bottom: 8px; }
#settings-view table.sv-dict th, #settings-view table.sv-dict td {
  border: 1px solid #eee;
  padding: 3px 8px;
  font-size: 13.5px;
  text-align: left;
}
#settings-view table.sv-dict input[type="text"] { width: 200px; padding: 3px 6px; }
#settings-view #config-json {
  width: 100%;
  box-sizing: border-box;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12.5px;
}

/* 印刷時に背景色・文字色が淡色化/省略されないよう常時exact指定(帳票ページのみ) */
.page, .page *, .page *::before, .page *::after {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* ---------- 印刷 ---------- */
#weight-badge {
  display: inline-block; margin-left: 12px; padding: 2px 10px;
  font-size: 12px; color: #555; background: #f6f6f6;
  border: 1px solid #ddd; border-radius: 12px; vertical-align: middle;
}
@media print {
  #weight-badge { display: none !important; }
  @page { size: A4 portrait; margin: 0; }
  html, body { background: #fff; }
  html, body, body *, body *::before, body *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  header.app-header, #drop-zone, #summary-line, #file-status, #warnings,
  #report-toolbar, #json-view, #settings-view, #edit-panel, #session-note,
  #app-footer, .report-placeholder, .screen-only { display: none !important; }
  main { max-width: none; padding: 0; margin: 0; }
  .report { display: none; }
  .report.active { display: block; }
  .page {
    box-shadow: none;
    margin: 0;
    page-break-after: always;
    break-after: page;
  }
  .page:last-child { page-break-after: auto; }
}

