/* パーフェクト適性検査 — 見た目
   方針：紙の色＋ほぼ黒の文字＋差し色1色（藍）。低い側は朱。影はつけず、細い線と紙の色の差で区切る。
   日本語は Zen Kaku Gothic New、数字は Barlow Condensed。 */

:root {
  color-scheme: light;
  --paper: #f4f1ea;
  --paper-2: #ebe7dd;
  --card: #ffffff;
  --ink: #1b1b1b;
  --ink-2: #4f4a43;
  --ink-3: #7c766c;
  --line: #d9d3c6;
  --line-2: #e7e2d8;
  --accent: #1b5fb4;
  --accent-ink: #154f97;
  --accent-soft: #e3ecf8;
  --on-accent: #ffffff;
  --band: #e7e2d8;
  --low: #b8433a;
  --low-soft: #f7e3e0;
  --good: #1e7d32;
  --warn: #9a6200;
  --alert: #b8433a;
  --hm-0: #ece9e2; --hm-0-t: #1b1b1b;
  --hm-p1: #dce8f7; --hm-p2: #a9c8ee; --hm-p3: #5e95da; --hm-p4: #1b5fb4;
  --hm-n1: #f6dedb; --hm-n2: #edb1aa; --hm-n3: #d9756b; --hm-n4: #b23b31;
  --hm-light-t: #1b1b1b; --hm-dark-t: #ffffff;
  --f-jp: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', system-ui, sans-serif;
  --f-num: 'Barlow Condensed', 'Zen Kaku Gothic New', system-ui, sans-serif;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #161614; --paper-2: #1d1c19; --card: #201f1c;
    --ink: #edeae4; --ink-2: #bdb7ac; --ink-3: #8f897f;
    --line: #3b3934; --line-2: #2c2a26;
    --accent: #5a9bea; --accent-ink: #8dbbf2; --accent-soft: #1d2b40; --on-accent: #0b1626; --band: #3a3833;
    --low: #e0756b; --low-soft: #3c2421;
    --good: #5cc46e; --warn: #e0a84a; --alert: #e0756b;
    --hm-0: #2e2d2a; --hm-0-t: #edeae4;
    --hm-p1: #22324a; --hm-p2: #2b4f86; --hm-p3: #3f7cc9; --hm-p4: #7fb2f2;
    --hm-n1: #43272a; --hm-n2: #7a3a35; --hm-n3: #b8554b; --hm-n4: #ee9a90;
    --hm-light-t: #edeae4; --hm-dark-t: #161614;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #161614; --paper-2: #1d1c19; --card: #201f1c;
  --ink: #edeae4; --ink-2: #bdb7ac; --ink-3: #8f897f;
  --line: #3b3934; --line-2: #2c2a26;
  --accent: #5a9bea; --accent-ink: #8dbbf2; --accent-soft: #1d2b40; --on-accent: #0b1626; --band: #3a3833;
  --low: #e0756b; --low-soft: #3c2421;
  --good: #5cc46e; --warn: #e0a84a; --alert: #e0756b;
  --hm-0: #2e2d2a; --hm-0-t: #edeae4;
  --hm-p1: #22324a; --hm-p2: #2b4f86; --hm-p3: #3f7cc9; --hm-p4: #7fb2f2;
  --hm-n1: #43272a; --hm-n2: #7a3a35; --hm-n3: #b8554b; --hm-n4: #ee9a90;
  --hm-light-t: #edeae4; --hm-dark-t: #161614;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-jp); font-size: 16px; line-height: 1.75; font-weight: 500;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--accent-ink); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.4; font-weight: 700; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-family: var(--f-num); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; vertical-align: -4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- 枠 ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 17px; letter-spacing: .02em; }
.brand-mark { color: var(--ink); }
.brand-dot { fill: var(--accent); }
.head-org { color: var(--ink-3); font-size: 13px; border-left: 1px solid var(--line); padding-left: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.head-sp { flex: 1; }
.site-foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 24px 0 40px; color: var(--ink-3); font-size: 13px; }
.site-foot a { color: var(--ink-3); }
.foot-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; align-items: center; }
.foot-logo { display: inline-flex; padding: 6px 0; }
.foot-logo img { height: 22px; width: auto; display: block; }
.logo-dark { display: none !important; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-note { grid-column: 1 / -1; font-size: 12.5px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-light { display: none !important; } :root:not([data-theme="light"]) .logo-dark { display: block !important; } }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }
.legal { padding: 32px 0; }
.legal h1 { font-size: 28px; font-weight: 900; margin-bottom: 6px; }
.legal h2 { font-size: 17px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.legal p, .legal li { font-size: 15px; }
main { min-height: 60vh; }
.noscript { padding: 40px 16px; text-align: center; }

/* ---------- ボタン・入力 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  border-radius: var(--r); padding: 11px 20px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; line-height: 1.3;
  transition: transform .06s ease, background .15s ease;
}
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); opacity: 1; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--low); border-color: var(--low); }
.btn.big { padding: 15px 28px; font-size: 17px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; cursor: pointer; font-weight: 700; }
.icbtn { background: none; border: 1px solid transparent; border-radius: var(--r); padding: 6px; cursor: pointer; color: var(--ink-2); display: inline-flex; }
.icbtn:hover { border-color: var(--line); color: var(--ink); }
.icbtn.on { color: var(--accent); }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 14px; font-weight: 700; }
.field small { color: var(--ink-3); font-size: 12.5px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r); padding: 11px 12px; font-size: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.err { color: var(--low); font-size: 14px; font-weight: 700; min-height: 1.2em; }

.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: 7px 14px; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.on { background: var(--ink); color: var(--paper); }

/* ---------- 共通の部品 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.card + .card { margin-top: 16px; }
.grid2 > .card + .card, .grid3 > .card + .card, .manage-grid > .card + .card, .stack > .card + .card { margin-top: 0; }
.card h3 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.eyebrow { font-family: var(--f-num); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--accent-ink); }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; color: var(--ink-2); background: var(--card); white-space: nowrap; }
.tag.hire { border-color: var(--ink); color: var(--ink); }
.tag.member { border-color: var(--accent); color: var(--accent-ink); }
.status { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status.good { color: var(--good); } .status.ok { color: var(--ink-2); } .status.watch { color: var(--warn); } .status.alert { color: var(--alert); }
.status.high { color: var(--good); } .status.mid { color: var(--ink-2); } .status.low { color: var(--alert); }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before { content: ''; position: absolute; left: 3px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.bullets.low li::before { background: var(--low); }
.bullets li b { font-weight: 700; }
.bullets .sub { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }
.note { border-left: 3px solid var(--line); padding: 8px 0 8px 14px; color: var(--ink-2); font-size: 14px; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--r); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.notice.demo { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.section-title { font-size: 22px; font-weight: 900; margin: 40px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title .eyebrow { margin-right: 4px; }
hr.dash { border: 0; border-top: 1.5px dashed var(--line); margin: 20px 0; }
.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }
.loading { padding: 60px 16px; text-align: center; color: var(--ink-3); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: var(--r); font-size: 14px; font-weight: 700; transition: all .2s ease; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--low); color: #fff; }
.tip { position: absolute; z-index: 90; max-width: 280px; background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.5; padding: 6px 10px; border-radius: 4px; pointer-events: none; opacity: 0; transition: opacity .1s; }
.tip.show { opacity: 1; }

/* ---------- トップ ---------- */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(29px, 4.1vw, 52px); font-weight: 900; letter-spacing: .01em; line-height: 1.25; }
.hero h1 .ln { display: block; white-space: nowrap; }
.hero h1 .a { color: var(--accent); }
.hero .lead { font-size: 18px; color: var(--ink-2); margin: 18px 0 28px; }
.hero-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.hero-card .hc-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px dashed var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.hero-card .hc-type { font-size: 26px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.hero-card .hc-rows { display: grid; gap: 8px; font-size: 13.5px; }
.hero-card .hc-rows div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; }
.hero-card .hc-rows b { color: var(--ink-3); font-weight: 700; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.feature { border-top: 2px solid var(--ink); padding-top: 14px; }
.feature .fnum { font-family: var(--f-num); font-size: 40px; font-weight: 600; line-height: 1; color: var(--accent); }
.feature h3 { font-size: 18px; margin: 8px 0 6px; }
.feature p { color: var(--ink-2); font-size: 14.5px; }
.steps { counter-reset: st; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.step::before { counter-increment: st; content: counter(st); font-family: var(--f-num); font-weight: 600; font-size: 30px; color: var(--accent); display: block; line-height: 1; margin-bottom: 8px; }
.step h3 { font-size: 16px; margin-bottom: 4px; }
.step p { font-size: 14px; color: var(--ink-2); }
.types-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.type-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.type-tile .tt-name { font-weight: 900; font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.type-tile p { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.report-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.report-list div { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.report-list .ic { color: var(--accent); margin-top: 3px; }

/* ---------- ログイン ---------- */
.auth { max-width: 440px; margin: 48px auto; }
.auth h1 { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.auth .sub { color: var(--ink-2); margin-bottom: 22px; }

/* ---------- 受検 ---------- */
.take { max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; }
.take-intro h1 { font-size: 28px; font-weight: 900; margin: 6px 0 14px; }
.take-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin: 18px 0; }
.take-facts div { padding: 14px; text-align: center; }
.take-facts div + div { border-left: 1px solid var(--line); }
.take-facts b { display: block; font-family: var(--f-num); font-size: 30px; font-weight: 600; line-height: 1.1; }
.take-facts span { font-size: 12.5px; color: var(--ink-3); }
.progress { position: sticky; top: 60px; background: var(--paper); padding: 12px 0 10px; z-index: 5; }
.progress .pg-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }
.progress .pg-count { font-family: var(--f-num); font-size: 20px; font-weight: 600; color: var(--ink); }
.progress .pg-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress .pg-fill { height: 100%; background: var(--accent); transition: width .25s ease; }
.qcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px 24px; margin-top: 10px; }
.qcard .qsec { font-size: 13px; color: var(--accent-ink); font-weight: 700; margin-bottom: 8px; }
.qcard .qtext { font-size: clamp(20px, 3.2vw, 25px); font-weight: 700; line-height: 1.55; min-height: 2.8em; }
.opts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 26px; }
.opt {
  border: 1.5px solid var(--line); background: var(--card); border-radius: var(--r); padding: 12px 6px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--ink-2); text-align: center;
  transition: border-color .1s, background .1s;
}
.opt:hover { border-color: var(--ink-3); }
.opt .pip { border-radius: 50%; border: 2px solid currentColor; display: block; }
.opt[data-v="1"] .pip, .opt[data-v="5"] .pip { width: 26px; height: 26px; }
.opt[data-v="2"] .pip, .opt[data-v="4"] .pip { width: 20px; height: 20px; }
.opt[data-v="3"] .pip { width: 14px; height: 14px; }
.opt[data-v="1"], .opt[data-v="2"] { color: var(--low); }
.opt[data-v="4"], .opt[data-v="5"] { color: var(--accent-ink); }
.opt[data-v="3"] { color: var(--ink-3); }
.opt.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.opt.on .pip { background: currentColor; }
.opt .key { font-family: var(--f-num); font-size: 12px; color: var(--ink-3); font-weight: 600; }
.opt.on .key { color: var(--paper); opacity: .7; }
.qnav { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: var(--ink-3); font-size: 13px; }
.interlude { text-align: center; padding: 40px 10px; }
.interlude h2 { font-size: 24px; font-weight: 900; margin: 10px 0; }

/* ---------- 結果（本人・管理者） ---------- */
.res-head { padding: 34px 0 10px; }
.res-head h1 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; }
.res-head .meta { color: var(--ink-3); font-size: 14px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.type-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 0; display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; }
.type-card .tc-main { padding: 26px; border-right: 1.5px dashed var(--line); }
.type-card .tc-side { padding: 22px 26px; }
.type-card .tc-label { font-size: 13px; color: var(--ink-3); font-weight: 700; }
.type-card .tc-name { font-size: clamp(34px, 5vw, 46px); font-weight: 900; line-height: 1.2; display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; }
.type-card .tc-name .ic { color: var(--accent); }
.type-card .tc-catch { font-weight: 700; font-size: 17px; margin-bottom: 10px; }
.type-card .tc-desc { color: var(--ink-2); font-size: 14.5px; }
.axes { display: grid; gap: 14px; }
.axis { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-3); }
.axis .ax-l { text-align: right; }
.axis .on { color: var(--ink); font-weight: 700; }
.ax-track { position: relative; height: 10px; background: var(--line-2); border-radius: 5px; }
.ax-mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1.5px; background: var(--ink-3); }
.ax-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv b { color: var(--ink-3); font-weight: 700; }

