/* 配色はこあらおじのイラスト（紺のネクタイ・淡いブルーグリーンの背景）に合わせる */
:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --ink: #1c2638;
  --ink-2: #4a5568;
  --ink-3: #7b8594;
  --line: #e1e6e5;
  --navy: #1f3358;
  --navy-hover: #172848;
  --navy-ink: #ffffff;
  --mint: #dbe9e8;
  --mint-soft: #eaf3f2;
  --pen: #3f8f86;
  --paper-line: #e9efee;
  --sand: #fbf6ec;
  --sand-line: #eadfc8;
  --sand-ink: #8a6420;
  --shadow: 0 1px 2px rgba(28, 38, 56, .04), 0 6px 20px rgba(28, 38, 56, .06);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121820; --surface: #1a222c; --ink: #e8edf2; --ink-2: #b6c0cb; --ink-3: #8b96a3;
    --line: #2b3542; --navy: #9fb8e0; --navy-hover: #b7cbea; --navy-ink: #111a28;
    --mint: #1f3133; --mint-soft: #182628; --pen: #74c2b8; --paper-line: #222c37;
    --sand: #252119; --sand-line: #3c3526; --sand-ink: #dcbc7c; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121820; --surface: #1a222c; --ink: #e8edf2; --ink-2: #b6c0cb; --ink-3: #8b96a3;
  --line: #2b3542; --navy: #9fb8e0; --navy-hover: #b7cbea; --navy-ink: #111a28;
  --mint: #1f3133; --mint-soft: #182628; --pen: #74c2b8; --paper-line: #222c37;
  --sand: #252119; --sand-line: #3c3526; --sand-ink: #dcbc7c; --shadow: none;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.45; margin: 0; word-break: auto-phrase; text-wrap: balance; }
p { margin: 0; }
img { max-width: 100%; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 600px) { .wrap { padding: 0 24px; } }

/* ---------- ヘッダー ---------- */
.site-head { padding: 14px 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.logo-mark { width: 22px; height: 22px; flex: none; }
.head-note { font-size: 12px; color: var(--ink-3); }

/* ---------- 吹き出し（こあらおじ） ---------- */
.say { display: flex; align-items: flex-start; gap: 12px; margin: 20px 0; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.bubble { position: relative; flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 12px 16px; font-size: 15px; color: var(--ink); box-shadow: var(--shadow); }
.say-sm .avatar { width: 44px; height: 44px; }
.say-sm .bubble { font-size: 14px; padding: 10px 14px; }

/* ---------- トップ・フェーズページ ---------- */
.hero { padding: 28px 0 0; }
.eyebrow { font-size: 13px; color: var(--pen); font-weight: 700; margin-bottom: 6px; }
.hero h1 { font-size: 30px; letter-spacing: .04em; color: var(--navy); }
@media (min-width: 600px) { .hero h1 { font-size: 36px; } }
.tagline { margin-top: 6px; font-size: 17px; font-weight: 700; color: var(--ink-2); }
.lead { margin-top: 12px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.chips li::before { content: ""; width: 14px; height: 14px; background: var(--pen); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }

.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.trust b { color: var(--navy); font-size: 15px; margin-right: 2px; }

.section-title { font-size: 18px; margin: 32px 0 4px; }
.section-sub { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; }
.phase-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; }
.phase-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.phase-card:hover { border-color: var(--navy); transform: translateY(-1px); }
.phase-card:active { transform: scale(.99); }
.phase-top { display: flex; align-items: center; justify-content: space-between; }
.phase-step { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--pen); }
.phase-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--mint-soft); display: grid; place-items: center; color: var(--navy); }
.phase-icon svg { width: 20px; height: 20px; }
.phase-name { font-weight: 700; font-size: 17px; }
.phase-desc { font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }

