/* =====================================================================
   CONDERI www — 2026-11-24 전수 QA 교정 시트 (v19 기준)
   · 서체 통일(Paperlogy) · 서브내비 한 줄 · 보조 텍스트 대비(AA)
   · 어두운 판 위 제목 가독 · 전자명함 페이지 잔재 정리
   모든 페이지 head 맨 끝에서 로드되어 마지막 우선순위를 갖는다.
   ===================================================================== */

/* ---------- 1. 서체 통일 ---------- */
body.v19,
body.v19 *,
body.chub-body,
body.chub-body *,
body.l-body,
body.l-body * {
  font-family: "Paperlogy", "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif !important;
}
/* 코드·단축키 표기는 예외 */
body.v19 :where(code, pre, kbd, samp, .v19-code),
body.chub-body :where(code, pre, kbd, samp) {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
}
/* 전자명함 앞면(3D 플립 카드)은 고유 서체 유지 — 카드 자체 디자인 */
body.v19 .cc-face,
body.v19 .cc-face :where(p, span, b, em, i, dl, dt, dd, div, li, figcaption, small, strong, h1, h2) {
  font-family: "Gowun Batang", "Nanum Myeongjo", serif !important;
}
/* 카드 안에서 라틴·숫자 라벨로 쓰이는 부분은 Paperlogy 유지 */
body.v19 :where(.cc-mark, .cc-b-txt, .cc-lw, .cv, .cp-sb, .cp-awd, .cb-mark, .cb-ey, .cb-big) {
  font-family: "Paperlogy", "Pretendard Variable", system-ui, sans-serif !important;
}

