/* ==========================================================================
   Web Marketing AI診断（ミツカルAI診断）- Design System
   ミツカルAI（https://mitsukaruai.com/）のブランドトーンに合わせた配色・
   フォント・角丸設定。「--color-primary」等の変数名は既存コード（render.js
   等）との互換のためそのまま残し、値だけをミツカルAIのブランドカラーに
   合わせている。
   ========================================================================== */

:root {
  --color-bg: #FFF8E9;
  --color-surface: #ffffff;
  --color-surface-alt: #FFF1F4;
  --color-border: #F0DDE2;
  --color-text: #1B1820;
  --color-text-sub: #6B6670;
  --color-text-faint: #8b8590;

  /* ミツカルAIのブランドカラー：黒×オフホワイト基調 + ピンク系アクセント */
  --color-primary: #14121C;
  --color-primary-dark: #08070D;
  --color-primary-light: #FFF1F4;
  --color-accent: #FF3864;
  --color-accent-dark: #D91E49;

  --color-red: #E5484D;
  --color-red-bg: #FDECEC;
  --color-orange: #f5893a;
  --color-orange-bg: #fef2e6;
  --color-yellow: #FFB627;
  --color-yellow-bg: #FFF8E9;
  --color-green: #2FBF71;
  --color-green-bg: #e7f7f0;

  --shadow-sm: 0 1px 3px rgba(20, 18, 28, 0.06);
  --shadow-md: 0 6px 20px rgba(255, 56, 100, 0.10);
  --shadow-lg: 0 16px 48px rgba(255, 56, 100, 0.16);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --font-main: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Zen Maru Gothic', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* レスポンシブ対応：診断対象URLやAIが生成したブランド名など、スペースを
   含まない長い英数字文字列がカード幅を超えて右にはみ出すのを防ぐ。
   overflow-wrap / word-break は継承されるプロパティなので body に設定
   すれば全体に効く。日本語の通常の改行挙動には影響しない。 */
body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow-x: hidden;
}
img, svg, canvas, video { max-width: 100%; }
table { max-width: 100%; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 800; letter-spacing: -0.01em; font-family: var(--font-heading); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
.hidden { display: none !important; }
.sp-only { display: none; }
@media (max-width: 720px) { .sp-only { display: inline; } .pc-only { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; font-family: var(--font-heading); line-height: 1.3; }
.brand-text small.brand-sub-service { font-size: 10px; font-weight: 600; color: var(--color-text-faint); font-family: var(--font-main); }
.brand-mark {
  width: 36px; height: 36px;
  color: var(--color-text); display: flex; align-items: center; justify-content: center; font-size: 15px;
  flex-shrink: 0;
}
.brand-mark img { width: 32px; height: 32px; display: block; }
.brand-sub-service {
  display: block; font-size: 11px; font-weight: 600; color: var(--color-text-faint);
  letter-spacing: 0.02em; margin-top: 1px;
}
.brand-powered-by {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700;
  color: var(--color-text-faint); text-decoration: none;
}
.brand-powered-by:hover { color: var(--color-accent); }
.header-nav { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--color-text-sub); }
.nav-link:hover { color: var(--color-accent); }
.btn-header-cta {
  background: var(--color-accent); color: #fff; border: none;
  padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 700;
  transition: background .2s;
}
.btn-header-cta:hover { background: var(--color-accent-dark); }
/* 画面が狭くヘッダーが2行に折り返る場合、.header-nav単体が1つの
   flexアイテムとして左詰めになり、右側に大きな空白ができてしまう。
   2行目を独立した行として幅100%にし、内部でspace-betweenさせることで、
   1行目（ロゴ）と同じ左右の余白に揃える。 */
@media (max-width: 640px) {
  .nav-link { display: none; }
  .header-nav { width: 100%; justify-content: space-between; }
}

/* ---------- Screens ---------- */
.screen { display: none; }
.screen.active { display: block; animation: screenFadeIn .45s ease; }
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .screen.active { animation: none; } }

