/* =========================================================
   BIM運用状況 健康診断
   峰設計ブランド：白基調 × ネイビー寄り濃紫 #3D348C
   ========================================================= */

:root {
  --fd-primary: #3D348C;       /* メイン: ネイビー寄り濃紫 */
  --fd-primary-dark: #2A2466;
  --fd-primary-light: #6F66BE;
  --fd-accent: #B8AEE7;        /* 薄い紫 */
  --fd-bg: #ffffff;
  --fd-bg-soft: #F7F6FB;
  --fd-text: #1a1a1a;
  --fd-muted: #6b7280;
  --fd-line: #e5e7eb;
  --fd-line-strong: #c8c8d4;

  /* シグナル色（健康診断のメタファ） */
  --ok: #2F9E63;
  --warn: #D89E2A;
  --ng: #C0463F;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 1px 2px rgba(28, 25, 78, 0.06),
                 0 8px 24px rgba(28, 25, 78, 0.04);

  --font-jp: "Yu Gothic UI", "Yu Gothic", "Meiryo UI", "Meiryo", sans-serif;
  --font-en: "Bahnschrift", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--fd-bg);
  color: var(--fd-text);
  font-family: var(--font-jp);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 全画面共通：薄い建築方眼紙風グリッド */
body {
  background-image:
    linear-gradient(rgba(61, 52, 140, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 52, 140, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
  background-attachment: fixed;
}

/* ============================================================
   背景グラフィック（建築製図 × 地形等高線）
   - pointer-events:none で重ねるのみ、既存レイアウトに非干渉
   ============================================================ */
#screen-intro,
#screen-result {
  position: relative;
  overflow: hidden;
}
#screen-intro::before,
#screen-intro::after,
#screen-result::before,
#screen-result::after {
  content: "";
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}
#screen-intro .container,
#screen-result .container {
  position: relative;
  z-index: 1;
}

/* スタートページ：右下に方位記号風の大きな同心円 */
#screen-intro::before {
  bottom: -260px;
  right: -220px;
  width: 780px;
  height: 780px;
  background-image: url("../assets/bg-compass.svg");
  opacity: 0.22;
}

/* 結果ページ：左上に角フレーム + 寸法線 */
#screen-result::before {
  top: -40px;
  left: -40px;
  width: 460px;
  height: 460px;
  background-image: url("../assets/bg-corner-frame.svg");
  opacity: 0.50;
}

/* 結果ページ：右下に小さな同心円 */
#screen-result::after {
  bottom: -180px;
  right: -180px;
  width: 580px;
  height: 580px;
  background-image: url("../assets/bg-radial-small.svg");
  opacity: 0.25;
}

/* スマホでは装飾を小さく */
@media (max-width: 720px) {
  #screen-intro::before {
    width: 480px;
    height: 480px;
    bottom: -160px;
    right: -160px;
    opacity: 0.15;
  }
  #screen-result::before {
    width: 280px;
    height: 280px;
    opacity: 0.38;
  }
  #screen-result::after {
    width: 360px;
    height: 360px;
    bottom: -120px;
    right: -120px;
    opacity: 0.18;
  }
}

/* ===== ヘッダー ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--fd-line);
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}
.brand-jp {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.brand-en {
  font-family: var(--font-en);
  font-size: 11px;
  color: var(--fd-muted);
  letter-spacing: 0.18em;
}
.meta {
  text-align: right;
}
.title-jp {
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fd-primary);
}
.title-sub {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fd-muted);
  text-transform: uppercase;
}

/* ===== 共通 ===== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.screen.hidden { display: none; }

h1 {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  color: var(--fd-text);
}
h1::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--fd-primary);
  margin-bottom: 18px;
}
.lead {
  font-size: 15px;
  color: var(--fd-text);
  max-width: 640px;
  margin: 0 0 32px;
}
.note {
  font-size: 12px;
  color: var(--fd-muted);
  margin-top: 24px;
  line-height: 1.8;
}

.section-title {
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--fd-primary);
  margin: 40px 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fd-line);
  text-transform: none;
}

/* ===== ボタン ===== */
.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}
.btn {
  font-family: inherit;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: all 0.15s ease;
}
.btn.primary {
  background: var(--fd-primary);
  color: #fff;
  border-color: var(--fd-primary);
}
.btn.primary:hover {
  background: var(--fd-primary-dark);
  border-color: var(--fd-primary-dark);
}
.btn.primary:disabled {
  background: var(--fd-line-strong);
  border-color: var(--fd-line-strong);
  cursor: not-allowed;
}
.btn.ghost {
  background: transparent;
  color: var(--fd-primary);
  border-color: var(--fd-primary);
}
.btn.ghost:hover {
  background: var(--fd-bg-soft);
}
.btn.contact {
  background: #1F1B4A;
  border-color: #1F1B4A;
}
.btn.contact:hover {
  background: #15123A;
  border-color: #15123A;
}
.btn.contact::before {
  content: "✉";
  margin-right: 8px;
  font-size: 14px;
}

