:root {
  --bg: #FAF6EE;
  --navy: #2B3A55;
  --coral: #E8927C;
  --coral-soft: #F6D7CC;
  --sage: #7FA98F;
  --sage-soft: #D8E3DC;
  --mustard: #F2C94C;
  --mustard-soft: #F4E6C3;
  --white: #FFFFFF;
  --line: #E8E0D0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--navy);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-weight: 500;
  line-height: 1.9;
  font-size: 16px;
}
#app { max-width: 720px; margin: 0 auto; padding: 24px 18px 80px; }
h1, h2, h3, h4 { font-weight: 900; line-height: 1.5; }
a { color: var(--coral); font-weight: 700; }
strong { font-weight: 700; }

/* ---------- スタート ---------- */
.hero { text-align: center; padding: 40px 8px 28px; }
.hero-eyebrow {
  display: inline-block; background: var(--mustard-soft); color: var(--navy);
  border-radius: 999px; padding: 4px 18px; font-size: 13px; font-weight: 700;
}
.hero h1 { font-size: 44px; margin: 14px 0 4px; letter-spacing: 2px; }
.hero-catch { font-size: 20px; font-weight: 700; color: var(--coral); margin-bottom: 18px; }
.hero-lead { text-align: left; font-size: 15px; margin: 0 auto 26px; max-width: 560px; }
.btn-primary {
  display: inline-block; background: var(--coral); color: #fff; border: none; cursor: pointer;
  font-family: inherit; font-weight: 900; font-size: 18px; letter-spacing: 1px;
  padding: 16px 52px; border-radius: 999px; box-shadow: 0 4px 0 #d17a63;
  transition: transform .1s;
}
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #d17a63; }
.btn-primary:disabled { background: #cfc7b8; box-shadow: none; cursor: not-allowed; }
.privacy-note { font-size: 12px; color: #8a8272; margin-top: 14px; }

.type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 24px 0 40px;
}
.type-chip {
  display: block; background: var(--white); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 10px 12px; font-size: 12.5px; text-align: center;
  text-decoration: none; color: var(--navy); transition: border-color .12s, transform .12s;
}
.type-chip:hover { border-color: var(--coral); transform: translateY(-2px); }
.type-chip b { display: block; font-size: 13.5px; color: var(--navy); }
.type-chip span { color: #8a8272; font-size: 11px; }

/* セクション見出し（トップの一覧・FAQ） */
.sec-title {
  font-size: 22px; text-align: center; margin: 34px 0 6px;
  padding-bottom: 10px; border-bottom: 3px solid var(--mustard);
}
.sec-lead { font-size: 13.5px; text-align: center; color: #7a6f5e; margin-bottom: 16px; }

/* よくあるご質問 */
.faq-block { margin: 34px 0 40px; }
.faq-item {
  background: var(--white); border: 1.5px solid var(--line); border-radius: 16px;
  padding: 16px 18px; margin-bottom: 10px;
}
.faq-item h3 { font-size: 15.5px; margin-bottom: 6px; }
.faq-item h3::before { content: "Q. "; color: var(--coral); }
.faq-item p { font-size: 14px; margin: 0; }

.site-footer { border-top: 1.5px solid var(--line); padding-top: 20px; font-size: 13.5px; text-align: center; }
.footer-links a { margin: 0 10px; }

/* ---------- 質問 ---------- */
.quiz-header { position: sticky; top: 0; background: var(--bg); padding: 12px 0 8px; z-index: 5; }
.progress-wrap { background: #EDE6D6; border-radius: 999px; height: 12px; overflow: hidden; }
.progress-bar { background: var(--sage); height: 100%; width: 0%; border-radius: 999px; transition: width .25s; }
.progress-text { font-size: 12.5px; text-align: right; color: #8a8272; margin-top: 4px; }

.q-card {
  background: var(--white); border-radius: 20px; padding: 22px 20px 18px;
  margin: 14px 0; border: 1.5px solid var(--line);
}
.q-card.answered { border-color: var(--sage-soft); }
.q-no { font-size: 12px; color: var(--coral); font-weight: 700; }
.q-text { font-size: 15.5px; font-weight: 700; margin: 4px 0 16px; }
.q-scale { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.q-opt { flex: 1; text-align: center; cursor: pointer; }
.q-opt input { display: none; }
.q-dot {
  display: inline-block; border-radius: 50%; border: 2.5px solid var(--sage);
  background: var(--white); transition: all .12s;
}
.q-opt:nth-child(1) .q-dot { width: 34px; height: 34px; border-color: var(--sage); }
.q-opt:nth-child(2) .q-dot { width: 27px; height: 27px; border-color: var(--sage); }
.q-opt:nth-child(3) .q-dot { width: 21px; height: 21px; border-color: #b9b1a0; }
.q-opt:nth-child(4) .q-dot { width: 27px; height: 27px; border-color: var(--coral); }
.q-opt:nth-child(5) .q-dot { width: 34px; height: 34px; border-color: var(--coral); }
.q-opt input:checked + .q-dot { background: currentColor; }
.q-opt:nth-child(-n+2) input:checked + .q-dot { background: var(--sage); }
.q-opt:nth-child(3) input:checked + .q-dot { background: #b9b1a0; }
.q-opt:nth-child(n+4) input:checked + .q-dot { background: var(--coral); }
.q-scale-labels { display: flex; justify-content: space-between; font-size: 11px; color: #8a8272; margin-top: 6px; }
.quiz-footer { text-align: center; padding: 24px 0; }
.quiz-hint { font-size: 12.5px; color: #8a8272; margin-top: 10px; }

/* ---------- 結果 ---------- */
.r-hero {
  text-align: center; background: var(--white); border-radius: 24px;
  padding: 34px 22px 26px; border: 1.5px solid var(--line); margin-bottom: 18px;
}
.r-eyebrow { font-size: 13px; color: #8a8272; }
.r-code { font-size: 14px; letter-spacing: 4px; color: var(--coral); font-weight: 700; }
.r-name { font-size: 34px; margin: 2px 0; }
.r-catch { font-size: 16px; font-weight: 700; color: var(--sage); }
.r-type-img {
  display: block; width: 100%; height: auto; max-width: 520px; margin: 18px auto 0;
  border-radius: 16px; border: 1.5px solid var(--line);
}
.r-section {
  background: var(--white); border-radius: 24px; padding: 26px 22px;
  border: 1.5px solid var(--line); margin-bottom: 18px;
}
.r-section h2 {
  font-size: 19px; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 3px solid var(--mustard);
}
.r-section h4 { font-size: 15.5px; margin: 18px 0 6px; color: var(--navy); }
.r-section p { margin-bottom: 10px; font-size: 14.5px; }
.r-section ul, .r-section ol { padding-left: 22px; margin-bottom: 10px; font-size: 14.5px; }
.r-section li { margin-bottom: 8px; }

/* 4軸バー */
.axis-row { margin-bottom: 14px; }
.axis-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.axis-labels .lose { color: #b9b1a0; font-weight: 500; }
.axis-track { background: #EDE6D6; height: 14px; border-radius: 999px; overflow: hidden; display: flex; }
.axis-fill-l, .axis-fill-r { height: 100%; }
.axis-pct { font-size: 12px; color: #8a8272; text-align: center; }

/* レーダー */
.radar-wrap { text-align: center; margin-bottom: 8px; }
.radar-wrap svg { max-width: 340px; width: 100%; height: auto; }

/* フェーズ表 */
.phase-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 8px; }
.phase-table th { background: var(--navy); color: #fff; padding: 8px 6px; font-size: 12.5px; }
.phase-table td { border-bottom: 1.5px solid var(--line); padding: 9px 6px; }
.phase-table td.mark { text-align: center; font-weight: 900; font-size: 15px; white-space: nowrap; }
.mark-best { color: var(--coral); }
.mark-good { color: var(--sage); }
.mark-weak { color: #b9b1a0; }

/* CTAカード */
.cta-card {
  background: var(--coral-soft); border-radius: 20px; padding: 20px 22px;
  text-align: center; margin: 18px 0;
}
.cta-card p { font-size: 14px; margin-bottom: 12px; }
.cta-card .cta-note { font-size: 12px; color: #7a6f5e; margin: 10px 0 0; line-height: 1.7; }
.cta-pdf { background: var(--mustard-soft); }
.btn-share {
  display: inline-block; background: var(--navy); color: #fff; text-decoration: none;
  font-weight: 900; padding: 13px 30px; border-radius: 999px; font-size: 15px;
}
.btn-pdf {
  background: var(--navy); color: #fff; border: none; cursor: pointer; font-family: inherit;
  font-weight: 900; padding: 13px 30px; border-radius: 999px; font-size: 15px;
}
.btn-pdf:active { transform: translateY(2px); }
.btn-pdf:disabled { background: #cfc7b8; cursor: not-allowed; }
.btn-share-img {
  border: none; cursor: pointer; font-family: inherit; margin-left: 8px;
  background: var(--coral); box-shadow: 0 3px 0 #d17a63;
}
.btn-share-img:active { transform: translateY(2px); box-shadow: 0 1px 0 #d17a63; }
.btn-share-img:disabled { background: #cfc7b8; box-shadow: none; cursor: wait; }

/* 任意アンケート（年齢・性別） */
.cta-survey { background: var(--sage-soft); text-align: left; }
.survey-title { font-size: 15px; font-weight: 900; margin-bottom: 6px; }
.survey-lead { font-size: 12.5px; color: #5E7A68; line-height: 1.8; margin-bottom: 14px; }
.survey-group { margin-bottom: 12px; }
.survey-label { font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.survey-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-opt { cursor: pointer; }
.survey-opt input { display: none; }
.survey-opt span {
  display: inline-block; background: var(--white); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; transition: all .12s;
}
.survey-opt input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.cta-survey .btn-pdf { display: block; margin: 4px auto 0; }
.cta-survey .cta-note { text-align: center; }
.btn-sub {
  display: inline-block; background: var(--white); color: var(--navy); text-decoration: none;
  font-weight: 700; padding: 12px 26px; border-radius: 999px; font-size: 14px;
  border: 2px solid var(--navy); margin: 4px;
}
.r-author {
  background: var(--sage-soft); border-radius: 20px; padding: 20px 22px; font-size: 13.5px;
}
.r-author b { font-size: 15px; }
.retry-link { text-align: center; margin: 22px 0; font-size: 14px; }

/* ---------- 質問ページ送り ---------- */
.quiz-nav { display: flex; justify-content: center; gap: 14px; align-items: center; }
.btn-ghost {
  background: var(--white); color: var(--navy); border: 2px solid var(--navy);
  font-family: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  padding: 12px 26px; border-radius: 999px;
}
.btn-ghost:disabled { border-color: #cfc7b8; color: #cfc7b8; cursor: not-allowed; }

/* ---------- 結果タブ ---------- */
.tab-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 10px;
  position: sticky; top: 0; background: var(--bg); z-index: 6;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.tab-pill {
  flex: 0 0 auto; background: var(--white); border: 1.5px solid var(--line);
  color: var(--navy); font-family: inherit; font-weight: 700; font-size: 13px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.tab-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.panel-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 22px; padding-top: 16px; border-top: 1.5px solid var(--line);
}
.panel-pos { font-size: 13px; color: #8a8272; font-weight: 700; }
.panel-sub { font-size: 16px; margin-bottom: 10px; }

/* ---------- 作成者カード ---------- */
.author-card {
  background: var(--sage-soft); border-radius: 20px; padding: 22px; margin-top: 18px;
}
.author-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.author-avatar { width: 64px; height: 64px; flex: 0 0 auto; }
.author-avatar svg { width: 100%; height: 100%; border-radius: 16px; }
.author-name { font-size: 19px; font-weight: 900; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.author-site {
  font-size: 12px; font-weight: 700; color: var(--navy); text-decoration: none;
  background: var(--white); border: 1.5px solid var(--navy); border-radius: 999px;
  padding: 2px 12px; line-height: 1.7; white-space: nowrap;
}
.author-site:hover { background: var(--navy); color: #fff; }
.author-tag { font-size: 12px; color: #5E8570; font-weight: 700; line-height: 1.5; }
.author-bio { font-size: 13.5px; margin-bottom: 14px; }
.link-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.link-card {
  display: block; background: var(--white); border-radius: 16px; padding: 16px;
  text-decoration: none; color: var(--navy); border: 1.5px solid var(--line);
}
.link-card-label { font-weight: 900; font-size: 14.5px; color: var(--navy); margin-bottom: 6px; }
.link-card-desc { font-size: 12.5px; font-weight: 500; line-height: 1.7; margin-bottom: 10px; }
.link-card-btn {
  display: inline-block; background: var(--coral); color: #fff;
  font-weight: 700; font-size: 13px; padding: 7px 16px; border-radius: 999px;
}
@media (max-width: 540px) { .link-cards { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
  .hero h1 { font-size: 34px; }
  .r-name { font-size: 26px; }
  #app { padding: 16px 12px 60px; }
}

/* ==========================================================================
   PDFレポート出力（画面では非表示・印刷時のみ表示）
   ブラウザの「印刷 → PDFに保存」でA4縦・章立てのレポートとして出力される
   ========================================================================== */
#print-doc { display: none; }

@media print {
  @page { size: A4 portrait; margin: 15mm 14mm 16mm; }

  html, body { background: #fff !important; font-size: 10.5pt; line-height: 1.75; }
  #app { display: none !important; }
  #print-doc { display: block !important; }

  /* 面の色（帯・バー・マーク）を印刷でも保持する */
  #print-doc, #print-doc * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* --- 表紙 --- */
  .print-cover { text-align: center; page-break-after: always; break-after: page; padding-top: 6mm; }
  .print-eyebrow {
    display: inline-block; border: 1.2pt solid var(--navy); border-radius: 999px;
    padding: 2pt 14pt; font-size: 9pt; font-weight: 700; letter-spacing: 1pt;
  }
  .print-cover-img { display: block; width: 100%; max-width: 150mm; margin: 8mm auto 7mm; border-radius: 4mm; }
  .print-code { font-size: 11pt; letter-spacing: 3pt; color: #6F6757; font-weight: 700; }
  .print-name { font-size: 26pt; font-weight: 900; margin: 1mm 0 2mm; }
  .print-catch { font-size: 12pt; font-weight: 700; color: var(--sage); }
  .print-date { font-size: 9.5pt; color: #6F6757; margin-top: 4mm; }
  .print-toc {
    text-align: left; max-width: 118mm; margin: 9mm auto 0;
    border: 1pt solid var(--line); border-radius: 4mm; padding: 6mm 8mm;
  }
  .print-toc-title { font-weight: 900; font-size: 10.5pt; margin-bottom: 2mm; }
  .print-toc ul { list-style: none; columns: 2; column-gap: 8mm; }
  .print-toc li { font-size: 9.5pt; line-height: 1.95; }
  .print-brand { font-size: 9pt; color: #6F6757; margin-top: 8mm; }

  /* --- 各章 --- */
  .print-ch { page-break-before: auto; margin-bottom: 7mm; }
  .print-ch h2 {
    font-size: 14pt; font-weight: 900; border-bottom: 2.4pt solid var(--mustard);
    padding-bottom: 1.5mm; margin-bottom: 4mm;
    page-break-after: avoid; break-after: avoid;
  }
  .print-ch h3, .print-ch .panel-sub { font-size: 11.5pt; margin: 4mm 0 1.5mm; page-break-after: avoid; }
  .print-ch p { margin-bottom: 2.5mm; }
  .print-ch ul, .print-ch ol { margin: 0 0 3mm 5mm; }
  .print-ch li { margin-bottom: 1mm; }
  .print-ch-body > *:first-child { margin-top: 0; }

  /* 途中で切れると読めなくなる要素は分割を禁止 */
  .print-ch table, .print-ch tr, .radar-wrap, .axis-row, .cta-card { page-break-inside: avoid; break-inside: avoid; }
  .print-ch table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin: 2mm 0 3mm; }
  .print-ch th, .print-ch td { border: 0.8pt solid var(--line); padding: 1.6mm 2.4mm; text-align: left; }
  .print-ch th { background: var(--sage-soft); font-weight: 700; }

  .radar-wrap { text-align: center; }
  .radar-wrap svg { width: 88mm; height: auto; }
  .axis-row { margin-bottom: 3mm; }
  .axis-track { height: 3.5mm; border-radius: 999px; overflow: hidden; display: flex; }

  /* 画面用の装飾・操作要素は出力しない */
  .print-ch .cta-card, .print-ch .author-card, .print-ch .retry-link { display: none; }

  .print-foot {
    font-size: 8.5pt; color: #6F6757; border-top: 0.8pt solid var(--line);
    padding-top: 3mm; margin-top: 6mm;
  }
  a { color: var(--navy) !important; text-decoration: underline; }
}