/* ---------- Hero / Input Screen ---------- */
#screen-input { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1400px; height: 700px; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255,56,100,0.10) 0%, rgba(255,182,39,0.07) 45%, transparent 75%);
}
.hero-wrap {
  position: relative; z-index: 1;
  max-width: 780px; margin: 0 auto; padding: 64px 24px 40px;
  text-align: center;
}
.hero-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--color-accent);
  text-transform: uppercase; margin-bottom: 16px;
}
.hero-title { font-size: 38px; line-height: 1.4; margin-bottom: 18px; color: var(--color-text); }
.hero-sub { font-size: 15.5px; color: var(--color-text-sub); margin-bottom: 40px; }
@media (max-width: 640px) { .hero-title { font-size: 27px; } .hero-wrap { padding: 40px 18px 30px; } }

.diagnose-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 36px 28px;
  text-align: left;
  border: 1px solid var(--color-border);
}
@media (max-width: 640px) { .diagnose-card { padding: 24px 18px 20px; } }

.field-label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 10px; }
.url-input-row {
  position: relative; display: flex; align-items: center;
  border: 2px solid var(--color-border); border-radius: var(--radius-md);
  transition: border-color .2s;
}
.url-input-row:focus-within { border-color: var(--color-accent); }
.input-icon { position: absolute; left: 16px; color: var(--color-text-faint); }
#url-input {
  width: 100%; border: none; outline: none; background: transparent;
  padding: 15px 16px 15px 44px; font-size: 15.5px; border-radius: var(--radius-md);
}

.toggle-optional {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; color: var(--color-accent);
  font-size: 13.5px; font-weight: 600; padding: 14px 2px 4px;
}
.toggle-arrow { margin-left: auto; transition: transform .2s; font-size: 11px; }
.toggle-optional.open .toggle-arrow { transform: rotate(180deg); }

.optional-fields { margin-top: 12px; padding-top: 16px; border-top: 1px dashed var(--color-border); }
.optional-note { font-size: 12.5px; color: var(--color-text-faint); margin-bottom: 14px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-grid { grid-template-columns: 1fr; } }
.field-item label { display: block; font-size: 12.5px; font-weight: 600; color: var(--color-text-sub); margin-bottom: 6px; }
.field-item input, .field-item select {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13.5px; outline: none; background: #fff;
}
.field-item input:focus, .field-item select:focus { border-color: var(--color-accent); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff; border: none; border-radius: 999px;
  font-weight: 700; box-shadow: 0 8px 20px rgba(255,56,100,0.3);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255,56,100,0.38); }
.btn-primary:active { transform: translateY(0); }
.btn-diagnose { width: 100%; padding: 17px; font-size: 16px; margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.privacy-note { text-align: center; font-size: 12px; color: var(--color-text-faint); margin-top: 14px; }

.history-panel { max-width: 780px; margin: 22px auto 0; text-align: left; }
.history-panel h3 { font-size: 14px; color: var(--color-text-sub); margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: box-shadow .15s;
}
.history-item:hover { box-shadow: var(--shadow-sm); }
.history-item .h-url { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.history-item .h-meta { font-size: 12px; color: var(--color-text-faint); display: flex; align-items: center; gap: 10px; }
.history-item .h-score { font-weight: 800; color: var(--color-accent); }

/* ---------- How it works / Why SEO・LLMO / FAQ ---------- */
.section-heading { text-align: center; font-size: 24px; margin-bottom: 36px; }
.how-it-works, .why-section, .terms-section { max-width: 1100px; margin: 90px auto; padding: 0 24px; }
.steps-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
.step-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 24px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-flex; width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary-light); color: var(--color-accent-dark);
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 12px;
}
.step-card h3 { font-size: 14.5px; margin-bottom: 6px; }
.step-card p { font-size: 12.5px; color: var(--color-text-sub); }

/* なぜSEO・LLMO対策が重要か（LLMO/AIO対策：AIが引用しやすいよう
   各カードを見出し+具体的な説明文を持つ独立した<article>にしている） */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }
.why-card {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 26px 22px; box-shadow: var(--shadow-sm);
}
.why-card h3 { font-size: 15.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--color-primary-dark); }
.why-card h3 i { color: var(--color-accent); }
.why-card p { font-size: 13.5px; color: var(--color-text-sub); line-height: 1.8; }

