@charset "UTF-8";
/* =========================================================
   大阪歯科総研 AI診断フォーム CSS v2
   ========================================================= */

:root {
  --brand:      #2b6c61;
  --brand-deep: #1d4f47;
  --brand-soft: #e8f4f0;
  --brand-ring: #a8c8c0;
  --warm-deep:  #b5651d;
  --warm-soft:  #fdf2e8;
  --surface:    #ffffff;
  --bg:         #f4f7f6;
  --ink:        #1a1a1a;
  --ink-soft:   #4a5568;
  --ink-faint:  #8a9ba8;
  --line-soft:  #e2e8f0;
  --r:          12px;
}

/* ── Research Flow（パンくず） ── */
.rf-crumb{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  font-family:'Roboto Mono',monospace;font-size:.68rem;letter-spacing:.02em;
  padding:16px clamp(20px,4vw,40px) 0;
}
.rf-crumb a{color:var(--ink-faint);text-decoration:none;}
.rf-crumb a:hover{color:var(--brand);text-decoration:underline;}
.rf-crumb .rf-sep{color:var(--line-soft);}
.rf-crumb .rf-current{color:var(--warm-deep);font-weight:700;}
.intro-screen .rf-crumb a,
.intro-screen .rf-crumb .rf-sep{color:rgba(255,255,255,.55);}
.intro-screen .rf-crumb .rf-current{color:#fff;}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════════
   イントロスクリーン
═══════════════════════════════════════════════════ */
.intro-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: linear-gradient(160deg, #1d4f47 0%, #2b6c61 60%, #3a8c7e 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.intro-screen::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -100px; right: -150px;
}
.intro-screen::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  bottom: -80px; left: -80px;
}
.intro-logo {
  font-size: .78rem;
  letter-spacing: .1em;
  color: rgba(255,255,255,.6);
  margin-bottom: 32px;
  font-weight: 600;
  position: relative; z-index: 1;
}
.intro-icon {
  width: 72px; height: 72px;
  background: rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  position: relative; z-index: 1;
}
.intro-icon svg { width: 36px; height: 36px; stroke: #fff; }
.intro-title {
  font-family: 'Shippori Mincho', 'Yu Mincho', serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: #fff;
  line-height: 1.4;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.intro-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  line-height: 1.8;
  max-width: 380px;
  margin: 0 auto 32px;
  position: relative; z-index: 1;
}
.intro-meta {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 36px;
  position: relative; z-index: 1;
}
.intro-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: rgba(255,255,255,.65);
}
.intro-meta-item svg { width: 14px; height: 14px; stroke: rgba(255,255,255,.65); }
.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 18px 42px;
  border-radius: 32px;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  position: relative; z-index: 1;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.btn-start svg { width: 18px; height: 18px; stroke: var(--brand); }
.intro-privacy {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  margin-top: 20px;
  position: relative; z-index: 1;
}

/* ═══════════════════════════════════════════════════
   プログレスヘッダー
═══════════════════════════════════════════════════ */
.shindan-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  padding: 16px 20px;
  position: sticky; top: 0; z-index: 100;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.progress-step-label {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-faint);
  white-space: nowrap;
  min-width: 60px;
}
.progress-track {
  flex: 1;
  height: 2px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}
.progress-pct {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  color: var(--ink-faint);
  min-width: 32px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   コンテナ
═══════════════════════════════════════════════════ */
.shindan-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 100px;
}
.shindan-container:has(.interview-shell) {
  max-width: 980px;
}

/* ═══════════════════════════════════════════════════
   Research Interview シェル（質問エリア＋研究パネルの2カラム）
═══════════════════════════════════════════════════ */
.interview-shell {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 64px;
  align-items: start;
}
.interview-main { min-width: 0; }

.interview-eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--brand);
  margin-bottom: 10px;
}
.interview-qnum {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
  margin-bottom: 22px;
}

/* ── 選択肢：静かな横長リスト ── */
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  background: #fbfcfb;
  border: none;
  border-bottom: 1px solid rgba(20,30,26,.07);
  padding: 14px 4px;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.cat-list .cat-row:first-child { border-top: 1px solid rgba(20,30,26,.07); }
