/* 就活スコア — スタイルシート
   デザイン方針：Z世代向けクリーン（余白・実データ・非ストックフォト）／ネイビー×スコアグリーン
   実装テク：text-wrap balance/pretty・tabular-nums・多層box-shadow・CLS抑制（選択肢固定高） */

:root {
  --navy: #16264c;
  --navy-2: #223766;
  --ink: #26324b;
  --muted: #5d6b85;
  --line: #e3e8f2;
  --bg: #f7f9fc;
  --card: #ffffff;
  --green: #00b386;
  --green-deep: #009e76;
  --blue: #2563eb;
  --amber: #f59e0b;
  --danger: #e2574c;
  --radius: 14px;
  --shadow-1: 0 1px 2px rgba(22, 38, 76, .05), 0 4px 12px rgba(22, 38, 76, .06);
  --shadow-2: 0 2px 4px rgba(22, 38, 76, .06), 0 10px 28px rgba(22, 38, 76, .10);
  --maxw: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", Meiryo, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}

h1, h2, h3 { color: var(--navy); line-height: 1.4; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: var(--blue); }
img { max-width: 100%; height: auto; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ===== header / footer ===== */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: baseline; gap: 12px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--navy); letter-spacing: .02em; }
.brand-mark { width: 20px; height: 20px; border-radius: 50%; background: conic-gradient(var(--green) 0 72%, var(--line) 72% 100%); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }
.tagline { margin: 0; font-size: .78rem; color: var(--muted); }

.site-footer { margin-top: 56px; padding: 28px 0 40px; background: var(--navy); color: #cdd6ea; font-size: .82rem; }
.site-footer a { color: #cdd6ea; text-decoration: none; margin-right: 14px; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .foot-note { margin-top: 10px; color: #8fa0c4; }
.site-footer .foot-contact { margin-top: 18px; font-size: .74rem; }
.site-footer .foot-contact a { color: #8fa0c4; margin: 0; }

/* ===== hero ===== */
.hero { padding: 44px 0 30px; text-align: center; }
.hero h1 { font-size: 1.7rem; margin: 0 0 10px; }
.hero .lead { color: var(--muted); margin: 0 auto 6px; max-width: 34em; }
.hero .hero-score { display: inline-flex; align-items: baseline; gap: 4px; color: var(--green-deep); font-weight: 700; }

.pr-note { font-size: .72rem; color: var(--muted); text-align: center; margin: 6px 0 0; }

/* ===== buttons ===== */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font-size: 1rem; font-weight: 700; border-radius: 999px; padding: 14px 30px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 158, 118, .3), 0 6px 16px rgba(0, 158, 118, .28);
}
.btn--primary:hover { box-shadow: 0 2px 4px rgba(0, 158, 118, .3), 0 10px 24px rgba(0, 158, 118, .34); }
.btn--ghost { background: var(--card); color: var(--navy); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.btn--big { font-size: 1.08rem; padding: 16px 40px; }
.btn--store {
  background: var(--navy); color: #fff; width: 100%;
  box-shadow: 0 1px 2px rgba(22, 38, 76, .25), 0 6px 16px rgba(22, 38, 76, .22);
}
.btn--store:hover { background: var(--navy-2); }
.btn-sub { display: block; font-size: .72rem; font-weight: 400; opacity: .85; margin-top: 2px; }

/* ===== cards ===== */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 22px; }
.card + .card { margin-top: 16px; }
.card h2 { margin-top: 0; font-size: 1.15rem; }
.card h3 { font-size: 1.02rem; }

/* ===== 診断（quiz） ===== */
.quiz-panel { max-width: 560px; margin: 0 auto; }
.progress-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 22px 0 6px; }
.progress-fill {
  height: 100%; width: 15%;
  background: linear-gradient(90deg, var(--green) 0%, var(--blue) 130%);
  border-radius: 999px;
  transition: width .35s ease;
}
.progress-label { font-size: .74rem; color: var(--muted); text-align: right; min-height: 1.2em; }