/* よくある質問（FAQPage構造化データと内容を一致させ、AI検索・生成AIが
   質問と回答をそのまま引用しやすい<details><summary>構造にする） */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 6px 22px;
}
.faq-item summary { cursor: pointer; padding: 16px 0; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { display: inline; font-size: 14.5px; font-weight: 700; }
.faq-item summary::before {
  content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  float: right; color: var(--color-accent); transition: transform .2s;
}
.faq-item[open] summary::before { transform: rotate(180deg); }
.faq-item p { font-size: 13px; color: var(--color-text-sub); padding-bottom: 18px; line-height: 1.8; }

/* パンくずリスト（BreadcrumbList構造化データと一致させる） */
.breadcrumb-nav { max-width: 1100px; margin: 0 auto; padding: 0 24px 20px; }
.breadcrumb-nav ol { display: flex; gap: 6px; font-size: 12px; color: var(--color-text-faint); flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.breadcrumb-nav li:not(:last-child)::after { content: '›'; margin-left: 6px; }
.breadcrumb-nav a { color: var(--color-text-sub); font-weight: 600; }
.breadcrumb-nav a:hover { color: var(--color-accent); }
.breadcrumb-nav li[aria-current="page"] { color: var(--color-text); font-weight: 700; }

.site-footer { text-align: center; padding: 20px 24px 60px; font-size: 12px; color: var(--color-text-faint); }
/* footer-brand-lineは画像+リンクを含む1つの文章。display:flexにすると
   テキストの各断片が個別のflexアイテムになり、単語単位でおかしな位置に
   改行されてしまうため、通常のインラインフロー（テキストの折り返し）に
   任せる。ロゴだけをテキストの高さに合わせてインライン表示する。 */
.footer-brand-line {
  font-size: 13px; color: var(--color-text-sub); margin-bottom: 8px; font-weight: 600;
  line-height: 1.7; max-width: 560px; margin-left: auto; margin-right: auto;
}
.footer-brand-line img { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.footer-brand-line a { color: var(--color-accent-dark); font-weight: 700; }
.footer-brand-line a:hover { text-decoration: underline; }

/* ---------- Progress Screen ----------
   9ステップを縦一列で並べると画面が不必要に縦長になりバランスが崩れるため、
   ステップ一覧は横幅を活かした2〜3列のグリッドで表示し、全体をコンパクトな
   カード状にまとめる。 */
/* #screen-progress はIDセレクタで display を指定すると、.screen{display:none} より
   詳細度が高くなり、.active が外れて非表示にしたつもりでも常時 display:flex の
   まま画面下部にレイアウトされ続けてしまう（＝前回診断の「100%・診断完了」表示が
   別ページ遷移後も残って見える不具合の原因）。そのため display は .active 時のみ
   指定し、非アクティブ時は .screen の display:none を確実に効かせる。 */
#screen-progress { min-height: 0; padding: 60px 20px; align-items: center; justify-content: center; position: relative; overflow: hidden; }
#screen-progress.active { display: flex; }

/* 診断中のクリエイティブな演出①：背景にブランドカラーの光の玉を
   ゆっくり浮遊させ、待ち時間の間も画面が「静止していない」印象にする。 */
.progress-bg-blob {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(1px);
  animation: blobFloat 11s ease-in-out infinite;
}
.progress-bg-blob.blob-1 { width: 240px; height: 240px; top: -80px; left: -70px; background: radial-gradient(circle, rgba(255,90,122,.20), transparent 70%); }
.progress-bg-blob.blob-2 {
  width: 280px; height: 280px; bottom: -100px; right: -80px;
  background: radial-gradient(circle, rgba(255,201,74,.22), transparent 70%);
  animation-delay: -5.5s; animation-duration: 13s;
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -16px) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) { .progress-bg-blob { animation: none; } }

.progress-wrap {
  position: relative; z-index: 1;
  max-width: 640px; width: 100%; margin: 0 auto; padding: 44px 40px; text-align: center;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) { .progress-wrap { padding: 32px 20px; } }

/* 診断中のクリエイティブな演出②：進捗リングの周りに、スキャン中を
   感じさせる回転する点線リングと、脈打つグロー（波紋）を重ねる。 */
.progress-ring { position: relative; width: 116px; height: 116px; margin: 0 auto 20px; }
.progress-ring::before {
  content: ''; position: absolute; inset: -14px; border-radius: 50%;
  border: 2px dashed var(--color-accent); opacity: .32;
  animation: ringSpin 6s linear infinite;
}
.progress-ring::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%;
  animation: ringPulseGlow 1.8s ease-out infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes ringPulseGlow {
  0%   { box-shadow: 0 0 0 0 rgba(255,56,100,.32); }
  70%  { box-shadow: 0 0 0 14px rgba(255,56,100,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,56,100,0); }
}
@media (prefers-reduced-motion: reduce) { .progress-ring::before, .progress-ring::after { animation: none; } }

.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--color-border); stroke-width: 8; }
.ring-fg {
  fill: none; stroke: url(#none); stroke: var(--color-accent); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset .4s ease;
}
.progress-percent {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--color-accent);
}
/* パーセント数値が更新された瞬間に、小さくポップさせて動きに気づかせる */
.progress-percent.pop { animation: percentPop .35s ease; }
@keyframes percentPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.progress-title {
  font-size: 18px; margin-bottom: 6px;
  transition: opacity .18s ease, transform .18s ease;
}
.progress-title.fade { opacity: 0; transform: translateY(4px); }

