/* ==========================================================================
   1stChip 랜딩 — index.php 전용. 모든 클래스는 ch- 접두어 (밝은 바탕, 앱 강조색 파랑 #3d84dd)
   앱 창 재현은 앱 0.9.1 main.lfm · main.pas 그리기 값(아래 고유 부분)
   ========================================================================== */

:root {
	--bg: #f5f8fc;
	--bg-2: #e9eff7;
	--surface: #fff;
	--line: rgba(15, 30, 50, .08);
	--line-2: rgba(15, 30, 50, .15);
	--text: #141c26;
	--muted: #4c5a6b;
	--faint: #8592a3;
	--acc: #2f78d6;
	--acc-2: #6fa8ee;
	--acc-deep: #1b5fb8;
	--acc-dim: rgba(47, 120, 214, .11);
	--wrap: 1160px;
	--top: 64px;
	--font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
	--mono: ui-monospace, "Cascadia Mono", Consolas, "D2Coding", "Pretendard Variable", monospace;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 12px); -webkit-text-size-adjust: 100%; }
body.ch {
	margin: 0; background: var(--bg); color: var(--text);
	font: 16px/1.7 var(--font); letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere;
	-webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--acc-deep); text-underline-offset: 3px; }
b, strong { font-weight: 700; color: var(--text); }
code { font-family: var(--mono); font-size: .86em; background: var(--bg-2); padding: .1em .4em; border-radius: 6px; color: #1b5fb8; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.03em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }

.ch-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.ch-narrow { max-width: 820px; }
.ch-small { font-size: 14px; color: var(--muted); }
.ch-skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--acc); color: #fff; padding: 8px 14px; border-radius: 8px; }
.ch-skip:focus { top: 8px; }

/* ---------- 버튼 · 배지 ---------- */
.ch-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
	background: linear-gradient(180deg, #4a92e8, #2468c4); color: #fff; font-family: inherit; cursor: pointer;
	font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
	box-shadow: 0 10px 26px -12px rgba(36, 104, 196, .8), inset 0 1px 0 rgba(255,255,255,.25);
	transition: transform .2s, box-shadow .2s;
}
.ch-btn svg { width: 20px; height: 20px; }
.ch-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(36, 104, 196, .9), inset 0 1px 0 rgba(255,255,255,.25); }
.ch-btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: 0 1px 2px rgba(15,30,50,.05); }
.ch-btn--ghost:hover { background: var(--bg-2); box-shadow: 0 1px 2px rgba(15,30,50,.05); }
.ch-btn--sm { min-height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.ch-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--acc-dim); color: var(--acc-deep); white-space: nowrap; }
.ch-badge--off { background: var(--bg-2); color: var(--muted); }

/* ---------- 상단 ---------- */
.ch-top {
	position: sticky; top: 0; z-index: 50; height: var(--top);
	background: rgba(245, 248, 252, .84); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%);
	border-bottom: 1px solid transparent; transition: border-color .3s;
}
.ch-top.is-stuck { border-bottom-color: var(--line); }
.ch-top__in { height: 100%; display: flex; align-items: center; gap: 24px; }
.ch-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; text-decoration: none; margin: 0; }
.ch-brand__icon { width: 20px; height: 20px; }
.ch-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.ch-nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.ch-nav a:hover { color: var(--text); background: var(--bg-2); }

/* ---------- HERO ---------- */
.ch-hero { position: relative; overflow: hidden; padding: 72px 0 88px; isolation: isolate; }
.ch-hero::before {
	content: ""; position: absolute; inset: -30% -10% auto; height: 130%; z-index: -1;
	background:
		radial-gradient(44% 46% at 74% 42%, rgba(111, 168, 238, .16), transparent 70%),
		radial-gradient(30% 30% at 12% 80%, rgba(90, 200, 180, .07), transparent 70%);
}
.ch-hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.ch-tags { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ch-tags li { font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); padding: 4px 12px; border-radius: 99px; background: rgba(255,255,255,.7); }
.ch-hero__title { font-size: clamp(34px, 4.3vw, 52px); font-weight: 800; letter-spacing: -.045em; margin-bottom: 24px; }
.ch-hero__title--long { font-size: clamp(30px, 3.8vw, 46px); }
.ch-hero__title em { font-style: normal; color: var(--acc); }
.ch-line { display: block; }
.ch-hero__lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 34em; margin-bottom: 32px; }
.ch-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.ch-hero__meta { font-size: 14px; color: var(--faint); margin: 0; }

