/* 안내 대화상자(#dlg-guide)의 내용 스타일. 토큰과 공통 요소(.btn, .tabs, .tb-wrap, .p-note, .lv, kbd 등)는 css/desk.css의 것을 쓴다. */
/* 맨 아래의 .akpi(자산군 지표 줄)만 대화상자 밖에서도 쓰는 구성요소라 #dlg-guide 아래에 두지 않는다. */

/* 틀: 탭 줄과 꼬리는 제자리에 두고 가운데 내용만 스크롤한다 */
#dlg-guide { width: min(760px, calc(100vw - 32px)); }
#dlg-guide .dlg-in { box-sizing: border-box; max-height: calc(100dvh - 50px); grid-template-rows: auto minmax(0, 1fr); }
#dlg-guide-body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; min-height: 0; overflow: hidden; }
#dlg-guide .gd-tabs { flex: none; }
#dlg-guide .gd-panel { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px 6px 2px; scrollbar-gutter: stable; }
#dlg-guide .gd-panel:focus-visible { outline-offset: -2px; }

/* 글: 본문은 한 단계 옅게, 제목과 강조만 본문색 */
#dlg-guide .gd-panel { font-size: 13.5px; line-height: 1.68; color: var(--dim); }
#dlg-guide .gd-panel p + p { margin-top: 6px; }
#dlg-guide .gd-panel ul { list-style: none; display: grid; gap: 7px; }
#dlg-guide .gd-panel li { position: relative; padding-left: 14px; }
#dlg-guide .gd-panel li::before { content: ""; position: absolute; left: 1px; top: .78em; width: 5px; height: 1px; background: var(--line3); }
#dlg-guide .gd-panel h4 { margin: 0 0 8px; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; color: var(--txt); scroll-margin-top: 4px; }
#dlg-guide .gd-panel h4:focus-visible { outline-offset: 3px; }
#dlg-guide .gd-sec { padding: 16px 0 18px; border-top: 1px solid var(--line); }
#dlg-guide .gd-sec:first-child { border-top: 0; padding-top: 6px; }
#dlg-guide .gd-n { display: inline-block; min-width: 22px; margin-right: 6px; font-family: var(--font-num); font-size: 12px; font-weight: 500; color: var(--gold-txt); }
#dlg-guide .mono { font-family: var(--font-num); font-size: 12.5px; font-weight: 500; }

/* 글 안의 단추 이름: 테두리로 단추임을 알린다 */
#dlg-guide .gd-btn { display: inline-block; padding: 0 6px; margin: 0 1px; border: 1px solid var(--line2); border-radius: 2px; font-size: 12.5px; line-height: 19px; color: var(--txt); white-space: nowrap; }

/* 사용 안내 목차 */
#dlg-guide .gd-toc { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 16px; }
#dlg-guide .gd-toc .btn { height: var(--ctl-h); }
#dlg-guide .gd-toc .gd-n { min-width: 0; margin-right: 7px; }

/* 검증 수준 등급과 지금 연 딜 */
#dlg-guide .gd-levels { display: grid; gap: 0; margin-top: 12px; border-top: 1px solid var(--line); }
#dlg-guide .gd-levels > div { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 4px 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
#dlg-guide .gd-levels dt { display: flex; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--txt); }
#dlg-guide .gd-levels dt .lv { transform: translateY(1px); }
#dlg-guide .gd-levels dd { font-size: 12.5px; line-height: 1.6; color: var(--mut); }
#dlg-guide .gd-deal { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line2); border-radius: 3px; background: var(--wash); font-size: 12.5px; line-height: 1.6; }
#dlg-guide .gd-deal-h { margin-bottom: 4px; font-size: 12px; color: var(--mut); }
#dlg-guide .gd-deal-h b { margin-left: 6px; font-size: 13px; font-weight: 600; color: var(--txt); }
#dlg-guide .gd-deal .akpi { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* 표: 키보드 조작, 저장 항목 */
#dlg-guide .gd-keytb { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12.5px; line-height: 1.55; }
#dlg-guide .gd-keytb th, #dlg-guide .gd-keytb td { padding: 7px 12px 7px 0; text-align: left; vertical-align: top; font-weight: 400; }
#dlg-guide .gd-keytb thead th { padding-top: 0; font-size: 12px; color: var(--mut); border-bottom: 1px solid var(--line2); }
#dlg-guide .gd-keytb tbody th { width: 128px; font-weight: 600; color: var(--txt); white-space: nowrap; }
#dlg-guide .gd-keytb tbody tr.is-first th, #dlg-guide .gd-keytb tbody tr.is-first td { border-top: 1px solid var(--line); }
#dlg-guide .gd-keytb tbody tr:first-child th, #dlg-guide .gd-keytb tbody tr:first-child td { border-top: 0; }
#dlg-guide .gd-keys { width: 168px; white-space: nowrap; }
#dlg-guide .gd-plus { margin: 0 3px; color: var(--mut); }
#dlg-guide .gd-store tbody th { width: auto; white-space: normal; font-weight: 400; }
#dlg-guide .gd-store tbody tr + tr th, #dlg-guide .gd-store tbody tr + tr td { border-top: 1px solid var(--line); }
#dlg-guide .gd-store code { font-family: var(--font-num); font-size: 12px; color: var(--txt); word-break: break-all; }
#dlg-guide .gd-state { width: 112px; font-family: var(--font-num); font-size: 12px; color: var(--dim); white-space: nowrap; }
#dlg-guide .gd-panel .tb-wrap + .p-note { margin-top: 8px; }