/* ===== Intro: カテゴリグリッド ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.cat-card {
  border: 1px solid var(--fd-line);
  border-radius: var(--radius);
  padding: 18px 14px;
  background: #fff;
  text-align: center;
  transition: all 0.15s ease;
}
.cat-card:hover {
  border-color: var(--fd-primary-light);
  box-shadow: var(--shadow-card);
}
.cat-card .num {
  font-family: var(--font-en);
  font-size: 28px;
  color: var(--fd-primary);
  font-weight: 600;
  line-height: 1;
}
.cat-card .name {
  font-size: 13px;
  margin-top: 8px;
  letter-spacing: 0.04em;
}
.cat-card .max {
  font-family: var(--font-en);
  font-size: 11px;
  color: var(--fd-muted);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Quiz: 進捗 ===== */
.progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--fd-bg-soft);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--fd-primary);
  width: 0%;
  transition: width 0.25s ease;
}
.progress-text {
  font-family: var(--font-en);
  font-size: 13px;
  color: var(--fd-muted);
  white-space: nowrap;
}

/* ===== Quiz: 設問 ===== */
.cat-pill {
  display: inline-block;
  background: var(--fd-bg-soft);
  color: var(--fd-primary);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.q-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.6;
  margin: 0 0 28px;
  white-space: pre-wrap;
}

/* ===== Quiz: 選択肢 ===== */
.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1.5px solid var(--fd-line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
}
.choice:hover {
  border-color: var(--fd-primary-light);
  background: var(--fd-bg-soft);
}
.choice.selected {
  border-color: var(--fd-primary);
  background: var(--fd-bg-soft);
  box-shadow: 0 0 0 3px rgba(61, 52, 140, 0.08);
}
.choice .pt {
  font-family: var(--font-en);
  font-weight: 600;
  color: var(--fd-primary);
  font-size: 15px;
  min-width: 32px;
  text-align: center;
}
.choice .label {
  flex: 1;
}

/* ===== Step Tag / Form 共通 ===== */
.step-tag {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fd-primary);
  background: var(--fd-bg-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.form-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}
.form-title::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--fd-primary);
  margin-bottom: 14px;
}

/* ===== 自由回答フォーム ===== */
.open-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
}
.open-q {
  background: #fff;
  border: 1px solid var(--fd-line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color 0.15s ease;
}
.open-q:focus-within {
  border-color: var(--fd-primary);
  box-shadow: 0 0 0 3px rgba(61, 52, 140, 0.08);
}
.open-q .num {
  font-family: var(--font-en);
  font-size: 12px;
  color: var(--fd-primary);
  letter-spacing: 0.12em;
  font-weight: 600;
}
.open-q .q-label {
  font-size: 15px;
  font-weight: 600;
  margin: 4px 0 12px;
  line-height: 1.6;
}
.open-q .q-label .opt {
  font-size: 11px;
  font-weight: 400;
  color: var(--fd-muted);
  margin-left: 6px;
}
.open-q textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--fd-line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fd-text);
  background: #fff;
  transition: border-color 0.15s ease;
}
.open-q textarea:focus {
  outline: none;
  border-color: var(--fd-primary);
}

/* ===== リード獲得フォーム ===== */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
  padding: 28px 30px;
  background: var(--fd-bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--fd-line);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--fd-text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field.req > label::after {
  content: "必須";
  font-size: 10px;
  font-weight: 600;
  background: var(--fd-primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--fd-line);
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--fd-text);
  transition: border-color 0.15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--fd-primary);
  box-shadow: 0 0 0 3px rgba(61, 52, 140, 0.1);
}
.field input.error,
.field select.error {
  border-color: var(--ng);
  background: #fff8f7;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; }
}
.field.consent .check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 0;
}
.field.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--fd-primary);
  cursor: pointer;
}
.field.consent.req > label::after { content: none; }
.form-error {
  color: var(--ng);
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

/* ===== Result: タイトル ===== */
.result-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02em;
  margin: 0 0 32px;
  color: var(--fd-text);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.result-title::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--fd-primary);
  margin-bottom: 18px;
  flex-basis: 100%;
}
.result-title .title-main {
  flex: 1;
}
.result-title .company {
  color: var(--fd-primary);
  margin-right: 4px;
}
.result-title .result-date {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fd-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.result-title .result-date .date-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  background: var(--fd-bg-soft);
  color: var(--fd-primary);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.result-title .result-date .date-value {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--fd-text);
  font-weight: 600;
}

