/* 화면 전용 — 사용 가이드(/guide · /guide/<이름>). TubeAI 사용설명서 배치 대응(2026-10-05): 탭 · 기능 카드 / 왼쪽 설명서 목록 ·
   머리 카드 · 가장 빠른 순서 번호 카드 · 단계 번호 칩 · 도움말 · 최종 점검 · FAQ 접기. 값은 토큰만. 모바일 먼저(min-width 600 · 960). */

.gd { container: gd / inline-size; display: grid; gap: var(--space-5); }
.gd-site { padding-block: var(--space-6) var(--space-8); }
.gd-head { display: grid; gap: var(--space-2); }
.gd-kicker { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-sm); font-weight: 700; color: var(--brand-text); }
.gd-title { font-size: var(--font-h1); line-height: var(--leading-tight); text-wrap: balance; }
.gd-lead { margin: 0; max-width: 64ch; font-size: var(--text-base); color: var(--sub); }
.gd-tabs .tab { display: inline-flex; align-items: center; gap: var(--space-2); }

/* 기능 카드 */
.gd-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.gd-cards > li { display: grid; }
@container gd (min-width: 600px) { .gd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container gd (min-width: 1000px) { .gd-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container gd (min-width: 1400px) { .gd-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gd-card { display: grid; align-content: start; gap: var(--space-2); padding: var(--space-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.gd-card:is(:hover, .is-hover) { border-color: var(--brand-text); transform: translateY(-2px); }
.gd-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gd-card-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-text); }
.gd-card.is-soon .gd-card-ico { background: var(--surface-2); color: var(--sub); }
.gd-card-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--text-base); font-weight: 800; }
.gd-card-desc { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--sub); }
.gd-card-go { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-1); font-size: var(--text-sm); font-weight: 700; color: var(--brand-text); }
@media (prefers-reduced-motion: reduce) { .gd-card { transition: none; } .gd-card:hover { transform: none; } }

/* 영상 가이드 자리 */
.gd-video { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.gd-video-thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--surface-2); color: var(--sub); border-bottom: 1px solid var(--line); }
.gd-video-thumb .ico { width: 36px; height: 36px; }
.gd-video-body { display: grid; align-content: start; justify-items: start; gap: var(--space-2); padding: var(--space-4); }

/* FAQ 상자 */
.gd-faq { display: grid; gap: var(--space-3); padding: var(--space-5); }
.gd-faq-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.gd-faq-head h2, .gd-faq-head h3 { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-lg); }
.gd-faq-head .ico { color: var(--brand-text); }

/* 기능별 설명서 — 왼쪽 목록 + 본문 */
.gd-doc { display: grid; gap: var(--space-5); align-items: start; }
@container gd (min-width: 900px) { .gd-doc { grid-template-columns: 240px minmax(0, 1fr); } }
.gd-side { display: grid; gap: var(--space-2); }
@container gd (min-width: 900px) { .gd-side { position: sticky; top: var(--space-5); } }
.gd-side ul { list-style: none; margin: 0; padding: var(--space-2); display: flex; gap: var(--space-1); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
@container gd (min-width: 900px) { .gd-side ul { flex-direction: column; overflow: visible; } }
.gd-side a { display: flex; align-items: center; gap: var(--space-2); min-height: var(--control-h-sm); padding: 0 var(--space-3); border-radius: var(--r); color: var(--ink); text-decoration: none; font-size: var(--text-md); white-space: nowrap; }
.gd-side a:is(:hover, .is-hover) { background: var(--surface-2); }
.gd-side a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; }
.gd-side a:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.gd-side a > span:first-of-type { flex: 1 1 auto; }
.gd-side-soon { font-size: var(--text-xs); color: var(--sub); }
.gd-back { font-size: var(--text-sm); }