.cat-row:hover { background: rgba(43,108,97,.04); }
.cat-row:hover .cat-icon,
.cat-row:hover .cat-name { color: var(--brand-deep); }
.cat-row:hover .cat-icon { stroke: var(--brand-deep); }
.cat-row .cat-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke: var(--ink-faint);
  fill: none;
  transition: stroke .15s;
}
.cat-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cat-en {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--ink-faint);
  opacity: .7;
  margin-bottom: 2px;
}
.cat-row .cat-name {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  transition: color .15s;
}
.cat-row .cat-sub {
  font-size: .78rem;
  color: var(--ink-faint);
}
.cat-arrow {
  display: inline-flex;
  align-items: center;
  font-size: .9rem;
  color: var(--ink-faint);
  opacity: .5;
  transition: opacity .15s, transform .15s, color .15s;
}
.cat-arrow::before {
  content: "詳しく確認する";
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: .72rem;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity .15s, max-width .2s;
}
.cat-row:hover .cat-arrow::before { opacity: 1; max-width: 120px; margin-right: 6px; }
.cat-row:hover .cat-arrow { color: var(--brand); }
.cat-row:hover .cat-arrow { opacity: 1; transform: translateX(2px); color: var(--brand); }

/* ── 研究パネル（右カラム） ── */
.research-panel {
  background: #fbfcfb;
  border: 1px solid rgba(20,30,26,.07);
  border-radius: 14px;
  padding: 24px 22px;
  position: sticky;
  top: 90px;
}
.rp-label {
  font-family: 'Roboto Mono', monospace;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--brand);
  margin-bottom: 18px;
}
.rp-stat {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.rp-stat-v {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.rp-stat-k {
  font-size: .72rem;
  color: var(--ink-faint);
  margin-top: 2px;
}
.rp-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(20,30,26,.07);
}
.rp-status {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(20,30,26,.07);
}
.rp-status-text {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  transition: color .2s;
}
.rp-status.updating .rp-status-text { color: var(--brand-deep); }
.rp-status-sub {
  font-size: .74rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.rp-block-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.rp-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rp-chip {
  font-size: .7rem;
  color: var(--ink-soft);
  background: rgba(20,30,26,.045);
  border-radius: 999px;
  padding: 4px 10px;
  transition: background .2s, color .2s;
}
.rp-chip.active {
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}
.rp-next-list {
  list-style: none;
  font-size: .82rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity .2s;
}
.rp-next-list li {
  padding-left: 14px;
  position: relative;
}
.rp-next-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
}

/* MATCHING FOCUS（静かなフェード＋バー） */
.rp-focus {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}
.rp-focus.show {
  opacity: 1;
  transform: translateY(0);
}
.rp-focus-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rp-focus-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rp-focus-label {
  font-size: .72rem;
  color: var(--ink-soft);
  min-width: 84px;
  flex-shrink: 0;
}
.rp-focus-track {
  flex: 1;
  height: 3px;
  background: rgba(20,30,26,.07);
  border-radius: 2px;
  overflow: hidden;
}
.rp-focus-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-ring), var(--brand-deep));
  transition: width .3s ease;
}

@media (max-width: 860px) {
  .interview-shell { grid-template-columns: 1fr; gap: 32px; }
  .research-panel { position: static; }
}