.progress-target { font-size: 13px; color: var(--color-text-faint); margin-bottom: 22px; word-break: break-all; }
.progress-steps {
  text-align: left; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 10px; margin-bottom: 20px;
}
@media (max-width: 640px) { .progress-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .progress-steps { grid-template-columns: 1fr; } }
.progress-steps li {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--color-text-faint);
  padding: 8px 10px; border-radius: var(--radius-sm); transition: all .25s; line-height: 1.3;
}
.progress-steps li.done { color: var(--color-text); background: var(--color-green-bg); }
.progress-steps li.active {
  color: var(--color-accent-dark); background: var(--color-primary-light); font-weight: 700;
  animation: stepPopIn .3s ease;
}
@keyframes stepPopIn {
  0%   { transform: scale(.94); }
  60%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.progress-steps li .step-icon { width: 16px; text-align: center; flex-shrink: 0; }
/* 現在進行中のステップのアイコンだけ、控えめに脈動させて
   「今まさに動いている」ことを視覚的に伝える。 */
.progress-steps li.active .step-icon i { display: inline-block; animation: iconPulse 1s ease-in-out infinite; }
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.28); }
}
@media (prefers-reduced-motion: reduce) {
  .progress-steps li.active, .progress-steps li.active .step-icon i { animation: none; }
  .progress-percent.pop { animation: none; }
}
.progress-hint { font-size: 12px; color: var(--color-text-faint); }
.progress-crawl-hint {
  font-size: 12.5px; color: var(--color-accent); font-weight: 600; margin-bottom: 12px; min-height: 18px;
  transition: opacity .18s ease, transform .18s ease;
}
.progress-crawl-hint.fade { opacity: 0; transform: translateY(3px); }

/* ---------- Report Screen ---------- */
.report-wrap { max-width: 1080px; margin: 0 auto; padding: 32px 20px 100px; }

/* レポート全体は縦に長いため、URL情報・操作ボタン・セクション間ジャンプ用の
   クイックナビを画面上部（ヘッダーの直下）に固定表示し、どこを読んでいても
   すぐに別セクションへ移動・PDF保存・再診断できるようにする。 */