.score-rows { display: grid; gap: 0; }
.score-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.lg-tick { width: 2.5px; height: 14px; background: var(--ink); }
.lg-band { width: 22px; height: 10px; background: var(--band); border-radius: 2px; }
.score-area { font-size: 13px; color: var(--accent-ink); margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.score-row { display: grid; grid-template-columns: 6.2em 2.2em 1fr 240px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.sr-name { font-weight: 700; }
.sr-num { font-size: 20px; text-align: right; }
.sr-low { color: var(--ink-3); text-align: right; font-size: 12.5px; line-height: 1.4; }
.sr-high { color: var(--ink-3); font-size: 12.5px; line-height: 1.4; }
.track { position: relative; height: 14px; }
.track .band { position: absolute; left: 33.33%; right: 33.33%; top: 1px; bottom: 1px; background: var(--band); border-radius: 2px; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--line); }
.track .mid { position: absolute; left: 50%; top: 1px; bottom: 1px; width: 1px; background: var(--ink-3); opacity: .6; }
.track .dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent); }
.track .dot.hi { background: var(--accent); }
.track .dot.lo { border-color: var(--low); background: var(--low); }
.track .tick { position: absolute; top: -3px; bottom: -3px; width: 2.5px; margin-left: -1px; background: var(--ink); }
.axis-scale { display: grid; grid-template-columns: 6.2em 2.2em 1fr 240px 1fr; gap: 10px; font-family: var(--f-num); font-size: 12px; color: var(--ink-3); }
.axis-scale span:nth-child(1) { grid-column: 4; grid-row: 1; justify-self: start; }
.axis-scale span:nth-child(2) { grid-column: 4; justify-self: center; grid-row: 1; }
.axis-scale span:nth-child(3) { grid-column: 4; justify-self: end; grid-row: 1; }

