:root {
  --bg: #ecebe6;
  --panel: #f8f7f3;
  --ink: #18181b;
  --ink-2: #3a3a40;
  --muted: #64646b;
  --line: #d3d1c9;
  --rec: #e5432d;
  --deck: #19191c;
  --deck-2: #26262b;
  --deck-line: #3d3d44;
  --deck-ink: #ecebe6;
  --nt: #2f55d4;
  --nf: #c4375f;
  --sj: #5b7814;
  --sp: #c9730a;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.75 var(--sans); letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rec); }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.03em; margin: 0; }

/* 상단 */
.bar { background: var(--deck); color: var(--deck-ink); border-bottom: 1px solid var(--deck-line); position: sticky; top: 0; z-index: 10; }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 16px; }
.mark svg { width: 26px; height: 26px; color: var(--deck-ink); }
.mark:hover { color: var(--deck-ink); }
.bar nav { display: flex; gap: 2px; flex-wrap: wrap; }
.bar nav a { text-decoration: none; font-size: 14.5px; padding: 7px 10px; border-radius: 4px; color: #c9c8c2; }
.bar nav a:hover { color: #fff; background: var(--deck-2); }
.bar nav a.go { color: #fff; background: var(--rec); font-weight: 700; margin-left: 4px; }
.bar nav a.go:hover { background: #cc3621; }
@media (max-width: 560px) {
  .bar-in { padding-top: 8px; padding-bottom: 8px; }
  .bar nav { width: 100%; justify-content: space-between; }
  .bar nav a { padding: 6px 8px; font-size: 14px; }
}

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--ink); color: #fff; border: 0; border-radius: 4px; font-weight: 700; font-size: 16px; text-decoration: none; }
.btn:hover { background: var(--rec); color: #fff; }
.btn.big { min-height: 56px; padding: 0 30px; font-size: 18px; background: var(--rec); }
.btn.big:hover { background: #fff; color: var(--deck); }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 4px; min-height: 42px; padding: 0 16px; font-size: 15px; }
.ghost:hover:not(:disabled) { border-color: var(--ink); }
.ghost:disabled { opacity: .4; cursor: default; }
.link { color: inherit; font-weight: 600; }

/* 첫 화면 */
.hero { background: var(--deck); color: var(--deck-ink); border-bottom: 4px solid var(--rec); }
.hero-in { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 44px; align-items: center; }
@media (min-width: 880px) { .hero-in { grid-template-columns: 1.15fr 1fr; gap: 56px; padding-top: 72px; padding-bottom: 72px; } }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 600 14px/1.4 var(--sans); letter-spacing: 0; color: var(--muted); margin: 0 0 14px; }
.hero .eyebrow { color: #a9a8a1; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); box-shadow: 0 0 0 3px rgba(229, 67, 45, .25); }
.hero h1 { font-size: clamp(44px, 9vw, 84px); font-weight: 900; letter-spacing: -0.05em; line-height: 1.02; }
.hero .lead { color: #cfcec7; margin: 18px 0 28px; font-size: 17.5px; max-width: 34em; }
.hero-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero .link { color: #e9e8e2; }
.hero .link:hover { color: #fff; }
.resume { margin: 18px 0 0; color: #cfcec7; font-size: 15px; }
.resume button { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.hero-fig { background: var(--deck-2); border: 1px solid var(--deck-line); border-radius: 6px; padding: 18px 10px 8px; max-width: 420px; width: 100%; justify-self: center; }

/* 페이더 그림 */
.mixer { display: block; width: 100%; height: auto; }
.mixer .lt { font: 700 26px var(--mono); text-anchor: middle; fill: #6c6b70; }
.mixer .lt.on { fill: #fff; }
.mixer .cn { font: 500 13px var(--sans); text-anchor: middle; fill: #8c8b86; }
.mixer .tick line { stroke: #4c4c53; stroke-width: 1.4; }
.mixer .slot { stroke: #0c0c0e; stroke-width: 7; stroke-linecap: round; }
.mixer .lev { stroke: var(--rec); stroke-width: 7; stroke-linecap: round; }
.mixer .cap { fill: #e9e8e2; stroke: #0c0c0e; stroke-width: 1.5; }
.mixer .cap-l { stroke: var(--deck); stroke-width: 2; }
.doc-head .mixer .lt { fill: #b5b3ab; }
.doc-head .mixer .lt.on { fill: var(--ink); }
.doc-head .mixer .tick line { stroke: #bdbbb2; }
.doc-head .mixer .slot { stroke: #d9d7cf; }
.doc-head .mixer .cap { fill: var(--ink); stroke: var(--ink); }
.doc-head .mixer .cap-l { stroke: #fff; }
.doc-head .mixer .cn { fill: var(--muted); }

/* 검사 */
.quiz { padding-top: 40px; padding-bottom: 56px; max-width: 820px; }
.quiz-top { display: flex; align-items: center; gap: 16px; }
.quiz-count { font: 500 15px var(--mono); white-space: nowrap; }
.quiz-count b { font-weight: 700; font-size: 20px; }
.quiz-bar { flex: 1; height: 8px; background: #d9d7cf; border-radius: 2px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--rec); transition: width .2s; }
.quiz-hint { color: var(--muted); font-size: 15px; margin: 28px 0 8px; }
.quiz-q { font-size: clamp(22px, 4.6vw, 30px); font-weight: 800; min-height: 3.9em; outline: none; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0 26px; }
.scale button { display: flex; flex-direction: column; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px 4px 12px; font-size: 14px; line-height: 1.3; min-height: 92px; }
.scale button i { display: block; border-radius: 50%; border: 2px solid var(--ink); }
.scale button:nth-child(1) i, .scale button:nth-child(5) i { width: 30px; height: 30px; }
.scale button:nth-child(2) i, .scale button:nth-child(4) i { width: 24px; height: 24px; }
.scale button:nth-child(3) i { width: 18px; height: 18px; }
.scale button:hover { border-color: var(--ink); }
.scale button.picked { background: var(--ink); color: #fff; border-color: var(--ink); }
.scale button.picked i { background: var(--rec); border-color: var(--rec); }
@media (max-width: 520px) { .scale { gap: 5px; } .scale button { font-size: 12.5px; padding: 12px 2px 10px; min-height: 84px; } }
.quiz-foot { display: flex; justify-content: space-between; gap: 10px; }

/* 홈 본문 */
.prose-wrap { padding-top: 24px; padding-bottom: 40px; }
.block { padding: 36px 0; border-top: 1px solid var(--line); max-width: 756px; margin: 0 auto; }
.block:first-child { border-top: 0; }
.block h2 { font-size: clamp(24px, 4vw, 30px); font-weight: 800; margin-bottom: 14px; }
.block p { margin: 0 0 14px; color: var(--ink-2); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px; }
.steps li::before { content: '0' counter(s); grid-row: span 2; font: 700 22px var(--mono); color: var(--rec); }
.steps b { font-size: 17px; }
.steps span { color: var(--ink-2); font-size: 16px; }
.axes { display: grid; gap: 10px; margin: 18px 0 0; }
.axes div { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 4px; padding: 16px 18px; }
.axes dt { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.axes dt b { font-family: var(--mono); color: var(--rec); }
.axes dt span { color: var(--muted); margin: 0 4px; }
.axes dd { margin: 0; color: var(--ink-2); font-size: 16px; }

/* 유형 목록 */
.tag { display: inline-flex; align-items: center; justify-content: center; font: 700 13px var(--mono); color: #fff; padding: 3px 7px; border-radius: 3px; letter-spacing: .03em; }
.g-nt { --g: var(--nt); } .g-nf { --g: var(--nf); } .g-sj { --g: var(--sj); } .g-sp { --g: var(--sp); }
.tag { background: var(--g); }
.type-grid { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.type-grid a { display: flex; flex-direction: column; gap: 6px; height: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; text-decoration: none; }
.type-grid a:hover { border-color: var(--ink); color: inherit; }
.type-grid .tag { align-self: flex-start; }
.type-grid b { font-size: 16.5px; }
.type-grid span:last-child { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.groups { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 16px; }
.group { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--g); border-radius: 4px; padding: 16px; }
.group b { font-size: 17px; }
.group p { font: 700 14.5px var(--mono); margin: 6px 0 !important; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.group p a { color: var(--g); }
.group span { color: var(--ink-2); font-size: 15px; }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; position: relative; padding-right: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 12px; font: 500 20px var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }

/* 문서 */
.doc { padding-top: 28px; padding-bottom: 56px; }
.crumb { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.crumb a { color: inherit; }
.doc-head { padding-bottom: 28px; border-bottom: 2px solid var(--ink); margin-bottom: 8px; }
.doc-head h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 900; }
.doc-head .lead { font-size: 18px; color: var(--ink-2); margin: 14px 0 0; max-width: 40em; }
.type-head { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .type-head { grid-template-columns: 1fr 300px; } }
.type-head .eyebrow::before { content: ''; width: 12px; height: 12px; background: var(--g); border-radius: 2px; }
.type-head h1, .res-head h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.code { font: 700 clamp(52px, 11vw, 92px)/1 var(--mono); letter-spacing: -0.02em; color: var(--g); }
.nick { font-size: clamp(22px, 4vw, 32px); font-weight: 800; }
.type-fig { max-width: 300px; width: 100%; justify-self: center; }
.doc-body { max-width: 820px; }
.doc-body section { padding: 28px 0 8px; }
.doc-body h2 { font-size: clamp(22px, 3.6vw, 27px); font-weight: 800; margin: 0 0 12px; }
.doc-body section h2:not(:first-child) { margin-top: 26px; }
.doc-body h3 { font-size: 18px; font-weight: 800; margin: 18px 0 6px; }
.doc-body h4 { font-size: 16px; margin: 0 0 4px; }
.doc-body p { margin: 0 0 14px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 22px; color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .72em; width: 10px; height: 4px; background: var(--rec); border-radius: 1px; }
.jobs { list-style: none; padding: 0; margin: 4px 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.jobs li { background: var(--panel); border: 1px solid var(--line); border-radius: 3px; padding: 4px 12px; font-size: 15px; }

/* 인지 기능 */
.fns { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.fns li { display: grid; grid-template-columns: 82px 44px 1fr; grid-template-areas: 'r c n' 'r c m' 'd d d'; gap: 2px 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.fns .fr { grid-area: r; font-size: 14px; color: var(--muted); }
.fns b { grid-area: c; font: 700 22px var(--mono); }
.fns .fname { grid-area: n; font-weight: 700; }
.fns .fmeter { grid-area: m; height: 6px; background: #dedcd4; border-radius: 2px; overflow: hidden; }
.fns .fmeter i { display: block; height: 100%; background: var(--ink); }
.fns li:first-child .fmeter i { background: var(--rec); }
.fns .fdesc { grid-area: d; color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.fn-table { display: grid; gap: 10px; }
.fn-table div { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.fn-table dt { font-weight: 700; }
.fn-table dt b { font-family: var(--mono); color: var(--rec); margin-right: 6px; }
.fn-table dd { margin: 4px 0 0; color: var(--ink-2); font-size: 16px; }

/* 궁합 */
.c5 { --c: #18181b; --ct: #fff; }
.c4 { --c: #5f5f66; --ct: #fff; }
.c3 { --c: #b9b7ae; --ct: #18181b; }
.c2 { --c: #dedcd3; --ct: #18181b; }
.c1 { --c: #f6d3cc; --ct: #8a2414; }
.compat-list { display: grid; gap: 8px; margin: 14px 0; }
.compat-list div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; }
.compat-list dt { background: var(--c); color: var(--ct); font-weight: 700; font-size: 14px; text-align: center; border-radius: 3px; padding: 3px 0; }
.compat-list dd { margin: 0; font: 700 15.5px var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 16px; height: 16px; border-radius: 3px; background: var(--c); border: 1px solid rgba(0, 0, 0, .1); }
.compat-wrap { margin-left: -16px; margin-right: -16px; padding: 0 16px; }
table.compat { border-collapse: separate; border-spacing: 2px; font: 500 12.5px var(--mono); min-width: 640px; }
table.compat th { font-weight: 700; padding: 4px; white-space: nowrap; background: none; border: 0; }
table.compat thead th { writing-mode: vertical-rl; transform: rotate(180deg); height: 52px; vertical-align: bottom; }
table.compat th a { text-decoration: none; }
table.compat td { background: var(--c); color: var(--ct); text-align: center; width: 34px; height: 30px; padding: 0; border: 0; border-radius: 2px; }
.pairs { display: grid; gap: 10px; margin: 14px 0 0; }
.pairs div { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.pairs dt { font: 700 16px var(--mono); margin-bottom: 4px; }
.pairs dd { margin: 0; color: var(--ink-2); font-size: 15.5px; }

/* 표 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--ink); color: #fff; font-weight: 700; white-space: nowrap; }
tbody th { white-space: nowrap; font-family: var(--mono); }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .45); }

/* 안내 상자 */
.cta { margin: 32px 0 8px; background: var(--deck); color: var(--deck-ink); border-radius: 6px; padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border-left: 6px solid var(--rec); }
.cta p { margin: 0 !important; color: inherit !important; font-weight: 600; flex: 1 1 260px; }
.cta .btn { background: var(--rec); }
.cta .btn:hover { background: #fff; color: var(--deck); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.pager a { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; text-decoration: none; font-weight: 700; font-size: 15px; }
.pager a:last-child { text-align: right; }
.pager small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.muted { color: var(--muted) !important; font-size: 15px; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--rec); border-radius: 4px; padding: 12px 16px; font-size: 15px; color: var(--ink-2); }

/* 결과 */
.result { padding-top: 32px; padding-bottom: 56px; max-width: 920px; }
.empty { font-size: 18px; margin-bottom: 18px; }
.res-head { padding-bottom: 26px; border-bottom: 2px solid var(--ink); }
.res-head .lead { font-size: 18px; color: var(--ink-2); margin: 14px 0 22px; }
.res-block { padding: 26px 0 6px; }
.res-block h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.res-block p { margin: 0 0 10px; color: var(--ink-2); }
.res-grid { display: grid; gap: 0 32px; }
@media (min-width: 760px) { .res-grid { grid-template-columns: 1fr 1fr; } }
.faders { list-style: none; padding: 18px 16px 6px; margin: 14px 0 16px; background: var(--deck); color: var(--deck-ink); border-radius: 6px; display: grid; gap: 18px; }
.fader { padding-bottom: 14px; border-bottom: 1px solid var(--deck-line); }
.fader:last-child { border-bottom: 0; }
.f-head { display: flex; gap: 8px; align-items: center; font-size: 14px; color: #a9a8a1; margin-bottom: 8px; }
.f-head em { font-style: normal; font: 700 12px var(--mono); background: var(--rec); color: #fff; padding: 1px 6px; border-radius: 2px; }
.f-row { display: grid; grid-template-columns: 88px 1fr 88px; gap: 12px; align-items: center; }
.f-l, .f-r { display: flex; flex-direction: column; font-size: 14px; color: #8c8b86; line-height: 1.3; }
.f-r { text-align: right; align-items: flex-end; }
.f-l b, .f-r b { font: 700 26px var(--mono); }
.f-l small, .f-r small { font: 500 13px var(--mono); }
.f-l.on, .f-r.on { color: #fff; }
.f-l.on small, .f-r.on small { color: var(--rec); font-weight: 700; }
.f-track { position: relative; height: 8px; background: #0c0c0e; border-radius: 4px; }
.f-track::after { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1px; background: #55555c; }
.f-fill { position: absolute; top: 0; bottom: 0; background: var(--rec); border-radius: 4px; }
.f-cap { position: absolute; top: 50%; width: 16px; height: 28px; margin: -14px 0 0 -8px; background: #e9e8e2; border-radius: 3px; border: 1px solid #0c0c0e; box-shadow: inset 0 -3px 0 #bdbbb3; }
@media (max-width: 480px) { .f-row { grid-template-columns: 64px 1fr 64px; gap: 8px; } .f-l b, .f-r b { font-size: 22px; } }
.fn-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fn-mini li { display: grid; grid-template-columns: 52px 40px 1fr; gap: 8px; align-items: baseline; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-size: 15px; }
.fn-mini span { color: var(--muted); font-size: 13.5px; }
.fn-mini b { font: 700 17px var(--mono); }
.res-block a:not(.plain) { font-family: var(--mono); font-weight: 700; }

/* 바닥 */
.foot { background: var(--deck); color: #bdbcb5; margin-top: 24px; padding: 40px 0 28px; font-size: 14.5px; }
.foot-in { display: grid; gap: 26px; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot-name { color: #fff; font-weight: 800; font-size: 17px; margin: 0 0 6px; }
.foot p { margin: 0; }
.foot-types { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 14px; justify-content: start; font-family: var(--mono); }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }
.foot-note { margin: 28px auto 0 !important; padding-top: 18px; border-top: 1px solid var(--deck-line); font-size: 13.5px; color: #8c8b86; }
table.compat { width: auto; }
table.compat thead th { color: var(--ink); background: none; }
table.compat tbody tr { background: none; }
table.compat tbody th { padding-right: 10px; }

/* 모바일 보정 */
.types-table { min-width: 640px; }
.types-table td:nth-child(3) { min-width: 220px; }
@media (max-width: 560px) {
  .bar { position: static; }
  .type-fig { max-width: 220px; }
}
