:root {
  --bg: #f6f7f4;
  --card: #ffffff;
  --ink: #1f2a2e;
  --ink-2: #4a5a60;
  --ink-3: #7b8a8f;
  --line: #e2e6e1;
  --accent: #1f7a6d;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ee;
  --warn: #a35a12;
  --warn-soft: #fbf1e4;
  --c-e: #d0661f;
  --c-a: #2f8a4a;
  --c-c: #2c64b5;
  --c-s: #7a4fb0;
  --c-o: #c23d6b;
  --c-v: #1f7a6d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 40, .06), 0 4px 16px rgba(20, 40, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12181a; --card: #1b2326; --ink: #e8eeee; --ink-2: #b4c1c3; --ink-3: #85959a; --line: #2c373a;
    --accent: #4fbfa9; --accent-ink: #0f1c1a; --accent-soft: #1d3330; --warn: #f0a560; --warn-soft: #33281c;
    --c-e: #f08a4a; --c-a: #5cc07a; --c-c: #6b9ae6; --c-s: #a988d6; --c-o: #e8739a; --c-v: #4fbfa9;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #12181a; --card: #1b2326; --ink: #e8eeee; --ink-2: #b4c1c3; --ink-3: #85959a; --line: #2c373a;
  --accent: #4fbfa9; --accent-ink: #0f1c1a; --accent-soft: #1d3330; --warn: #f0a560; --warn-soft: #33281c;
  --c-e: #f08a4a; --c-a: #5cc07a; --c-c: #6b9ae6; --c-s: #a988d6; --c-o: #e8739a; --c-v: #4fbfa9;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px; line-height: 1.75; letter-spacing: .01em;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin-top: 1.2em; }
p { margin: 0 0 .9em; }
small, .small { font-size: .85rem; color: var(--ink-2); }
.center { text-align: center; }

.site-head {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 800px; margin: 0 auto; padding: 14px 16px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.logo svg { width: 28px; height: 28px; color: var(--accent); }
.head-link { font-size: .9rem; }
main { max-width: 800px; margin: 0 auto; padding: 0 16px 40px; }
.site-foot { max-width: 800px; margin: 0 auto; padding: 24px 16px 48px; font-size: .75rem; color: var(--ink-3); border-top: 1px solid var(--line); }
.site-foot p { margin-bottom: .6em; overflow-wrap: anywhere; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.hero { padding: 28px 4px 18px; }
.hero h1 { font-size: 2rem; letter-spacing: .02em; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; margin-bottom: .4em; }
.lead { font-size: 1.02rem; color: var(--ink-2); }
.lead-s { color: var(--ink-2); font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: .9rem; margin-top: 2px; }
.steps b { display: block; }
.steps span { color: var(--ink-2); font-size: .92rem; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.mode { text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: inherit; position: relative; transition: border-color .15s, transform .15s; }
.mode:hover { border-color: var(--accent); transform: translateY(-1px); }
.mode b { font-size: 1.2rem; }
.mode span { color: var(--accent); font-weight: 700; }
.mode .tag { position: absolute; top: 12px; right: 12px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; padding: 2px 8px; border-radius: 99px; }
.note ul { padding-left: 1.2em; margin: 0 0 .6em; }
.note li { margin-bottom: .4em; }
.resume { border-color: var(--accent); background: var(--accent-soft); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn { font: inherit; font-weight: 700; border-radius: 99px; padding: 12px 22px; border: 1.5px solid var(--accent); cursor: pointer; min-height: 48px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.wide { width: 100%; margin-top: 8px; }

/* 質問 */
.quiz-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; margin-bottom: 8px; }
.secs { display: flex; gap: 4px; margin-bottom: 8px; }
.secs span { flex: 1; text-align: center; font-size: .7rem; color: var(--ink-3); border-bottom: 3px solid var(--line); padding-bottom: 2px; font-weight: 700; }
.secs span i { display: block; font-style: normal; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.secs span.done { color: var(--accent); border-color: var(--accent); }
.secs span.now { color: var(--ink); border-color: var(--ink); }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); transition: width .3s; }
.count { font-size: .78rem; color: var(--ink-3); margin: 4px 0 0; text-align: right; }

.q { padding: 18px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.qt { font-weight: 500; font-size: 1.05rem; margin-bottom: 12px; }
.opts { display: flex; justify-content: space-between; align-items: center; max-width: 420px; margin: 0 auto; }
.opt { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.opt span { display: block; border-radius: 50%; border: 2px solid var(--ink-3); transition: all .12s; }
.opt:nth-child(1) span, .opt:nth-child(5) span { width: 40px; height: 40px; }
.opt:nth-child(2) span, .opt:nth-child(4) span { width: 32px; height: 32px; }
.opt:nth-child(3) span { width: 24px; height: 24px; }
.opt:hover span { border-color: var(--accent); }
.opt.on span { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ends { display: flex; justify-content: space-between; max-width: 440px; margin: 6px auto 0; font-size: .74rem; color: var(--ink-3); gap: 8px; }
.ends.top { font-size: .92rem; color: var(--ink); font-weight: 500; margin: 0 auto 10px; max-width: none; }
.ends.top span { flex: 1; }
.ends.top span:last-child { text-align: right; }
.q.answered .qt { color: var(--ink-2); }

.chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 14px; }
.chips.fields { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.chips.col { grid-template-columns: 1fr; }
.chip { font: inherit; text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-height: 44px; }
.chip small { display: block; font-size: .78rem; line-height: 1.5; }
.chip.sm { font-size: .9rem; padding: 8px 12px; }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.chip.on::before { content: "✓ "; color: var(--accent); }
.nav { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 10px; }
.nav .btn { flex: 1; max-width: 220px; }
.nav .btn.primary { margin-left: auto; }

/* 結果 */
.summary h1 { font-size: 1.5rem; }
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 6px 0 14px; }
.sum-grid > div { background: var(--accent-soft); border-radius: 12px; padding: 12px; }
.sum-grid small { display: block; color: var(--ink-2); font-size: .75rem; margin-bottom: 4px; }
.sum-grid b { display: block; font-size: .95rem; line-height: 1.5; }
.sum-grid b.big { font-size: 1.8rem; letter-spacing: .1em; color: var(--accent); line-height: 1.2; }
.sum-grid span { font-size: .8rem; color: var(--ink-2); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; }
.toc a { font-size: .82rem; text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; color: var(--ink-2); background: var(--card); }
.warn { border-color: var(--warn); background: var(--warn-soft); }
.warn h2 { color: var(--warn); }

.trait { padding: 16px 0; border-top: 1px solid var(--line); }
.trait:first-of-type { border-top: 0; }
.trait-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trait-head b { font-size: 1.1rem; }
.trait-head b small { font-weight: 400; }
.lv { font-size: .85rem; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.what { font-size: .85rem; color: var(--ink-3); margin: 0 0 6px; }
.track { position: relative; height: 10px; background: var(--line); border-radius: 99px; margin: 4px 0 10px; }
.track .fill { height: 100%; border-radius: 99px; background: var(--accent); }
.track i { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink-3); opacity: .6; }
.track.sm { height: 6px; margin: 0; }
.aspects { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 6px 0 8px; }
.aspects > div, .vals .val { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: end; }
.aspects > div .track, .vals .val .track { grid-column: span 2; height: 6px; margin: 2px 0 6px; }
.aspects span, .vals span { font-size: .88rem; font-weight: 500; }
.aspects span small, .vals span small { display: block; font-weight: 400; font-size: .74rem; color: var(--ink-3); line-height: 1.4; }
.aspects em, .vals em { font-style: normal; font-size: .85rem; color: var(--ink-2); }
.work { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }

.int-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: center; }
.hex { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.hex .grid { fill: none; stroke: var(--line); stroke-width: 1; }
.hex .shape { fill: var(--accent); fill-opacity: .25; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.hex text { font-size: 13px; fill: var(--ink-2); }
.hex .hx-code { font-weight: 700; fill: var(--accent); font-size: 15px; }
.code { font-size: 1.3rem; color: var(--accent); letter-spacing: .1em; }
.note-list { padding-left: 1.2em; margin: 0 0 .8em; }
.note-list li { margin-bottom: .5em; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-top: 8px; }
.type p { font-size: .88rem; color: var(--ink-2); }
.vals { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 20px; margin-bottom: 8px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two h3 { margin-top: 0; }
.pref { list-style: none; padding: 0; margin: 0 0 8px; }
.pref li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.pref em { font-style: normal; color: var(--accent); font-size: .8rem; white-space: nowrap; font-weight: 700; }

.filters { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 16px; }
.sm-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sm-row select { font: inherit; font-size: .9rem; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 10px; background: var(--card); color: var(--ink); min-height: 40px; }
.toggle { font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.search { font: inherit; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card); color: var(--ink); width: 100%; }

.job { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.job-head { display: flex; gap: 12px; align-items: flex-start; }
.rank { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 1.25rem; display: flex; align-items: baseline; justify-content: center; padding-top: 11px; line-height: 1; }
.rank small { font-size: .65rem; margin-left: 1px; color: inherit; }
.hidden-note { font-size: .82rem; color: var(--ink-3); margin: -4px 0 12px; }
.job h3 { margin: 0 0 4px; font-size: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tags span { font-size: .72rem; background: var(--accent-soft); color: var(--ink-2); border-radius: 99px; padding: 1px 8px; }
.tags span.prep { background: transparent; border: 1px solid var(--line); }
.desc { font-size: .92rem; color: var(--ink-2); margin: 10px 0; }
.comp { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-bottom: 10px; }
.comp > div { display: flex; flex-direction: column; gap: 3px; }
.comp span { font-size: .7rem; color: var(--ink-3); }
.why, .caution { list-style: none; padding: 0; margin: 0 0 6px; font-size: .88rem; }
.why li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.caution li { color: var(--warn); }
.caution li::before { content: "△ "; }
.grow { font-size: .85rem; color: var(--ink-2); margin-bottom: 6px; }
details { font-size: .88rem; margin: 6px 0; }
summary { cursor: pointer; color: var(--accent); }
details p { color: var(--ink-2); margin: 6px 0; }
.ext { font-size: .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 20px 0 8px; }
.about h2 { margin-top: 1.4em; }
.refs { font-size: .82rem; padding-left: 1.4em; color: var(--ink-2); }
.refs li { margin-bottom: .5em; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .mode-grid { grid-template-columns: 1fr; }
  .sum-grid { grid-template-columns: 1fr 1fr; }
  .aspects, .types, .vals, .two { grid-template-columns: 1fr; }
  .int-grid { grid-template-columns: 1fr; }
  .comp { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 18px 16px; }
  .secs span i { display: none; }
  .opt { width: 44px; height: 44px; }
  .opt:nth-child(1) span, .opt:nth-child(5) span { width: 38px; height: 38px; }
}

@media print {
  .site-head, .quiz-head, .actions, .filters, .toc, .btn, .site-foot { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid-page; }
  .job { break-inside: avoid; }
}
.picks { margin: 0 0 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.picks small { display: block; font-size: .75rem; color: var(--ink-2); margin-bottom: 4px; }
.picks ul { list-style: none; padding: 0; margin: 0; }
.picks li { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; font-size: .9rem; }
.pick-f { font: inherit; font-size: .78rem; font-weight: 700; flex: none; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 99px; padding: 1px 10px; cursor: pointer; }
