/* キャリア診断の画面（seeker/onboarding.html）2026-10-06
   設問 … 白地に黒い番号タイル＋太字　　回答 … グレーのトレイに、丸（ひとつ）／四角（複数）の印つきボタン
   いま答える設問だけを開き、答えた設問は1行にたたむ。モックは lp/_fvtop/diag2.css */
   設問 … 白地・黒い番号タイル・太字      回答 … グレーのトレイ・丸/四角の印つきボタン */
.dx { max-width: 780px; margin: 0 auto; }

/* 診断の種類 */
.dx-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--paper-deep); border-radius: 14px; margin-bottom: 14px; }
.dx-mode button { font-family: inherit; border: 0; background: none; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--ink-soft); text-align: center; }
.dx-mode button b { display: block; font-size: 14.5px; }
.dx-mode button small { display: block; font-size: 11.5px; margin-top: 2px; }
.dx-mode button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 10px -4px rgba(21,19,28,.3); }
.dx-mode button.on small { color: var(--brand-deep); font-weight: 700; }

/* 3ステップ */
.dx-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.dx-step { font-family: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 9px; cursor: pointer; color: var(--ink-soft); display: grid; gap: 3px; }
.dx-step small { font-family: 'Manrope', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--ink-faint); }
.dx-step b { font-size: 13px; line-height: 1.4; }
.dx-step em { font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; }
.dx-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 3px; }
.dx-bar i { display: block; height: 100%; background: var(--brand); border-radius: 2px; transition: width .4s; }
.dx-step.now { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.dx-step.now small { color: var(--brand-deep); }
.dx-step.done .dx-bar i { background: var(--forest); }

/* 用紙 */
.dx-sheet { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px 32px 0; box-shadow: 0 20px 40px -28px rgba(21,19,28,.25); }
.dx-head { padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.dx-kicker { font-family: 'Manrope', 'Noto Sans JP', sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--brand-deep); }
.dx-head h3, .dx-res h3 { font-size: 24px; font-weight: 900; margin: 6px 0 6px; letter-spacing: -.01em; }
.dx-head p, .dx-res > p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }

