/* 두뇌실험실 · 밝고 부드럽게 (C안: 크림 바탕, 검사별 파스텔, 둥근 카드) */
:root {
  /* 항상 밝은 화면(2026-10-18). "only"는 휴대폰·카카오톡 브라우저가 화면을 억지로 어둡게 바꾸지 못하게 한다 */
  color-scheme: only light;
  --bg: #fff8f1;
  --surface: #ffffff;
  --ink: #2b2522;
  --ink-2: #4a413c;
  --muted: #7a6e67;
  --line: #f0e6dc;
  --line-2: #e5d7ca;
  --accent: #6150e0;
  --accent-ink: #ffffff;
  --accent-soft: #eeeaff;
  --accent-line: #c9c1f7;
  --ok: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --accent-2: #f08a5d;
  --accent-2-soft: #ffe9df;
  --accent-2-ink: #b4532a;
  --blk-t: #ffffff; --blk-l: #d2cafb; --blk-r: #a89cef;   /* 블록 옆면을 윗면보다 뚜렷이 어둡게 해서 깊이가 잘 읽히게 한다(WCAG 대비: 윗면과 왼쪽 옆면 1.55:1, 오른쪽 옆면 2.4:1, 두 옆면끼리 1.57:1) */
  --radius: 24px;
  --chip: rgba(255, 255, 255, .62);
  --radius-s: 16px;
  --shadow: 0 1px 2px rgba(74, 50, 30, .05), 0 12px 30px rgba(122, 86, 52, .09);
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, "D2Coding", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- 상단 바 ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
/* 검사 화면(body.running)에서는 상단 바를 고정하지 않는다. 문항이 길어 내려 볼 때 바가 화면 위를 가리지 않게 한다 */
.running .topbar { position: static; }
.topbar-inner { max-width: 560px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.02em; }
.brand-mark { width: 16px; height: 16px; margin-right: 4px; border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%; background: var(--accent); box-shadow: 9px -6px 0 -4px #f2b530, -7px 7px 0 -5px #f08a5d; }
.topnav { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.topnav a:hover { color: var(--ink); }

/* ---------- 홈 ---------- */
.hero { padding: 26px 0 22px; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.hero h1 { font-size: 32px; line-height: 1.28; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--ink-2); margin-top: 12px; font-size: 16px; line-height: 1.65; }
.title { font-size: 28px; line-height: 1.28; font-weight: 800; letter-spacing: -0.02em; }
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 520px) { .grid { grid-template-columns: 1fr 1fr; } }
.test-card {
  display: flex; flex-direction: column; gap: 8px; position: relative;
  background: var(--tint, var(--surface)); color: var(--tint-ink, var(--ink)); border: 0; border-radius: 28px;
  padding: 22px 20px 20px; transition: transform .15s, box-shadow .15s;
}
.test-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.test-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.num { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: 0.04em; }
.tag-measure { background: var(--accent-soft); color: var(--accent); }
.tag-trait { background: var(--accent-2-soft); color: var(--accent-2-ink); }
.test-card h2 { font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; padding-right: 40px; }
.test-card p { font-size: 14px; line-height: 1.55; opacity: .82; flex: 1; }
.test-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card-kicker { font-size: 12px; font-weight: 700; opacity: .75; }
.card-go { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; }
.chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--chip); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.hero-chips span { font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; }
.intro-hero, .result-hero { background: var(--accent-soft); color: var(--tint-ink, var(--ink)); border-radius: 28px; padding: 24px 20px 22px; }
.intro-hero .eyebrow, .result-hero .eyebrow { color: inherit; opacity: .75; }
.intro-hero .lead { color: inherit; opacity: .88; }
.result-hero .badge { margin-bottom: 0; }
.result .summary { margin-top: 18px; }

.block { margin-top: 32px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.block-head h3 { font-size: 15px; font-weight: 700; }
.link { font-size: 13px; color: var(--accent); }
.rows { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.row {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t d" "s d";
  gap: 2px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; margin-bottom: 8px;
}
.rows .row { margin-bottom: 0; }
.row-title { grid-area: t; font-weight: 600; font-size: 15px; }
.row-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tint-strong, var(--accent)); margin-right: 8px; vertical-align: 2px; }
.row-sub { grid-area: s; font-size: 13px; color: var(--muted); }
.row-date { grid-area: d; font-size: 12px; color: var(--muted); align-self: center; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* ---------- 소개 ---------- */
.back { display: inline-block; font-size: 13px; color: var(--muted); margin: 18px 0 20px; }
.back:hover { color: var(--ink); }
.intro-list { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.intro-list li { position: relative; padding-left: 18px; font-size: 15px; color: var(--ink-2); }
.intro-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 24px 0; }
.spec > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.spec span { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: 0.06em; }
.notice { font-size: 12px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; margin-top: 20px; line-height: 1.5; }
.explain { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; }
.explain h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.explain-row { padding: 12px 0; border-top: 1px solid var(--line); }
.explain h3 + .explain-row { border-top: 0; }
.explain-row h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.explain-row p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.explain-where { margin-top: 6px; }
.explain-where .mono, .where .mono { display: inline-block; font-size: 11px; color: var(--accent); letter-spacing: .08em; margin-right: 6px; vertical-align: 1px; }
.explain-row .explain-tasks { font-size: 12px; color: var(--muted); margin-top: 6px; }
.section-card .where { font-size: 14px; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); z-index: 50; text-align: center; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.sheet-card { background: var(--surface); color: var(--ink); width: 100%; max-width: 420px; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin: auto 0; }
.sheet-card h3 { font-size: 16px; font-weight: 800; }
.sheet-card img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.sheet-card p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.sheet-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-btns .btn { flex: 1 1 30%; }
.gal-item { margin: 18px 0 30px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.gal-item > p { margin-bottom: 8px; line-height: 1.5; }
.banner { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; padding: 10px 12px; border-radius: var(--radius-s); margin-top: 16px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 15px 20px; border-radius: 999px; border: 1.5px solid var(--line-2);
  background: var(--surface); font-weight: 700; font-size: 15px; line-height: 1; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--accent-line); }
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 18px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-block { width: 100%; }

/* ---------- 진행 ---------- */
.run { padding-top: 14px; }
.run-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.run-title:hover { color: var(--ink); }
.progress { height: 8px; background: var(--accent-soft); border-radius: 999px; margin: 10px 0 24px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.item { animation: rise .22s ease-out; }
/* 화면을 벗어나 멈춘 객관식 문항(2026-10-18): 문제와 보기를 가리고 멈춤 카드만 보인다 */
.item.paused > :not(.pause-card) { display: none; }
.run-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 18px; }
.run-nav .btn { padding: 10px 14px; font-size: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-card { background: var(--accent-soft); border: 0; border-radius: 28px; padding: 26px 22px; display: flex; flex-direction: column; gap: 10px; }
.section-card h2 { font-size: 22px; font-weight: 800; }
.section-card p { color: var(--ink-2); font-size: 15px; }
.section-card .btn { margin-top: 12px; }

.timer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.timer { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.timer-bar { height: 100%; width: 100%; background: var(--warn); border-radius: 2px; }
.timer-num { font-size: 12px; color: var(--muted); min-width: 24px; text-align: right; }
.timer-row.urgent .timer-bar { background: var(--bad); }
.timer-row.urgent .timer-num { color: var(--bad); font-weight: 700; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.q-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.level-dots { letter-spacing: 2px; color: var(--accent); font-size: 11px; }
.practice-tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }
.practice-fb { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); animation: rise .2s ease-out; }
.practice-fb.ok { border-color: var(--ok); }
.practice-fb.bad { border-color: var(--warn); }
.practice-title { font-weight: 800; margin-bottom: 8px; }
.practice-fb.ok .practice-title { color: var(--ok); }
.practice-fb.bad .practice-title { color: var(--warn); }
.practice-explain { font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 8px 0 12px; }
.practice-fb .rv-opt .cell { width: 72px; }
.opt:disabled { opacity: .55; cursor: default; }
.opt.correct { opacity: 1; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.resume { display: flex; flex-direction: column; gap: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; margin-top: 20px; }
.resume strong { display: block; font-size: 15px; }
.resume-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.time-set { display: flex; flex-direction: column; gap: 6px; margin: 20px 0 12px; }
.time-set .modes-label { margin-bottom: 2px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg-btn { border: 0; background: transparent; padding: 10px 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg-btn + .seg-btn { border-left: 1px solid var(--line-2); }
.seg-btn.on { background: var(--accent); color: var(--accent-ink); }
.profile-card { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; background: var(--accent-soft); border: 0; border-radius: var(--radius); padding: 18px 20px; }
.profile-card .eyebrow { margin-bottom: 2px; }
.profile-main { font-size: 20px; font-weight: 800; }

.scenario { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius-s); padding: 14px 16px; font-size: 15px; line-height: 1.65; color: var(--ink-2); margin-bottom: 16px; }
.q-prompt { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 16px; }
.q-likert { font-size: 20px; min-height: 84px; display: flex; align-items: center; }
.q-lead { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

.options { display: grid; grid-template-columns: 1fr; gap: 8px; }
.options.cols-2 { grid-template-columns: 1fr 1fr; }
.options.cols-3 { grid-template-columns: repeat(3, 1fr); }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  padding: 14px 16px; font-size: 15px; line-height: 1.45; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--accent-line); }
.opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.opt-key { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.opt.selected .opt-key { border-color: var(--accent); color: var(--accent); }
.cols-2 .opt { justify-content: center; text-align: center; }
.cols-2 .opt-key { display: none; }
.options-visual .opt { padding: 8px; aspect-ratio: 1; justify-content: center; }
.options-visual .cell { width: 100%; height: 100%; }

.matrix { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; }
.matrix.matrix2 { grid-template-columns: repeat(2, 1fr); max-width: 260px; margin-left: auto; margin-right: auto; }
.options.cols-4.options-visual { gap: 6px; }
.options-visual .opt { padding: 3px; }
/* 보기 그림에는 안쪽 칸 테두리를 따로 두지 않는다. 단추 테두리 하나면 충분하고, 그만큼 그림이 커진다(폰에서 약 66px → 73px) */
.options-visual .opt > .cell { border-color: transparent; background: transparent; }
.cell { display: block; width: 100%; aspect-ratio: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.cell-missing { display: flex; align-items: center; justify-content: center; border-style: dashed; border-color: var(--accent-line); color: var(--accent); font-size: 28px; font-weight: 700; font-family: var(--mono); }
.seq { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--mono); font-size: 26px; font-weight: 700; margin-bottom: 20px; }
.seq span { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; min-width: 52px; text-align: center; }
.seq .seq-q { border-style: dashed; border-color: var(--accent-line); color: var(--accent); }

.likert { display: flex; justify-content: space-between; gap: 4px; }
.lk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 0; }
.lk-dot { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line-2); transition: border-color .12s, background .12s, transform .12s; }
.lk-1 .lk-dot { width: 46px; height: 46px; } .lk-5 .lk-dot { width: 46px; height: 46px; }
.lk-2 .lk-dot, .lk-4 .lk-dot { width: 42px; height: 42px; }
.lk:hover .lk-dot { border-color: var(--accent-line); }
.lk.selected .lk-dot { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.lk-label { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }

.span-stage { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; }
.span-digit { font-size: 92px; font-weight: 700; line-height: 1; height: 140px; display: flex; align-items: center; justify-content: center; width: 140px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: color .1s; color: var(--line-2); }
.span-digit.on { color: var(--ink); }
.span-stage .btn { max-width: 320px; }
.span-stage .btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
/* 기억 폭 과제 입력(2026-10-18): 휴대폰 키보드 대신 화면 버튼. 넣은 답은 밑줄 칸에 보이고, 남은 칸 수로 몇 개를 더 넣어야 하는지 알 수 있다 */
.span-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 34px; max-width: 320px; }
.span-slots span { width: 24px; height: 32px; border-bottom: 2px solid var(--line-2); font-size: 20px; font-weight: 700; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.span-slots span.on { border-color: var(--accent); }
.digit-pad { display: grid; grid-template-columns: repeat(3, 56px); }
.span-tools { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 320px; }
.span-tools .btn-ghost { padding: 15px 10px; }
.span-tools #ok { flex: 1; }
.digit-pad .lns-btn:last-child { grid-column: 2; }
.span-fb { font-size: 30px; font-weight: 800; padding-top: 40px; }
.span-fb.ok { color: var(--ok); }
.span-fb.bad { color: var(--bad); }

.rt-wrap { display: flex; flex-direction: column; gap: 10px; }
.rt-pad {
  width: 100%; height: min(60vh, 440px); min-height: 300px; border-radius: var(--radius); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface); user-select: none; -webkit-user-select: none; touch-action: manipulation; transition: background .05s;
}
.rt-big { font-size: 32px; font-weight: 800; }
.rt-small { font-size: 14px; opacity: .8; }
/* 신호를 색 하나에 맡기지 않는다(2026-10-18): 기다리는 동안은 어둡고, "지금!"은 아주 밝은 바탕 + 흰 동그라미 + 글자로 한꺼번에 바뀐다.
   어두운 #1f2937 → 밝은 #4ade80의 밝기 대비는 8.4:1이고 적록 색각 이상 흉내(Machado 2009)에서도 8.0~9.0:1이다(예전 빨강→초록은 녹색맹 흉내에서 1.14:1). */
.rt-pad.wait { background: #1f2937; color: #fff; border-color: #1f2937; }
.rt-pad.go { background: #4ade80; color: #052e16; border-color: #4ade80; }
.rt-pad.go::before { content: ''; width: 112px; height: 112px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 10px rgba(255, 255, 255, .35); }
.rt-pad.early { background: #f59e0b; color: #2b1d00; border-color: #f59e0b; }
.rt-pad.shown, .rt-pad.done { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.rt-pad.shown .rt-big, .rt-pad.done .rt-big { font-family: var(--mono); font-size: 44px; }

/* ---------- 결과 ---------- */
.result .headline { font-size: 34px; line-height: 1.22; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.badge { display: inline-block; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.summary { font-size: 16px; color: var(--ink-2); line-height: 1.65; }
.scales { margin: 24px 0 16px; display: flex; flex-direction: column; gap: 14px; }
.scale-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.scale-head .mono { color: var(--accent); font-weight: 700; }
.scale-head small { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 4px; }
.bar { height: 12px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s ease-out; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 16px; }
.actions-share { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.btn-kakao { background: #fee500; color: #191919; border-color: #fee500; }
.btn-kakao:hover { filter: brightness(.97); }
.action-note { min-height: 18px; margin-bottom: 8px; }
.rs { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px 18px; margin-bottom: 10px; }
.rs h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.rs p { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.rs p + p { margin-top: 8px; }
.rs-list { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.rs-list li + li { margin-top: 4px; }
.plot { display: block; width: 100%; max-width: 320px; margin: 20px auto 4px; }
.plot-q { font-size: 11px; fill: var(--muted); font-family: var(--font); }
.plot-axis { font-size: 11px; fill: var(--accent); font-family: var(--mono); letter-spacing: 0.08em; }
.about .rs { margin-top: 14px; }

/* ---------- 검사 방식 선택 ---------- */
.modes-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.modes { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mode { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; transition: border-color .12s, background .12s; }
.mode:hover { border-color: var(--accent); background: var(--accent-soft); }
.mode-title { font-size: 17px; font-weight: 800; }
.mode-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.mode-meta { font-size: 12px; color: var(--accent); margin-top: 4px; }
.task-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.task-head .modes-label { margin-bottom: 0; }
.task-group { margin-top: 10px; }
.task-group-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-bottom: 6px; }
.task-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.task-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; transition: border-color .12s, background .12s; }
.task-chip .mono { font-size: 11px; color: var(--muted); font-weight: 500; }
.task-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.task-chip.done { border-color: var(--accent-line); background: var(--accent-soft); }
.task-chip.done .mono { color: var(--accent); font-weight: 700; }
.profile-link { margin-bottom: 14px; }
.bar { position: relative; }
.bar-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--line-2); z-index: 1; }
.scale-iq .bar-fill { position: relative; }
.section-sub { padding: 20px 18px; }
.section-sub h2 { font-size: 19px; }

/* ---------- 추가 과제 ---------- */
.options.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.series { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 18px; }
.analogy { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.an-pair { display: flex; align-items: center; gap: 6px; }
.an-pair .cell { width: 30%; max-width: 120px; flex-shrink: 0; }
.an-label { font-size: 11px; color: var(--muted); width: 14px; text-align: center; }
.an-sep { font-weight: 800; color: var(--muted); padding: 0 4px; }
.scales-given { display: grid; gap: 6px; margin-bottom: 16px; }
/* 저울 그림(svg)만. 결과 화면의 막대 줄(div.scale)에는 적용하지 않는다 */
svg.scale { display: block; width: 100%; max-width: 360px; margin: 0 auto; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); }
.scales-given .scale:last-child { border-color: var(--accent-line); }
.options.cols-2.options-visual .opt { aspect-ratio: auto; padding: 6px 10px; }
.pan-opt { width: 100%; color: var(--ink); background: transparent; border: 0; }
.glyph { width: 40px; height: 40px; color: var(--ink); }
.ss { display: flex; flex-direction: column; gap: 12px; }
.ss-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ss-head .urgent { color: var(--bad); font-weight: 700; }
.ss-board { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px; min-height: 90px; }
.ss-targets { display: flex; gap: 4px; }
.ss-div { width: 2px; align-self: stretch; background: var(--accent); border-radius: 1px; }
.ss-row { display: flex; gap: 4px; flex: 1; justify-content: space-around; }
/* 기호 크기를 남는 너비에 맞춘다(2026-10-18): 판의 고정 너비(간격·구분선·패딩·테두리 합 60px)와 .wrap 좌우 패딩 32px을 빼고 일곱으로 나눈다(4px 여유).
   360px 화면에서 37.7px, 390px에서 42px, 404px부터 44px. 예전 11vw는 390px 이하에서 오른쪽 기호가 판을 6~22px 넘었다. */
.ss-board .glyph { width: min(44px, calc((100vw - 96px) / 7)); max-width: 44px; height: auto; aspect-ratio: 1; flex: 0 0 auto; }
.ss-board[hidden], .ss .crt-btns[hidden], .ss-pause[hidden] { display: none; }
.ss-pause { background: var(--accent-soft); border-radius: var(--radius); padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; text-align: center; color: var(--ink-2); }
.ss .glyph.hit, .ss-ex .glyph.hit { color: var(--ok); }
.ss .glyph.lure, .ss-ex .glyph.lure { color: var(--warn); }
.ss-exs { display: flex; flex-direction: column; gap: 8px; }
.ss-ex { background: var(--surface); border-radius: var(--radius-s); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ss-ex-board { display: flex; align-items: center; gap: 8px; }
.ss-ex-g { display: flex; gap: 2px; }
.ss-ex .glyph { width: 30px; height: 30px; }
.ss-ex p { font-size: 13px; color: var(--ink-2); }
.lns-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 320px; }
.lns-pad { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.lns-grp-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-bottom: 6px; }
.lns-nums { display: grid; grid-template-columns: repeat(3, 56px); }
.lns-cons { display: grid; grid-template-columns: repeat(4, 56px); }
.lns-btn { width: 56px; height: 56px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); font-size: 22px; font-weight: 700; }
.lns-btn:disabled { opacity: .3; }
.poly-prompt { display: flex; justify-content: center; margin-bottom: 18px; }
.poly-prompt .cell { width: 140px; }
.cell.poly { color: var(--accent); }
.options-visual .cell.poly { color: var(--ink); }
/* 전개도 접기: 전개도(칸 100단위, --c = 가로 칸 수)와 정육면체 보기(위·왼쪽·오른쪽 면, 옆면은 잉크색을 옅게 겹쳐 어둡게) */
/* 폰 한 화면(약 390×700)에 전개도와 보기 네 개가 다 들어가게, 전개도 칸(최대 62px)과 정육면체 보기(최대 120px)를 화면 높이에 맞춰 줄인다 */
.fold-prompt { display: flex; justify-content: center; margin-bottom: 12px; }
.fold-net { display: block; width: min(100%, calc(var(--c) * min(62px, 7vh))); height: auto; color: var(--ink); }
.fold-net .sq { fill: var(--surface); stroke: var(--ink-2); stroke-width: 3; }
.fold-net g, .cube g { fill: currentColor; }
.cell.cube { color: var(--ink); aspect-ratio: 75 / 86; }   /* viewBox를 정육면체 둘레(75×86)에 맞게 잘랐다 */
.options-visual .opt > .cell.cube { width: min(100%, 120px, 14vh); height: auto; }
/* 사파리·인앱 브라우저처럼 아래 도구 막대가 접혔다 펴지는 곳에서는 vh가 실제로 보이는 높이보다 클 수 있다. svh를 아는 브라우저에서는 막대가 펴진 높이(svh)로 맞춘다 */
@supports (height: 1svh) {
  .fold-net { width: min(100%, calc(var(--c) * min(62px, 7svh))); }
  .options-visual .opt > .cell.cube { width: min(100%, 120px, 14svh); }
}
.cube .cf { fill: var(--surface); stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.cube .cs { fill: currentColor; stroke: none; }
.cube .cs-l { fill-opacity: .07; }
.cube .cs-r { fill-opacity: .15; }
/* 블록 세기: --w = 그림 가로(단위), 블록 모서리 20단위가 화면에서 약 34px */
.blk-prompt { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 16px; }
.blk { display: block; width: calc(var(--w) * 1.7px); max-width: 100%; height: auto; }
.blk polygon { stroke: var(--ink); stroke-width: .9; stroke-linejoin: round; }
.blk .bt { fill: var(--blk-t); }
.blk .bl { fill: var(--blk-l); }
.blk .br { fill: var(--blk-r); }
.blk-rule { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.5; }

.gspan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 300px); }
.gcell { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0; transition: background .1s, transform .1s; }
.gspan.show .gcell { pointer-events: none; }
/* 칸 테두리는 바탕과 대비 3:1 이상(--muted는 바탕 #fff8f1과 4.7:1). 예전 1px --line-2는 1.3:1이라 칸이 잘 안 보였다 */
.gspan.show .gcell, .gspan.input .gcell { border: 2px solid var(--muted); }
.gcell.on { background: var(--accent); border-color: var(--accent); }
.gspan .gcell.tap { background: var(--accent); border-color: var(--accent); transform: scale(.96); }
/* 틀렸을 때 보여 주는 정답 순서: 작은 격자에 번호 */
.gspan.answer { width: min(100%, 168px); gap: 6px; }
.practice-fb .gspan.answer { margin: 6px auto 4px; }
.gspan.answer .gcell { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--accent); }
.gspan.answer .gcell.num { background: var(--accent-soft); border: 2px solid var(--accent); }

.crt { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.crt-stim { width: 100%; height: 220px; display: flex; align-items: center; justify-content: center; font-size: 96px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.crt-stim.ok { color: var(--ok); font-size: 64px; }
.crt-stim.bad { color: var(--bad); font-size: 64px; }
.crt-stim.early { color: var(--warn); font-size: 26px; padding: 0 12px; text-align: center; }
.crt-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.crt-btn { padding: 22px 0; font-size: 17px; }
.stroop-word { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; font-size: 72px; font-weight: 800; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stroop-word.note { font-size: 24px; padding: 0 12px; text-align: center; }
/* 2×2 배치(2026-10-18): 두 손으로 잡으면 왼쪽 엄지가 1·3번, 오른쪽 엄지가 2·4번을 맡아 한 줄 네 칸보다 엄지가 덜 움직인다. 숫자키 1~4 대응은 그대로 */
.stroop-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.stroop-btn { height: 64px; border-radius: 12px; border: 0; color: rgba(255,255,255,.85); font-size: 13px; }
.stroop-btn:active { transform: scale(.97); }
/* 터치 기기: 두 번 탭 확대·길게 눌러 선택·탭 하이라이트를 막아 반응·기억 과제의 탭이 바로, 한 번만 들어가게 한다 */
.rt-pad, .crt-btn, .stroop-btn, .gcell, .lns-btn, .opt { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }

/* ---------- 결과 트리 · 복기 ---------- */
.scale-children { margin: 8px 0 6px 14px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.scale-child .scale-head { font-size: 13px; font-weight: 500; }
.scale-child .scale-head .mono { color: var(--ink-2); font-weight: 600; }
.scale-child .bar { height: 6px; }
.scale-child .bar-fill { background: var(--accent-line); }
.review { margin: 6px 0 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
.review summary { cursor: pointer; padding: 12px 16px; font-size: 14px; font-weight: 700; list-style: none; }
.review summary::-webkit-details-marker { display: none; }
.review summary::after { content: "펼치기"; float: right; font-size: 12px; color: var(--muted); font-weight: 500; }
.review[open] summary::after { content: "접기"; }
.rv { border-top: 1px solid var(--line); padding: 14px 16px; }
.rv-title { font-size: 12px; color: var(--accent); margin-bottom: 8px; }
.rv-prompt { font-size: 14px; margin-bottom: 8px; }
.rv-visual .matrix, .rv-visual .series { max-width: 240px; margin-bottom: 10px; }
.rv-visual .seq { font-size: 18px; margin-bottom: 10px; }
.rv-visual .seq span { min-width: 40px; padding: 4px 8px; }
.rv-visual .poly-prompt { justify-content: flex-start; margin-bottom: 10px; }
.rv-visual .poly-prompt .cell { width: 90px; }
.rv-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.rv-ans > div { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.rv-k { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.rv-opt .cell { width: 72px; }
.rv-opt .cell.cube, .practice-fb .rv-opt .cell.cube { width: 96px; }
.rv-visual .fold-prompt, .rv-visual .blk-prompt { justify-content: flex-start; align-items: flex-start; margin-bottom: 10px; }
.rv-visual .fold-net { width: min(100%, calc(var(--c) * 40px)); }
.rv-visual .blk { width: calc(var(--w) * 1px); }
.rv-visual .blk-rule { text-align: left; }
.rv-explain { font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* ---------- 푸터 ---------- */
.footer { max-width: 560px; margin: 0 auto; padding: 24px 16px 56px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.6; }
.footer p + p { margin-top: 4px; }

/* ---------- 검사별 색 ----------
   .tint-<id>: 파스텔 바탕(tint)·그 위 글자(ink)·버튼과 막대(strong)·그 위 글자(on)·테두리(line).
   .tinted: 그 색을 화면의 --accent로 써서 버튼·진행 막대·보기 선택이 검사 색을 따르게 한다. */
.tint-cognitive { --tint: #ece8ff; --tint-ink: #2e2470; --tint-strong: #6150e0; --tint-on: #ffffff; --tint-line: #c9c1f7; }
.tint-eq { --tint: #ffe4ee; --tint-ink: #6e1e40; --tint-strong: #c93c76; --tint-on: #ffffff; --tint-line: #f4b5cd; }
.tint-personality { --tint: #d9f5ea; --tint-ink: #0e4d3a; --tint-strong: #14845f; --tint-on: #ffffff; --tint-line: #9fdcc3; }
.tint-attachment { --tint: #ffe6db; --tint-ink: #74301a; --tint-strong: #c4532d; --tint-on: #ffffff; --tint-line: #f6bba3; }
.tint-interest { --tint: #ddeeff; --tint-ink: #10406e; --tint-strong: #2d72c2; --tint-on: #ffffff; --tint-line: #a9cdf3; }
.tint-love { --tint: #fff0c9; --tint-ink: #6a4a06; --tint-strong: #9a6208; --tint-on: #ffffff; --tint-line: #f3d58a; }
.tinted { --accent: var(--tint-strong); --accent-ink: var(--tint-on); --accent-soft: var(--tint); --accent-line: var(--tint-line); }
/* 익명 통계 (2026-10-18): 첫 결과 화면 안내와 스위치, 임시 기준값 옆의 "실제 응시자 기준" 줄 */
.stats-notice { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; margin-top: 18px; }
.stats-notice strong { display: block; font-size: 15px; margin-bottom: 6px; }
.stats-notice p { font-size: 13px; color: var(--ink-2); line-height: 1.6; margin: 0 0 10px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.rs .switch { margin-top: 10px; }
.real-norm { font-size: 13px; color: var(--ink-2); font-weight: 600; margin: 10px 0 0; }