/* ---------- 2. 보조 텍스트 대비 (WCAG AA 4.5:1) ---------- */
/* #6c7a93 → 흰 바탕 4.34:1(미달). #5f6b82 로 조정: 흰 5.37 · #f5f6f8 4.96 */
:root,
body.v19,
body.v19-card-only,
body.chub-body,
body.l-body { --v19-muted-2: #5f6b82; --muted-2: #5f6b82; }

/* ---------- 3. 서브내비: 한 줄 고정 ---------- */
body.v19 .subnav > .shell {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.v19 .subnav > .shell::-webkit-scrollbar { display: none; }
body.v19 .subnav > .shell > ul {
  display: flex;
  flex-wrap: nowrap !important;
  gap: clamp(8px, 1vw, 14px) !important;
  overflow: visible !important;
  align-items: stretch;
  min-height: 54px;
}
body.v19 .subnav > .shell > ul > li { flex: 0 0 auto; }
body.v19 .subnav a {
  height: 54px;
  padding: 0 !important;
  font-size: 13.6px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
body.v19 .subnav a[aria-current] { font-weight: 600; }
@media (max-width: 1024px) {
  body.v19 .subnav a { height: 48px; font-size: 13px; }
}

/* 빵부스러기·표 라벨이 모노로 떨어지던 곳 — 서체만 통일하고 크기는 유지 */
body.v19 :where(.crumbs, .v19-crumb, .mono, .cms-date, .cms-popup-k, .cms-popup-count,
  .pf-cat, .sup-tag, .paper-meta, .nb, .label-num, .v19-dl dt, .v16-fact dt, .v16-tile dt,
  .info-table dt, .v19-timeline-item b, .chub-kicker, .chub-link-k, .chub-code, .v19-bm-k,
  .v19-brandrow-role, .v19-help, .v17-foot-notice) {
  letter-spacing: normal;
}

/* ---------- 4. 어두운 판 위 제목 ---------- */
/* /studio/ TYPE SPECIMEN 판: 남색 제목이 #111 판 위에서 보이지 않던 문제 */
body.v19 .sp-letter h4,
body.v19 .sp-plates h4 { color: #f7f9fc; }
/* /approach/ 공정 도식의 단계 번호: 흰 바탕에 1.54:1 이던 색 */
body.v19 .v16-process-figure text { fill: #64748b; }

/* ---------- 5. 전자명함 페이지 ---------- */
/* 페이지 전체에 걸쳐 흘러나오던 대형 심볼 워터마크 — 카드처럼 보이는 잔상 */
body.v19-card-only .cp-wm { display: none; }
/* 진입 연출 폐지(2026-11-24 대표 지시): 남색 전체화면 인트로·남색 막 규칙 삭제 — pl.js 가 cpl-on 을 걸지 않는다 */
/* 부명함 탭 줄: 좁은 화면에서 잘리지 않게 가로 스크롤 */
body.v19-card-only .cp-tabs,
body.v19-card-only .cp-subtabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.v19-card-only .cp-tabs::-webkit-scrollbar,
body.v19-card-only .cp-subtabs::-webkit-scrollbar { display: none; }

/* ---------- 6. 명함 상세·팀 소개 배너 화이트 톤 (2026-11-24) ---------- */
/* 대표 지시: 명함 페이지가 첫 화면부터 여전히 네이비로 보인다 — 상단 배너(.cp-ban .cb)와
   팀 소개 카드 배너(.tm .cb)의 남색 그라데이션을 v19 화이트/라이트 톤으로 내린다.
   남색은 제목(.cb-big)·라벨(.cb-ey) 글자와 브랜드 로고 워터마크에만 남긴다. */
body.v19 .cp-ban .cb,
body.v19 .tm .cb {
  background: #f8fafc !important;
  color: #102a56;
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}
body.v19 .cp-ban .cb-grid,
body.v19 .tm .cb-grid {
  background-image: linear-gradient(rgba(16, 42, 86, .05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(16, 42, 86, .05) 1px, transparent 1px) !important;
}
body.v19 .cp-ban .cb-sym,
body.v19 .tm .cb-sym { color: #102a56 !important; opacity: .05 !important; }
body.v19 .cp-ban .cb-mark,
body.v19 .tm .cb-mark { -webkit-text-stroke: 1px rgba(16, 42, 86, .15) !important; }
body.v19 .cp-ban .cb-ey,
body.v19 .tm .cb-ey { color: #52627c !important; }
body.v19 .cp-ban .cb-ey b,
body.v19 .tm .cb-ey b { color: #102a56 !important; }
body.v19 .cp-ban .cb-ey span,
body.v19 .tm .cb-ey span { border-left-color: rgba(16, 42, 86, .2) !important; }
body.v19 .cp-ban .cb-big,
body.v19 .cp-ban .cb-big :where(span, b, em, i),
body.v19 .tm .cb-big,
body.v19 .tm .cb-big :where(span, b, em, i) { color: #102a56 !important; }
body.v19 .cp-ban .cb-dot,
body.v19 .tm .cb-dot { color: #9aa8c0 !important; }
body.v19 .cp-ban .cb-lk,
body.v19 .tm .cb-lk { opacity: .14; }
body.v19 .cp-ban .cb-lk .cc-lg,
body.v19 .cp-ban .cb-lk .cc-lm,
body.v19 .tm .cb-lk .cc-lg,
body.v19 .tm .cb-lk .cc-lm { filter: none !important; }
body.v19 .cp-ban .cb-lk .cc-lw,
body.v19 .tm .cb-lk .cc-lw { color: #102a56 !important; }

/* ---------- 7. 전자명함 페이지 — 테마 고정(라이트) ---------- */
/* 대표 지시(2026-11-24 `#88681` "여전히 명함 페이지 네이비야"):
   OS 다크모드(prefers-color-scheme: dark)나 html[data-theme=dark] 상태에서 명함 페이지
   본문이 남색(#07122a)으로 깔리고 그 위 글자가 진한 남색이라 읽히지 않던 문제.
   원인은 styles.css 의 html[data-theme=dark] 팔레트(--bg:#07122a 등)가
   명함 셸(body.v19-card-only)의 --bg·--ink·--navy 를 덮어쓴 것이다.
   테마와 무관하게 종이 #faf9f6 · 흰 카드 #ffffff · 글자 #17191d · 남색 #102a56 로 고정한다.
   (/staff/* · /admin/* 내부 콘솔 다크테마는 이 규칙의 대상이 아니다.) */
html[data-theme] body.v19-card-only,
html[data-theme="dark"] body.v19-card-only {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-2: #f2f0ea;
  --paper: #ffffff;
  --ink: #17191d;
  --ink-2: #2a2f38;
  --muted: #57606a;
  --line: rgba(16, 42, 86, .12);
  --line-strong: rgba(16, 42, 86, .24);
  --navy: #102a56;
  --navy-deep: #0a1c3d;
  --navy-soft: rgba(16, 42, 86, .07);
  --dark: #0a1c3d;
  --dark-2: #102a56;
  --on-dark: #f7f5f0;
  --on-dark-muted: #a9b4c9;
  --v19-white: #ffffff;
  --v19-paper: #f5f6f8;
  --v19-ink: #0a1a36;
  --v19-muted: #4d5b76;
  --v19-muted-2: #5f6b82;
  --v19-line: #e1e6ee;
  --v19-line-strong: #c8d1e0;
  background-color: #faf9f6 !important;
  color: #17191d;
}
html[data-theme] body.v19-card-only main#main,
html[data-theme] body.v19-card-only .cp {
  background-color: #faf9f6 !important;
}
html[data-theme] body.v19-card-only .v17-header,
html[data-theme] body.v19-card-only .v17-footer {
  background-color: #ffffff !important;
}

/* 위 고정이 있어도 남아 있는 카드 전용 다크 오버라이드(진한 배경 위 흰 글자 전제)를 라이트 값으로 되돌린다 */
html[data-theme="dark"] body.v19-card-only .cp-btn.pri,
html[data-theme="dark"] body.v19-card-only .cp-flip button[aria-pressed="true"] { color: #ffffff; }
html[data-theme="dark"] body.v19-card-only .cp-sb { color: #ffffff; }
html[data-theme="dark"] body.v19-card-only .cp-sb[data-t="x"],
html[data-theme="dark"] body.v19-card-only .cp-sb[data-t="threads"],
html[data-theme="dark"] body.v19-card-only .cp-sb[data-t="tiktok"],
html[data-theme="dark"] body.v19-card-only .cp-sb[data-t="github"],
html[data-theme="dark"] body.v19-card-only .cp-sb[data-t="notion"] { background: #111111; color: #ffffff; }
html[data-theme="dark"] body.v19-card-only .cp-vb {
  color: #17613d;
  background: rgba(31, 122, 77, .08);
  border-color: rgba(31, 122, 77, .35);
}
html[data-theme="dark"] body.v19-card-only .cp-guh { color: #17613d; }
html[data-theme="dark"] body.v19-card-only .cp-ctab[aria-selected="true"] .cp-ctabk {
  background: #102a56;
  color: #ffffff;
}
html[data-theme="dark"] body.v19-card-only .cp-wm { opacity: .045; }

/* /card/ 허브도 브라우저 기본 UI까지 라이트로 */
html[data-theme] body.chub-body { color-scheme: light; }

/* 전자명함 페이지의 CMS 배너·공지 팝업도 테마와 무관하게 종이 톤으로 */
html[data-theme] body.v19-card-only .cms-banner,
html[data-theme="dark"] body.v19-card-only .cms-banner {
  background-color: #f2f0ea !important;
  color: #17191d !important;
  border-bottom: 1px solid rgba(23, 25, 29, .08) !important;
}
html[data-theme] body.v19-card-only .cms-popup,
html[data-theme="dark"] body.v19-card-only .cms-popup {
  background-color: #ffffff !important;
  color: #17191d !important;
}
html[data-theme="dark"] body.v19-card-only .cms-popup :where(p, li, dd, .cms-popup-body),
html[data-theme="dark"] body.v19-card-only .cms-popup .cms-popup-body { color: #2a2f38 !important; }

/* /card/ 허브 — 테마 상태와 무관하게 같은 라이트 팔레트 */
body.chub-body,
html[data-theme] body.chub-body,
html[data-theme="dark"] body.chub-body {
  color-scheme: light;
  --bg: #faf9f6;
  --bg-2: #f2f0ea;
  --paper: #ffffff;
  --ink: #17191d;
  --ink-2: #2a2f38;
  --muted: #57606a;
  --line: rgba(16, 42, 86, .12);
  --line-strong: rgba(16, 42, 86, .24);
  --navy: #102a56;
  background-color: #faf9f6;
  color: #17191d;
}

/* ── 8. 명함 셸(/card/*) 상단 빈 띠 제거 — 2026-11-24 (#88773)
   v19-card-tone.css 의 body.v19-card-only{padding-top:var(--v19-hd-h,72px)} 는 헤더가 fixed 이던 시절 값.
   지금 헤더는 sticky(문서 흐름)라 그 padding 이 그대로 메뉴바 위 72px 흰 띠로 보인다. */
html body.v19-card-only,
html[data-theme] body.v19-card-only,
html[data-theme="dark"] body.v19-card-only {
  padding-top: 0 !important;
}
/* /about/team/ 같은 v19-legacy 페이지도 같은 규칙으로 고정(현재 값 0 — 재발 방지용 안전망) */
html body.v19-legacy:not(.v19-card-only) {
  padding-top: 0;
}