.report-toolbar-sticky {
  /* ヘッダーは画面幅によって1行/2行に変わり高さが変動するため、固定px値
     ではなく実測値（js/app.jsがCSS変数--header-heightに設定）に追従させ、
     ヘッダーとツールバーが重なるのを防ぐ。未計測時の初期値として61pxを保持。 */
  position: sticky; top: var(--header-height, 61px); z-index: 150;
  background: var(--color-bg);
  padding-top: 10px; padding-bottom: 10px;
  box-shadow: 0 10px 14px -12px rgba(20,24,50,0.18);
  margin-bottom: 14px;
}
.report-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.report-url-info { font-size: 13px; color: var(--color-text-sub); }
.report-url-info strong { color: var(--color-text); }
.toolbar-actions { display: flex; gap: 10px; }
.btn-ghost {
  background: #fff; border: 1.5px solid var(--color-border); color: var(--color-text-sub);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* クイックナビ（セクション間ジャンプ） */
.report-quick-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.report-quick-nav::-webkit-scrollbar { height: 4px; }
.report-quick-nav::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.quick-nav-link {
  flex-shrink: 0; background: #fff; border: 1.5px solid var(--color-border);
  padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  color: var(--color-text-sub); white-space: nowrap; transition: all .15s;
}
.quick-nav-link:hover { border-color: var(--color-accent); color: var(--color-accent); }
.quick-nav-link.active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); box-shadow: 0 4px 10px rgba(255,56,100,0.3); }

.report-section {
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border); padding: 32px; margin-bottom: 24px;
  /* ヘッダー＋固定ツールバー（URL情報・操作ボタン・クイックナビ）の
     合計高さは、診断対象URLの長さやタグの有無で変動するため、固定px
     ではなく実測値（js/app.jsがCSS変数--sticky-offsetに設定）に追従
     させる。これによりジャンプ時にセクション上部（SECTION表記等）が
     固定要素の下に隠れて見えなくなる（カード上部が切れる）のを防ぐ。 */
  scroll-margin-top: var(--sticky-offset, 128px);
}
@media (max-width: 640px) { .report-section { padding: 20px 16px; scroll-margin-top: var(--sticky-offset, 116px); } }
.report-section-title { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; color: var(--color-accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.report-section-heading { font-size: 20px; margin-bottom: 20px; }

/* \u8a3a\u65ad\u5b8c\u4e86\u76f4\u5f8c\u306b\u30b9\u30b3\u30a2\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u30b8\u30e3\u30f3\u30d7\u3057\u305f\u969b\u3001\u300c\u3053\u3053\u306b\u7d50\u679c\u304c\u51fa\u305f\u300d\u3053\u3068\u304c\n   \u4e00\u77ac\u3067\u5206\u304b\u308b\u3088\u3046\u306b\u3001\u80cc\u666f\u3092\u4e00\u6642\u7684\u306b\u5f31\u304f\u767a\u5149\u3055\u305b\u308b\u3002 */
@keyframes reportSectionFlash {
  0% { box-shadow: 0 0 0 0 rgba(255,56,100,0); background-color: var(--color-primary-light); }
  40% { box-shadow: 0 0 0 6px rgba(255,56,100,0.14); background-color: var(--color-primary-light); }
  100% { box-shadow: var(--shadow-sm); background-color: var(--color-surface); }
}
.report-section.jump-highlight { animation: reportSectionFlash 1.6s ease-out; }

/* Section 01: Total score */
.total-score-block { text-align: center; padding: 10px 0 20px; }
.total-score-caption { font-size: 13px; color: var(--color-text-faint); margin-bottom: 8px; }
.total-score-num { font-size: 76px; font-weight: 800; line-height: 1; }
.total-score-num span { font-size: 30px; color: var(--color-text-faint); font-weight: 600; }
.score-disclaimer {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  background: var(--color-surface-alt); color: var(--color-text-faint);
  font-size: 11.5px; padding: 6px 14px; border-radius: 999px;
}
.total-summary-text { max-width: 680px; margin: 24px auto 0; text-align: center; font-size: 15px; color: var(--color-text); background: var(--color-primary-light); padding: 18px 24px; border-radius: var(--radius-md); }
.compare-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 700; padding: 8px 16px; border-radius: 999px; }
.compare-up { background: var(--color-green-bg); color: var(--color-green); }
.compare-down { background: var(--color-red-bg); color: var(--color-red); }
.compare-flat { background: var(--color-surface-alt); color: var(--color-text-sub); }

/* Section 02: category chart */
.category-charts-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 800px) { .category-charts-grid { grid-template-columns: 1fr; } }
.category-bars { display: flex; flex-direction: column; gap: 14px; }
.cat-bar-row { display: grid; grid-template-columns: 90px 1fr 42px; align-items: center; gap: 10px; }
.cat-bar-label { font-size: 12.5px; font-weight: 700; color: var(--color-text-sub); }
.cat-bar-track { height: 10px; background: var(--color-surface-alt); border-radius: 999px; overflow: hidden; }
.cat-bar-fill { height: 100%; border-radius: 999px; transition: width .8s ease; }
.cat-bar-score { font-size: 13px; font-weight: 800; text-align: right; }
.radar-chart-wrap { position: relative; height: 320px; }