/* ═══════════════════════════════════════════════════
   ステップ（カード枠なし・静かな余白）
═══════════════════════════════════════════════════ */
.step-card {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 12px;
  display: none;
  animation: fadeUp .4s ease;
}
.step-card.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-label {
  font-family: 'Roboto Mono', monospace;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.step-title {
  font-family: 'Shippori Mincho', serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 12px;
}
.step-lead {
  font-size: .92rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
  line-height: 1.75;
}
.step-sub {
  font-size: .8rem;
  color: var(--ink-faint);
  margin-bottom: 36px;
}

/* ═══════════════════════════════════════════════════
   STEP1: AI研究員インタビュー（カテゴリ→詳細→確認）
═══════════════════════════════════════════════════ */
.s1-stage { display: none; margin-top: 36px; }
.s1-stage.active { display: block; animation: fadeUp .35s ease; }
#s1-stage-category.active,
#s1-stage-detail.active,
#s1-stage-confirm.active { margin-top: 0; }

.s1-back {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 24px;
  font-size: .85rem;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color .15s;
}
.s1-back:hover { color: var(--ink); }

.s1-note {
  font-size: .72rem;
  color: var(--ink-faint);
  opacity: .7;
  margin-top: 28px;
  text-align: center;
}

/* カテゴリカード */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cat-card {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: #fbfcfb;
  border: 1px solid rgba(20,30,26,.08);
  border-radius: 14px;
  padding: 22px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.cat-card--full { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; }
.cat-card--full .cat-name,
.cat-card--full .cat-sub { display: inline; }
.cat-card:hover {
  border-color: var(--brand-ring);
  background: rgba(43,108,97,.05);
  transform: translateY(-1px);
}
.cat-card:hover .cat-icon { stroke: var(--brand-deep); }
.cat-card:hover .cat-name { color: var(--brand-deep); }
.cat-icon {
  width: 26px; height: 26px;
  stroke: var(--ink-faint);
  fill: none;
  transition: stroke .15s;
}
.cat-name {
  display: block;
  font-size: .98rem;
  transition: color .15s;
  font-weight: 700;
  color: var(--ink);
}
.cat-sub {
  display: block;
  font-size: .76rem;
  color: var(--ink-faint);
}
@media(max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}

/* 詳細選択・確認画面：リスト行UI */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice-list[hidden] {
  display: none;   /* data-cat-list によるカテゴリ絞り込み（hidden属性）が効くようにする */
}
.choice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: .92rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.choice-row input[type="checkbox"] { display: none; }
.row-check {
  width: 18px; height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-soft);
  position: relative;
  transition: border-color .15s, background .15s;
}
.row-check::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
  opacity: 0;
  transition: opacity .1s;
}
.choice-row:hover { border-color: var(--ink-faint); }
.choice-row input:checked + .row-check,
.row-check.checked {
  background: var(--brand);
  border-color: var(--brand);
}
.choice-row input:checked + .row-check::after,
.row-check.checked::after { opacity: 1; }
.choice-row:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}
.choice-row--static {
  cursor: default;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
}

/* 確認画面 */
.confirm-block { margin-bottom: 28px; }
.confirm-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.confirm-cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: .9rem;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   選択肢グループ（カテゴリ見出し）
═══════════════════════════════════════════════════ */
.choice-group {
  margin-bottom: 32px;
}
.choice-group:last-child {
  margin-bottom: 0;
}
.choice-group-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 14px;
  letter-spacing: .02em;
}

/* ═══════════════════════════════════════════════════
   選択肢（軽いチップ / タグUI）
═══════════════════════════════════════════════════ */
.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.choice-grid.col1,
.choice-grid.col2 { display: flex; flex-wrap: wrap; }

.choice-item input[type="checkbox"],
.choice-item input[type="radio"] { display: none; }