/* 設問 */
.dx-q { border-bottom: 1px solid var(--line); }
.dx-qhead { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 15px 0; background: none; border: 0; font: inherit; text-align: left; color: inherit; }
button.dx-qhead { cursor: pointer; }
button.dx-qhead:hover .dx-qtext { color: var(--ink); }
.dx-qno { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 800; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.dx-qtext { font-size: 14px; font-weight: 600; color: var(--ink-soft); line-height: 1.5; }
.dx-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dx-ans { font-size: 13.5px; font-weight: 800; color: var(--brand-deep); background: var(--brand-tint); border-radius: 8px; padding: 5px 10px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-edit { font-size: 12px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; }
.dx-todo { font-size: 12px; color: var(--ink-faint); border: 1px dashed var(--ink-faint); border-radius: 6px; padding: 3px 8px; }
.is-done .dx-qno { color: var(--forest); }
.is-done .dx-qno::after { content: ' ✓'; }

/* いま答える設問 */
.dx-q.is-open { padding: 14px 0 34px; }
.is-open .dx-qhead { padding: 16px 0 6px; align-items: start; }
.is-open .dx-qno { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--ink); color: #fff; font-size: 15px; }
.is-open .dx-qtext { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.45; padding-top: 8px; text-wrap: balance; }
.dx-hint { margin: 0 0 14px 60px; font-size: 12.5px; color: var(--ink-soft); }
.dx-tray { margin-left: 60px; background: var(--paper-deep); border-radius: 18px; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dx-tray.many { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dx-opt { display: flex; gap: 11px; align-items: center; min-height: 54px; padding: 12px 14px; background: #fff; border: 1.5px solid transparent; border-radius: 12px; box-shadow: 0 1px 2px rgba(21,19,28,.08); font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); text-align: left; line-height: 1.4; cursor: pointer; transition: border-color .15s, transform .1s; }
.dx-opt:hover { border-color: var(--ink-faint); }
.dx-opt:active { transform: scale(.98); }
.dx-mark { position: relative; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #C9C5CF; background: #fff; transition: all .15s; }
.multi .dx-mark { border-radius: 6px; }
.dx-opt.on { border-color: var(--brand); color: var(--brand-deep); font-weight: 800; }
.dx-opt.on .dx-mark { border-color: var(--brand); background: var(--brand); }
.dx-opt.on .dx-mark::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; }
.multi .dx-opt.on .dx-mark::after { width: 5px; height: 9px; margin: -6px 0 0 -2.5px; border-radius: 0; background: none; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.dx-tray-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 2px 0; }
.dx-skip { font-family: inherit; font-size: 12.5px; color: var(--ink-soft); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; }
.dx-ok { font-family: inherit; font-size: 14px; font-weight: 800; color: #fff; background: var(--ink); border: 0; border-radius: 10px; padding: 11px 20px; cursor: pointer; }
.dx-ok:disabled { opacity: .3; cursor: default; }

/* 下の帯（追従） */
.dx-foot { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 -32px; padding: 16px 32px calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; }
.dx-count { font-size: 12.5px; color: var(--ink-soft); }
.dx-count b { font-family: 'Manrope', sans-serif; font-size: 16px; color: var(--ink); margin-right: 2px; font-variant-numeric: tabular-nums; }
.dx-nav { display: flex; gap: 8px; align-items: center; }
.dx-back { font-family: inherit; font-size: 14px; font-weight: 700; color: var(--ink-soft); background: none; border: 0; padding: 12px 10px; cursor: pointer; }
.dx-next { font-family: inherit; font-size: 15px; font-weight: 800; color: #fff; background: var(--brand); border: 0; border-radius: 12px; padding: 14px 24px; cursor: pointer; box-shadow: 0 5px 0 var(--brand-deep); }
.dx-next:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brand-deep); }

.dx-early { display: block; width: 100%; margin-top: 14px; font-family: inherit; text-align: center; background: #fff; border: 1.5px solid var(--brand); color: var(--brand-deep); border-radius: 14px; padding: 13px 14px; cursor: pointer; }
.dx-early b { display: block; font-size: 14.5px; }
.dx-early small { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.dx-early:disabled { border-color: var(--line); color: var(--ink-faint); cursor: default; }
.dx-safe { text-align: center; font-size: 11.5px; color: var(--forest); margin-top: 12px; }

/* 結果 */
.dx-res { padding-bottom: 26px; }
.dx-cards { display: grid; gap: 10px; margin: 18px 0 8px; }
.dx-card { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.dx-card img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none; }
.dx-card b { font-size: 16px; }
.dx-card small { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.dx-note { font-size: 11px; color: var(--ink-faint); margin-bottom: 14px; }
.dx-res-nav { justify-content: space-between; }

@media (max-width: 640px) {
  .dx-mode button b { font-size: 13px; }
  .dx-steps { gap: 5px; }
  .dx-step { padding: 8px 8px 7px; }
  .dx-step b { font-size: 11px; }
  .dx-sheet { padding: 22px 18px 0; border-radius: 18px; }
  .dx-head h3 { font-size: 20px; }
  .dx-qhead { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .dx-side { grid-column: 2; }
  .dx-ans { max-width: 100%; }
  .is-open .dx-qno { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
  .is-open .dx-qtext { font-size: 17px; padding-top: 4px; }
  .dx-hint { margin-left: 0; }
  .dx-tray, .dx-tray.many { margin-left: 0; grid-template-columns: 1fr; }
  .dx-tray.many { grid-template-columns: 1fr 1fr; }
  .dx-opt { font-size: 14px; min-height: 50px; padding: 11px 12px; }
  .dx-foot { margin: 0 -18px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .dx-count { font-size: 11.5px; flex: 1 1 100%; }
  .dx-nav { flex: 1; justify-content: flex-end; }
  .dx-next { flex: 1; padding: 13px 14px; font-size: 14px; }
}

/* 本番の画面まわり */
.dx-page { padding: 26px 0 70px; }
.dx-title { text-align: center; margin-bottom: 18px; }
.dx-title h1 { font-size: 24px; font-weight: 900; }
.dx-title p { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.dx-skip { text-align: center; margin-top: 16px; font-size: 13px; }
.dx-skip a { color: var(--ink-soft); }
@media (max-width: 640px) { .dx-page { padding-top: 16px; } .dx-title h1 { font-size: 20px; } }

/* 前回の回答が残っているときの札（ふつうに開いたときは空で始め、ここから1回で読み込める） */
.dx-prev { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #fff; border: 1.5px dashed var(--ink-faint); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.dx-prev b { display: block; font-size: 14px; }
.dx-prev span { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.dx-prev-btn { font-family: inherit; font-size: 13.5px; font-weight: 800; color: var(--ink); background: var(--paper-deep); border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.dx-prev-btn:hover { background: var(--line); }
@media (max-width: 640px) { .dx-prev-btn { width: 100%; } }
