/* culturemap.css — 컬처맵 8축 자가진단 전용 스타일. 강의자료와 같은 팔레트(인계서 §8). 이모지 쓰지 않음. 외부 웹폰트 없음. */
:root {
  --navy: #111C34; --green: #50AD28; --orange: #DE6A10; --blue: #2E6FB7;
  --teal: #1F8A85; --purple: #6B4EA0; --red: #C82506; --gray: #6B7280;
  --line: #C9D2DA; --wash: #F5F7F9; --white: #FFFFFF;
  --bg: #F5F7F9; --card: #FFFFFF; --ink: #111C34; --sub: #4B5563;
  --accent: var(--orange);
  --accent-ink: #A34C08;          /* 흰 바탕 위 글자용 — 악센트 원색은 대비 4.5 미달이라 짙게 */
  /* ⚠️ 라이트 고정 — 다크 모드는 뺐다(삼성 인터넷·앱 안 브라우저의 자동 어둡게와 겹쳐 폰마다 달라 보였다, 2026-09-13).
     ⚠️ color-mix() 금지 — 결과 이미지 저장(html2canvas)이 못 읽는다. 악센트(#DE6A10)와 섞은 값을 미리 계산해 둔다. */
  --tint: #FAEADE;   /* 악센트 14% + 흰색 */
  --edge: #F4CCAE;   /* 테두리 — 악센트 34% + 흰색(인계서) */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); min-height: 100vh;
  word-break: keep-all; overflow-wrap: anywhere;
}
.wrap { max-width: 600px; margin: 0 auto; padding: 16px 16px 40px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; color: inherit; }

