/* ══ 좁은 화면 다듬기 — 휴대폰 · 태블릿 · 줄인 PC 창(2026-11-20 반응형 점검) ══════════
 *
 * 🔴 이 파일의 규칙은 전부 max-width 미디어 쿼리 안에 둔다. 넓은 PC 화면(1280 이상)은
 *    한 픽셀도 바뀌면 안 된다 — 1280 · 1440 · 1920 전체 페이지 전후 픽셀 비교가 0 이어야 한다.
 *    가장 넓은 쿼리도 1180px 아래다.
 * 🔴 줄여서 맞추지 않는다. 글자 · 표 · 그림을 통째로 작게 만들거나 scale 로 욱여넣지 않고,
 *    배치를 바꾼다(여러 단 → 한 단, 표 → 칸마다 이름이 붙은 세로 목록, 줄 바꿈 허용).
 *    글자는 12px 아래로 내려가지 않게 올리기만 한다.
 * 페이지 JSX 의 인라인 스타일을 이겨야 하는 곳은 !important 를 쓴다.
 * 손가락 누름 칸(44px)은 보이는 모양을 그대로 두고 padding + 같은 크기의 음수 margin 으로 넓힌다.
 */

/* ── 공통: 머리 메뉴 · 바닥글 ─────────────────────────────────────────── */
@media (max-width: 1180px) {
  /* 접힌 메뉴 단추 — 아이콘 자리는 그대로, 누르는 칸만 44px */
  .global-nav-hamburger { min-width: 44px; min-height: 44px; margin-right: -6px; }
}
@media (max-width: 768px) {
  /* 바닥글: 링크를 한 줄 44px 칸으로 — 손가락으로 눌러도 옆 링크가 눌리지 않게 */
  footer .footer-cols ul { gap: 0 !important; }
  footer .footer-cols ul a { display: block; padding: 13px 0; font-size: 14.5px !important; line-height: 18px; }
  footer .footer-cols .t-caption-strong { margin-bottom: 4px !important; font-size: 14px !important; }
  footer .footer-meta-links a.t-fine { display: inline-block; padding: 16px 0; margin: -16px 0; font-size: 13px; }
  footer .container > div:first-child { font-size: 12px !important; }
  footer .footer-biz { font-size: 13px; }
}
@media (max-width: 540px) {
  /* 한 단으로 내리면 링크 14개가 세로로 길게 늘어선다 — 두 단 유지(짧은 이름이라 들어간다) */
  footer .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 28px 20px !important; }
}