/* 변경 내역 */
#dlg-guide .gd-ver { padding-bottom: 12px; border-bottom: 1px solid var(--line); font-family: var(--font-num); font-size: 12px; color: var(--mut); }
#dlg-guide .gd-log h4 { margin: 18px 0 8px; font-size: 13.5px; font-weight: 600; }
#dlg-guide .gd-log h4 .mono { color: var(--dim); }
#dlg-guide .gd-log ul { font-size: 13px; }

/* 의견 보내기 */
#dlg-guide .gd-form { display: grid; gap: 14px; margin-top: 16px; }
#dlg-guide .gd-field, #dlg-guide .gd-manual { display: grid; gap: 6px; }
#dlg-guide .gd-field label, #dlg-guide .gd-manual label { font-size: 12.5px; font-weight: 600; color: var(--txt); }
#dlg-guide .gd-field label small { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--mut); }
#dlg-guide .gd-form textarea, #dlg-guide .gd-form input[type="email"] { width: 100%; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 3px; background: var(--wash); color: var(--txt); font: inherit; font-size: 13.5px; line-height: 1.6; }
#dlg-guide .gd-form input[type="email"] { height: 36px; padding-top: 0; padding-bottom: 0; }
#dlg-guide .gd-form textarea { min-height: 120px; resize: vertical; }
#dlg-guide .gd-form textarea[readonly] { min-height: 96px; font-family: var(--font-num); font-size: 12.5px; color: var(--dim); }
#dlg-guide .gd-form textarea:hover, #dlg-guide .gd-form input[type="email"]:hover { border-color: var(--line3); }
#dlg-guide .gd-form ::placeholder { color: var(--mut); }
#dlg-guide .gd-form .btn-row { margin-top: 0; }
#dlg-guide .gd-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
#dlg-guide .gd-meta dt { font-size: 12px; color: var(--mut); }
#dlg-guide .gd-meta dd { font-family: var(--font-num); font-size: 12.5px; color: var(--txt); word-break: break-all; }
#dlg-guide .gd-status { min-height: 20px; font-size: 12.5px; color: var(--txt); }
#dlg-guide .gd-status:empty { display: none; }

/* 꼬리: 운영 주체 표기(값이 있을 때만), 빌드 식별자, 이전 화면 링크 */
#dlg-guide .gd-foot { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--mut); }
#dlg-guide .gd-who { display: flex; flex-wrap: wrap; gap: 4px 20px; }
#dlg-guide .gd-who > div { display: flex; gap: 8px; min-width: 0; }
#dlg-guide .gd-who dt { flex: none; color: var(--mut); }
#dlg-guide .gd-who dd { color: var(--dim); overflow-wrap: anywhere; }
#dlg-guide .gd-foot-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
#dlg-guide .gd-foot a, #dlg-guide .gd-panel a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }
#dlg-guide .gd-foot a:hover, #dlg-guide .gd-panel a:hover { color: var(--txt); }
/* 꼬리의 글자 링크는 조작 요소 기준(넓은 화면 32px, 좁은 화면 40px)만큼의 누르는 영역을 갖는다 */
#dlg-guide .gd-foot a { display: inline-flex; align-items: center; min-height: 32px; }

/* 좁은 화면: 표의 자리 이름을 줄 위로 올리고 누르는 자리를 넓힌다 */
@media screen and (max-width: 719px) {
  #dlg-guide .gd-panel { padding-right: 8px; }
  #dlg-guide .gd-tabs button { padding: 0 8px; font-size: 13px; }
  #dlg-guide .gd-tabs button:first-child { padding-left: 0; }
  #dlg-guide .gd-tabs button[aria-selected="true"]::after { left: 8px; right: 8px; }
  #dlg-guide .gd-tabs button:first-child[aria-selected="true"]::after { left: 0; }
  #dlg-guide .gd-form .btn { height: 40px; }
  #dlg-guide .gd-toc .btn { height: 40px; }
  #dlg-guide .gd-levels > div { grid-template-columns: minmax(0, 1fr); }
  #dlg-guide .gd-keytb:not(.gd-store) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #dlg-guide .gd-keytb:not(.gd-store) tbody tr { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 10px; }
  #dlg-guide .gd-keytb:not(.gd-store) tbody th { grid-column: 1 / -1; width: auto; padding-bottom: 0; }
  #dlg-guide .gd-keytb:not(.gd-store) tbody tr:not(.is-first) th { padding: 0; }
  #dlg-guide .gd-keys { width: auto; white-space: normal; }
  #dlg-guide .gd-store thead th:nth-child(2), #dlg-guide .gd-store tbody td:nth-child(2) { display: none; }
  #dlg-guide .gd-state { width: 92px; }
  #dlg-guide .gd-meta { grid-template-columns: minmax(0, 1fr); }
  #dlg-guide .gd-form input[type="email"] { height: 40px; }
  #dlg-guide .gd-foot a { display: inline-flex; align-items: center; min-height: 40px; }
}

/* 자산군 지표 줄(js/desk/dialogs/guide.js의 assetKpiLineHtml): 이름과 값을 한 줄에 나란히 적고 좁으면 줄을 바꾼다 */
.akpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; min-width: 0; font-size: 12.5px; line-height: 1.6; }
.akpi-h { flex: none; font-size: 12px; font-weight: 600; color: var(--dim); }
.akpi dl { display: flex; flex-wrap: wrap; gap: 2px 18px; min-width: 0; margin: 0; }
.akpi dl > div { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.akpi dt { color: var(--mut); }
.akpi dd { margin: 0; font-family: var(--font-num); font-size: 13px; color: var(--txt); white-space: nowrap; }