/* 質問カード：min-heightでCLS抑制（設問切替時にボタン位置が跳ねない） */
.q-card { min-height: 380px; display: flex; flex-direction: column; }
.q-text { font-size: 1.12rem; font-weight: 700; color: var(--navy); margin: 6px 0 18px; min-height: 3.2em; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-option {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: .98rem; line-height: 1.5;
  transition: border-color .12s ease, background .12s ease, transform .1s ease;
}
.q-option:hover { border-color: var(--green); background: #f2fbf8; }
.q-option:active { transform: scale(.99); }
.q-back { margin-top: auto; align-self: flex-start; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .82rem; padding: 10px 0 0; }
.q-back:disabled { visibility: hidden; }

/* 分析中 */
.analyzing { text-align: center; padding: 60px 0; }
.analyzing .spinner {
  width: 52px; height: 52px; margin: 0 auto 22px; border-radius: 50%;
  border: 5px solid var(--line); border-top-color: var(--green);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing .a-step { color: var(--muted); min-height: 1.6em; }

/* ===== 結果 ===== */
.score-hero { text-align: center; padding: 10px 0 4px; }
.score-ring { position: relative; width: 168px; height: 168px; margin: 0 auto 8px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .ring-bg { stroke: var(--line); }
.score-ring .ring-val { stroke: url(#scoreGrad); stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.6,.2,1); }
.score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-center .s-val { font-size: 2.6rem; font-weight: 800; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.score-center .s-unit { font-size: .78rem; color: var(--muted); }
.type-name { font-size: 1.35rem; margin: 8px 0 2px; }
.type-copy { color: var(--muted); margin: 0 auto 14px; max-width: 30em; }

.gap-bars { margin: 18px 0 6px; }
.gap-row { display: grid; grid-template-columns: 8.5em 1fr 3.2em; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .86rem; }
.gap-row .g-label { color: var(--navy); font-weight: 600; }
.gap-track { height: 9px; background: var(--line); border-radius: 999px; overflow: hidden; }
.gap-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green), var(--blue)); transition: width .9s ease .3s; }
.gap-row .g-val { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.gap-row.is-weak .g-label { color: var(--danger); }
.gap-row.is-weak .gap-fill { background: linear-gradient(90deg, var(--amber), var(--danger)); }

/* 処方カード */
.rx-list { margin-top: 20px; }
.rx-card { position: relative; padding-top: 30px; }
.rx-card--first { border: 2px solid var(--green); box-shadow: var(--shadow-2); }
.rx-flag {
  position: absolute; top: -13px; left: 18px;
  background: var(--green); color: #fff; font-size: .74rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}
.rx-flag--sub { background: var(--navy-2); }
.rx-why { background: #f2f7ff; border-radius: 10px; padding: 10px 14px; font-size: .88rem; margin: 10px 0; }
.rx-app { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.rx-meta { font-size: .78rem; color: var(--muted); margin: 2px 0 12px; }
.rx-note { font-size: .74rem; color: var(--muted); margin-top: 8px; }

/* スティッキーCTA（結果表示後のみ・画面占有を薄く） */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  display: none;
}
.sticky-cta.is-visible { display: flex; gap: 10px; align-items: center; justify-content: center; }
.sticky-cta .sc-label { font-size: .78rem; color: var(--navy); font-weight: 600; max-width: 46%; line-height: 1.35; }
.sticky-cta .btn { padding: 10px 22px; font-size: .92rem; white-space: nowrap; }
body.has-sticky { padding-bottom: 68px; }

/* ===== 記事・静的ページ ===== */
.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 26px 22px; margin-top: 24px; }
.article h1 { font-size: 1.45rem; margin-top: 0; }
.article h2 { font-size: 1.15rem; border-left: 4px solid var(--green); padding-left: 10px; margin-top: 2em; }
.article .article-date { color: var(--muted); font-size: .78rem; }
.article table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.article th, .article td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.article th { background: var(--bg); color: var(--navy); }
.toc { background: var(--bg); border-radius: 10px; padding: 14px 18px; font-size: .88rem; }
.toc ol { margin: 6px 0 0; padding-left: 1.3em; }

/* 記事内 診断誘導バナー */
.cta-banner {
  margin: 26px 0; padding: 20px; text-align: center;
  background: linear-gradient(135deg, #eefaf6 0%, #eef3fe 100%);
  border: 1px solid #d5ece4; border-radius: var(--radius);
}
.cta-banner p { margin: 0 0 12px; font-weight: 700; color: var(--navy); }

/* アプリ紹介ブロック（記事内・apps） */
.app-box { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; background: var(--card); }
.app-box .app-name { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 0 0 2px; }
.app-box .app-dev { font-size: .76rem; color: var(--muted); margin: 0 0 10px; }
.app-box .app-point { font-size: .9rem; margin: 0 0 12px; }

/* フォーム */
.form-field { margin-bottom: 16px; }
.field-label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: 6px; }
input[type="text"], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--card);
  font-family: inherit;
}
input[type="text"]:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.hint-sm { font-size: .74rem; color: var(--muted); text-align: right; margin: 4px 0 0; }
.status { min-height: 1.5em; font-size: .88rem; }
.status.ok { color: var(--green-deep); }
.status.err { color: var(--danger); }

/* ユーティリティ */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: .82rem; color: var(--muted); }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.badge { font-size: .72rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; color: var(--muted); }

@media (max-width: 480px) {
  .hero h1 { font-size: 1.42rem; }
  .q-card { min-height: 420px; }
  .gap-row { grid-template-columns: 7em 1fr 3em; }
}