/* ── 공통 부품: 두 칸 입력 줄 · 입력칸 + 단추 줄 ─────────────────────────── */
@media (max-width: 560px) {
  /* 이름 · 이메일처럼 나란한 두 칸 → 한 칸씩 */
  .r-stack2 { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 480px) {
  /* 입력칸 옆에 단추가 둘 이상 붙은 줄 — 입력칸은 한 줄을 다 쓰고 단추는 아래 줄에 나눠 선다 */
  .r-inrow { flex-wrap: wrap !important; row-gap: 8px !important; }
  .r-inrow > :first-child { flex: 1 1 100% !important; }
  .r-inrow > :not(:first-child) { flex: 1 1 0 !important; }
  .r-inrow > :not(:first-child) > button, .r-inrow > button { width: 100%; min-height: 44px; justify-content: center; }
}

/* ── 메인: 함께하는 곳 ──────────────────────────────────────────────── */
@media (max-width: 560px) {
  /* 로고 120px 옆에 기관 이름(26px, 줄바꿈 금지)이 서면 오른쪽 밖으로 잘렸다 — 로고 위, 이름 아래로 */
  .partners-list { width: auto !important; max-width: calc(100% - 40px); align-items: center !important; gap: 36px !important; }
  .partners-item { flex-direction: column; gap: 12px !important; text-align: center; }
  .partners-name { white-space: normal !important; }
}

/* ── 회사 · 오시는 길 ───────────────────────────────────────────────── */
@media (max-width: 900px) {
  /* 지도 단추 줄 · 정보 표가 칸 폭(1fr = 최소 내용 폭)을 밀어 화면 밖으로 11px 넘쳤다 */
  .loc-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .loc-grid > * { min-width: 0; }
}

/* ── 솔루션(Carrot Viewer): Pro+ Storage 기능 묶음 ─────────────────────── */
@media (max-width: 833px) {
  /* Pro · Pro+ Storage 묶음은 좌우 -30px 바깥 여백으로 색 띠를 넓힌다. 컨테이너 여백이 24px(833 이하) ·
     20px(640 이하)로 줄면 그만큼 화면 밖으로 넘쳤다(768 폭 6px, 360 폭 10px). 휴대폰 규칙(720 이하,
     viewer.css)과 같은 모양을 833 이하부터 쓴다 */
  .vf-sec-pro, .vf-sec-st { margin-left: 0; margin-right: 0; padding: 24px 20px 26px; border-radius: var(--r-md); }
}

/* ── 에디션 비교 표(솔루션 · 다운로드 공통 EdCmpTable) ─────────────────────
 * 휴대폰 폭에서는 네 칸 표가 들어가지 않아 오른쪽 열이 잘리거나(다운로드) 가로로 밀어야
 * 값이 보였다(솔루션). 줄마다 항목 이름을 한 줄 위에 두고, 그 아래 세 에디션 값을
 * 이름표(Lite · Pro · Pro+ Storage)와 함께 나란히 둔다. 글자 크기는 그대로다. */
@media (max-width: 600px) {
  .pv-ed3-wrap { overflow-x: visible !important; }
  .ed-cmp.pv-ed3 { min-width: 0 !important; }
  table.ed-cmp, table.ed-cmp > tbody { display: block; width: 100%; }
  table.ed-cmp > colgroup, table.ed-cmp > thead { display: none; }
  table.ed-cmp > tbody > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  table.ed-cmp > tbody > tr > td { display: block; min-width: 0; }
  table.ed-cmp > tbody > tr > td:first-child { grid-column: 1 / -1; padding-bottom: 6px !important; }
  table.ed-cmp > tbody > tr:not(.ed-cmp-grp) > td:not(:first-child) {
    border-top: 0 !important; padding-top: 6px !important; padding-bottom: 16px !important; text-align: left;
  }
  table.ed-cmp > tbody > tr.ed-cmp-grp > td:not(:first-child) { display: none; }
  table.ed-cmp > tbody > tr.ed-cmp-grp > td:first-child { box-shadow: inset 4px 0 0 #B9AE9B; }
  table.ed-cmp > tbody > tr.ed-cmp-grp-pro > td:first-child { box-shadow: inset 4px 0 0 var(--carrot); }
  table.ed-cmp > tbody > tr.ed-cmp-grp-st > td:first-child { box-shadow: inset 4px 0 0 var(--storage); }
  table.ed-cmp td[data-ed]::before {
    content: attr(data-ed); display: block; margin-bottom: 4px;
    font-family: var(--f-display); font-size: 12px; font-weight: 600; letter-spacing: 0;
    line-height: 1.3; color: var(--ink-muted-48); word-break: keep-all; overflow-wrap: normal;
  }
  /* 세 칸이 나란히 서므로 칸 안 좌우 여백만 줄인다(글자 크기는 그대로) */
  table.ed-cmp > tbody > tr:not(.ed-cmp-grp) > td:not(:first-child) { padding-left: 12px !important; padding-right: 8px !important; }
  table.ed-cmp .ed-cmp-label { font-size: 15px !important; }
  table.ed-cmp .ed-cmp-sub { font-size: 12px; }
  /* 열 구분선 · 고른 열 강조는 칸이 가로로 늘어선 표에서만 뜻이 있다 */
  table.ed-cmp > tbody > tr > td:not(:first-child) { box-shadow: none !important; }
}

/* ── 다운로드(Carrot Viewer) ────────────────────────────────────────── */
@media (max-width: 900px) {
  /* 머리 표는 소개 칸 + 에디션 세 칸, 네 칸이다. 768 폭에서는 Pro+ Storage 칸이 카드 오른쪽 밖으로
     잘렸다. 소개 칸을 한 줄 위로 올리고 에디션 세 칸만 나란히 둔다(휴대폰 폭 규칙과 같은 방식) */
  .dl-cmp-head, .dl-cmp-head thead { display: block; }
  .dl-cmp-head colgroup { display: none; }
  .dl-cmp-head thead tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dl-cmp-head .dl-cmp-intro { grid-column: 1 / -1; display: block; }
  .dl-cmp-head .dl-cmp-headcell { display: block; min-width: 0; height: auto !important; }
  .dl-cmp-head .dl-cmp-headcell:nth-child(2) .dl-head-ed { border-left: 0; }
  .dl-cmp-head .dl-head-ed { border-top: 1px solid var(--hairline); }
}
@media (max-width: 560px) {
  /* 에디션 머리 칸 셋(Lite · Pro · Pro+ Storage)을 두 칸 격자에 넣어 단추 글자가 두 줄로 접히고
     Pro+ Storage 가 반쪽 칸에 홀로 남았다 — 에디션마다 한 줄씩 쌓는다 */
  .dl-cmp-head thead tr { grid-template-columns: minmax(0, 1fr) !important; }
  .dl-cmp-head .dl-head-ed { border-left: 0 !important; height: auto; }
  .dl-head-ed .dl-cta { align-self: flex-start; }
  .dl-os-btn { font-size: 13px; padding: 12px 0 3px; }
  .dl-cmp tbody td { padding: 14px 18px !important; }
}
@media (max-width: 820px) {
  /* 이전 버전 줄 — 다섯 칸이 두 칸 격자로 흘러 '다운로드' 글자가 세로로 접혔다.
     번호 · 배지 / 날짜 · 크기 / 릴리스 노트 / 다운로드 단추(한 줄 전체) 차례로 놓는다 */
  .dl-ver-row:not(.dl-ver-head) { grid-template-columns: minmax(0, 1fr) auto !important; column-gap: 12px !important; row-gap: 10px !important; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(1) { grid-column: 1 / -1; order: 0; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(3) { text-align: left !important; order: 1; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(4) { order: 2; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(2) { grid-column: 1 / -1; order: 3; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(5) { grid-column: 1 / -1; order: 4; text-align: left !important; }
  .dl-ver-row:not(.dl-ver-head) > :nth-child(5) > a { width: 100%; justify-content: center; box-sizing: border-box; min-height: 44px; }
  .dl-ver-seg-btn { min-height: 44px; }
}

/* ── 채팅 ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  /* 목록(300px)과 대화가 나란히 서서 대화 칸이 화면 밖으로 잘렸다 — 한 화면에 하나만 */
  .chat-layout > .chat-side { width: 100% !important; flex-shrink: 1 !important; border-right: 0 !important; }
  .chat-layout-list > .chat-main { display: none !important; }
  .chat-layout-detail > .chat-side { display: none !important; }
}

/* ── 12px 보다 작은 글자 — 휴대폰 · 태블릿 폭에서만 12px 로 올린다(넓은 화면은 그대로) ── */
@media (max-width: 768px) {
  .sh-pro, .pv-glance-pro, .pv-glance-n, .vf-rail-n, .vf-rail-grp, .vf-kbd, .pv-nav-brand,
  .edg-tag, .st-hero-qr-os, .st-qr-os, .ed-cmp .ed-cmp-sub, .pd-notice-label,
  .vf-pro-tag, .pv-diff-pro, .dl-manual-meta > div, .dl-os-soon, .st-reg-sub, .st-reg-soon,
  .dl-head-size, .dl-head-notes, .dl-intro-eyebrow, .dl-ed-note { font-size: 12px !important; }
}

/* ── 손가락 누름 칸 — 보이는 모양은 그대로, 누르는 영역만 투명한 ::after 로 넓힌다 ──
 * (알약 단추 · 위 메뉴 글자 링크처럼 높이 30~43px 인 것. 이웃끼리 8px 이상 떨어져 있어 겹치지 않는다) */
@media (max-width: 768px) {
  .r-hit, .pv-nav-inner > a, .global-nav-inner > a:first-child, .vf-rail-link { position: relative; }
  .r-hit::after, .pv-nav-inner > a::after, .global-nav-inner > a:first-child::after {
    content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%);
  }
}
/* 기능 목록 색인(한 줄에 여러 칸으로 놓인 1080 이하) — 줄 높이 자체를 44px 로 */
@media (max-width: 768px) {
  .vf-rail-link { min-height: 44px; align-items: center; padding-top: 0; padding-bottom: 0; }
}
/* 에디션 계단 그림 — 좁은 기둥에서 '편집'이 '편 / 집'으로 갈렸다. 낱말 단위로만 줄을 바꾼다 */
@media (max-width: 768px) {
  .edc-blk b, .edg-blk b { word-break: keep-all; }
}

/* ── 시스템 요구사항 표(.pv-req) — 휴대폰 폭에서 세 칸(항목 · 최소 · 권장)이 들어가지 않았다 ──
 * 영어 360 폭에서 표가 칸 밖으로 2px 넘쳤고, 칸을 고정하면 'Recommended' · 'Resolution' 이 글자 중간에서 꺾였다.
 * 항목 이름을 한 줄 위로 올리고 그 아래 최소 · 권장 두 칸을 나란히 둔다. 머리 줄은 최소 · 권장만 남아 아래 두 칸과 줄이 맞는다.
 * 글자 크기는 그대로다. */
@media (max-width: 480px) {
  .pv-req, .pv-req > thead, .pv-req > tbody { display: block; width: 100%; box-sizing: border-box; }
  .pv-req > colgroup { display: none; }
  .pv-req tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-req tr > * { display: block; min-width: 0; }
  .pv-req thead th:first-child { display: none; }
  .pv-req tbody td:first-child { grid-column: 1 / -1; padding-bottom: 4px !important; }
  .pv-req tbody td:not(:first-child) { border-top: 0; padding-top: 4px !important; }
}

/* ── 한국어 낱말 중간 꺾임 — p · li 등은 viewer.css 가 어절 단위로 끊지만 div 문단은 빠져 있어
 *    좁은 칸에서 '제공.' 이 '제 / 공.' 으로 갈려 한 글자 꼬리가 남았다(메인 서비스 카드, 768) */
@media (max-width: 1180px) {
  .carrot-root div.t-body, .carrot-root div.t-body-strong, .carrot-root div.t-caption { word-break: keep-all; overflow-wrap: break-word; }
}
@media (max-width: 768px) {
  /* 내 정보 구독 카드 — '가능합니/다' 처럼 마지막 글자만 남았다(390) */
  .r-keep { word-break: keep-all; overflow-wrap: break-word; }
}

/* ── 처음 읽는 중요한 문단 — 휴대폰 폭(600 이하)에서 16px(2026-11-23 사용자 결정) ──
 * 대상: 메인 소개 문단(about.lead, 14.5px) · Carrot Viewer 다운로드 '프로그램 다운로드' 안내 문단(15px).
 * 솔루션 · 제품 · 서비스 · 다운로드 첫 화면의 머리 소개 문단은 이미 16.5~17px, 회사 소개(준비 중 안내) ·
 * 오시는 길 머리 문단은 16px 이라 그대로 둔다. 카드 설명 · 표 · 배지는 그대로다. */
@media (max-width: 600px) {
  .r-lead16 { font-size: 16px !important; }
}