.ch-hero__visual { position: relative; padding: 24px 0 40px; }
.ch-chip {
	position: absolute; margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px;
	background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 40px -20px rgba(15,30,50,.35); font-size: 14px; color: var(--muted); white-space: nowrap;
}
.ch-chip img { width: 20px; height: 20px; flex: none; }

/* 첫 화면 등장 (JS 가 있을 때만) */
.ch-js .ch-line, .ch-js .ch-tags, .ch-js .ch-hero__lead, .ch-js .ch-cta, .ch-js .ch-hero__meta, .ch-js .ch-hero__visual {
	animation: ch-rise .9s cubic-bezier(.2,.7,.2,1) both;
}
.ch-js .ch-tags { animation-delay: .05s; }
.ch-js .ch-line:nth-child(1) { animation-delay: .12s; }
.ch-js .ch-line:nth-child(2) { animation-delay: .22s; }
.ch-js .ch-hero__lead { animation-delay: .34s; }
.ch-js .ch-cta { animation-delay: .44s; }
.ch-js .ch-hero__meta { animation-delay: .52s; }
.ch-js .ch-hero__visual { animation-duration: 1.2s; animation-delay: .2s; }
@keyframes ch-rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes ch-pop { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* ---------- 섹션 공통 ---------- */
.ch-sec { padding: 112px 0; border-top: 1px solid var(--line); }
.ch-head { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.ch-head h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; }
.ch-caption { text-align: center; font-size: 13px; color: var(--faint); margin: 28px auto 0; max-width: 780px; text-wrap: balance; }

.ch-js .ch-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.ch-js .ch-reveal.is-in { opacity: 1; transform: none; }

/* ---------- 격자 ---------- */
.ch-grid { display: grid; gap: 16px; }
.ch-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 카드 ---------- */
.ch-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; transition: border-color .3s, box-shadow .3s; }
.ch-card:hover { border-color: var(--line-2); box-shadow: 0 20px 40px -30px rgba(20, 60, 120, .35); }
.ch-card h3 { font-size: 18px; margin: 12px 0 6px; }
.ch-card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- 아코디언 ---------- */
.ch-acc { display: grid; gap: 10px; }
.ch-acc details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .3s; }
.ch-acc details[open] { border-color: var(--line-2); }
.ch-acc summary { list-style: none; cursor: pointer; padding-block: 18px; padding-inline: 22px 52px; position: relative; font-weight: 700; font-size: 16px; }
.ch-acc summary::-webkit-details-marker { display: none; }
.ch-acc summary::after { content: ""; position: absolute; inset-inline-end: 22px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .3s; }
.ch-acc details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.ch-acc details p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* ---------- DOWNLOAD ---------- */
.ch-down { background: radial-gradient(60% 60% at 50% 0%, rgba(111, 168, 238, .1), transparent 70%), var(--bg); }
.ch-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; max-width: 900px; margin: 0 auto; }
.ch-dl__card { display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.ch-dl__card h3 { font-size: 22px; }
.ch-dl__card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: 15px; flex: 1; }
.ch-dl__card ul li { padding-inline-start: 20px; position: relative; }
.ch-dl__card ul li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--acc); border-bottom: 2px solid var(--acc); transform: rotate(-45deg); }
.ch-dl__card--main { border-color: rgba(36, 104, 196, .4); background: linear-gradient(180deg, #eaf2fd, var(--surface) 60%); box-shadow: 0 24px 50px -36px rgba(36, 104, 196, .6); }
.ch-dl__card--main h3 { display: flex; align-items: center; gap: 10px; }
.ch-dl__card .ch-btn { align-self: stretch; white-space: normal; text-align: center; padding-block: 10px; }
.ch-req { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; color: var(--muted); font-size: 14px; }
.ch-req b { margin-inline-end: 4px; }
.ch-hist { max-width: 820px; margin: 36px auto 0; border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; background: var(--surface); }
.ch-hist summary { cursor: pointer; padding: 16px 0; font-weight: 700; }
.ch-hist__item { padding: 12px 0; border-top: 1px solid var(--line); }
.ch-hist__item p { margin: 0 0 6px; }
.ch-hist__item time { color: var(--faint); font-size: 14px; margin-inline-start: 6px; }
.ch-hist__item ul { margin: 0; padding-inline-start: 20px; color: var(--muted); font-size: 14.5px; }
.ch-hist > .ch-small { border-top: 1px solid var(--line); padding: 14px 0 18px; margin: 0; }

/* ---------- 바닥 ---------- */
.ch-foot { border-top: 1px solid var(--line); padding: 40px 0 56px; background: #fff; }
.ch-foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.ch-foot__in p { margin: 0 0 4px; }
.ch-foot .ch-brand a { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.ch-foot .ch-brand a:hover { color: var(--acc-deep); }
.ch-foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.ch-foot__links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.ch-foot__links a:hover { color: var(--text); }

/* ---------- 언어 선택 ---------- */
.ch-lang { position: relative; margin-inline-start: 4px; }
.ch-lang summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
	border-radius: 10px; border: 1px solid var(--line-2); color: var(--muted); font-size: 14px; white-space: nowrap; background: rgba(255,255,255,.6);
}
.ch-lang summary::-webkit-details-marker { display: none; }
.ch-lang summary:hover, .ch-lang[open] summary { color: var(--text); background: #fff; }
.ch-lang summary svg { width: 17px; height: 17px; }
.ch-lang ul {
	position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px;
	display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 2px;
	background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 20px 50px -20px rgba(15,30,50,.35);
}
.ch-lang a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.ch-lang a:hover { background: var(--bg-2); color: var(--text); }
.ch-lang a[aria-current="page"] { color: var(--acc-deep); font-weight: 700; }

/* ---------- 언어별 서체 · 방향 ---------- */
:root:lang(ja) { --font: "Pretendard JP Variable", "Pretendard Variable", "Hiragino Sans", "Yu Gothic UI", Meiryo, system-ui, sans-serif; }
:root:lang(zh-Hans) { --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Pretendard Variable", system-ui, sans-serif; }
:root:lang(ar) { --font: "Pretendard Variable", "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; }
:root:lang(th) { --font: "Pretendard Variable", "Leelawadee UI", "Noto Sans Thai", Tahoma, system-ui, sans-serif; }
:root:lang(ja) body.ch, :root:lang(zh-Hans) body.ch, :root:lang(th) body.ch { word-break: normal; line-break: strict; }
:root:lang(ar) .ch-hero__title, :root:lang(ar) .ch-head h2, :root:lang(th) .ch-hero__title { letter-spacing: 0; line-height: 1.4; }
:root:lang(ar) body.ch { letter-spacing: 0; }

/* ---------- kilho.net 첫 화면 링크: 다운로드 아래 (LANDING-PAGE.md 10-1) ---------- */
.ch-more img { width: 16px; height: 16px; flex: none; }
.ch-more { margin: 32px 0 0; text-align: center; }
.ch-more a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color .2s, transform .2s; }
.ch-more a:hover { transform: translateY(-2px); }
.ch-more a::after { content: "→"; color: var(--muted); }
[dir="rtl"] .ch-more a::after { content: "←"; }

/* ---------- 첫 화면 칩 ---------- */
.ch-chip { color: var(--text); font-weight: 600; }
kbd { font-family: var(--mono); font-size: .82em; padding: .1em .45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: #fff; color: var(--text); white-space: nowrap; }
.ch-head > p { color: var(--muted); margin: 14px auto 0; max-width: 680px; }
.ch-ad { margin-top: 24px; line-height: 0; }

/* ---------- 기능 카드 ---------- */
.ch-card h3 { margin-top: 14px; }
.ch-card__ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--acc-dim); color: var(--acc-deep); }
.ch-card__ic .ch-ic { width: 20px; height: 20px; }

/* ---------- 프로그램 미리보기: 탭 + 창 ---------- */
.ch-appsec { background: linear-gradient(180deg, #fff, var(--bg)); }
.ch-appv { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; }
.ch-appv__side { position: sticky; top: calc(var(--top) + 24px); }
.ch-appv__tabs { display: grid; gap: 10px; }
.ch-appv__tabs [role="tab"] { text-align: start; cursor: pointer; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; transition: border-color .2s, box-shadow .2s; }
.ch-appv__tabs [role="tab"] > b { display: block; font-size: 16px; margin-bottom: 2px; }
.ch-appv__tabs [role="tab"] span { font-size: 14px; line-height: 1.55; display: block; }
.ch-appv__tabs [role="tab"][aria-selected="true"] { border-color: rgba(36, 104, 196, .45); box-shadow: 0 0 0 4px var(--acc-dim); color: var(--text); }
.ch-appv__view {
	min-height: 620px; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 40px 24px; border-radius: 24px; overflow: hidden;
	background: radial-gradient(80% 70% at 50% 30%, rgba(111, 168, 238, .14), transparent 70%), linear-gradient(160deg, #e6eef9, #f8fbff);
	border: 1px solid var(--line);
}
.ch-appv__pane { width: 100%; min-width: 0; display: grid; justify-items: center; }
.ch-appv__pane[hidden] { display: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 1020px) {
	.ch-appv { grid-template-columns: 1fr; gap: 20px; }
	.ch-appv__side { position: static; }
	.ch-appv__tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	:root { --top: 56px; }
	.ch-wrap { padding: 0 16px; }
	.ch-nav { display: none; }
	.ch-top__in { justify-content: space-between; gap: 10px; }
	.ch-lang, .ch-nav + .ch-lang { margin-inline-start: auto; }
	.ch-lang summary span { display: none; }
	.ch-lang summary { padding: 0 10px; }
	.ch-top__in { position: relative; }
	.ch-lang { position: static; }
	.ch-lang ul { inset-inline-end: 16px; width: min(300px, calc(100vw - 32px)); }   /* 메뉴 목록은 머리줄 오른쪽 끝에 맞춘다 (단추에 맞추면 긴 언어 이름일 때 왼쪽이 잘림) */
	.ch-hero { padding: 40px 0 56px; }
	.ch-hero__grid { grid-template-columns: 1fr; gap: 24px; }
	.ch-chip { padding: 8px 11px; font-size: 13px; }
	.ch-sec { padding: 72px 0; }
	.ch-head { margin-bottom: 36px; }
	.ch-grid--3 { grid-template-columns: 1fr; }
		.ch-appv__tabs { gap: 6px; }
	.ch-appv__tabs [role="tab"] { padding: 10px; text-align: center; border-radius: 10px; }
	.ch-appv__tabs [role="tab"] b { font-size: 14px; margin: 0; }
	.ch-appv__tabs [role="tab"] span { display: none; }
	.ch-appv__view { padding: 28px 12px; min-height: 0; }
	.ch-dl { grid-template-columns: 1fr; }
	.ch-foot__in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
	.ch-hero__title { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
	.ch-js .ch-reveal { opacity: 1; transform: none; }
}

/* 바닥 왼쪽 © KILHO.NET — kilho.net 첫 화면 링크, 글자색은 둘레와 같게 */
.ch-foot .ch-small a { color: inherit; text-decoration: none; }
.ch-foot .ch-small a:hover { color: var(--text); text-decoration: underline; }

/* 바닥 X(트위터) — 글자 대신 로고 */
.ch-foot__links .ch-x { display: inline-flex; align-items: center; height: 100%; }
.ch-foot__links .ch-x svg { width: 15px; height: 15px; }




/* ==========================================================================
   1stChip 고유 — 앱 창 재현(main.lfm · main.pas 값), 첫 화면 상태 바꾸기, 원리 그림
   ========================================================================== */

.ch-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ch-fit { width: 100%; max-width: 100%; display: flex; justify-content: center; }   /* 안쪽 고정 크기 그림은 JS zoom 으로 맞춘다 */
.ch-fit > * { flex: none; }
.ch-card__ic svg { width: 22px; height: 22px; }
.ch-hero__title .ch-line { text-wrap: balance; }   /* 긴 언어에서 마지막 낱말 하나만 떨어지지 않게 */
:root:lang(ja) .ch-hero__title { word-break: auto-phrase; }

/* ---------- 앱 창 — 클라이언트 347x490 + 늘 어두운 제목 줄 31(DWM 다크 캡션) + 테두리 1
   캡션 아래 강조선은 라이트 2px #3d84dd (ktheme UpdateLine). 목록 · 아래 칸은 다크에서도 흰 바탕 ---------- */
.ch-win {
	position: relative; width: 349px; border-radius: 8px; overflow: hidden; user-select: none; -webkit-user-select: none;
	font: 12px/16px "Segoe UI", "Malgun Gothic", "Yu Gothic UI", "Microsoft YaHei UI", Tahoma, var(--font); letter-spacing: 0; word-break: normal; overflow-wrap: normal;
	color: #000; background: #fff; text-align: start; border: 1px solid #5c5c5c;
	box-shadow: 0 30px 60px -30px rgba(15, 30, 50, .45);
}
.ch-win p { margin: 0; }
.ch-cap { position: relative; height: 31px; display: flex; align-items: center; gap: 8px; padding-inline-start: 10px; background: #1f1f1f; color: #fff; border-bottom: 2px solid #3d84dd; box-sizing: content-box; }
.ch-cap img { width: 16px; height: 16px; }
.ch-cap i { position: absolute; top: 0; width: 46px; height: 31px; }
.ch-cap__min { inset-inline-end: 92px; } .ch-cap__max { inset-inline-end: 46px; } .ch-cap__x { inset-inline-end: 0; }
.ch-cap__min::before { content: ""; position: absolute; left: 18px; top: 15px; width: 10px; border-top: 1px solid #fff; }
.ch-cap__max::before { content: ""; position: absolute; left: 18px; top: 10px; width: 10px; height: 10px; box-sizing: border-box; border: 1px solid #fff; border-radius: 1px; }
.ch-cap__x::before, .ch-cap__x::after { content: ""; position: absolute; left: 17px; top: 15px; width: 13px; border-top: 1px solid #fff; transform: rotate(45deg); }
.ch-cap__x::after { transform: rotate(-45deg); }

/* 목록 — 남는 높이 440(490 - 강조선 2 - 아래 칸 48). 넘치면 창 안에서 스크롤 */
.ch-tree { height: 440px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }
.ch-set[hidden] { display: none; }
.ch-cat { height: 24px; line-height: 24px; padding-inline-start: 8px; background: #f4f4f4; color: #3d84dd; font-weight: 700; white-space: nowrap; }
.ch-row { position: relative; height: 40px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 36px; }
.ch-row.is-sel { background: #cce8ff; }
.ch-logo { display: grid; place-items: center; }
.ch-logo img { width: 32px; height: 32px; }
.ch-name { position: relative; margin: 0 2px; overflow: hidden; }
/* 두 줄 — 이름(9pt) / 버전 · 날짜(8pt, 회색 · 드라이버 없으면 빨강), 사이 3px (TreeAfterCellPaint) */
.ch-n1, .ch-n2 { position: absolute; inset-inline-start: 0; white-space: pre; }
.ch-n1, .ch-n2, .ch-tip { unicode-bidi: plaintext; }   /* 장치 이름 · 버전 줄은 글자에 따라 방향을 정한다 (RTL 창의 영어 이름이 뒤집히지 않게) */
.ch-n1 { top: 5px; }
.ch-n2 { top: 24px; font-size: 10.67px; line-height: 14px; color: #6d6d6d; }
.ch-n2.is-red { color: #f00; }
.ch-st { position: relative; display: grid; place-items: center; }
/* ! — 18px 노란 원(icon/_circle.png) + 검은 굵은 10pt */
.ch-mark {
	display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
	background: url(logo/_circle.png) center / 18px 18px no-repeat; color: #000; font: 700 13.3px/1 "Segoe UI", Tahoma, sans-serif; font-style: normal;
}
button.ch-mark { cursor: pointer; }
button.ch-mark:focus-visible { outline: 2px solid #3d84dd; outline-offset: 1px; border-radius: 50%; }
/* 설명 — ! 바로 아래 2px, 왼쪽으로 펼친다 (THintWindow) */
.ch-tip {
	position: absolute; z-index: 3; top: calc(50% + 11px); inset-inline-end: 18px; width: max-content; max-width: 300px; padding: 4px 7px 5px;
	background: #fff; border: 1px solid #c5c5c5; border-radius: 4px; box-shadow: 0 4px 10px rgba(0, 0, 0, .14);
	color: #000; font-size: 12px; line-height: 16px; white-space: nowrap; pointer-events: none;
}
.ch-tip--live { top: 0; inset-inline-end: auto; left: 0; white-space: pre; }
.ch-tip[hidden] { display: none; }
/* 아래 칸 — 흰 바탕 48, 위 1px #eaeaea, 두 줄 (PnlStatus) */
.ch-stat { height: 48px; border-top: 1px solid #eaeaea; padding: 8px 6px 0; box-sizing: border-box; white-space: nowrap; overflow: hidden; }
.ch-stat p { height: 15px; line-height: 15px; }
.ch-stat p + p { margin-top: 7px; }
.ch-win--bare { width: 300px; border-color: var(--line-2); box-shadow: none; border-radius: 6px; }
.ch-win--bare .ch-tree { height: auto; overflow: visible; }

/* ---------- 첫 화면: 상태 바꾸기 + 창 ---------- */
.ch-hero__visual { display: grid; justify-items: center; gap: 18px; margin: 0; }
.ch-hero__visual figcaption { text-align: center; max-width: 440px; }
.ch-how { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.ch-note { margin: 0; font-size: 13px; color: var(--faint); }
.ch-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.ch-seg button { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; }
.ch-seg button[aria-checked="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15, 30, 50, .15); }

/* ---------- 원리 ---------- */
.ch-howsec { background: linear-gradient(180deg, #fff, var(--bg)); }
.ch-flow { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.ch-flow__step { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.ch-flow__step + .ch-flow__step::before {
	content: ""; position: absolute; inset-inline-start: -13px; top: 74px; width: 10px; height: 10px;
	border-top: 2px solid var(--acc); border-right: 2px solid var(--acc); transform: rotate(45deg);
}
[dir="rtl"] .ch-flow__step + .ch-flow__step::before { transform: rotate(-135deg); }
.ch-flow__fig { min-height: 118px; display: grid; place-items: center; margin-bottom: 16px; padding: 14px; border-radius: 12px; background: var(--bg); }
.ch-flow h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ch-flow h3 span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--acc-dim); color: var(--acc-deep); font-size: 14px; }
.ch-flow p { color: var(--muted); font-size: 15px; margin: 0; }
.ch-devmgr { justify-items: start; align-content: center; font: 12px/20px "Segoe UI", "Malgun Gothic", var(--font); color: #000; background: #fff; border: 1px solid var(--line-2); }
.ch-devmgr p { margin: 0; display: flex; align-items: center; gap: 6px; }
.ch-devmgr__item { padding-inline-start: 22px; }
.ch-devmgr__chev { width: 6px; height: 6px; border-right: 1.5px solid #444; border-bottom: 1.5px solid #444; transform: rotate(45deg); margin: 0 4px 3px 2px; }
.ch-devmgr__warn { width: 16px; height: 14px; background: #ffc000; clip-path: polygon(50% 0, 100% 100%, 0 100%); position: relative; }
.ch-devmgr__warn::after { content: "!"; position: absolute; inset: 2px 0 0; text-align: center; font: 700 10px/12px "Segoe UI", sans-serif; color: #000; }

/* ---------- 프로그램 화면 ---------- */
.ch-appv__view { min-height: 600px; }
.ch-appv__pane { grid-template-columns: minmax(0, 1fr); }

/* ---------- 반응형 ---------- */
@media (max-width: 1020px) {
	.ch-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ch-hero__grid { grid-template-columns: minmax(0, 1fr); }
	.ch-appv__tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ch-flow { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
	.ch-flow__step + .ch-flow__step::before { inset-inline-start: 50%; top: -13px; transform: rotate(135deg); }
	[dir="rtl"] .ch-flow__step + .ch-flow__step::before { transform: rotate(135deg); }
}
@media (max-width: 520px) {
	.ch-grid--4 { grid-template-columns: 1fr; }
}