/* ===== Result: ヘッダー ===== */
.result-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .result-head { grid-template-columns: 1fr; }
}
.total-block {
  display: flex;
  align-items: center;
  gap: 24px;
}
.rank-badge {
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fd-primary);
  color: #fff;
  font-family: var(--font-en);
  font-size: 64px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 8px 24px rgba(61, 52, 140, 0.2);
}
.rank-badge.rank-S { background: linear-gradient(135deg, #2A2466, #6F66BE); }
.rank-badge.rank-A { background: linear-gradient(135deg, #3D348C, #7B73C4); }
.rank-badge.rank-B { background: linear-gradient(135deg, #4C42A0, #8A82CE); }
.rank-badge.rank-C { background: linear-gradient(135deg, #6F66BE, #9B92D2); }
.rank-badge.rank-D { background: linear-gradient(135deg, #8076C0, #C0B9E1); }
.rank-badge.rank-E { background: linear-gradient(135deg, #B0A8D8, #D8D2EC); }

.rank-meta { flex: 1; }
.rank-label {
  font-size: 14px;
  color: var(--fd-primary);
  letter-spacing: 0.12em;
}
.rank-score {
  font-family: var(--font-en);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--fd-text);
}
.rank-score .of {
  font-size: 18px;
  color: var(--fd-muted);
  margin-left: 4px;
}
.rank-desc {
  font-size: 13px;
  color: var(--fd-text);
  margin-top: 8px;
}

/* ===== Result: レーダー ===== */
.radar-block { display: grid; place-items: center; }
#radar { width: 100%; max-width: 360px; height: auto; }

/* ===== Result: カテゴリ別バー ===== */
.cat-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cat-bar {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  gap: 16px;
  align-items: center;
}
.cat-bar .name {
  font-size: 14px;
  letter-spacing: 0.04em;
}
.cat-bar .track {
  height: 12px;
  background: var(--fd-bg-soft);
  border-radius: 6px;
  overflow: hidden;
}
.cat-bar .fill {
  height: 100%;
  background: var(--fd-primary);
  border-radius: 6px;
  transition: width 0.6s ease;
}
.cat-bar .fill.ok { background: var(--ok); }
.cat-bar .fill.warn { background: var(--warn); }
.cat-bar .fill.ng { background: var(--ng); }
.cat-bar .score {
  font-family: var(--font-en);
  font-size: 14px;
  text-align: right;
  color: var(--fd-text);
}
.cat-bar .score .of {
  color: var(--fd-muted);
  font-size: 12px;
}
@media (max-width: 720px) {
  .cat-bar { grid-template-columns: 100px 1fr 70px; gap: 10px; }
}

/* ===== Result: ヒアリング内容 ===== */
.hearing-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hearing-item {
  background: var(--fd-bg-soft);
  border-left: 3px solid var(--fd-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
}
.hearing-item .h-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--fd-primary);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.hearing-item .h-a {
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  color: var(--fd-text);
}
.hidden { display: none; }

/* ===== Result: コメント ===== */
.comments {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment {
  border-left: 3px solid var(--fd-primary);
  padding: 12px 16px;
  background: var(--fd-bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.comment.lv-ok { border-color: var(--ok); }
.comment.lv-warn { border-color: var(--warn); }
.comment.lv-ng { border-color: var(--ng); }
.comment .head {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.comment .body {
  font-size: 13px;
  color: var(--fd-text);
  line-height: 1.7;
}
.comment .body > div + div {
  margin-top: 6px;
}
.pdf-comment .body > div + div {
  margin-top: 1.2mm;
}

/* ===== Footer ===== */
.site-footer {
  padding: 16px 40px;
  border-top: 1px solid var(--fd-line);
  color: var(--fd-muted);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* =========================================================
   PDF出力用ステージ（A4縦）
   画面外に絶対配置し、html2pdf.js でレンダリング
   ========================================================= */
.pdf-stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 794px;
  background: #fff;
  pointer-events: none;
  display: none;
  z-index: 9999;
}

.pdf-generating-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.05em;
}

.pdf-page {
  width: 210mm;
  min-height: 297mm;
  padding: 14mm 16mm 12mm;
  box-sizing: border-box;
  background: #fff;
  color: #1a1a1a;
  font-family: var(--font-jp);
  font-size: 10pt;
  line-height: 1.55;
  page-break-after: always;
  display: flex;
  flex-direction: column;
}
.pdf-page:last-child { page-break-after: auto; }

/* ヘッダー */
.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--fd-primary);
  padding-bottom: 6mm;
  margin-bottom: 7mm;
}
.pdf-header .h-left {
  display: flex;
  align-items: center;
  gap: 4mm;
}
.pdf-header .h-mark {
  width: 11mm;
  height: 11mm;
  border: 1.5px solid var(--fd-primary);
  color: var(--fd-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-en);
  font-weight: 600;
  font-size: 13pt;
}
.pdf-header .h-title {
  font-size: 15pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fd-primary);
  line-height: 1.2;
}
.pdf-header .h-sub {
  font-family: var(--font-en);
  font-size: 8pt;
  letter-spacing: 0.18em;
  color: var(--fd-muted);
  margin-top: 1mm;
}
.pdf-header .h-right {
  text-align: right;
  font-size: 9pt;
  color: var(--fd-text);
}
.pdf-header .h-recipient {
  font-size: 12pt;
  font-weight: 700;
  color: var(--fd-text);
  letter-spacing: 0.04em;
  margin-bottom: 1.5mm;
}
.pdf-header .h-date {
  font-family: var(--font-en);
  font-size: 11pt;
  font-weight: 600;
  color: var(--fd-primary);
}
.pdf-header .h-org {
  font-size: 8pt;
  color: var(--fd-muted);
  margin-top: 1mm;
  letter-spacing: 0.06em;
}

/* 自由回答ブロック（PDF用） */
.pdf-qa-a.open-ans {
  display: block;
  padding: 2mm 3mm;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 8.5pt;
  min-height: 7mm;
  border-left-color: var(--fd-primary);
}
.pdf-qa-a.open-ans.empty {
  color: var(--fd-muted);
  font-style: italic;
}
.pdf-recipient-info {
  display: flex;
  gap: 6mm;
  flex-wrap: wrap;
  background: var(--fd-bg-soft);
  border-left: 3px solid var(--fd-primary);
  padding: 3mm 4mm;
  margin-bottom: 4mm;
  font-size: 8.5pt;
}
.pdf-recipient-info .ri-item .lbl {
  font-size: 7.5pt;
  color: var(--fd-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.5mm;
}
.pdf-recipient-info .ri-item .val {
  font-weight: 600;
}

/* 1ページ目：トップブロック（ランク＋レーダー） */
.pdf-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8mm;
  align-items: center;
  margin-bottom: 8mm;
}
.pdf-rank-area {
  display: flex;
  align-items: center;
  gap: 6mm;
}
.pdf-rank-badge {
  width: 30mm;
  height: 30mm;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fd-primary);
  color: #fff;
  font-family: var(--font-en);
  font-size: 28pt;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.pdf-rank-badge.rank-S { background: linear-gradient(135deg, #2A2466, #6F66BE); }
.pdf-rank-badge.rank-A { background: linear-gradient(135deg, #3D348C, #7B73C4); }
.pdf-rank-badge.rank-B { background: linear-gradient(135deg, #4C42A0, #8A82CE); }
.pdf-rank-badge.rank-C { background: linear-gradient(135deg, #6F66BE, #9B92D2); }
.pdf-rank-badge.rank-D { background: linear-gradient(135deg, #8076C0, #C0B9E1); }
.pdf-rank-badge.rank-E { background: linear-gradient(135deg, #B0A8D8, #D8D2EC); }

.pdf-rank-meta { flex: 1; }
.pdf-rank-tag {
  font-size: 9pt;
  color: var(--fd-primary);
  letter-spacing: 0.12em;
  margin-bottom: 1mm;
}
.pdf-rank-label {
  font-size: 13pt;
  font-weight: 700;
  margin-bottom: 2mm;
}
.pdf-rank-score {
  font-family: var(--font-en);
  font-size: 24pt;
  font-weight: 700;
  color: var(--fd-text);
  line-height: 1;
}
.pdf-rank-score .of {
  font-size: 11pt;
  color: var(--fd-muted);
  margin-left: 1mm;
}
.pdf-rank-desc {
  font-size: 8.5pt;
  color: var(--fd-text);
  margin-top: 2mm;
  line-height: 1.55;
}

.pdf-radar-area {
  display: grid;
  place-items: center;
}
.pdf-radar-area svg {
  width: 70mm;
  height: 70mm;
}

/* セクションタイトル */
.pdf-section-title {
  font-size: 9.5pt;
  letter-spacing: 0.14em;
  color: var(--fd-primary);
  font-weight: 700;
  border-bottom: 1px solid var(--fd-line);
  padding-bottom: 1.5mm;
  margin: 4mm 0 4mm;
}

/* カテゴリバー（PDF版） */
.pdf-cat-bars {
  display: flex;
  flex-direction: column;
  gap: 2.5mm;
  margin-bottom: 6mm;
}
.pdf-cat-bar {
  display: grid;
  grid-template-columns: 38mm 1fr 22mm;
  gap: 3mm;
  align-items: center;
  font-size: 9pt;
}
.pdf-cat-bar .name { letter-spacing: 0.04em; }
.pdf-cat-bar .track {
  height: 3mm;
  background: var(--fd-bg-soft);
  border-radius: 1.5mm;
  overflow: hidden;
}
.pdf-cat-bar .fill {
  height: 100%;
  background: var(--fd-primary);
  border-radius: 1.5mm;
}
.pdf-cat-bar .fill.ok { background: var(--ok); }
.pdf-cat-bar .fill.warn { background: var(--warn); }
.pdf-cat-bar .fill.ng { background: var(--ng); }
.pdf-cat-bar .score {
  font-family: var(--font-en);
  font-size: 10pt;
  text-align: right;
  font-weight: 600;
}
.pdf-cat-bar .score .of {
  color: var(--fd-muted);
  font-size: 8pt;
  font-weight: 400;
}

/* 所見コメント */
.pdf-comments {
  display: flex;
  flex-direction: column;
  gap: 2.5mm;
}
.pdf-comment {
  border-left: 3px solid var(--fd-primary);
  padding: 2.5mm 3mm;
  background: var(--fd-bg-soft);
  font-size: 8.5pt;
  line-height: 1.6;
}
.pdf-comment.lv-ok { border-color: var(--ok); }
.pdf-comment.lv-warn { border-color: var(--warn); }
.pdf-comment.lv-ng { border-color: var(--ng); }
.pdf-comment .head {
  font-weight: 700;
  font-size: 9pt;
  margin-bottom: 1mm;
}

/* フッター */
.pdf-footer {
  margin-top: auto;
  padding-top: 4mm;
  border-top: 1px solid var(--fd-line);
  display: flex;
  justify-content: space-between;
  font-size: 7.5pt;
  color: var(--fd-muted);
  letter-spacing: 0.06em;
}

/* 2ページ目以降：回答内容 */
.pdf-answer-cat {
  margin-bottom: 6mm;
  page-break-inside: avoid;
}
.pdf-answer-cat-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--fd-primary);
  padding-bottom: 1.5mm;
  margin-bottom: 3mm;
}
.pdf-answer-cat-head .name {
  font-size: 11pt;
  font-weight: 700;
  color: var(--fd-primary);
  letter-spacing: 0.04em;
}
.pdf-answer-cat-head .score {
  font-family: var(--font-en);
  font-size: 11pt;
  font-weight: 600;
}
.pdf-answer-cat-head .score .of {
  font-size: 8pt;
  color: var(--fd-muted);
}

.pdf-qa {
  display: grid;
  grid-template-columns: 8mm 1fr;
  gap: 2mm;
  margin-bottom: 3mm;
  page-break-inside: avoid;
}
.pdf-qa-num {
  font-family: var(--font-en);
  font-size: 9pt;
  color: var(--fd-primary);
  font-weight: 600;
}
.pdf-qa-body { font-size: 8.5pt; }
.pdf-qa-q {
  color: var(--fd-text);
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 1mm;
}
.pdf-qa-a {
  background: var(--fd-bg-soft);
  border-left: 2px solid var(--fd-primary);
  padding: 1.2mm 2mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8.5pt;
}
.pdf-qa-a.unanswered { border-color: var(--ng); color: var(--fd-muted); }
.pdf-qa-a .ans-label { flex: 1; }
.pdf-qa-a .ans-pt {
  font-family: var(--font-en);
  font-weight: 700;
  color: var(--fd-primary);
  margin-left: 2mm;
}
.pdf-qa-a .ans-pt .pt-max {
  font-size: 7.5pt;
  color: var(--fd-muted);
  font-weight: 400;
}

/* レーダー（PDF用） */
.pdf-radar { width: 70mm; height: 70mm; }

/* ===== 印刷（ブラウザの印刷ダイアログ用フォールバック） ===== */
@media print {
  .site-header, .site-footer, .action-row { display: none !important; }
  .screen.hidden { display: none !important; }
  body { background: #fff; }
  .container { padding: 0 !important; }
  .rank-badge { box-shadow: none !important; }
}