.fit-list { display: grid; gap: 10px; }
.fit { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.fit:last-child { border-bottom: 0; }
.fit .f-name { font-weight: 700; }
.fit .f-num { font-family: var(--f-num); font-size: 24px; font-weight: 600; line-height: 1; color: var(--accent-ink); align-self: center; grid-row: span 2; }
.fit.weak .f-num { color: var(--low); }
.fit .f-why { font-size: 13px; color: var(--ink-3); }
.culture { display: grid; gap: 16px; }
.cul .cul-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--ink-3); }
.cul .cul-track { position: relative; height: 8px; background: var(--line-2); border-radius: 4px; margin: 6px 0; }
.cul .cul-dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--accent); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--accent); }
.cul .cul-text { font-size: 14px; font-weight: 700; }
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.manage-grid .card h3 { font-size: 15.5px; }
.compat-col h4 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.pair { border-top: 1px solid var(--line-2); padding: 12px 0; }
.pair:first-of-type { border-top: 0; }
.pair .p-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pair .p-name { font-weight: 700; }
.pair .p-score { font-family: var(--f-num); font-size: 22px; font-weight: 600; }
.pair .p-score.good { color: var(--accent-ink); }
.pair .p-score.bad { color: var(--low); }
.pair p { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.pair .p-tip { font-size: 13px; color: var(--ink); background: var(--paper-2); padding: 6px 10px; border-radius: 4px; margin-top: 6px; }
.pair .p-tip b { color: var(--accent-ink); }
.subnav { position: sticky; top: 60px; z-index: 6; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; padding: 6px 0; margin: 10px 0 0; scrollbar-width: none; }
.subnav a { padding: 6px 12px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap; border-radius: 4px; }
.subnav a:hover { background: var(--paper-2); color: var(--ink); }
.anchor { scroll-margin-top: 120px; }
.state-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.state-grid > div { padding: 14px; text-align: center; }
.state-grid > div + div { border-left: 1px solid var(--line); }
.state-grid .sg-name { font-size: 13px; color: var(--ink-3); }
.state-grid .sg-val { font-family: var(--f-num); font-size: 30px; font-weight: 600; line-height: 1.1; }

/* ---------- 管理画面 ---------- */
.admin-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.admin-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 4px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; }
.admin-nav a:hover { background: var(--paper-2); color: var(--ink); }
.admin-nav a.on { background: var(--ink); color: var(--paper); }
.admin-bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.admin-bar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 8px; padding-bottom: 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 28px 0 18px; }
.page-head h1 { font-size: 26px; font-weight: 900; }
.page-head p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters select { width: auto; padding: 7px 10px; font-size: 14px; }
.headline { font-size: clamp(19px, 2.6vw, 24px); font-weight: 900; line-height: 1.5; margin: 6px 0 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi .k-label { font-size: 13px; color: var(--ink-3); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kpi .k-val { font-family: var(--f-num); font-size: 44px; font-weight: 600; line-height: 1.05; }
.kpi .k-val small { font-family: var(--f-jp); font-size: 14px; font-weight: 700; margin-left: 4px; color: var(--ink-3); }
.kpi.alert .k-val { color: var(--alert); }
.dbars { display: grid; }
.dbar-row { display: grid; grid-template-columns: 6.5em 1fr 3.4em; gap: 10px; align-items: center; padding: 4px 0; font-size: 13.5px; }
.db-name { font-weight: 700; }
.db-track { position: relative; height: 14px; background: linear-gradient(var(--line-2), var(--line-2)) center / 100% 2px no-repeat; }
.db-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1.5px; background: var(--ink-3); }
.db-fill { position: absolute; top: 1px; bottom: 1px; border-radius: 2px; }
.db-fill.pos { background: var(--accent); border-radius: 0 3px 3px 0; }
.db-fill.neg { background: var(--low); border-radius: 3px 0 0 3px; }
.db-cmp { position: absolute; top: -3px; bottom: -3px; width: 2.5px; background: var(--ink); }
.db-num { text-align: right; font-size: 17px; }
.db-scale { display: grid; grid-template-columns: 6.5em 1fr 3.4em; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.db-scale span:nth-child(1) { grid-column: 2; grid-row: 1; justify-self: start; }
.db-scale span:nth-child(2) { grid-column: 2; grid-row: 1; justify-self: center; }
.db-scale span:nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
.tbars { display: grid; gap: 6px; }
.tbar-row { display: grid; grid-template-columns: 8.5em 1fr 4.6em; gap: 10px; align-items: center; font-size: 14px; }
.tb-name { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.tb-name .ic { color: var(--accent); }
.tb-track { height: 14px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.tb-fill { display: block; height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; }
.tb-num { font-size: 20px; text-align: right; }
.tb-num small { font-family: var(--f-jp); font-size: 11.5px; color: var(--ink-3); margin-left: 2px; }
.insight { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.insight:last-child { border-bottom: 0; }
.insight .in-d { font-family: var(--f-num); font-size: 26px; font-weight: 600; line-height: 1; grid-row: span 2; min-width: 2.4em; }
.insight .in-d.pos { color: var(--accent-ink); }
.insight .in-d.neg { color: var(--low); }
.insight .in-name { font-weight: 700; }
.insight .in-text { font-size: 14px; color: var(--ink-2); }
.heat-wrap { overflow-x: auto; }
table.heat { border-collapse: separate; border-spacing: 2px; font-size: 12.5px; }
.heat th { font-weight: 700; color: var(--ink-2); }
.heat .hm-col { height: 96px; vertical-align: bottom; padding: 0 0 4px; min-width: 34px; }
.heat .hm-col span { writing-mode: vertical-rl; white-space: nowrap; display: inline-block; }
.heat .hm-row { text-align: left; white-space: nowrap; padding-right: 8px; }
.heat .hm-row small { color: var(--ink-3); font-weight: 500; }
.heat td.hm { width: 36px; height: 30px; text-align: center; font-family: var(--f-num); font-weight: 600; font-size: 13.5px; border-radius: 3px; }
.heat td.clickable { cursor: pointer; }
.heat td.clickable:hover { outline: 2px solid var(--ink); }
.heat td.hm-self { color: var(--ink-3); background: transparent; }
.hm-0 { background: var(--hm-0); color: var(--hm-0-t); }
.hm-p1 { background: var(--hm-p1); color: var(--hm-light-t); } .hm-p2 { background: var(--hm-p2); color: var(--hm-light-t); }
.hm-p3 { background: var(--hm-p3); color: var(--hm-dark-t); } .hm-p4 { background: var(--hm-p4); color: var(--hm-dark-t); }
.hm-n1 { background: var(--hm-n1); color: var(--hm-light-t); } .hm-n2 { background: var(--hm-n2); color: var(--hm-light-t); }
.hm-n3 { background: var(--hm-n3); color: var(--hm-dark-t); } .hm-n4 { background: var(--hm-n4); color: var(--hm-dark-t); }
.heat-legend { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-3); margin-top: 10px; flex-wrap: wrap; }
.heat-legend i { width: 22px; height: 12px; border-radius: 2px; display: inline-block; }
.heat-legend span { margin: 0 6px; }
.trend-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trend-card { border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 10px 4px; }
.trend-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; font-weight: 700; }
.trend-head b { font-size: 22px; }
svg.trend { width: 100%; height: auto; display: block; }
.tr-grid { stroke: var(--line-2); stroke-width: 1; }
.tr-mid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.tr-ax { fill: var(--ink-3); font-size: 11px; font-family: var(--f-num); }
.tr-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tr-pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; cursor: default; }

table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 14px; }
.list th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--paper-2); white-space: nowrap; }
.list td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tr.click { cursor: pointer; }
.list tr.click:hover td { background: var(--paper-2); }
.list .name { font-weight: 700; }
.list .type { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.list .type .ic { color: var(--accent); }
.invite-url { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--ink-2); word-break: break-all; }
.pill-off { color: var(--ink-3); }
.dialog-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 80; }
.dialog { background: var(--card); border-radius: var(--r); max-width: 620px; width: 100%; max-height: 85vh; overflow: auto; padding: 22px; border: 1px solid var(--line); }
.dialog h3 { font-size: 18px; margin-bottom: 10px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 12px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); padding: 10px; background: var(--card); }
.checks label { display: flex; gap: 6px; align-items: center; font-size: 13.5px; cursor: pointer; }
.checks input { accent-color: var(--accent); }