.choice-item label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
  line-height: 1.3;
}
.choice-item label:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.choice-item label:active { transform: scale(.98); }
.choice-item input:checked + label {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

/* テキスト入力（その他） */
.other-input-wrap {
  margin-top: 10px;
  display: none;
}
.other-input-wrap.visible { display: block; }
.other-input {
  width: 100%;
  border: 1.5px solid var(--brand-ring);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: .84rem;
  color: var(--ink);
  background: var(--brand-soft);
  outline: none;
  transition: border-color .15s;
}
.other-input:focus { border-color: var(--brand); }
.other-input::placeholder { color: var(--ink-faint); }

/* ═══════════════════════════════════════════════════
   リアルタイム診断プロファイルバー
═══════════════════════════════════════════════════ */
.profile-panel {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 12px 14px;
  margin-top: 16px;
  display: none;
}
.profile-panel.visible { display: block; }
.profile-panel-title {
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: .05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.profile-panel-title svg {
  width: 12px; height: 12px;
  stroke: var(--brand); fill: none;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; } 50% { opacity: .4; }
}
.pbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.pbar-label {
  font-size: .72rem;
  color: var(--ink-soft);
  min-width: 80px;
}
.pbar-track {
  flex: 1;
  height: 5px;
  background: var(--line-soft);
  border-radius: 3px;
  overflow: hidden;
}
.pbar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.pbar-fill.tech    { background: var(--brand); }
.pbar-fill.pain    { background: #e07b54; }
.pbar-fill.esth    { background: #9b72cf; }
.pbar-fill.prev    { background: #4a9e92; }
.pbar-val {
  font-size: .68rem;
  color: var(--ink-faint);
  min-width: 24px;
  text-align: right;
}

/* ═══════════════════════════════════════════════════
   AI分析アニメーション
═══════════════════════════════════════════════════ */
.ai-overlay {
  position: fixed;
  inset: 0;
  background: rgba(29,79,71,.9);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.ai-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.ai-brain-icon {
  width: 56px; height: 56px;
  stroke: #fff; fill: none;
  stroke-width: 1.5;
  margin-bottom: 20px;
  animation: brainPulse 1s ease infinite alternate;
}
@keyframes brainPulse {
  from { transform: scale(1); opacity: .8; }
  to   { transform: scale(1.05); opacity: 1; }
}
.ai-text {
  font-size: .95rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 8px;
}
.ai-dots {
  display: flex; gap: 6px;
}
.ai-dot {
  width: 7px; height: 7px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  animation: dotBounce .8s ease infinite;
}
.ai-dot:nth-child(2) { animation-delay: .15s; }
.ai-dot:nth-child(3) { animation-delay: .3s; }
@keyframes dotBounce {
  0%,60%,100% { transform: translateY(0); opacity: .5; }
  30%          { transform: translateY(-8px); opacity: 1; }
}
.ai-insight {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin-top: 14px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════
   二択Q（価値観）
═══════════════════════════════════════════════════ */
.vs-group {
  margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}
.vs-q {
  background: var(--brand-soft);
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand-deep);
  padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.vs-options { display: flex; }
.vs-item { flex: 1; }
.vs-item input[type="radio"] { display: none; }
.vs-item:first-child label { border-right: 1px solid var(--line-soft); }
.vs-item label {
  display: block;
  text-align: center;
  padding: 12px 8px;
  font-size: .82rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, color .15s;
  line-height: 1.4;
}
.vs-item input:checked + label {
  background: var(--brand);
  color: #fff;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════
   ナビゲーション
═══════════════════════════════════════════════════ */
.step-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
}
.btn-prev {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 8px 4px;
  font-size: .85rem;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color .15s;
}
.btn-prev:hover { color: var(--ink); }
.btn-next, .btn-result {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 15px 24px;
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, transform .1s;
}
.btn-next:active, .btn-result:active { transform: scale(.98); }
.btn-next {
  background: var(--brand);
  color: #fff;
}
.btn-next:hover { background: var(--brand-deep); }
.btn-result {
  background: var(--warm-deep);
  color: #fff;
}
.btn-result:hover { background: #8b4a15; }
.btn-next svg, .btn-result svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
}
.limit-note {
  font-size: .71rem;
  color: var(--ink-faint);
  text-align: right;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════
   患者タイプ画面
═══════════════════════════════════════════════════ */
.type-screen {
  display: none;
  animation: fadeUp .35s ease;
}
.type-screen.active { display: block; }

.type-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  color: #fff;
  margin-bottom: 14px;
}
.type-complete-label {
  font-size: .72rem;
  letter-spacing: .1em;
  opacity: .7;
  margin-bottom: 12px;
}
.type-icon-wrap {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
}
.type-icon-wrap svg { width: 32px; height: 32px; stroke: #fff; fill: none; }
.type-name {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}
.type-desc {
  font-size: .84rem;
  opacity: .88;
  line-height: 1.7;
  max-width: 380px;
  margin: 0 auto;
}

.type-traits {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.type-traits h3 {
  font-size: .82rem;
  font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.type-traits h3 svg { width: 14px; height: 14px; stroke: var(--brand); fill: none; }
.trait-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .84rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 8px;
}
.trait-item::before {
  content: '✓';
  color: var(--brand);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.btn-to-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-to-result:hover { background: var(--brand-deep); }
.btn-to-result svg { width: 16px; height: 16px; stroke: #fff; fill: none; }

/* ═══════════════════════════════════════════════════
   結果画面
═══════════════════════════════════════════════════ */
.result-section { display: none; animation: fadeUp .35s ease; }
.result-section.active { display: block; }

.result-header {
  background: var(--surface);
  border-radius: var(--r) var(--r) 0 0;
  border: 1px solid var(--line-soft);
  border-bottom: none;
  padding: 18px 20px;
}
.result-header-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.result-header-top svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; }
.result-header h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.05rem;
  color: var(--brand-deep);
}
.result-header p { font-size: .78rem; color: var(--ink-faint); }

.result-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: none;
  padding: 20px;
}
.result-card:last-child { border-radius: 0 0 var(--r) var(--r); }

.result-rank-row {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px;
}
.rank-badge {
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-deep);
}
.rank-badge.r1 { background: #fff3cd; color: #856404; }
.rank-badge.rn { background: var(--warm-soft); color: var(--warm-deep); }
.result-name-wrap { flex: 1; min-width: 0; }
.result-clinic-name {
  font-size: .98rem; font-weight: 700;
  color: var(--brand-deep);
  text-decoration: none;
  display: block;
  line-height: 1.3;
}
.result-clinic-name:hover { text-decoration: underline; }
.result-address { font-size: .75rem; color: var(--ink-faint); margin-top: 2px; }

.match-wrap { margin: 10px 0 12px; }
.match-top {
  display: flex; justify-content: space-between;
  font-size: .73rem; color: var(--ink-soft);
  margin-bottom: 4px;
}
.match-pct { font-weight: 700; color: var(--brand-deep); font-size: .86rem; }
.match-track {
  height: 6px; background: var(--line-soft);
  border-radius: 3px; overflow: hidden;
}
.match-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #4a9e92);
  border-radius: 3px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
}

.reason-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.reason-chip {
  font-size: .71rem;
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-radius: 10px;
  padding: 3px 9px;
  font-weight: 600;
}
.reason-chip.notable { background: var(--warm-soft); color: var(--warm-deep); }

.result-articles {
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  margin-top: 10px;
}
.result-articles-lbl {
  font-size: .7rem; color: var(--ink-faint);
  font-weight: 700; margin-bottom: 5px;
}
.result-article-link {
  display: block; font-size: .78rem;
  color: var(--brand); text-decoration: none;
  padding: 3px 0; line-height: 1.4;
}
.result-article-link:hover { text-decoration: underline; }
.result-article-link::before { content: "📄 "; }

.result-btn {
  display: block; width: 100%; margin-top: 12px;
  background: var(--brand-soft);
  border: 1.5px solid var(--brand-ring);
  border-radius: 8px; padding: 10px;
  text-align: center; font-size: .84rem;
  font-weight: 700; color: var(--brand-deep);
  text-decoration: none; transition: background .15s;
}
.result-btn:hover { background: #d0e8e3; }

/* ローディング */
.loading-card {
  background: var(--surface);
  border-radius: var(--r);
  border: 1px solid var(--line-soft);
  padding: 48px 24px;
  text-align: center; display: none;
}
.loading-card.active { display: block; }
.loading-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: .86rem; color: var(--ink-soft); line-height: 1.6; }

/* 結果なし */
.no-result { background: var(--surface); border-radius: var(--r); padding: 36px 24px; text-align: center; display: none; }
.no-result.active { display: block; }
.no-result p { font-size: .88rem; color: var(--ink-soft); line-height: 1.7; }

/* やり直し */
.btn-retry {
  display: none; width: 100%; margin: 14px 0;
  background: none; border: 1.5px solid var(--brand);
  border-radius: 8px; padding: 12px;
  font-size: .86rem; font-weight: 700;
  color: var(--brand); cursor: pointer; text-align: center;
}
.btn-retry.visible { display: block; }
.btn-retry:hover { background: var(--brand-soft); }

/* なぜこの医院？ボタン＆パネル */
.why-btn {
  display: block; width: 100%;
  margin: 8px 0 4px;
  padding: 9px 14px;
  background: var(--bg);
  border: 1.5px solid var(--brand-soft);
  border-radius: 8px;
  color: var(--brand-deep);
  font-size: .82rem; font-weight: 600;
  cursor: pointer; text-align: left;
  transition: background .15s;
}
.why-btn:hover { background: var(--brand-soft); }

.why-panel {
  background: var(--bg);
  border: 1.5px solid var(--brand-soft);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 8px;
  font-size: .82rem;
  line-height: 1.7;
}
.why-section { margin-bottom: 12px; }
.why-section:last-child { margin-bottom: 0; }
.why-title {
  font-size: .75rem; font-weight: 700;
  color: var(--brand-deep);
  margin-bottom: 5px;
  letter-spacing: .03em;
}
.why-section ul {
  margin: 0; padding-left: 1.2em;
  color: var(--ink-mid);
}
.why-section ul li { margin-bottom: 3px; }
.why-summary {
  background: var(--brand-soft);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink-deep);
  font-size: .83rem;
  line-height: 1.75;
}
.why-fit-row {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 5px;
  margin-bottom: 6px;
}
.fit-label {
  font-size: .71rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  white-space: nowrap;
}
.fit-yes { background: #e6f4f0; color: var(--brand-deep); }
.fit-no  { background: #fdf0ec; color: #c0522e; }
.fit-tag {
  font-size: .75rem; padding: 2px 9px;
  background: #fff; border: 1px solid var(--brand-soft);
  border-radius: 20px; color: var(--ink-deep);
}
.fit-tag-no {
  background: #fff8f6; border-color: #f2c9bb; color: #c0522e;
}

/* ═══════════════════════════════════════════════════
   AI RESEARCH REPORT（Patient Match Analysis）
   ODR-DS 研究レポート・トーン。既存 .result-* を壊さず追加
═══════════════════════════════════════════════════ */
.odr-report-kicker{
  font-family:'Roboto Mono',monospace;font-weight:500;
  font-size:.66rem;letter-spacing:.22em;text-transform:uppercase;
  color:var(--warm-deep);margin-bottom:8px;
}
.odr-report-title{
  font-family:'Zen Kaku Gothic New',sans-serif;font-weight:900;
  font-size:1.2rem;color:var(--brand-deep);letter-spacing:.01em;
}
.odr-report-sub{
  font-family:'Zen Kaku Gothic New',sans-serif;font-size:.78rem;
  color:var(--ink-soft);margin-top:2px;
}
.odr-report-meta{
  display:flex;flex-wrap:wrap;gap:6px 16px;margin-top:12px;
  padding-top:12px;border-top:1px solid var(--line-soft);
}
.odr-report-meta-item{
  font-family:'Roboto Mono',monospace;font-size:.66rem;letter-spacing:.02em;
  color:var(--ink-faint);
}
.odr-report-meta-item b{color:var(--brand-deep);font-weight:600;}

/* Confidence / Evidence バッジ行 */
.odr-metrics-row{
  display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;
  margin:12px 0 14px;
}
.odr-metric{
  background:var(--brand-soft);border-radius:10px;
  padding:9px 6px;text-align:center;
}
.odr-metric-num{
  font-family:'Roboto Mono',monospace;font-weight:700;
  font-size:1.05rem;color:var(--brand-deep);line-height:1;
}
.odr-metric-label{
  font-family:'Roboto Mono',monospace;font-size:.6rem;letter-spacing:.06em;
  text-transform:uppercase;color:var(--ink-faint);margin-top:5px;
}
.odr-metric.evidence .odr-metric-num{font-size:.86rem;}
.odr-metric.evidence.strong{background:#e6f4f0;}
.odr-metric.evidence.medium{background:#fdf6e8;}
.odr-metric.evidence.limited{background:#f5f0ea;}

/* AI Decision Process */
.odr-decision{
  margin:4px 0 14px;padding:12px 14px;
  background:var(--bg);border:1px solid var(--line-soft);border-radius:10px;
}
.odr-decision-title{
  font-family:'Roboto Mono',monospace;font-size:.66rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--brand-deep);font-weight:600;margin-bottom:10px;
}
.odr-decision-row{
  display:flex;align-items:center;gap:8px;margin-bottom:7px;
}
.odr-decision-row:last-child{margin-bottom:0;}
.odr-decision-label{
  font-size:.72rem;color:var(--ink-soft);width:76px;flex-shrink:0;
}
.odr-decision-weight{
  font-family:'Roboto Mono',monospace;font-size:.6rem;color:var(--ink-faint);
  width:28px;flex-shrink:0;text-align:right;
}
.odr-decision-track{
  flex:1;height:5px;background:var(--line-soft);border-radius:3px;overflow:hidden;
}
.odr-decision-bar{
  height:100%;background:linear-gradient(90deg, var(--brand), #4a9e92);border-radius:3px;
}

/* なぜこの医院なのか（常時表示チェックリスト） */
.odr-why-checklist{
  margin:0 0 12px;padding:0;list-style:none;
}
.odr-why-checklist li{
  display:flex;gap:8px;align-items:flex-start;
  font-size:.83rem;color:var(--ink-deep);line-height:1.6;margin-bottom:6px;
}
.odr-why-checklist li::before{
  content:"✔";color:var(--brand);font-weight:700;flex-shrink:0;
}

/* 比較ノート（第一候補との違い） */
.odr-compare-note{
  display:flex;gap:8px;align-items:flex-start;
  background:var(--warm-soft);border-radius:8px;
  padding:9px 12px;margin-bottom:12px;
  font-size:.78rem;color:var(--warm-deep);line-height:1.6;
}
.odr-compare-note svg{width:14px;height:14px;stroke:var(--warm-deep);flex-shrink:0;margin-top:2px;}

/* カード末尾メタ（分析日時・ソース） */
.odr-card-meta{
  display:flex;flex-wrap:wrap;gap:4px 14px;
  margin-top:12px;padding-top:10px;border-top:1px dashed var(--line-soft);
  font-family:'Roboto Mono',monospace;font-size:.62rem;color:var(--ink-faint);
}

/* RELATED RESEARCH */
.odr-related{
  background:var(--surface);border:1px solid var(--line-soft);
  border-radius:var(--r);padding:20px;margin-top:16px;
}
.odr-related-kicker{
  font-family:'Roboto Mono',monospace;font-weight:500;
  font-size:.66rem;letter-spacing:.22em;text-transform:uppercase;
  color:var(--warm-deep);margin-bottom:10px;
}
.odr-related-list{list-style:none;margin:0;padding:0;}
.odr-related-list li{border-top:1px solid var(--line-soft);}
.odr-related-list li:first-child{border-top:none;}
.odr-related-link{
  display:flex;align-items:center;gap:8px;
  padding:11px 2px;font-size:.86rem;color:var(--brand-deep);
  text-decoration:none;font-weight:600;
}
.odr-related-link:hover{text-decoration:underline;}
.odr-related-link::before{content:"📄";flex-shrink:0;}

/* 注意書き */
.disclaimer {
  font-size: .71rem; color: var(--ink-faint);
  background: var(--bg); border-radius: 8px;
  padding: 12px 14px; margin-top: 10px; line-height: 1.7;
}
.disclaimer-toggle {
  margin-top: 20px;
}
.disclaimer-toggle summary {
  font-size: .74rem;
  color: var(--ink-faint);
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.disclaimer-toggle summary::before { content: "ⓘ "; }
.disclaimer-toggle summary::-webkit-details-marker { display: none; }
.disclaimer-toggle summary:hover { color: var(--ink-soft); }