/* Score band colors */
.band-good { background: var(--color-green); color: var(--color-green); }
.band-mid { background: var(--color-yellow); color: var(--color-yellow); }
.band-bad { background: var(--color-red); color: var(--color-red); }

/* Section 03: good points */
.good-points-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .good-points-list { grid-template-columns: 1fr; } }
.good-point-item {
  display: flex; gap: 12px; background: var(--color-green-bg); padding: 16px 18px; border-radius: var(--radius-md);
}
.good-point-item i { color: var(--color-green); margin-top: 2px; }
.good-point-item h5 { font-size: 13.5px; margin-bottom: 4px; }
.good-point-item p { font-size: 12.5px; color: var(--color-text-sub); }

/* Section 04: priority summary (counts only, no detail) */
.priority-tag { font-size: 11px; background: var(--color-surface-alt); color: var(--color-text-faint); padding: 3px 9px; border-radius: 999px; }
.priority-summary-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 640px) { .priority-summary-grid { grid-template-columns: 1fr; } }
.priority-summary-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px 18px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--color-surface-alt);
}
.priority-summary-num { font-size: 40px; font-weight: 800; line-height: 1; }
.priority-summary-label { font-size: 13px; font-weight: 700; color: var(--color-text-sub); }
.priority-summary-card.sev-critical { background: var(--color-red-bg); }
.priority-summary-card.sev-critical .priority-summary-num { color: var(--color-red); }
.priority-summary-card.sev-high { background: #FFF3E4; }
.priority-summary-card.sev-high .priority-summary-num { color: #E88A2E; }
.priority-summary-card.sev-mid { background: var(--color-surface-alt); }
.priority-summary-card.sev-mid .priority-summary-num { color: #91710a; }
.priority-summary-cta { text-align: center; margin-top: 8px; }

/* Section 05: tabs detail */
.detail-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 22px; padding-bottom: 4px; }
.detail-tab-btn {
  flex-shrink: 0; background: var(--color-surface-alt); border: none; padding: 9px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--color-text-sub); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: all .15s;
}
.detail-tab-btn:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.detail-tab-btn.active { background: var(--color-accent); color: #fff; }
.tab-score-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tab-score-num { font-weight: 800; opacity: 0.75; }
.detail-tab-btn.active .tab-score-num { opacity: 1; }
.detail-panel { display: none; }
.detail-panel.active { display: block; }
.detail-score-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--color-border); }
.detail-score-circle { width: 68px; height: 68px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex-shrink: 0; color: #fff; }
.detail-score-desc h4 { font-size: 15px; margin-bottom: 4px; }
.detail-score-desc p { font-size: 12.5px; color: var(--color-text-sub); }
/* 各項目（名前・バー・スコア・理由）の境目が分かりにくく、右のグラフが
   どの項目に対応するのか判別しづらいという指摘への対応：
   1項目＝1枚のカードとして枠線・背景で区切り、名前行とバー・スコアを
   同じ行（1段目）で明確に紐付け、理由文は2段目に少し字下げして配置する。 */
.breakdown-list {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px;
}
.breakdown-item {
  display: grid; grid-template-columns: 1fr 120px 44px; gap: 6px 12px; align-items: center;
  font-size: 12.5px; padding: 13px 14px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--color-surface-alt);
}
.breakdown-name { color: var(--color-text); font-weight: 700; font-size: 13px; }
.breakdown-track { height: 8px; background: #fff; border: 1px solid var(--color-border); border-radius: 999px; overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: 999px; }
.breakdown-score { text-align: right; font-weight: 800; }
.breakdown-reason {
  grid-column: 1 / -1; font-size: 12px; color: var(--color-text-sub); line-height: 1.6;
  padding: 8px 0 0; margin-top: 4px; border-top: 1px dashed var(--color-border);
}
.breakdown-reason::before { content: '\f05a'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--color-text-faint); margin-right: 6px; }
/* スマホ幅では「項目名」列が狭く折り返されてバー・スコアと詰まって見えるため、
   項目名を1段目、バー＋スコアを2段目に分けて縦積みにし、読みやすさを優先する。 */