/* ---------- 狭い画面 ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
  .features, .steps { grid-template-columns: 1fr; }
  .types-grid { grid-template-columns: 1fr 1fr; }
  .grid2, .manage-grid, .report-list { grid-template-columns: 1fr; }
  .type-card { grid-template-columns: 1fr; }
  .type-card .tc-main { border-right: 0; border-bottom: 1.5px dashed var(--line); }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .trend-grid { grid-template-columns: 1fr 1fr; }
  .state-grid { grid-template-columns: 1fr 1fr; }
  .state-grid > div:nth-child(3) { border-left: 0; }
  .state-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .head-org { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .opts { grid-template-columns: 1fr; gap: 8px; }
  .opt { flex-direction: row; justify-content: flex-start; padding: 13px 14px; font-size: 15px; text-align: left; }
  .opt .pip { width: 18px !important; height: 18px !important; }
  .opt .key { margin-left: auto; }
  .qcard { padding: 22px 16px 18px; }
  .score-row { grid-template-columns: 6.4em 2.4em 1fr; row-gap: 2px; }
  .score-row .track { grid-column: 1 / -1; grid-row: 2; }
  .score-row .sr-low { grid-column: 1 / 2; grid-row: 3; text-align: left; }
  .score-row .sr-high { grid-column: 2 / 4; grid-row: 3; text-align: right; }
  .axis-scale { display: none; }
  .axis { grid-template-columns: 1fr 70px 1fr; font-size: 12px; }
  .types-grid { grid-template-columns: 1fr; }
  .take-facts b { font-size: 24px; }
  .dbar-row, .db-scale { grid-template-columns: 5.6em 1fr 3em; }
  .tbar-row { grid-template-columns: 7.2em 1fr 4.2em; }
  .card { padding: 16px; }
  .brand span { font-size: 15px; }
}

/* ---------- 印刷 ---------- */
@media print {
  :root { --paper: #fff; }
  .site-head, .site-foot, .admin-bar, .subnav, .no-print, .btn, .icbtn { display: none !important; }
  .card, .type-card { break-inside: avoid; border-color: #bbb; }
  body { font-size: 12px; }
  .section-title { margin-top: 18px; }
}
