/* =========================================================================
   医療職の転職タイプ診断 — style.css
   ブランド：MOYORI 医療職キャリア相談室（医療ブルー系）
   既存 index.html / shindan.html のカラートークンを踏襲
   ========================================================================= */

/* ---- リセット ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- カラートークン・共通変数 ---- */
:root {
  --primary:      #0B5563;  /* メイン（深いティール） */
  --primary-dark: #083E4A;  /* 濃色 */
  --primary-light:#17A2B3;  /* 明色（アクセント文字） */
  --accent:       #5EE0EA;  /* 差し色（進捗・ハイライト） */
  --cta:          #F0862E;  /* CTAオレンジ */
  --cta-dark:     #D96F1B;
  --ink:          #1B2A32;  /* 本文 */
  --muted:        #5B6B73;  /* 補足テキスト */
  --line:         #E3ECEF;  /* 罫線 */
  --bg:           #F7FAFB;  /* 背景 */
  --card:         #ffffff;
  --radius:       20px;
  --shadow:       0 16px 50px rgba(11,85,99,.14);
}

/* ---- ベース ---- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', -apple-system, "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }

/* コンテンツ幅 */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* =========================================================================
   ヘッダー / フッター
   ========================================================================= */
header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hbar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 900; font-size: 18px; color: var(--primary); line-height: 1.2; }
.logo small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; letter-spacing: .1em; }
.hbar a.back { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 700; }

footer { background: #062E37; color: #9FC5CC; padding: 26px 0; font-size: 13px; margin-top: 50px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
footer a { color: #9FC5CC; text-decoration: none; }
footer a:hover { color: #fff; }

/* =========================================================================
   ボタン共通
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--cta), var(--cta-dark));
  color: #fff; font-weight: 700; border: none; border-radius: 999px;
  padding: 16px 30px; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .25s, box-shadow .25s;
  box-shadow: 0 8px 22px rgba(240,134,46,.36);
  min-height: 52px; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(240,134,46,.44); }
.btn:active { transform: translateY(0); }
.btn.block { display: flex; width: 100%; }
/* サブボタン（枠線タイプ・威圧感を出さない） */
.btn.sub {
  background: #fff; color: var(--primary); border: 2px solid var(--primary);
  box-shadow: none;
}
.btn.sub:hover { background: var(--primary); color: #fff; }

/* =========================================================================
   画面切り替え（フェード＋スライド）
   .screen は既定で非表示。.active が付いた画面だけ表示する
   ========================================================================= */
main { padding: 26px 0 10px; }
.screen { display: none; }
.screen.active { display: block; animation: fadeSlide .4s ease; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   スタート画面
   ========================================================================= */
.hero {
  background:
    radial-gradient(600px 380px at 90% 0%, rgba(94,224,234,.20), transparent 62%),
    linear-gradient(160deg, #E9F5F4 0%, #F4FAF9 60%, #FBFDFE 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 42px 26px 36px;
  text-align: center;
}
.hero .tagpill {
  display: inline-flex; gap: 8px; align-items: center;
  background: #fff; border: 1.5px solid var(--primary-light);
  border-radius: 999px; padding: 7px 18px; font-size: 12.5px; font-weight: 800;
  color: var(--primary); margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(11,85,99,.06);
}
.hero h1 {
  font-size: clamp(24px, 6vw, 34px); line-height: 1.45; font-weight: 900;
  color: var(--primary);
}
.hero .lead { color: var(--muted); margin-top: 14px; font-size: 14.5px; }
.hero .meta {
  display: inline-flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin: 22px 0 24px;
}
.hero .meta span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 12px; color: var(--primary); font-weight: 700;
}

/* =========================================================================
   質問画面
   ========================================================================= */
.quiz-card {
  background: #fff; border-radius: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden;
}
.quiz-head {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; padding: 18px 24px;
}
.quiz-head .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-head .count { font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.quiz-head .count b { font-size: 18px; }
.quiz-head .hint { font-size: 12px; color: #BFE3E8; font-weight: 500; }
/* プログレスバー */
.progress { margin-top: 12px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px;
  background: var(--accent); transition: width .35s ease; }

.qbody { padding: 26px 24px 28px; }
.qtitle { font-weight: 700; font-size: 18px; line-height: 1.6; margin-bottom: 18px; }

/* 選択肢：タッチエリア 44px 以上を確保 */
.opts { display: grid; gap: 11px; }
.opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: #fff; cursor: pointer; font-size: 14.5px; line-height: 1.5;
  text-align: left; width: 100%; font-family: inherit; color: var(--ink);
  transition: border-color .15s, background .15s, transform .1s;
}
.opt:hover { border-color: var(--primary-light); background: #F2FBFC; }
.opt:active { transform: scale(.99); }
/* 選択された瞬間のハイライト（遷移前に一瞬見せる） */
.opt.selected {
  border-color: var(--primary); background: #E9F6F8; font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--primary);
}
.opt .mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line); position: relative; transition: .15s;
}
.opt.selected .mark { border-color: var(--primary); background: var(--primary); }
.opt.selected .mark::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%; background: #fff;
}

/* 戻るボタン */
.qnav { padding: 0 24px 22px; }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  padding: 8px 4px; min-height: 44px;
}
.btn-back:hover { color: var(--primary); }
.btn-back:disabled { opacity: .35; cursor: default; }

/* =========================================================================
   結果画面
   ========================================================================= */
.result-card {
  background: linear-gradient(180deg, #F0FAFB, #fff);
  border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); overflow: hidden;
}
.result-top { padding: 32px 26px 24px; text-align: center;
  border-bottom: 2px dashed var(--primary-light); }
.result-top .rlabel { font-size: 12px; font-weight: 900; color: var(--primary-light); letter-spacing: .16em; }
.result-top .tname { font-size: clamp(23px, 6vw, 30px); font-weight: 900; color: var(--primary-dark); line-height: 1.4; margin: 8px 0 4px; }
.result-top .tsub { font-size: 13.5px; color: var(--muted); }

.result-body { padding: 26px; display: grid; gap: 20px; }

/* 各セクション見出し */
.sec h2 {
  font-size: 15px; font-weight: 900; color: var(--primary);
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.sec h2::before {
  content: ""; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(var(--primary-light), var(--primary));
}
.sec p { font-size: 14.5px; }

/* おすすめ理由・向いている人などのボックス */
.box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.box.tint { background: #F2FBFC; border-color: #D9EEF1; }
.box.warm { background: #FFF9F2; border: 1px solid #F3E3CD; color: #6B4E23; }

/* 向いている人：箇条書き */
.suited { list-style: none; display: grid; gap: 8px; }
.suited li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.suited li::before { content: "✓"; color: var(--primary-light); font-weight: 900; flex: none; }

/* CTAブロック */
.cta-col { display: grid; gap: 10px; }
.cta-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* もう一度診断する */
.retry {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px auto 0;
  background: none; border: none; color: var(--muted);
  font-size: 13px; text-decoration: underline; cursor: pointer;
  font-family: inherit; min-height: 44px;
}
.retry:hover { color: var(--primary); }

/* シェアボタン（X） */
.share {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; border-radius: 999px;
  background: #111; color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none; border: none; cursor: pointer; font-family: inherit;
  transition: opacity .2s;
}
.share:hover { opacity: .85; }
.share svg { width: 18px; height: 18px; fill: currentColor; }

.center { text-align: center; }

/* =========================================================================
   レスポンシブ（タブレット / PC）
   ========================================================================= */
@media (min-width: 560px) {
  .opts.two { grid-template-columns: 1fr 1fr; }
}