@media (max-width: 480px) {
  .breakdown-item { grid-template-columns: 1fr 44px; row-gap: 8px; }
  .breakdown-name { grid-column: 1 / -1; }
  .breakdown-track { grid-column: 1 / 2; }
  .breakdown-score { grid-column: 2 / 3; }
}
.na-note { font-size: 12px; color: var(--color-text-faint); background: var(--color-surface-alt); padding: 10px 14px; border-radius: var(--radius-sm); margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; }

/* CTA */
.lead-cta-box {
  text-align: center; background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)); color: #fff;
  padding: 44px 30px; border-radius: var(--radius-lg); margin-top: 10px;
}
.lead-cta-box h3 { font-size: 22px; margin-bottom: 10px; }
.lead-cta-box p { font-size: 14px; opacity: 0.9; margin-bottom: 24px; }
.lead-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-cta-light { background: #fff; color: var(--color-accent-dark); border: none; padding: 14px 28px; border-radius: 999px; font-weight: 800; font-size: 14.5px; }
.btn-cta-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.5); padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 14.5px; }

.future-features-note { text-align: center; font-size: 12.5px; color: var(--color-text-faint); margin-top: 40px; padding: 20px; }

/* Loading skeleton for report actions */
.crawl-warning { background: var(--color-orange-bg); color: #8a4a12; font-size: 12.5px; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; display: flex; gap: 8px; align-items: flex-start; }
.external-data-note { background: var(--color-surface-alt); color: var(--color-text-faint); font-size: 12px; padding: 10px 14px; border-radius: var(--radius-sm); display: flex; gap: 8px; align-items: center; margin-top: 8px; }

/* Toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--color-text); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 999; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* PDF\u51fa\u529b\u4e2d\u306e\u4e00\u6642\u7684\u306a\u8868\u793a\u5236\u5fa1\uff08js/pdf.js\u304cbody\u306b.pdf-exporting\u3092\u4ed8\u4e0e\uff09\u3002
   \u30b3\u30d4\u30fc\u30dc\u30bf\u30f3\u30fb\u30ca\u30d3\u30fb\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u306a\u3069\u3001\u7d19\u9762\u3067\u306f\u610f\u5473\u3092\u6301\u305f\u306a\u3044\u64cd\u4f5c\u7528UI\u3092\u975e\u8868\u793a\u306b\u3057\u3001\n   \u4f4d\u7f6e\u56fa\u5b9a\uff08sticky\uff09\u3082\u89e3\u9664\u3057\u3066html2canvas\u306e\u30ad\u30e3\u30d7\u30c1\u30e3\u4f4d\u7f6e\u30ba\u30ec\u3092\u9632\u3050\u3002 */
.pdf-exporting .report-quick-nav,
.pdf-exporting .toolbar-actions,
.pdf-exporting .lead-cta-btns,
.pdf-exporting .back-to-top-btn,
.pdf-exporting .detail-tabs { display: none !important; }
.pdf-exporting .report-toolbar-sticky { position: static !important; box-shadow: none !important; }
.pdf-exporting .detail-panel { display: block !important; margin-bottom: 22px; }
.pdf-exporting .detail-panel:last-child { margin-bottom: 0; }

/* Back to top floating button（縦に長いページのどこからでもトップへ戻れる） */
.back-to-top-btn {
  position: fixed; bottom: 26px; right: 22px; z-index: 190;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--color-accent); color: #fff; border: none;
  box-shadow: var(--shadow-lg); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px) scale(0.9); pointer-events: none;
  transition: opacity .25s, transform .25s, background .15s;
}
.back-to-top-btn.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top-btn:hover { background: var(--color-accent-dark); }
@media (max-width: 640px) { .back-to-top-btn { bottom: 18px; right: 16px; width: 42px; height: 42px; font-size: 14px; } }