.gd-main { display: grid; gap: var(--space-4); min-width: 0; }
.gd-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; gap: var(--space-3); padding: var(--space-6); background: linear-gradient(135deg, var(--surface) 0%, var(--brand-soft) 100%); }
.gd-hero h2 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--font-h1); line-height: var(--leading-tight); }
.gd-hero p { margin: 0; max-width: 60ch; font-size: var(--text-base); color: var(--sub); }

.gd-quick, .gd-section { display: grid; gap: var(--space-3); padding: var(--space-5); scroll-margin-top: var(--space-7); }
.gd-quick h3, .gd-section h3 { font-size: var(--text-xl); line-height: var(--leading-tight); }
.gd-section h3 .num { color: var(--brand-text); }
.gd-quick-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@container gd (min-width: 640px) { .gd-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container gd (min-width: 1100px) { .gd-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gd-quick-grid li { display: grid; align-content: start; gap: var(--space-1); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.gd-quick-grid b { font-size: var(--text-base); }
.gd-quick-grid li > span:last-child { font-size: var(--text-sm); color: var(--sub); line-height: var(--leading-normal); }
.gd-num { width: 28px; height: 28px; display: grid; place-items: center; margin-bottom: var(--space-1); border-radius: var(--r-full); background: var(--brand); color: var(--on-brand); font-size: var(--text-sm); font-weight: 800; }
.gd-note { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; font-size: var(--text-sm); color: var(--sub); }

/* 단계 번호 칩 목록 — li 는 글 흐름 그대로, 칩만 왼쪽 여백(공지 nb-steps 와 같은 이유: grid 로 만들면 글 조각이 흩어진다) */
.gd-steps { list-style: none; margin: 0; padding: 0; counter-reset: gd; display: grid; gap: var(--space-3); }
.gd-steps li { counter-increment: gd; position: relative; min-height: 28px; padding: 2px 0 0 calc(28px + var(--space-3)); display: grid; gap: 2px; }
.gd-steps li::before { content: counter(gd); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-full); background: var(--brand-soft); color: var(--brand-text); font-size: var(--text-sm); font-weight: 800; line-height: 1; }
.gd-steps b { font-size: var(--text-base); }
.gd-steps li > span { font-size: var(--text-md); line-height: var(--leading-normal); color: var(--sub); }
.gd-tip { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding: var(--space-3) var(--space-4); border-left: 4px solid var(--st-write-fg); border-radius: 0 var(--r) var(--r) 0; background: var(--st-write-bg); font-size: var(--text-md); color: var(--ink); }
.gd-tip .ico-sm { flex: none; margin-top: 3px; color: var(--st-write-fg); }

.gd-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.gd-check li { display: flex; align-items: flex-start; gap: var(--space-2); font-size: var(--text-md); }
.gd-check li .ico-sm { flex: none; margin-top: 3px; color: var(--st-done-fg); }

/* 영상 가이드 — 기능 묶음 머리 + PC·모바일 영상 카드(TubeAI 사용설명서 포털 대응, 일치도 2차 2026-10-05) */
.gd-vsec { display: grid; gap: var(--space-4); padding-block: var(--space-5); border-bottom: 1px solid var(--line); container: gdv / inline-size; }
.gd-vsec-head { display: flex; gap: var(--space-3); align-items: flex-start; }
.gd-vsec-head h2 { font-size: var(--text-2xl); line-height: var(--leading-tight); }
.gd-vsec-head p { margin: 0; }
.gd-vsec-ico { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: var(--r-lg); background: var(--brand-soft); color: var(--brand-text); }
.gd-vcards { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
@container gdv (min-width: 760px) { .gd-vcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gd-vcard { display: grid; overflow: hidden; }
.gd-vcard .gd-video-thumb { position: relative; width: 100%; aspect-ratio: auto; height: clamp(140px, 22vw, 200px); }
.gd-vdur { position: absolute; right: var(--space-2); bottom: var(--space-2); padding: 2px var(--space-2); border-radius: var(--r-sm); background: rgba(0, 0, 0, .66); color: #fff; font-size: var(--text-xs); font-weight: 700; }
.gd-vcard-body { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-4); }
.gd-vcard-body .badge { justify-self: start; }
.gd-vcard-body b { font-size: var(--text-lg); }
.gd-vcard-body p { margin: 0; }
.gd-vflow { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-2) var(--space-3); border-radius: var(--r); background: var(--surface-2); color: var(--ink); line-height: var(--leading-normal); }
.gd-vflow .ico-sm { flex: none; margin-top: 3px; color: var(--brand-text); }
/* 설명서 전면 보강(2026-10-05) — 찾기 · 묶음 · 목차 · 어디서 · 옵션 표 · 우리 화면 캡처(라이트/다크) · 비용 · 자주 하는 실수 · 끝 단추 */
.gd-search { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); }
.gd-search-label { font-size: var(--text-sm); font-weight: 700; }
.gd-search-row { display: flex; gap: var(--space-2); }
.gd-search-row .input { flex: 1 1 auto; min-width: 0; }
.gd-search-side { display: flex; gap: var(--space-1); padding: 0; }
.gd-search-side .input { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.gd-hits { display: grid; gap: var(--space-3); padding: var(--space-5); }
.gd-hits h2 { font-size: var(--text-lg); }
.gd-hits ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.gd-hits a { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.gd-hits a:hover { border-color: var(--brand-text); }
.gd-hits a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gd-hit-where { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: 700; color: var(--brand-text); }
.gd-group { display: grid; gap: var(--space-3); }
.gd-group-h { font-size: var(--text-lg); line-height: var(--leading-tight); }
.gd-card-meta { margin-top: auto; }
.gd-side-group { margin: var(--space-2) 0 0; padding: 0 var(--space-2); font-size: var(--text-xs); font-weight: 700; color: var(--sub); }
.gd-toc { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-5); }
.gd-toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: var(--space-1); }
@container gd (min-width: 760px) { .gd-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); } }
.gd-toc a { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; font-size: var(--text-md); }
.gd-where { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; font-size: var(--text-sm); font-weight: 600; color: var(--brand-text); }
.gd-where .ico-sm { flex: none; margin-top: 2px; }
.gd-section.is-soon { background: var(--surface-2); }
.gd-sec-body { display: grid; gap: var(--space-4); align-items: start; }
@container gd (min-width: 1100px) { .gd-sec-body.has-shot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.gd-sec-text { display: grid; gap: var(--space-4); min-width: 0; }
.gd-opt-wrap { margin: 0; }
.gd-opt td { font-size: var(--text-md); }
.gd-shot { margin: 0; display: grid; gap: var(--space-2); }
.gd-shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); background: var(--surface-2); }
.gd-shot figcaption { font-size: var(--text-xs); color: var(--sub); }
.gd-shot .gd-shot-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gd-shot .gd-shot-dark { display: block; }
  :root:not([data-theme="light"]) .gd-shot .gd-shot-light:has(+ .gd-shot-dark) { display: none; }
}
:root[data-theme="dark"] .gd-shot .gd-shot-dark { display: block; }
:root[data-theme="dark"] .gd-shot .gd-shot-light:has(+ .gd-shot-dark) { display: none; }
.gd-cost h3, .gd-mistakes h3 { display: flex; align-items: center; gap: var(--space-2); }
.gd-cost h3 .ico-sm { color: var(--brand-text); }
.gd-mistakes h3 .ico-sm { color: var(--st-fail-fg); }
.gd-mistakes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.gd-mistakes li { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-left: 3px solid var(--st-fail-fg); border-radius: 0 var(--r) var(--r) 0; background: var(--surface-2); }
.gd-mistakes li b { font-size: var(--text-base); }
.gd-mistakes li span { font-size: var(--text-md); color: var(--sub); line-height: var(--leading-normal); }
.gd-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-5); }
.gd-end p { margin: 0; }
.faq-item:target { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: var(--r); }