.how { margin: 32px 0 0; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.how ol { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: how; }
.how-title { font-size: 15px; font-weight: 700; }
.how li { counter-increment: how; display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 14.5px; }
.how li::before { content: counter(how); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--navy-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }

.start-box { margin-top: 8px; }
.btn { display: block; width: 100%; text-align: center; padding: 15px 20px; border: 0; border-radius: 12px; background: var(--navy); color: var(--navy-ink); font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer; box-shadow: 0 4px 14px rgba(31, 51, 88, .18); transition: background .15s, transform .1s; }
.btn:hover { background: var(--navy-hover); }
.btn:active { transform: scale(.99); }
.btn:disabled { opacity: .6; cursor: default; }
.start-note { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.common { margin-top: 36px; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.common h2 { font-size: 16px; margin-bottom: 10px; }
.common ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: 15px; }
.common li + li { margin-top: 4px; }

/* ---------- トップ：最初の画面で選べる ---------- */
.hero-top { padding-top: 22px; }
.tag-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--ink-3); }
.pick-title { font-size: 17px; margin: 20px 0 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pick-title span { font-size: 12px; font-weight: 400; color: var(--pen); }

.sample { margin-top: 8px; }
.sample-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px 16px; box-shadow: var(--shadow); overflow: hidden; }
.sample-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--pen); }
.sample-card .ring { animation: none; stroke-dashoffset: 0; }
.sample-card h3 { font-size: 16px; margin-top: 2px; }
.blur { filter: blur(3.5px); user-select: none; }
.sample-note { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.who { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 18px; background: var(--mint-soft); border: 1px solid var(--mint); border-radius: var(--radius); }
.who img { width: 64px; height: 64px; border-radius: 50%; background: var(--mint); flex: none; }
.who h2 { font-size: 16px; margin-bottom: 4px; }
.who p { font-size: 14px; color: var(--ink-2); }
.who-links { display: flex; gap: 16px; margin-top: 8px !important; }
.who-links a { font-size: 13.5px; font-weight: 700; }

.faq { margin-top: 28px; }
.faq h2 { font-size: 17px; margin-bottom: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; }
.faq details + details { margin-top: 8px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 24px 14px 0; font-weight: 700; font-size: 15px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 20px; font-weight: 400; color: var(--ink-3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 14px; font-size: 14.5px; color: var(--ink-2); }
.common-intro { font-size: 14.5px; color: var(--ink-2); margin-bottom: 10px; }

/* ---------- 質問 ---------- */
.fade { animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } }

.quiz { padding: 20px 0 8px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.phase-tag { font-size: 13px; color: var(--pen); font-weight: 700; }
.back { background: none; border: 0; padding: 4px 0; font: inherit; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.back:hover { color: var(--ink); }
.count { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 28px; }
.bar span { display: block; height: 100%; background: var(--pen); border-radius: 99px; transition: width .3s ease; }
.q-title { font-size: 21px; outline: none; }
.q-note { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.options { display: grid; gap: 10px; margin-top: 22px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; width: 100%; padding: 14px 18px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.6; cursor: pointer; transition: border-color .12s, background .12s; -webkit-tap-highlight-color: transparent; }
.option::after { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); transition: border-color .12s, background .12s; }
.option:hover { border-color: var(--navy); }
.option:hover::after { border-color: var(--navy); }
.option:active { background: var(--mint-soft); border-color: var(--pen); }
.option:active::after { background: var(--pen); border-color: var(--pen); }
.say-cheer { margin: -12px 0 18px; }
.pick { border: 0; padding: 0; margin: 22px 0 0; }
.pick legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-btn { padding: 10px 14px; min-height: 44px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.4; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pick-btn:hover { border-color: var(--navy); }
.pick-btn.on { background: var(--navy); border-color: var(--navy); color: var(--navy-ink); font-weight: 700; }
.finish { margin-top: 28px; }
.quiz-foot { font-size: 13px; color: var(--ink-3); margin-top: 20px; text-align: center; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }

/* ---------- 答え合わせ中 ---------- */
.checking { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; background: var(--mint); margin-bottom: 10px; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.checking-title { font-size: 20px; font-weight: 700; color: var(--navy); }
.dots i { font-style: normal; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.checking-sub { font-size: 14px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .avatar-lg, .dots i { animation: none; } }

/* ---------- 結果（答案用紙） ---------- */
.result { padding: 20px 0 8px; }
.result-title { font-size: 24px; outline: none; color: var(--navy); }
.sheet { display: grid; gap: 14px; }
.reason { position: relative; background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px 18px; box-shadow: var(--shadow); overflow: hidden; }
.reason::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--mint); }
.reason:first-child::before { background: var(--pen); }
.reason-head { display: flex; gap: 12px; align-items: flex-start; }
.rank { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.rank b { font-size: 20px; color: var(--navy); font-family: Georgia, "Times New Roman", serif; }
.ring { position: absolute; inset: 0; width: 44px; height: 44px; fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 130; stroke-dashoffset: 130; animation: draw .7s ease-out forwards; }
.reason:nth-child(2) .ring { animation-delay: .15s; }
.reason:nth-child(3) .ring { animation-delay: .3s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; stroke-dashoffset: 0; } }
.level { font-size: 12px; color: var(--pen); font-weight: 700; margin-top: 2px; }
.reason h3 { font-size: 17px; margin-top: 2px; }
.not-you { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--navy); background: var(--mint-soft); border-radius: 999px; padding: 2px 10px; }
.hr { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; }
.avatar-sm { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--mint); margin-top: 2px; }
.hr-label, .step-label { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.hr-text { font-size: 15px; color: var(--ink-2); }
.step { margin-top: 14px; background: var(--sand); border: 1px solid var(--sand-line); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.step-label { color: var(--sand-ink); margin-bottom: 2px; }
.tip { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--sand-line); font-size: 14px; color: var(--ink-2); }

.offer { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.offer-head { display: flex; align-items: center; gap: 8px; }
.offer-head h2 { font-size: 18px; }
.pr { font-size: 11px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; line-height: 1.7; }
.offer-lead { color: var(--ink-2); font-size: 14px; margin: 0 0 14px; }
.offer-card { background: var(--surface); border: 1.5px solid var(--navy); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); }
.offer-card h3 { font-size: 18px; color: var(--navy); }
.offer-card p { font-size: 15px; color: var(--ink-2); margin-top: 6px; }
.offer-card ul { margin: 12px 0 18px; padding: 0; list-style: none; display: grid; gap: 6px; }
.offer-card li { font-size: 14px; color: var(--ink-2); padding-left: 22px; position: relative; }
.offer-card li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; background: var(--pen); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
.offer-sub { display: block; margin-top: 10px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--ink); }
.offer-sub:hover { border-color: var(--navy); }
.offer-sub-label { display: block; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.offer-sub-name { display: block; font-weight: 700; }
.offer-sub-lead { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 12px; line-height: 1.7; }

.more { margin-top: 36px; }
.more h2 { font-size: 17px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-link { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px; }
.chip-link:hover { border-color: var(--navy); color: var(--navy); }
.link-btn { margin-top: 14px; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink-3); text-decoration: underline; cursor: pointer; }

.follow { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding: 16px 18px; border-radius: var(--radius); background: var(--mint-soft); border: 1px solid var(--mint); text-decoration: none; color: var(--ink); }
.follow .avatar { box-shadow: none; }
.follow-name { display: block; font-weight: 700; }
.follow-lead { display: block; font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

/* ---------- 固定ページ ---------- */
.page { padding: 24px 0 8px; }
.page h1 { font-size: 24px; margin-bottom: 16px; color: var(--navy); }
.page h2 { font-size: 17px; margin: 28px 0 8px; }
.page p, .page li { color: var(--ink-2); font-size: 15px; }
.page p + p { margin-top: 10px; }
.profile { display: flex; gap: 14px; align-items: center; margin-top: 8px; }
.profile img { width: 72px; height: 72px; border-radius: 50%; background: var(--mint); flex: none; }

/* ---------- フッター ---------- */
.site-foot { margin-top: 56px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); background: var(--surface); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