.brand { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 2px 10px; font-size: 14px; color: var(--sub); }
.brand b { color: var(--ink); font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; margin-top: 12px; }
h1 { font-size: 24px; line-height: 1.35; letter-spacing: -0.02em; }
h2 { font-size: 19px; line-height: 1.4; margin-bottom: 8px; }
.lead { color: var(--sub); margin-top: 4px; }
.sess { display: inline-block; margin-top: 10px; padding: 3px 10px; border-radius: 999px; background: var(--tint); border: 1px solid var(--edge); color: var(--accent-ink); font-size: 14px; font-weight: 700; }
ul.dots { list-style: none; margin-top: 14px; }
ul.dots li { position: relative; padding-left: 16px; margin-top: 4px; }
ul.dots li::before { content: ""; position: absolute; left: 3px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.muted { color: var(--sub); font-size: 15px; }

/* 안내·동의 */
.notice { margin-top: 16px; padding: 14px 14px; background: var(--tint); border: 1px solid var(--edge); border-radius: 12px; font-size: 15px; }
.notice b { display: block; margin-bottom: 4px; }
.fld { display: block; font-weight: 700; margin: 16px 0 6px; font-size: 15px; }
.fld .req { color: var(--red); }
input[type=text], input[type=email], select {
  width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 12px;
  font: inherit; font-size: 16px; background: var(--card); color: var(--ink);
}
input:focus, select:focus { border-color: var(--accent-ink); outline: none; box-shadow: 0 0 0 3px var(--edge); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font-size: 15px; }
.chips input:checked + span { border-color: var(--accent-ink); background: var(--tint); font-weight: 700; }
.chips input:focus-visible + span { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.consent { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--wash); font-size: 15px; }
.consent label.chk { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.consent input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--accent-ink); }
.consent table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.consent th, .consent td { text-align: left; vertical-align: top; padding: 5px 4px; border-top: 1px solid var(--line); }
.consent th { width: 5.6em; color: var(--sub); font-weight: 700; white-space: nowrap; }
.err { color: var(--red); font-weight: 700; margin-top: 12px; min-height: 1.4em; font-size: 15px; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: 18px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.line { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); font-weight: 700; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { margin-top: 12px; }

/* 진행률 */
.prog { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 10px 0 8px; }
.prog .num { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.prog .bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog .fill { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.q-area { font-size: 14px; font-weight: 700; color: var(--accent-ink); }
.q-text { font-size: 20px; font-weight: 800; line-height: 1.5; margin: 6px 0 16px; min-height: 3em; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 17px; }
.opt .mark { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.opt[aria-checked="true"] { border-color: var(--accent-ink); background: var(--tint); font-weight: 700; }
.opt[aria-checked="true"] .mark { border-color: var(--accent-ink); background: var(--accent-ink); box-shadow: inset 0 0 0 3px var(--card); }
@media (hover: hover) { .opt:hover { border-color: var(--accent-ink); } }
.back { margin-top: 14px; background: none; border: 0; color: var(--sub); font-size: 15px; font-weight: 700; padding: 8px 4px; cursor: pointer; }

/* 결과 */
.sec-t { font-size: 15px; font-weight: 800; color: var(--accent-ink); margin: 18px 0 6px; }
.status { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15px; background: var(--wash); border: 1px solid var(--line); }
.status.ok { background: var(--tint); border-color: var(--edge); }
.status.fail { border-color: var(--red); color: var(--red); }
.total { color: var(--sub); font-size: 15px; }
.hbar { margin-top: 12px; }
.hbar .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 700; }
.hbar .lbl .v { font-size: 20px; font-weight: 800; white-space: nowrap; }
.hbar .trk { display: block; height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; margin-top: 4px; }
.hbar .fil { display: block; height: 100%; background: var(--gray); }
.hbar.low .fil { background: var(--accent); }
.hbar.low .lbl { color: var(--accent-ink); }
.hbar .tag { font-size: 13px; font-weight: 800; padding: 1px 8px; border-radius: 999px; border: 1.5px solid var(--accent-ink); color: var(--accent-ink); margin-left: 6px; white-space: nowrap; }
.rx { margin-top: 16px; padding: 14px; background: var(--tint); border: 1px solid var(--edge); border-radius: 12px; }
.rx .h { font-size: 14px; font-weight: 800; color: var(--accent-ink); margin-bottom: 4px; }

/* 0~100 축 위의 점들 */
.dim { padding: 14px 0; border-top: 1px solid var(--line); }
.dim:first-of-type { border-top: 0; }
.dim .nm { font-weight: 800; font-size: 17px; }
.dim .nm small { font-weight: 700; color: var(--sub); font-size: 13px; margin-left: 4px; }
.axis { position: relative; height: 34px; margin: 8px 6px 2px; }
.axis::before { content: ""; position: absolute; left: 0; right: 0; top: 16px; height: 3px; background: var(--line); border-radius: 2px; }
.axis .pt { position: absolute; top: 9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; border: 2px solid var(--card); }
.axis .pt.me { top: 5px; width: 24px; height: 24px; margin-left: -12px; background: var(--accent); border: 3px solid var(--navy); z-index: 3; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); margin: 0 2px; }
.vals { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 15px; margin-top: 6px; }
.vals .me { font-weight: 800; }
.dim .line { font-size: 15px; color: var(--sub); margin-top: 4px; }
.poles { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; margin-top: 4px; }
.poles span:last-child { text-align: right; }
.dir { margin-top: 8px; font-size: 15px; padding: 8px 10px; background: var(--wash); border-radius: 8px; }
.pre { white-space: pre-line; }
.disc { margin-top: 14px; padding: 12px 14px; border: 1.5px solid var(--navy); border-radius: 10px; font-size: 14px; white-space: pre-line; font-weight: 600; }
.note { margin-top: 12px; padding: 12px 14px; background: var(--wash); border-radius: 10px; font-size: 15px; white-space: pre-line; }
.toggle { margin-top: 12px; background: none; border: 1.5px solid var(--line); border-radius: 10px; min-height: 44px; padding: 0 14px; font-weight: 700; cursor: pointer; }
.cta { margin-top: 18px; text-align: center; font-size: 15px; }
.cta a { color: var(--accent-ink); font-weight: 800; }
.cta + .cta { margin-top: 6px; }   /* 결과 끝 CTA 두 줄(팀 단위 문의 · 과정 보기, 2026-10-30) 사이 간격 */
.foot { margin-top: 22px; text-align: center; font-size: 13px; color: var(--sub); white-space: pre-line; line-height: 1.7; }
.spin { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 36px auto; animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 폰·브라우저별 대책(2026-09-13) — 두 번 톡 확대·회색 톡 번쩍임·당겨서 새로고침 막기, 결과 이미지 길게 눌러 저장 창 */
html { touch-action: manipulation; }
html, body { overscroll-behavior-y: contain; }
.opt, .btn, .chips span, .back { -webkit-tap-highlight-color: transparent; }
.opt:focus-visible { border-radius: 12px; }
.card.center .btn + .btn { margin-top: 10px; }
.ov { position: fixed; inset: 0; z-index: 50; background: rgba(17, 28, 52, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; overflow: auto; }
.ov p { color: #fff; font-size: 17px; text-align: center; }
.ov img { max-width: 100%; max-height: 70vh; border-radius: 10px; background: #fff; -webkit-touch-callout: default; }
.ov .btn { max-width: 320px; margin-top: 0; }

/* 비교 나라 고르기(2026-09-13) — 기준선 한국 + 고른 나라. 고르는 칸은 결과 이미지(#cap) 밖에 둔다 */
.pick { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px 14px; background: var(--card); border: 1.5px solid var(--edge); border-radius: 12px; }
.pick label { font-weight: 800; white-space: nowrap; font-size: 15px; }
.pick select { flex: 1; min-width: 0; min-height: 44px; }
.why { margin-top: 10px; padding: 10px 12px; background: var(--wash); border-radius: 10px; font-size: 15px; }
.why b { display: block; font-size: 13px; color: var(--sub); margin-bottom: 2px; }
.vals .na { color: var(--sub); }
.axis .pt.KR { background: var(--navy); }
.axis .pt.CH { background: var(--card); border: 3px solid var(--red); }
.key { display: inline-flex; align-items: center; gap: 5px; }
.key i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.key i.me { background: var(--accent); border: 2px solid var(--navy); }
.key i.KR { background: var(--navy); }
.key i.CH { border: 2px solid var(--red); }
