/* ════════════════════════════════════════════════════════════════
   상세 데이터베이스 (Detail DB) — 전용 스타일
   · 모든 토큰(--brand/--sage 등)은 index.html :root에서 정의됨 → 참조만(재정의 금지).
   · 클래스 프리픽스 `ddb-` 로 기존 .enc-* 와 충돌 회피.
   · 세이지 절제(화이트리스트): 현재 선택 바/배경·활성 조상 텍스트·활성 탭 언더라인·
     weight=high 칩·NEW 칩·포커스 링. 나머지 무채색. best/bad는 --pos/--neg(라인+아이콘+텍스트만).
   ════════════════════════════════════════════════════════════════ */

/* 뷰 전환 — view-cost/view-encyclopedia 패턴 모방.
   .container.view-detaildb 활성 시 #detaildbView만 표시, 나머지 섹션·배너·빈상태 숨김. */
.container.view-detaildb > .section:not(#detaildbView),
.container.view-detaildb > #bannerSlot,
.container.view-detaildb > #emptySlot { display: none; }

#detaildbView { padding: 0; }

/* ── 셸 ───────────────────────────────────────────────────────── */
.ddb-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── 페이지 헤더 (56px) ───────────────────────────────────────── */
.ddb-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 4px 14px;
}
.ddb-head-tt {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}
.ddb-head-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

/* ── 탭 토글 (언더라인형 2탭) ─────────────────────────────────── */
.ddb-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.ddb-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 14px 11px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0;
  transition: color .14s ease;
}
.ddb-tab::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: -1px;
  height: 2px;
  background: transparent;
  border-radius: 2px;
}
.ddb-tab:hover { color: var(--text-2); }
.ddb-tab.is-active { color: var(--text); }
.ddb-tab.is-active::after { background: var(--brand); }   /* 활성 탭 언더라인 = 세이지(brand) */
.ddb-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ── 탭 패널 ──────────────────────────────────────────────────── */
.ddb-panel { display: none; }
.ddb-panel.is-active { display: block; }

/* ── 탭B placeholder (다음 단계 진입점) ───────────────────────── */
.ddb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 280px;
  text-align: center;
  color: var(--muted);
}
.ddb-placeholder-tt { font-size: 14px; font-weight: 600; color: var(--text-2); }
.ddb-placeholder-sub { font-size: 13px; font-weight: 400; color: var(--muted); }

/* ════════════════════════════════════════════════════════════════
   3-pane (탭A)  — ≥1440: 280 / 1fr / 320
   ════════════════════════════════════════════════════════════════ */
.ddb-3pane {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 320px;
  gap: 0;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

/* ── 좌: 계층 트리 ────────────────────────────────────────────── */
.ddb-tree {
  border-right: 1px solid var(--line);
  padding: 8px 0;
  align-self: stretch;
}
.ddb-tree-scroll {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
  padding: 0 4px;
}
.ddb-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* 수직 가이드선 (children 영역) */
.ddb-tree-children {
  position: relative;
}
.ddb-tree-children::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.ddb-node {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  position: relative;
  color: var(--text-2);
  transition: background .12s ease, color .12s ease;
}
.ddb-node:hover { background: var(--surface-2); }
.ddb-node:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* 레벨별 행 높이 / 들여쓰기 / 폰트 */
.ddb-node-major {
  min-height: 40px;
  padding: 4px 8px 4px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ddb-node-mid {
  min-height: 36px;
  padding: 4px 8px 4px 28px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}
.ddb-node-sub {
  min-height: 36px;
  padding: 4px 8px 4px 44px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
}

/* caret (대·중만) — 기존 대시보드 .ctb-caret 톤 통일: CSS 보더 셰브론 */
.ddb-caret {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 0 5px 0 2px;
  pointer-events: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  /* 접힘 = 오른쪽(▸) */
  transform: translateX(-2px) rotate(-45deg);
  transition: transform .16s ease, border-color .16s ease;
}
/* 펼침 = 아래(▾) + 브랜드 색 (aria-expanded는 트리 버튼 .ddb-node에 있음) */
.ddb-node[aria-expanded="true"] .ddb-caret {
  transform: translateY(-2px) rotate(45deg);
  border-color: var(--brand);
}
.ddb-node-sub .ddb-caret { visibility: hidden; }

.ddb-node-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 카운트 뱃지 (대·중) */
.ddb-count {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
}

/* NEW 칩 (소분류) */
.ddb-new {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--brand-ink);
  background: var(--sage-tint-2);
  padding: 1px 5px;
  border-radius: 999px;
  margin-left: 4px;
}

/* 활성 조상(대·중) — brand-ink 600 승격 */
.ddb-node.is-ancestor {
  color: var(--brand-ink);
  font-weight: 600;
}
/* 현재 선택 소분류 — 배경 sage-tint + 좌측 3px brand 바 + brand-ink 600 */
.ddb-node-sub.is-selected {
  background: var(--sage-tint);
  color: var(--brand-ink);
  font-weight: 600;
}
.ddb-node-sub.is-selected::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

/* ── 가운데: 본문 ─────────────────────────────────────────────── */
.ddb-main {
  padding: 28px 32px 48px;
  min-width: 0;
}
.ddb-main-inner { max-width: none; }

.ddb-crumb {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px;
}
.ddb-crumb-sep { padding: 0 6px; color: var(--line-strong); }
.ddb-h1 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}
.ddb-lead {
  margin: 0 0 4px;
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-2);
}

/* 개요(대/중 클릭 시) 카드 그리드 */
.ddb-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.ddb-ov-card {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s ease, background .12s ease;
}
.ddb-ov-card:hover { background: var(--surface-2); border-color: var(--line-strong); }
.ddb-ov-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-ov-card-tt {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.ddb-ov-card-meta { font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 4px; }

/* 체크포인트 목록 — 카드 중첩 금지, 디바이더로 구분 */
.ddb-cps { margin-top: 24px; }
.ddb-cp {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.ddb-cp:first-child { border-top: 0; padding-top: 4px; }

.ddb-cp-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ddb-cp-point {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

/* weight 칩 */
.ddb-wt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .02em;
}
.ddb-wt-high { background: var(--sage-tint-2); color: var(--brand-ink); }
.ddb-wt-mid  { background: var(--surface-2); color: var(--text-2); }
.ddb-wt-low  {
  background: transparent;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  padding: 1px 7px;
}

/* check 라인 */
.ddb-cp-check {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-2);
}
.ddb-check-lab {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 6px;
}

/* best / bad — 좌측 라인 + 아이콘 + 텍스트 라벨 (면 채우기 금지) */
.ddb-case {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--line-strong);
}
.ddb-case-best { border-left-color: var(--pos); }
.ddb-case-bad  { border-left-color: var(--neg); }
.ddb-case-lab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 3px;
}
.ddb-case-best .ddb-case-lab { color: var(--pos); }
.ddb-case-bad  .ddb-case-lab { color: var(--neg); }
.ddb-case-ico {
  display: inline-flex;
  width: 13px; height: 13px;
  align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; line-height: 1;
}
.ddb-case-body {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--text-2);
}

/* 예시 이미지(ref) — 2열 그리드 */
.ddb-refs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 14px;
  align-items: start;   /* 이미지 없는 카드가 다른 카드 높이로 늘어나지 않게 */
}
.ddb-ref {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.ddb-ref-img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface-2);
  cursor: zoom-in;
}
.ddb-ref-cap { padding: 8px 10px 10px; }
.ddb-ref-brand { font-size: 12px; font-weight: 600; color: var(--text); }
.ddb-ref-note {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted);
  margin-top: 2px;
}
/* img 없을 때 캡션만 — 카드 패딩 보정 */
.ddb-ref.is-noimg .ddb-ref-cap { padding-top: 12px; }

/* ── 우: 메타 ─────────────────────────────────────────────────── */
.ddb-meta {
  border-left: 1px solid var(--line);
  padding: 28px 20px;
  align-self: stretch;
  font-size: 13px;
}
.ddb-meta-block { padding: 14px 0; border-top: 1px solid var(--line); }
.ddb-meta-block:first-child { border-top: 0; padding-top: 0; }
.ddb-meta-lab {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
.ddb-meta-val { font-size: 13px; font-weight: 600; color: var(--text); }

/* 위치 브레드크럼 */
.ddb-meta-loc { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.5; }
.ddb-meta-loc .ddb-crumb-sep { color: var(--line-strong); }

/* weight 분포 미니 막대 */
.ddb-wbar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface-2);
  margin: 8px 0 6px;
}
.ddb-wbar-high { background: var(--brand); }
.ddb-wbar-mid  { background: var(--sage); }
.ddb-wbar-low  { background: var(--line-strong); }
.ddb-wlegend {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.ddb-wlegend b { font-weight: 600; color: var(--text); }

/* structural rules */
.ddb-srule { padding: 8px 0; }
.ddb-srule + .ddb-srule { border-top: 1px solid var(--line); }
.ddb-srule-id {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  padding: 1px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.ddb-srule-rule {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-2);
}

/* ════════════════════════════════════════════════════════════════
   모바일 경로(트리→드롭다운) — 기본 숨김, 좁은 폭에서 노출
   ════════════════════════════════════════════════════════════════ */
.ddb-mobnav { display: none; }
.ddb-mobnav-back {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 8px 12px;
  min-height: 44px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ddb-mobnav-crumb {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 2px;
}
/* 모바일 단계 드롭다운 — 터치 타깃 ≥44px. 네이티브 화살표 제거 후 가는 선 ∨ 커스텀 */
.ddb-mobnav-sel {
  min-height: 44px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  padding: 0 36px 0 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2379818B' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}
.ddb-mobnav-sel:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ════════════════════════════════════════════════════════════════
   반응형
   ════════════════════════════════════════════════════════════════ */

/* 1024~1439: 우 메타 → 본문 하단 스택 (좌 트리 + 본문 2-pane) */
@media (max-width: 1439px) {
  .ddb-3pane { grid-template-columns: 280px minmax(0, 1fr); }
  .ddb-meta {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 32px;
  }
}

/* ≤1023: 좌 트리도 접고(데스크톱 3-pane 해제는 아래 768에서) — 중간 구간은 2-pane 유지 */
@media (max-width: 1023px) {
  .ddb-tree-scroll { max-height: calc(100vh - 200px); }
}

/* ≤768: 좌 트리 → 상단 경로 드롭다운 + 단계 드릴다운. 우 메타 본문 하단 스택. */
@media (max-width: 768px) {
  .ddb-3pane {
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .ddb-tree { display: none; }      /* 데스크톱 트리 숨김 */
  .ddb-mobnav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }
  .ddb-main {
    padding: 4px 0 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 20px 18px 28px;
  }
  .ddb-meta {
    grid-column: auto;
    border-left: 0;
    border-top: 0;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px;
  }
  .ddb-refs { gap: 12px; }
}

/* ≤375: 예시 이미지 1열 */
@media (max-width: 420px) {
  .ddb-refs { grid-template-columns: 1fr; }
  .ddb-overview { grid-template-columns: 1fr; }
}

/* 모션 최소화 */
@media (prefers-reduced-motion: reduce) {
  .ddb-tab, .ddb-node, .ddb-caret, .ddb-ov-card { transition: none; }
  .ddb-own-prod, .ddb-own-tnode, .ddb-own-card, .ddb-own-sortbtn { transition: none; }
  .ddb-jumplink, .ddb-jumplink-hint { transition: none; }
}

/* ════════════════════════════════════════════════════════════════
   탭B — 자사 상세 점검 (own)
   · 공용 셸(.ddb-3pane/.ddb-tree/.ddb-main/.ddb-meta)을 재사용 → 반응형 상속.
   · 세이지 화이트리스트: 선택 제품/분류 바·배경, 게이지/막대 채움, 활성 강조, 포커스 링.
   · taxonomy color 미사용.
   ════════════════════════════════════════════════════════════════ */

/* ── 좌: 제품 선택 + 트리 ─────────────────────────────────────── */
.ddb-own-mobsel { display: none; }            /* 좁은 폭에서만 노출 */

.ddb-own-products {
  display: flex;
  flex-direction: column;
  padding: 0 4px;
}
.ddb-own-prod {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 10px 4px 12px;
  color: var(--text-2);
  transition: background .12s ease, color .12s ease;
}
.ddb-own-prod:hover { background: var(--surface-2); }
.ddb-own-prod:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-own-prod-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ddb-own-prod-cnt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* 선택 제품: 좌측 3px brand 바 + sage-tint 배경 + brand-ink */
.ddb-own-prod.is-active {
  background: var(--sage-tint);
}
.ddb-own-prod.is-active .ddb-own-prod-name { color: var(--brand-ink); }
.ddb-own-prod.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

.ddb-own-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 8px;
}

/* 대>중 트리 */
.ddb-own-tree { list-style: none; margin: 0; padding: 0 4px; }
.ddb-own-tree ul { list-style: none; margin: 0; padding: 0; }
.ddb-own-tree-children { position: relative; }
.ddb-own-tnode {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-2);
  transition: background .12s ease, color .12s ease;
}
.ddb-own-tnode:hover { background: var(--surface-2); }
.ddb-own-tnode:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-own-tnode-all,
.ddb-own-tnode-major {
  min-height: 36px;
  padding: 4px 8px 4px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.ddb-own-tnode-mid {
  min-height: 32px;
  padding: 3px 8px 3px 28px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
}
.ddb-own-tnode-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ddb-own-tnode-cnt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* 보유 0 분류 — muted + 점선 카운트 */
.ddb-own-tnode.is-empty { color: var(--muted); }
.ddb-own-tnode.is-empty .ddb-own-tnode-label { color: var(--muted); }
.ddb-own-tnode.is-empty .ddb-own-tnode-cnt {
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 0 5px;
  color: var(--muted);
}
/* 선택 분류 — sage-tint 배경 + 좌측 3px brand 바 + brand-ink */
.ddb-own-tnode.is-active {
  background: var(--sage-tint);
  color: var(--brand-ink);
}
.ddb-own-tnode.is-active .ddb-own-tnode-label { color: var(--brand-ink); font-weight: 600; }
.ddb-own-tnode.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--brand);
}

/* ── 가운데: 본문 ─────────────────────────────────────────────── */
/* 가로형 카드가 가용 폭을 전부 쓰도록 본문 최대폭 제한 해제 */
.ddb-own-main-inner { max-width: none; }
.ddb-own-head { margin-bottom: 16px; }
.ddb-own-headmeta {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* 정렬 토글 + 필터 칩 */
.ddb-own-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ddb-own-sort {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ddb-own-sortbtn {
  appearance: none;
  border: 0;
  background: var(--surface);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 7px 14px;
  min-height: 36px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.ddb-own-sortbtn + .ddb-own-sortbtn { border-left: 1px solid var(--line); }
.ddb-own-sortbtn:hover { color: var(--text-2); background: var(--surface-2); }
.ddb-own-sortbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.ddb-own-sortbtn.is-active { background: var(--sage-tint); color: var(--brand-ink); }

.ddb-own-filterchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 5px 6px 5px 10px;
}
.ddb-own-filterchip-lab {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 2px;
}
.ddb-own-filterclear {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  width: 20px; height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ddb-own-filterclear:hover { color: var(--text); background: var(--surface); }
.ddb-own-filterclear:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.ddb-own-empty {
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 분류별 그룹 — 스티키 미니 헤더 */
.ddb-own-group-head {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 0;
  margin-top: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.ddb-own-group-head:first-child { margin-top: 0; }

/* 아이템 그리드 — 1열(가로형 카드: 이미지 좌 · 정보 우) */
.ddb-own-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0 8px;
}
.ddb-own-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  transition: border-color .12s ease;
}
.ddb-own-card:hover { border-color: var(--line-strong); }
/* 이미지 오른쪽: 본문 + 베스트를 한 열로 (가로형 카드의 우측 영역) */
.ddb-own-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ddb-own-thumb {
  flex: 0 0 280px;
  width: 280px;
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  overflow: hidden;
  padding: 8px;
}
/* 이미지는 원본 비율 유지 + 확대(업스케일) 안 함. 박스(200×360) 안에서 축소만. */
.ddb-own-thumb-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 480px;
  cursor: zoom-in;
  border-radius: 4px;
}
/* 이미지 원본 크게 보기(라이트박스) */
.ddb-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .82);
  cursor: zoom-out;
}
.ddb-lb.is-open { display: flex; }
.ddb-lb.is-loading::after {
  content: ""; position: fixed; top: 50%; left: 50%;
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border: 3px solid rgba(255,255,255,.22); border-top-color: #fff; border-radius: 50%;
  animation: ddb-lb-spin .8s linear infinite; z-index: 1;
}
@keyframes ddb-lb-spin { to { transform: rotate(360deg); } }
.ddb-lb-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  transition: opacity .2s ease;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
/* 긴 이미지 모드(섹션 설정) — 상세 컷은 세로가 7,000px까지 가서 화면에 우겨넣으면
   글씨가 안 읽힌다. 폭을 기준으로 키우고 세로는 스크롤해서 전부 보게 한다. */
.ddb-lb.is-tall { align-items: flex-start; overflow: auto; -webkit-overflow-scrolling: touch; }
.ddb-lb.is-tall .ddb-lb-img { max-height: none; width: min(860px, 92vw); height: auto; }

/* 떠다니는 팝업 접기/펼치기 헤더 */
.ddb-meta-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -14px -16px 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.ddb-meta-toggle-tt { font-size: 12.5px; font-weight: 800; color: var(--brand-ink); }
.ddb-meta-toggle-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  width: 26px;
  height: 24px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
  flex: none;
}
.ddb-meta-toggle-btn:hover { border-color: var(--line-strong); color: var(--text); }
/* 접힘: 헤더만 남기고 본문 숨김 */
.is-meta-collapsed > *:not(.ddb-meta-toggle) { display: none; }
.is-meta-collapsed .ddb-meta-toggle { margin-bottom: -14px; border-bottom: 0; }

/* ════════════════════════════════════════════════════════════════
   탭C — 자사 상세페이지 개선 (제품 서브탭 + 7단계 스텝탭 + 기획 문서)
   ════════════════════════════════════════════════════════════════ */
.ddb-improve { padding-top: 4px; }

/* 제품 서브탭(언더라인형) */
.ddb-improve-prodbar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
/* 제품 서브탭 옆 — 스마트스토어 판매페이지 링크 */
.ddb-improve-storelink {
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.ddb-improve-storelink:hover {
  background: var(--sage-tint);
  border-color: var(--brand);
  color: var(--brand-ink);
}
.ddb-improve-storelink:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.ddb-improve-storelink .ic { font-size: 12px; line-height: 1; }
.ddb-improve-storelink[hidden] { display: none; }

@media (max-width: 640px) {
  .ddb-improve-storelink .tx { display: none; }
  .ddb-improve-storelink { padding: 7px 10px; }
}

.ddb-improve-prodtab {
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 14px 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.ddb-improve-prodtab:hover { color: var(--text-2); }
.ddb-improve-prodtab.is-active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.ddb-improve-prodtab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* 7단계 스텝탭(알약형, 줄바꿈 허용) */
.ddb-improve-stepbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.ddb-improve-steptab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  padding: 7px 14px 7px 7px;
  cursor: pointer;
  color: var(--text-2);
  min-height: 40px;
  transition: border-color .12s ease, background .12s ease;
}
.ddb-improve-steptab:hover { border-color: var(--line-strong); }
.ddb-improve-steptab.is-active { border-color: var(--brand); background: var(--sage-tint); color: var(--brand-ink); }
.ddb-improve-steptab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-improve-stepnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 800;
  flex: none;
}
.ddb-improve-steptab.is-active .ddb-improve-stepnum { background: var(--brand); color: #fff; }
.ddb-improve-steptt { font-size: 13px; font-weight: 600; }

/* 콘텐츠 영역 */
.ddb-improve-content { min-height: 200px; }
/* 0단계 기획 문서 — iframe 격리 임베드(JS가 내용 높이에 맞춰 height 조정) */
.ddb-improve-frame {
  width: 100%;
  min-height: 600px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f4f6fa;
  display: block;
}
/* 1~6단계 준비 중 플레이스홀더 */
.ddb-improve-empty {
  text-align: center;
  padding: 64px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--muted);
}
.ddb-improve-empty-ic { font-size: 30px; margin-bottom: 10px; }
.ddb-improve-empty-tt { font-size: 16px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.ddb-improve-empty-sub { font-size: 13px; }
.ddb-improve-empty-tag { font-size: 12.5px; color: var(--text-2); margin-top: 10px; }

/* 각 단계 상단 공통 헤더: 번호·제목 + 목적/목표 */
.ddb-improve-stephead {
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.ddb-improve-stephead-tt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.ddb-improve-stephead-tt .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex: none;
}
.ddb-improve-aim { display: flex; flex-direction: column; gap: 8px; }
.ddb-improve-aim .aim { display: flex; gap: 10px; align-items: flex-start; }
.ddb-improve-aim .lab {
  flex: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand-ink);
  background: var(--sage-tint);
  border-radius: 6px;
  padding: 3px 10px;
  margin-top: 1px;
}
.ddb-improve-aim .txt { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ── 단계 본문(기획 내용 정리) — 대시보드 톤 네이티브 스타일 ─────── */
.ddb-doc { font-size: 14px; color: var(--text); line-height: 1.7; }
.ddb-doc .mut { color: var(--muted); }
.ddb-doc .neg { color: var(--neg); }
.ddb-doc .pos { color: var(--pos); }
.ddb-doc-sec { margin-bottom: 26px; }
.ddb-doc-h { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.ddb-doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.ddb-doc-bt { font-size: 12.5px; font-weight: 800; letter-spacing: .02em; color: var(--brand-ink); margin: 0 0 12px; }
.ddb-doc-bt.mt { margin-top: 22px; }

.ddb-doc-callout {
  background: var(--sage-tint);
  border: 1px solid var(--sage-tint-2);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.75;
}
.ddb-doc-callout strong { color: var(--brand-ink); }

.ddb-doc-funnel { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.ddb-doc-stat { flex: 1; min-width: 124px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; }
.ddb-doc-stat .big { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.05; }
.ddb-doc-stat .sub { font-size: 11.5px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
.ddb-doc-stat.bad { background: #fbecec; border-color: #f1cfcf; }
.ddb-doc-stat.bad .big { color: var(--neg); }
.ddb-doc-arrow { display: flex; align-items: center; color: var(--muted); font-size: 20px; font-weight: 700; }

.ddb-doc-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.ddb-doc-insight { background: var(--sage-tint); border: 1px solid var(--sage-tint-2); border-left: 4px solid var(--sage); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; font-size: 13.5px; line-height: 1.7; }
.ddb-doc-insight b { color: var(--brand-ink); }
.ddb-doc-warn { background: #fdf2e8; border: 1px solid #f3dcbd; border-left: 4px solid #c97a12; border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 14px; font-size: 13.5px; line-height: 1.7; }
.ddb-doc-warn b { color: #a96410; }
.ddb-doc-src { font-size: 11px; color: var(--muted); margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed var(--line); line-height: 1.6; }
.ddb-doc-src code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 11px; }

.ddb-doc-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ddb-doc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ddb-doc-table th { background: var(--surface-2); color: var(--text); font-weight: 700; font-size: 11.5px; padding: 8px 10px; text-align: right; border-bottom: 2px solid var(--line); white-space: nowrap; }
.ddb-doc-table th:first-child { text-align: left; }
.ddb-doc-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ddb-doc-table td:first-child { text-align: left; font-weight: 600; white-space: normal; }
.ddb-doc-table tr.grp td { background: var(--brand); color: #fff; font-weight: 700; font-size: 11.5px; text-align: left; }
.ddb-doc-table tr.total td { background: var(--sage-tint); font-weight: 800; border-top: 2px solid var(--sage-tint-2); }
.ddb-doc-table .cvr { color: var(--neg); font-weight: 800; }
.ddb-doc-table .na { color: var(--muted); font-style: italic; }
.ddb-doc-table .mut { color: var(--muted); font-weight: 400; }
.ddb-doc-table .th-sub { display: block; font-size: 10px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.ddb-doc-basis {
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #fdf2e8;
  border: 1px solid #f3dcbd;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.ddb-doc-basis b { color: #a96410; }

.ddb-doc-kpi { width: 100%; border-collapse: collapse; }
.ddb-doc-kpi th { width: 150px; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 11px 12px 11px 0; vertical-align: top; }
.ddb-doc-kpi td { text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ddb-doc-kpi tr:last-child th, .ddb-doc-kpi tr:last-child td { border-bottom: 0; }
.ddb-doc-pill { display: inline-block; font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: var(--radius-pill); }
.ddb-doc-pill.green { background: var(--sage-tint); color: var(--pos); }
.ddb-doc-pill.amber { background: #fdf2e8; color: #a96410; }

.ddb-doc-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.ddb-doc-bar-lab { width: 130px; flex: none; font-size: 13px; }
.ddb-doc-bar-track { flex: 1; background: var(--surface-2); border-radius: 6px; height: 24px; overflow: hidden; }
.ddb-doc-bar-fill { height: 100%; border-radius: 6px; display: flex; align-items: center; padding: 0 10px; color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; }

@media (max-width: 768px) {
  .ddb-doc-kpi th { width: auto; display: block; padding-bottom: 2px; }
  .ddb-doc-kpi td { display: block; padding-top: 4px; }
}

/* 상단 한눈 요약 박스 */
.ddb-doc-summary {
  border: 2px solid var(--brand);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px 20px 20px;
  margin-bottom: 22px;
  box-shadow: 0 3px 14px rgba(62, 77, 65, .12);
}
.ddb-doc-summary-h {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .03em;
  color: #fff;
  background: var(--brand);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.ddb-doc-summary-metrics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.ddb-doc-summary-metrics .m {
  flex: 1;
  min-width: 130px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.ddb-doc-summary-metrics .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ddb-doc-summary-metrics .v { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.2; margin-top: 2px; }
.ddb-doc-summary-metrics .v.neg { color: var(--neg); }
.ddb-doc-summary-metrics .v.pos { color: var(--pos); }
.ddb-doc-summary-metrics .s { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.ddb-doc-summary-pts { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.75; color: var(--text-2); }
.ddb-doc-summary-pts li { margin: 5px 0; }
.ddb-doc-summary-pts b { color: var(--brand-ink); }
.ddb-doc-summary-goal {
  margin: 0 0 14px;
  padding: 11px 14px;
  background: var(--sage-tint);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
}
.ddb-doc-summary-goal b { color: var(--brand-ink); }
.ddb-own-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ddb-own-card-el {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.ddb-own-card-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ddb-own-card-chip {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 소분류 베스트 프랙티스 비교 (우리 카드 ↔ 베스트) ──────────────
   우리 요소(위)와 시각 구분: 상단 디바이더 + 세이지 라벨. 같은 톤 유지. */
.ddb-own-best {
  margin-top: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ddb-own-best-lab { display: flex; align-items: center; }
.ddb-own-best-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--brand-ink);
  background: var(--sage-tint);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
}
.ddb-own-best-point {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-2);
}
/* 카드 안에서 case/refs 여백은 살짝 축소(중첩 과하지 않게) */
.ddb-own-best .ddb-case { margin-top: 2px; }
.ddb-own-best .ddb-refs { margin-top: 6px; gap: 10px; }

/* ── 미보유 소분류 — 베스트 참고(본문 하단 접기) ───────────────────── */
.ddb-own-miss-sec {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.ddb-own-miss-sec-sum {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  padding: 4px 0;
}
.ddb-own-miss-sec-sum::-webkit-details-marker { display: none; }
.ddb-own-miss-sec-sum::before {
  content: "▸";
  color: var(--muted);
  font-size: 11px;
  transition: transform .12s ease;
}
.ddb-own-miss-sec[open] .ddb-own-miss-sec-sum::before { transform: rotate(90deg); }
.ddb-own-miss-sec-sum:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.ddb-own-miss-sec-tt {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.ddb-own-miss-sec-cnt {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ddb-own-miss-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.ddb-own-misscard {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.ddb-own-misscard-hd {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ddb-own-misscard-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* ── 탭B → 탭A 베스트 점프 링크(미보유 카드 이름 / 보유 카드 분류 칩) ──
   세이지 화이트리스트만 사용. hover/포커스 시 색·밑줄·힌트로 어포던스. */
.ddb-jumplink {
  cursor: pointer;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.ddb-jumplink:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 미보유 카드 이름: 이름 + "베스트 보기 →" 힌트 한 줄 */
.ddb-own-misscard-name.ddb-jumplink {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.ddb-own-misscard-name.ddb-jumplink:hover .ddb-jumplink-tx,
.ddb-own-misscard-name.ddb-jumplink:focus-visible .ddb-jumplink-tx {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ddb-jumplink-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  opacity: 0;
  transition: opacity .12s ease, color .12s ease;
}
.ddb-own-misscard-name.ddb-jumplink:hover .ddb-jumplink-hint,
.ddb-own-misscard-name.ddb-jumplink:focus-visible .ddb-jumplink-hint {
  opacity: 1;
  color: var(--brand);
}
/* 보유 카드 분류 칩(링크형): hover/포커스 시 세이지 강조 */
.ddb-own-card-chip--link:hover,
.ddb-own-card-chip--link:focus-visible {
  color: var(--brand-ink);
  background: var(--sage-tint);
}
.ddb-own-misscard-flag {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  line-height: 1.3;
}
/* 미보유 카드 안 베스트는 위 디바이더 생략(이미 카드로 구분됨) */
.ddb-own-best--inmiss {
  border-top: 0;
  padding: 10px 0 0;
  margin-top: 8px;
}

/* ── 우: 보유율 메타 ──────────────────────────────────────────── */
.ddb-own-bignum {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.ddb-own-bignum b { font-weight: 700; }
.ddb-own-gauge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.ddb-own-gauge {
  flex: 1 1 auto;
  height: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.ddb-own-gauge-fill {
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-sm);
}
.ddb-own-gauge-pct {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}

/* 대분류별 보유율 막대 */
.ddb-own-mbar-row { margin-top: 12px; }
.ddb-own-mbar-row:first-of-type { margin-top: 4px; }
.ddb-own-mbar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ddb-own-mbar-lab {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ddb-own-mbar-num {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ddb-own-mbar {
  height: 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.ddb-own-mbar-fill {
  height: 100%;
  background: var(--sage);
  border-radius: var(--radius-sm);
}
.ddb-own-mbar.is-strong .ddb-own-mbar-fill { background: var(--brand); }
/* 0% — 트랙 + 점선 */
.ddb-own-mbar.is-empty {
  background: transparent;
  border: 1px dashed var(--line-strong);
  height: 6px;
}

/* 미보유 소분류 — 대분류별 그룹 + 점선 칩 */
.ddb-own-miss-grp { margin-top: 12px; }
.ddb-own-miss-grp:first-of-type { margin-top: 4px; }
.ddb-own-miss-grphead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}
.ddb-own-miss-grpcnt {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ddb-own-miss-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ddb-own-miss-chip {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  line-height: 1.3;
}
/* 미보유 소분류 칩(링크형): hover/포커스 시 세이지 강조 — 보유 카드 칩 링크와 동일 어포던스
   (커서/트랜지션/포커스 링은 .ddb-jumplink 공용 규칙 상속) */
.ddb-own-miss-chip--link:hover,
.ddb-own-miss-chip--link:focus-visible {
  color: var(--brand-ink);
  background: var(--sage-tint);
  border-color: var(--brand);
}

/* ════════════════════════════════════════════════════════════════
   탭B 반응형 — 공용 셸(.ddb-3pane 등)이 1439/768 미디어를 상속.
   아이템 그리드 열수 + 모바일 좌측(제품 드롭다운) 처리만 추가.
   ════════════════════════════════════════════════════════════════ */

/* 가로형 카드라 좁은 폭에서도 1열 유지 */
@media (max-width: 1439px) {
  .ddb-own-grid { grid-template-columns: 1fr; }
}

/* 미보유 베스트 그리드: 좁은 폭에서 1열(카드 내용 가독성) */
@media (max-width: 768px) {
  .ddb-own-miss-grid { grid-template-columns: 1fr; }
}

/* ≤768: 좌 트리 → 상단 제품 드롭다운 + 가로 분류 칩. 공용 규칙이
   .ddb-tree를 display:none 처리하므로 own-left만 다시 노출. */
@media (max-width: 768px) {
  .ddb-own .ddb-own-left {
    display: block;
    border-right: 0;
    padding: 0;
    margin-bottom: 12px;
  }
  .ddb-own .ddb-own-left .ddb-tree-scroll {
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .ddb-own-mobsel {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-bottom: 10px;
  }
  /* 데스크톱 제품 리스트·디바이더 숨기고, 트리는 가로 칩으로 */
  .ddb-own-products,
  .ddb-own-divider { display: none; }
  .ddb-own-tree {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
  }
  .ddb-own-tree > li { display: contents; }
  .ddb-own-tree-children { display: contents; }
  .ddb-own-tnode {
    width: auto;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
  }
  .ddb-own-tnode-all,
  .ddb-own-tnode-major,
  .ddb-own-tnode-mid {
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 500;
  }
  .ddb-own-tnode.is-active::before { display: none; }
  .ddb-own-tnode.is-active { border-color: var(--brand); }
}

/* ≤420: 1열 유지 + 썸네일 폭 축소(가로형 카드가 좁은 화면에 맞게) */
@media (max-width: 420px) {
  .ddb-own-grid { grid-template-columns: 1fr; gap: 10px; }
  .ddb-own-thumb { flex: 0 0 120px; width: 120px; }
}

/* ── 자사 점검(데스크톱 ≥769) — 좌측 패널을 상단 내비로, 본문 전체폭 ─────
   3단 그리드(.ddb-3pane)는 베스트 탭과 공용이라 .ddb-own 에만 한정해 재배치한다.
   제품=가로 알약, 분류(요소)=가로 칩(클릭 시 본문 필터), 우 보유율은 본문 하단으로. */
@media (min-width: 769px) {
  .ddb-3pane.ddb-own {
    display: block;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  /* 상단 내비(기존 좌측 패널) — 제품 탭은 투명, 분류(전체~)만 흰 카드 */
  .ddb-own > .ddb-own-left {
    border-right: 0;
    padding: 0;
    margin-bottom: 14px;
  }
  .ddb-own .ddb-own-left .ddb-tree-scroll {
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .ddb-own .ddb-own-mobsel { display: none; }
  /* 제품 = 밑줄 탭(개선 탭 제품탭과 동일), 한 줄 가로 */
  .ddb-own .ddb-own-products {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }
  .ddb-own .ddb-own-prod {
    width: auto;
    flex: 0 0 auto;
    min-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 0;
    background: none;
    padding: 8px 16px 10px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
  }
  .ddb-own .ddb-own-prod:hover { background: none; color: var(--text-2); }
  .ddb-own .ddb-own-prod.is-active { background: none; color: var(--brand-ink); border-bottom-color: var(--brand); }
  .ddb-own .ddb-own-prod.is-active .ddb-own-prod-name { color: var(--brand-ink); }
  .ddb-own .ddb-own-prod.is-active::before { display: none; }
  .ddb-own .ddb-own-prod-name { font-size: 14px; font-weight: 600; flex: 0 0 auto; }
  .ddb-own .ddb-own-prod-cnt { display: none; }
  /* 제품탭 밑줄이 구분선 역할 → 별도 디바이더 숨김 */
  .ddb-own .ddb-own-divider { display: none; }

  /* 분류(요소) = 대분류(라벨) → 중분류(칩) 계층 표현 (전체~ 흰 카드 배경) */
  .ddb-own .ddb-own-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
  }
  .ddb-own .ddb-own-tree > li { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
  .ddb-own .ddb-own-tnode { width: auto; min-height: 0; }
  /* '전체' = 단독 칩 */
  .ddb-own .ddb-own-tnode-all {
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
  }
  /* 대분류 = 왼쪽 굵은 라벨(고정폭으로 정렬 → 계층 가독) */
  .ddb-own .ddb-own-tnode-major {
    flex: 0 0 auto;
    min-width: 150px;
    border: 0;
    background: none;
    border-radius: 0;
    padding: 6px 0;
    justify-content: flex-start;
    font-weight: 700;
    color: var(--text);
  }
  .ddb-own .ddb-own-tnode-major:hover { background: none; color: var(--brand-ink); }
  .ddb-own .ddb-own-tnode-major.is-active { background: none; color: var(--brand-ink); }
  .ddb-own .ddb-own-tnode-major .ddb-own-tnode-label { white-space: normal; }
  /* 중분류 묶음 = 오른쪽 칩들 */
  .ddb-own .ddb-own-tree-children {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 0;
    min-width: 0;
    padding: 0;
  }
  .ddb-own .ddb-own-tnode-mid {
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    font-size: 12.5px;
  }
  .ddb-own .ddb-own-tnode.is-active::before { display: none; }
  .ddb-own .ddb-own-tnode-all.is-active,
  .ddb-own .ddb-own-tnode-mid.is-active { border-color: var(--brand); background: var(--sage-tint); color: var(--brand-ink); }
  /* 본문 = 전체폭 */
  .ddb-own .ddb-own-main { padding: 4px 0 0; }
  /* 보유 현황 → 오른쪽 상단 떠다니는 작은 팝업(내부 스크롤) */
  .ddb-own .ddb-own-meta {
    position: fixed;
    top: 88px;
    right: 20px;
    width: 240px;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    z-index: 40;
  }
}

/* ── 요소별 베스트(데스크톱 ≥769) — 좌 트리를 상단 계층 내비로, 본문 전체폭 ──
   대분류 라벨 → 중분류 칩 → (선택 시) 소분류 칩. 좌 트리는 모바일용으로 숨김. */
@media (min-width: 769px) {
  .ddb-3pane.ddb-best {
    display: block;
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .ddb-best > .ddb-tree { display: none; }       /* 데스크톱: 좌 트리 숨김(상단 내비로 대체) */
  .ddb-best .ddb-main {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 22px 26px;
  }
  /* 위치·가중치분포·참고사례·구조규칙 → 오른쪽 상단 떠다니는 팝업(내부 스크롤) */
  .ddb-best .ddb-meta {
    position: fixed;
    top: 88px;
    right: 20px;
    width: 260px;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    z-index: 40;
  }
  /* 상단 계층 내비 */
  .ddb-bestnav { margin-bottom: 18px; }
  .ddb-bestnav-cats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 14px 16px;
  }
  .ddb-bestnav-catrow { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
  .ddb-bestnav-major {
    flex: 0 0 auto;
    min-width: 150px;
    padding: 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
  }
  .ddb-bestnav-mids { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 0; min-width: 0; }
  .ddb-bestnav-mid {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-2);
    padding: 5px 12px;
    font-size: 12.5px;
    cursor: pointer;
  }
  .ddb-bestnav-mid:hover { border-color: var(--line-strong); }
  .ddb-bestnav-mid:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .ddb-bestnav-mid.is-active { border-color: var(--brand); background: var(--sage-tint); color: var(--brand-ink); font-weight: 600; }
  .ddb-bestnav-cnt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .ddb-bestnav-mid.is-active .ddb-bestnav-cnt { color: var(--brand-ink); }
  /* 선택된 중분류의 소분류 바 */
  .ddb-bestnav-subbar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }
  .ddb-bestnav-subbar-lab {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 5px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-ink);
  }
  .ddb-bestnav-subs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 0; min-width: 0; }
  .ddb-bestnav-sub {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--text-2);
    padding: 5px 12px;
    font-size: 12.5px;
    cursor: pointer;
  }
  .ddb-bestnav-sub:hover { border-color: var(--line-strong); }
  .ddb-bestnav-sub:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .ddb-bestnav-sub.is-active { border-color: var(--brand); background: var(--sage-tint); color: var(--brand-ink); font-weight: 600; }
  .ddb-bestnav-new { font-size: 9px; font-weight: 800; color: var(--pos); letter-spacing: .03em; }
}
@media (max-width: 768px) {
  .ddb-bestnav { display: none; }   /* 모바일: 상단 내비 숨김(기존 모바일 내비 사용) */
}

/* ════════ [탭C · step1] 우리 현황 진단 — step0과 동일한 ddb-doc 톤 확장 ════════ */
/* 51컷 썸네일 그리드 */
.ddb-doc-cuts { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:7px; margin-top:4px; }
.ddb-doc-cut { border:2px solid var(--line); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface); }
.ddb-doc-cut img { width:100%; height:78px; object-fit:cover; object-position:top; display:block; background:var(--surface-2); cursor:zoom-in; }
.ddb-doc-cut .cl { font-size:10px; padding:3px 5px 5px; line-height:1.25; color:var(--muted); }
.ddb-doc-cut .cl b { color:var(--text); }
.ddb-doc-cut.f { outline:2px solid var(--neg); outline-offset:1px; }
.ddb-doc-grp { font-size:12.5px; font-weight:800; margin:16px 0 8px; padding:5px 12px; border-radius:var(--radius-sm); background:var(--surface-2); border-left:4px solid var(--muted); color:var(--text); }
.ddb-doc-grp:first-child { margin-top:0; }
.ddb-doc-grp .c { font-weight:600; color:var(--muted); font-size:11.5px; }
.ddb-doc-grp.g-main { border-left-color:var(--brand); }
/* 후기·Q&A 인용 */
.ddb-doc-quotes { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:8px; }
.ddb-doc-quote { background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius-sm); padding:11px 13px; font-size:12.5px; line-height:1.6; color:var(--text-2); }
.ddb-doc-quote b { color:var(--text); }
.ddb-doc-quote .qc { display:block; margin-top:7px; font-size:10.5px; font-weight:800; color:var(--brand-ink); }
/* step2 경쟁사 분석 — 특이점 칩 + 강점/약점 2열 */
.ddb-doc-chips { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 4px; }
.ddb-doc-chip { font-size:12px; font-weight:600; background:var(--sage-tint); color:var(--brand-ink);
  border-radius:8px; padding:6px 11px; line-height:1.3; }
.ddb-doc-gb { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:13px; }
.ddb-doc-good, .ddb-doc-bad { border-radius:var(--radius-sm); padding:13px 15px; }
.ddb-doc-good { background:var(--sage-tint); border:1px solid var(--sage-tint-2); }
.ddb-doc-bad { background:#fcebe8; border:1px solid #f6d6cf; }
.ddb-doc-good .h, .ddb-doc-bad .h { font-size:12.5px; font-weight:800; margin-bottom:7px; letter-spacing:.01em; }
.ddb-doc-good .h { color:var(--pos); } .ddb-doc-bad .h { color:var(--neg); }
.ddb-doc-good ul, .ddb-doc-bad ul { margin:0; padding-left:17px; }
.ddb-doc-good li, .ddb-doc-bad li { margin:4px 0; font-size:13px; line-height:1.5; color:var(--text-2); }
.ddb-doc-table tr.hl > td { background:#fff7ed; }
.ddb-doc-table tr.hl > td:first-child { font-weight:700; box-shadow:inset 3px 0 0 var(--neg); }
/* step2 — 경쟁사 리포트 형태 재현: 제품 카드 그리드 */
.ddb-c2-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(152px,1fr)); gap:12px; margin-top:6px; }
.ddb-c2-card { border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--surface); overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.ddb-c2-card .thumb { position:relative; height:112px; background:var(--surface-2); }
.ddb-c2-card .thumb img { width:100%; height:100%; object-fit:cover; object-position:top center; cursor:zoom-in; display:block; }
.ddb-c2-card .rk { position:absolute; top:7px; left:7px; width:24px; height:24px; border-radius:7px; background:var(--brand-ink); color:#fff; font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(0,0,0,.3); }
.ddb-c2-card .body { padding:12px 13px; }
.ddb-c2-card h5 { margin:0 0 2px; font-size:14px; font-weight:700; letter-spacing:-.01em; }
.ddb-c2-card .cbrand { font-size:11.5px; color:var(--muted); margin:0 0 9px; }
.ddb-c2-card .kv { display:flex; justify-content:space-between; font-size:12px; padding:4px 0; border-top:1px solid var(--line); }
.ddb-c2-card .kv b { font-weight:700; }
.ddb-c2-card .ctags { display:flex; flex-wrap:wrap; gap:4px; margin-top:9px; }
.ddb-c2-card .ctags span { font-size:11px; font-weight:600; background:var(--sage-tint); color:var(--brand-ink); border-radius:6px; padding:4px 7px; }
.ddb-c2-store { display:flex; align-items:center; justify-content:center; gap:5px; margin-top:11px; font-size:12px; font-weight:700; color:#fff; background:#03c75a; border-radius:8px; padding:8px 10px; text-decoration:none; }
.ddb-c2-store:hover { background:#02b350; }
.ddb-c2-storelink { font-size:12.5px; font-weight:700; color:#0a8a3f; text-decoration:none; margin-left:8px; white-space:nowrap; }
.ddb-c2-storelink:hover { text-decoration:underline; }
/* step2 — 흐름 위치 비교 바 */
.ddb-c2-pos { display:grid; grid-template-columns:96px 1fr 86px; gap:10px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.ddb-c2-pos:last-child { border-bottom:0; }
.ddb-c2-pos .plab { font-size:13px; font-weight:600; }
.ddb-c2-track { position:relative; height:6px; background:var(--surface-2); border-radius:4px; }
.ddb-c2-mk { position:absolute; top:50%; width:14px; height:14px; border-radius:50%; transform:translate(-50%,-50%); border:2px solid var(--surface); box-shadow:0 1px 2px rgba(0,0,0,.2); }
.ddb-c2-mk.c { background:#9aa0a6; z-index:1; } .ddb-c2-mk.s { background:var(--brand); z-index:2; }
.ddb-c2-pos .ppct { font-size:12px; text-align:right; }
.ddb-c2-poslg { font-size:12.5px; color:var(--muted); margin-top:12px; display:flex; gap:16px; }
.ddb-c2-dot { display:inline-block; width:11px; height:11px; border-radius:50%; vertical-align:middle; margin-right:5px; }
/* step2 — 상품 카드 구분 강화 + 액션 2열 + 제목 강조 */
.ddb-c2-prod { border:1.5px solid var(--line-strong); box-shadow:0 3px 16px rgba(0,0,0,.09); padding:22px 22px 24px; margin-bottom:18px; position:relative; overflow:hidden; }
.ddb-c2-prod::before { content:""; position:absolute; top:0; left:0; right:0; height:5px; background:var(--brand); }
.ddb-c2-prodname { font-size:18px !important; font-weight:800 !important; color:var(--text) !important; margin:2px 0 4px !important; }
.ddb-c2-prodname .mut { font-size:13px; font-weight:600; color:var(--muted); }
.ddb-c2-actiongrid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:6px; }
.ddb-c2-actiongrid .ddb-doc-card { margin:0; height:100%; }
.ddb-c2-actiongrid .ddb-doc-bt { font-size:15.5px; font-weight:800; }
/* step2 섹션 제목 더 크게(잘 보이게) */
.ddb-doc .ddb-doc-h { font-size:21px; }
@media (max-width:760px){ .ddb-c2-actiongrid { grid-template-columns:1fr; } }
/* step2 — 상품별 상세페이지 전체 갤러리 */
.ddb-c2-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(94px,1fr)); gap:7px; margin-top:6px; }
.ddb-c2-shot { margin:0; border:1px solid var(--line); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface); cursor:zoom-in; position:relative; transition:.12s; }
.ddb-c2-shot:hover { border-color:var(--brand); transform:translateY(-1px); }
.ddb-c2-shot img { width:100%; height:92px; object-fit:cover; object-position:top center; display:block; background:var(--surface-2); }
.ddb-c2-shot figcaption { position:absolute; top:4px; left:4px; background:rgba(0,0,0,.6); color:#fff; font-size:10px; font-weight:700; padding:1px 6px; border-radius:5px; }
/* 라이트박스 좌우 넘기기 nav */
.ddb-lb-nav { position:fixed; top:50%; transform:translateY(-50%); width:48px; height:48px; border-radius:50%; border:0; background:rgba(255,255,255,.16); color:#fff; font-size:28px; line-height:1; cursor:pointer; z-index:2; display:flex; align-items:center; justify-content:center; }
.ddb-lb-nav:hover { background:rgba(255,255,255,.3); }
.ddb-lb-prev { left:18px; } .ddb-lb-next { right:18px; }
.ddb-lb-count { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); color:#fff; font-size:14px; font-weight:600; background:rgba(0,0,0,.45); padding:5px 14px; border-radius:999px; z-index:2; }
@media (max-width:680px){ .ddb-doc-gb { grid-template-columns:1fr; } .ddb-doc-quotes { grid-template-columns:1fr; } .ddb-lb-nav { width:40px; height:40px; font-size:24px; } .ddb-lb-prev{left:8px;} .ddb-lb-next{right:8px;} }
/* 레퍼런스 개선안 */
.ddb-doc-ref { display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); align-items:flex-start; }
.ddb-doc-ref:last-child { border-bottom:0; padding-bottom:0; }
.ddb-doc-ref-img { flex:none; width:116px; }
.ddb-doc-ref-img img { width:100%; border-radius:var(--radius-sm); border:1px solid var(--line); cursor:zoom-in; display:block; background:var(--surface-2); }
.ddb-doc-ref-img .cap { font-size:10.5px; color:var(--muted); margin-top:4px; text-align:center; line-height:1.3; }
.ddb-doc-ref-tx { flex:1; }
.ddb-doc-ref-tx .gp { display:inline-block; font-size:11px; font-weight:700; background:#fbecec; color:var(--neg); padding:2px 8px; border-radius:5px; margin-bottom:6px; }
.ddb-doc-ref-tx .pr { font-size:13.5px; font-weight:800; color:var(--text); margin:0 0 5px; }
.ddb-doc-ref-tx .rf { font-size:12.5px; color:var(--text-2); margin:0 0 7px; line-height:1.55; }
.ddb-doc-ref-tx .ap { font-size:12.5px; background:var(--sage-tint); border-left:3px solid var(--sage); padding:8px 11px; border-radius:6px; margin:0; line-height:1.55; }
.ddb-doc-ref-tx .ap b { color:var(--brand-ink); }
/* 긍정(good) 박스 */
.ddb-doc-good { background:var(--sage-tint); border:1px solid var(--sage-tint-2); border-left:4px solid var(--pos); border-radius:var(--radius-sm); padding:14px 16px; margin-top:14px; font-size:13.5px; line-height:1.7; }
.ddb-doc-good b { color:var(--pos); }
@media(max-width:680px){ .ddb-doc-quotes{grid-template-columns:1fr;} .ddb-doc-ref{flex-direction:column;} .ddb-doc-ref-img{width:100%;max-width:200px;} }

/* ── 편집 모드 (요소별 베스트 프랙티스, ?edit=1) ── */
.ddb-editable { outline: 1px dashed var(--line-strong); border-radius: 5px; padding: 1px 5px; cursor: text; transition: background .12s, outline-color .12s; }
.ddb-editable:hover { background: var(--sage-tint); outline-color: var(--sage); }
.ddb-editable:focus { outline: 2px solid var(--brand); background: #fff; }
.ddb-ref-move { margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ddb-ref-move-lab { font-size: 11px; color: var(--muted); font-weight: 700; }
.ddb-ref-move-sel { font-size: 11.5px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 6px; max-width: 190px; background: #fff; }
.ddb-savebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 9999; display: flex; align-items: center; gap: 12px; background: var(--brand-ink); color: #fff; padding: 10px 14px 10px 18px; border-radius: 999px; box-shadow: 0 8px 28px rgba(0,0,0,.28); font-size: 13px; max-width: 94vw; }
.ddb-savebar-info { opacity: .82; }
.ddb-savebar-status { font-weight: 700; white-space: nowrap; }
.ddb-savebar-btn { background: #fff; color: var(--brand-ink); border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.ddb-savebar-btn.is-dirty { background: #ffd84d; }
@media(max-width:680px){ .ddb-savebar { flex-direction: column; gap: 7px; border-radius: 14px; left: 8px; right: 8px; transform: none; max-width: none; } .ddb-savebar-info { font-size: 11.5px; } }

/* ── 맨 위로 가기 버튼 ─────────────────────────────────────────
   스크롤을 내리면(320px↑) 우하단에 작게 나타나는 원형 버튼. */
.ddb-topbtn {
  position: fixed;
  right: 40px;
  bottom: 40px;
  z-index: 9998;            /* savebar(9999)보다 한 단계 아래 */
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--brand-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.ddb-topbtn:hover { background: var(--sage-tint); }
.ddb-topbtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-topbtn.is-on { opacity: 1; visibility: visible; transform: translateY(0); }
/* 편집 모드의 하단 저장바(모바일은 화면 하단 전체 차지)와 겹치지 않게 위로 올림 */
@media(max-width:680px){
  .ddb-topbtn { right: 18px; bottom: 20px; width: 44px; height: 44px; }
  body.ddb-edit-on .ddb-topbtn { bottom: 92px; }
}

/* ════════════════════════════════════════════════════════════════
   탭D — 섹션 설정 (GTM_GA 상세측정 연동, #41)
   좌: 상품/기간/섹션목록 레일(고정폭) · 우: 이미지 워크벤치(세로 스크롤)
   ════════════════════════════════════════════════════════════════ */
.ddb-sec { display: flex; gap: 28px; align-items: flex-start; }
.ddb-sec-side {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 16px;
}
.ddb-sec-main { flex: 1 1 auto; min-width: 0; }

.ddb-sec-block { }
.ddb-sec-lab {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}
.ddb-sec-count { font-weight: 400; color: var(--muted); }

.ddb-sec-sel { width: 100%; }

.ddb-sec-hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.ddb-sec-hint.is-warn { color: #a96410; }

.ddb-sec-period { display: flex; flex-direction: column; gap: 8px; }
.ddb-sec-period-row { display: flex; align-items: center; gap: 6px; }
.ddb-sec-period-tag {
  flex: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.ddb-sec-period-sep { color: var(--muted); font-size: 12px; }
.ddb-sec-date {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 8px;
}
.ddb-sec-date:disabled { color: var(--muted); background: var(--surface-2); }
.ddb-sec-date:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.ddb-sec-listblock { }
.ddb-sec-prefill-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--sage-tint);
  border: 1px solid var(--sage);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  line-height: 1.5;
  margin-bottom: 8px;
}
.ddb-sec-prefill-warn { font-size: 11.5px; color: #a96410; line-height: 1.5; margin-bottom: 8px; }
.ddb-sec-empty { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding: 8px 0; }
.ddb-sec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.ddb-sec-listitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.ddb-sec-listitem:last-child { border-bottom: 0; }
.ddb-sec-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 999px; }
.ddb-sec-listbody { flex: 1; min-width: 0; }
.ddb-sec-listname { font-size: 12.5px; font-weight: 600; color: var(--text); }
.ddb-sec-listrange { font-size: 11px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.ddb-sec-listdel {
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  cursor: pointer;
}
.ddb-sec-listdel:hover { color: var(--neg); border-color: var(--neg); }
.ddb-sec-listdel:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.ddb-sec-saveblock { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.ddb-sec-savebtn {
  align-self: flex-start;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  cursor: pointer;
}
.ddb-sec-savebtn:hover { background: var(--brand-ink); }
.ddb-sec-savebtn:disabled { background: var(--line-strong); cursor: not-allowed; }
.ddb-sec-savebtn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ddb-sec-status { font-size: 12px; color: var(--muted); min-height: 16px; }

/* 우: 이미지 워크벤치 */
.ddb-sec-imgtoolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.ddb-sec-imgcount { font-weight: 700; color: var(--text-2); }
.ddb-sec-imgtip { color: var(--muted); }

.ddb-sec-imglist { display: flex; flex-direction: column; gap: 6px; }
.ddb-sec-imgrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.ddb-sec-imgrow:hover { background: var(--surface-2); }
.ddb-sec-imgrow.is-start { border-color: var(--brand); box-shadow: 0 0 0 2px var(--sage-tint) inset; }
.ddb-sec-imgrow.is-pending { background: var(--sage-tint); border-color: var(--sage); }
.ddb-sec-imgrow.is-assigned { background: var(--surface-2); }
.ddb-sec-imgidx {
  flex: 0 0 34px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* 순서 바꾸기 손잡이 — 여기를 끌어야 행이 움직인다(썸네일 클릭=확대와 분리). */
.ddb-sec-imghandle {
  flex: 0 0 auto; width: 20px; text-align: center; cursor: grab;
  color: var(--muted); font-size: 15px; line-height: 1; user-select: none;
}
.ddb-sec-imghandle:active { cursor: grabbing; }
.ddb-sec-imgrow.is-dragging { opacity: .45; }
.ddb-sec-imgrow.is-dragover { box-shadow: 0 -3px 0 0 var(--sage) inset, 0 0 0 1px var(--sage); }
.ddb-sec-imgthumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: top center;   /* 위쪽(카피)이 보이게 */
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  cursor: zoom-in;               /* 클릭하면 원본 전체 확대 */
  transition: box-shadow .12s, transform .12s;
}
.ddb-sec-imgthumb:hover { box-shadow: 0 0 0 2px var(--sage); transform: scale(1.04); }
.ddb-sec-imgtag {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-ink);
  background: var(--sage-tint);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  white-space: nowrap;
}

/* 배정 대기 바(구간 확정 후 대>중>소 선택) — 이미지 목록 위에 고정 표시 */
.ddb-sec-assign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--sage-tint);
  border: 1px solid var(--sage-tint-2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ddb-sec-assign-range { font-size: 12.5px; font-weight: 700; color: var(--brand-ink); white-space: nowrap; }
.ddb-sec-assign .ddb-sec-sel { width: auto; min-width: 130px; flex: 1 1 130px; }
.ddb-sec-assign-add,
.ddb-sec-assign-cancel {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.ddb-sec-assign-add { background: var(--brand); color: #fff; border: 0; }
.ddb-sec-assign-add:hover { background: var(--brand-ink); }
.ddb-sec-assign-cancel { background: var(--surface); color: var(--text-2); border: 1px solid var(--line-strong); }
.ddb-sec-assign-cancel:hover { background: var(--surface-2); }

@media (max-width: 900px) {
  .ddb-sec { flex-direction: column; }
  .ddb-sec-side { position: static; flex: 1 1 auto; width: 100%; }
}

/* ════════════════════════════════════════════════════════════════
   탭E: 상세 성과 (perf, #43) — GA4 상세페이지 측정, 상품별 전/후 비교
   · 무채색 기조 유지 — "후(after)"만 세이지로 강조, "전(before)"은 중립 회색.
     (파일 상단 세이지 절제 화이트리스트 원칙과 동일 — 색으로 판단 유도 아님, 강조만)
   · KPI 카드: 큰 숫자 + 델타 배지 = pos/neg만(라인·텍스트, 배경은 옅은 틴트).
   ════════════════════════════════════════════════════════════════ */
.ddb-perf { display: flex; flex-direction: column; gap: 20px; }

.ddb-perf-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 4px;
}
.ddb-perf-selrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ddb-perf-selrow .ddb-sec-lab { margin: 0; white-space: nowrap; }
/* 유입 세그먼트 토글(전체/광고/비광고) — 레벨 토글과 같은 알약 버튼을 그대로 쓴다. */
.ddb-perf-seg { display: flex; align-items: center; gap: 4px; margin-left: 6px;
  padding: 3px; border-radius: 999px; background: var(--surface-2); }
.ddb-perf-seg-lab { font-size: 12px; color: var(--text-2); font-weight: 600; padding: 0 6px; white-space: nowrap; }
.ddb-perf-sel { min-width: 220px; }

.ddb-perf-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.ddb-perf-meta-txt { color: var(--text-2); font-weight: 600; }
.ddb-perf-meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.ddb-perf-meta-after { background: var(--sage-tint); color: var(--brand-ink); border-color: var(--sage-tint-2); }
.ddb-perf-meta-arrow { color: var(--muted); font-size: 13px; }

/* KPI 카드 4개 */
.ddb-perf-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ddb-perf-kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ddb-perf-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ddb-perf-kpi-big {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.ddb-perf-kpi-deltarow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ddb-perf-kpi-delta { font-size: 12.5px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.ddb-perf-kpi-delta.is-pos { color: var(--pos); background: rgba(31, 138, 76, .1); }
.ddb-perf-kpi-delta.is-neg { color: var(--neg); background: rgba(210, 59, 59, .1); }
.ddb-perf-kpi-delta.is-flat { color: var(--muted); background: var(--surface-2); }
.ddb-perf-kpi-sub { font-size: 12px; color: var(--muted); }

/* 본문 내 블록(KPI행 · 차트그리드들 · 섹션블록) 간 세로 간격을 일정하게 */
.ddb-perf-body { display: flex; flex-direction: column; gap: 20px; }

/* 차트 카드 그리드 — 2열(큰 차트: 스크롤·체류·인터랙션·퍼널, 행 높이 통일) */
.ddb-perf-charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: stretch; }
/* 도넛류 3열(유입 채널·기기·신규재방문, 행 높이 통일) */
.ddb-perf-charts-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ddb-perf-chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.ddb-perf-chart-tt { font-size: 13px; font-weight: 700; color: var(--text-2); }
.ddb-perf-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); }
.ddb-perf-lg { display: inline-flex; align-items: center; gap: 5px; }
.ddb-perf-lg::before { content: ""; width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ddb-perf-lg-before::before { background: var(--sage); }
.ddb-perf-lg-after::before { background: var(--brand); }
.ddb-perf-canvas-wrap { position: relative; width: 100%; }
.ddb-perf-canvas-wrap canvas { max-width: 100%; }

/* 섹션 도달·체류 (대/중/소 토글) */
.ddb-perf-sec-block { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
.ddb-perf-sec-tt { font-size: 14px; font-weight: 700; color: var(--text); }
.ddb-perf-sec-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  padding: 3px;
  width: fit-content;
}
.ddb-perf-sec-toggle-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
}
.ddb-perf-sec-toggle-btn.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ddb-perf-sec-toggle-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ddb-perf-sec-info { font-size: 12.5px; color: var(--muted); padding: 24px 0; text-align: center; }

/* 스크롤 히트맵 — section_reach.sub 재사용, 색 강도 셀(전/후 2열, 행 높이 통일) */
.ddb-perf-heatmap-block { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.ddb-perf-heatmap-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.ddb-perf-heatmap-legend-bar { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--surface-2), var(--brand)); }
.ddb-perf-heatmap-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 8px;
  align-items: center;
  height: 34px;
}
.ddb-perf-heatmap-head { height: auto; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.ddb-perf-heatmap-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ddb-perf-heatmap-cell-lab { font-size: 11.5px; color: var(--muted); text-align: center; }
.ddb-perf-heatmap-cell {
  height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* 전체 지표 요약 표 — Before/After, 행별 개선/악화 옅은 틴트 */
.ddb-perf-table-wrap { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
.ddb-perf-table-scroll { overflow-x: auto; }
.ddb-perf-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 12.5px; }
.ddb-perf-table thead th {
  text-align: center; padding: 8px 10px; color: var(--muted); font-weight: 600; font-size: 11.5px;
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.ddb-perf-table thead th:first-child { text-align: left; }
.ddb-perf-table tbody td {
  padding: 9px 10px; border-bottom: 1px solid var(--line); color: var(--text-2);
  text-align: center; font-variant-numeric: tabular-nums;
}
.ddb-perf-table tbody td.ddb-perf-table-label { text-align: left; font-weight: 600; color: var(--text); }
.ddb-perf-table tbody tr.is-pos { background: rgba(31, 138, 76, .035); }
.ddb-perf-table tbody tr.is-neg { background: rgba(210, 59, 59, .035); }

@media (max-width: 1200px) { .ddb-perf-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
  .ddb-perf-charts-grid { grid-template-columns: 1fr; }
  .ddb-perf-charts-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ddb-perf-kpi-grid { grid-template-columns: 1fr; }
  .ddb-perf-head { flex-direction: column; align-items: flex-start; }
  .ddb-perf-heatmap-row { grid-template-columns: 90px 1fr 1fr; }
}

/* ── 자사 개선 · 손목마사지기 step4 (후킹 챕터 추가) ───────────────── */

/* 삽입 위치 도식 */
.ddb-w4-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.ddb-w4-fbox {
  flex: 1; min-width: 148px; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); padding: 12px; text-align: center;
}
.ddb-w4-fbox .t { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: .03em; margin-bottom: 8px; }
.ddb-w4-fbox > img {
  width: 100%; height: 118px; object-fit: cover; object-position: top;
  border-radius: 8px; border: 1px solid var(--line); display: block; margin-bottom: 10px; cursor: zoom-in;
  background: var(--surface-2);
}
.ddb-w4-fbox .m { font-size: 13.5px; font-weight: 700; line-height: 1.45; color: var(--text); margin-top: auto; }
.ddb-w4-fbox .m .why { display: inline-block; font-weight: 500; font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }
.ddb-w4-arr { display: flex; align-items: center; color: var(--line-strong); font-size: 17px; font-weight: 800; }

.ddb-w4-fbox.is-del { background: var(--surface-2); }
.ddb-w4-fbox.is-del > img { filter: grayscale(1); opacity: .42; }
.ddb-w4-fbox.is-del .t { color: var(--neg); }
.ddb-w4-fbox.is-del .m { color: var(--muted); }
.ddb-w4-fbox.is-del .m .strike { text-decoration: line-through; text-decoration-color: var(--neg); }
.ddb-w4-fbox.is-del .m .why { color: var(--neg); }

.ddb-w4-fbox.is-new { background: var(--sage-tint); border: 2px dashed var(--brand); }
.ddb-w4-fbox.is-new .t { color: var(--brand-ink); }
.ddb-w4-fbox.is-new .g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 6px; }
.ddb-w4-fbox.is-new .g4 img {
  width: 100%; height: 56px; object-fit: cover; border-radius: 5px;
  border: 1px solid var(--line); display: block; cursor: zoom-in; background: var(--surface);
}
.ddb-w4-fbox.is-new .reflbl { font-size: 10px; font-weight: 700; color: var(--brand-ink); opacity: .85; margin-bottom: 9px; line-height: 1.4; }
.ddb-w4-fbox.is-new .m .why { color: var(--brand-ink); }

/* 7장 세트 카드 */
.ddb-w4-sheet {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); overflow: hidden; margin-bottom: 14px;
}
.ddb-w4-sheet .hd {
  display: flex; align-items: center; gap: 11px; padding: 13px 16px;
  background: var(--sage-tint); border-bottom: 1px solid var(--line);
}
.ddb-w4-sheet .hd .no {
  flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--brand);
  color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.ddb-w4-sheet .hd h5 { margin: 0; font-size: 15.5px; font-weight: 700; color: var(--text); }
.ddb-w4-sheet .hd .tech { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--brand-ink); white-space: nowrap; }

.ddb-w4-sheet .bd { display: grid; grid-template-columns: 340px 1fr; }
.ddb-w4-sheet .vis { padding: 15px 16px; border-right: 1px solid var(--line); }
.ddb-w4-sheet .vis .cap { font-size: 11.5px; color: var(--muted); font-weight: 700; margin-bottom: 7px; }
.ddb-w4-sheet .vis .cap.c2 { margin-top: 14px; }
.ddb-w4-sheet .vis img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.ddb-w4-sheet .txt { padding: 15px 18px; }
.ddb-w4-sheet .row { margin-bottom: 15px; }
.ddb-w4-sheet .row:last-child { margin-bottom: 0; }
.ddb-w4-sheet .row .k { font-size: 11px; font-weight: 800; letter-spacing: .05em; color: var(--muted); margin-bottom: 5px; }
.ddb-w4-sheet .row .v { font-size: 13.5px; line-height: 1.65; color: var(--text); }
.ddb-w4-sheet .row .v .sub { font-size: 12.5px; color: var(--text-2); margin-top: 7px; line-height: 1.6; }

.ddb-w4-sheet .mk { display: inline-block; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 7px; }
.ddb-w4-sheet .mk.none { background: var(--sage-tint); color: var(--brand-ink); }
.ddb-w4-sheet .mk.draw { background: #fff4e5; color: #9a5c0d; }

.ddb-w4-sheet .quo {
  background: var(--surface-2); border-left: 3px solid var(--brand);
  border-radius: 0 8px 8px 0; padding: 11px 14px;
  font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--text);
}

/* GIF 밑에 붙일 설명 컷 시안 */
.ddb-w4-capshot {
  background: linear-gradient(160deg, #1a2440, #0f1729);
  border-radius: 10px; padding: 24px 18px; text-align: center; color: #fff;
}
.ddb-w4-capshot .ttl { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.ddb-w4-capshot .dsc { font-size: 13px; line-height: 1.85; color: #c9d2e4; }
.ddb-w4-sheet .cnote { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }

.ddb-w4-warn {
  margin-top: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.65;
  background: #fdf6e9; border: 1px solid #f0dcb8; border-left: 3px solid #c97a12;
  border-radius: 8px; color: #6b5426;
}
.ddb-w4-warn b { color: #4a3a18; }

.ddb-w4-tip {
  margin-top: 4px; padding: 14px 16px; font-size: 13px; line-height: 1.7;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text-2);
}
.ddb-w4-tip b { color: var(--text); }

/* 라벨 오류 수정 안내 */
.ddb-w4-fix {
  display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: center;
  background: #fdeeee; border: 1px solid #f3c9c9; border-left: 4px solid var(--neg);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.ddb-w4-fix > img { width: 100%; border-radius: 8px; border: 1px solid #f0c4c4; display: block; cursor: zoom-in; }
.ddb-w4-fix .fx p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.7; color: var(--text); }
.ddb-w4-fix .fx p.sm { font-size: 12.5px; color: #7a4444; }
.ddb-w4-fix .fx .bdg {
  display: inline-block; background: var(--surface); border: 1px solid #f0c4c4;
  border-radius: 7px; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--text);
}
.ddb-w4-fix .fx .bdg s { color: var(--neg); opacity: .7; }

@media (max-width: 860px) {
  .ddb-w4-sheet .bd { grid-template-columns: 1fr; }
  .ddb-w4-sheet .vis { border-right: none; border-bottom: 1px solid var(--line); }
  .ddb-w4-fix { grid-template-columns: 1fr; }
  .ddb-w4-arr { display: none; }
}

/* 자사 개선 · 손목 step4 — 챕터 탭(상단 후킹 / 후킹 리스트업) */
.ddb-w4-chaptabs { display: flex; gap: 6px; margin-bottom: 22px; border-bottom: 2px solid var(--line); }
.ddb-w4-chaptab {
  appearance: none; border: none; background: none; padding: 11px 18px; font: inherit;
  font-size: 15px; font-weight: 700; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s;
}
.ddb-w4-chaptab:hover { color: var(--text); }
.ddb-w4-chaptab.is-active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.wrist-chap[hidden] { display: none; }
.wrist-chap iframe { display: block; }


/* wrist step4 챕터2 — 후킹 리스트업(대시보드 네이티브 스코프) */
#ddbHookListup *{box-sizing:border-box;}
#ddbHookListup{-webkit-text-size-adjust:100%;}
#ddbHookListup{margin:0; background:transparent; color:var(--text);
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Pretendard",
      "Apple SD Gothic Neo","Malgun Gothic",system-ui,sans-serif;
    line-height:1.6; font-size:15px; letter-spacing:-.01em;
    -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;}
#ddbHookListup .wrap{max-width:1320px; margin:0 auto; padding:0 24px;}
#ddbHookListup header{padding:56px 0 24px; text-align:center;}
#ddbHookListup header h1{margin:0 0 10px; font-size:38px; line-height:1.1; font-weight:700; letter-spacing:-.025em;}
#ddbHookListup header .lead{margin:0 auto; max-width:640px; font-size:19px; color:var(--text-2); font-weight:400; line-height:1.5;}
#ddbHookListup .scheme{margin:14px auto 8px;}
#ddbHookListup .scheme-intro{background:var(--surface); border-radius:16px; padding:18px 22px; box-shadow:0 1px 2px rgba(20,25,30,.05);
    font-size:14.5px; color:var(--text-2); line-height:1.7; margin-bottom:18px;}
#ddbHookListup .scheme-intro b{color:var(--text); font-weight:600;}
#ddbHookListup .scheme-grid{display:grid; grid-template-columns:repeat(5,1fr); gap:12px;}
#ddbHookListup .sc{background:var(--surface); border-radius:16px; padding:18px 16px; box-shadow:0 1px 2px rgba(20,25,30,.05);
    display:flex; flex-direction:column; gap:8px; border-top:3px solid var(--gc,#ccc);}
#ddbHookListup .sc .sc-h{display:flex; align-items:center; gap:9px;}
#ddbHookListup .sc .sc-num{flex:none; width:28px; height:28px; border-radius:9px; background:var(--gc,#1d1d1f); color:#fff;
    font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center;}
#ddbHookListup .sc .sc-name{font-size:15.5px; font-weight:700; letter-spacing:-.02em;}
#ddbHookListup .sc .sc-def{font-size:12.5px; color:var(--muted); line-height:1.45; min-height:34px;}
#ddbHookListup .sc .sc-subs{display:flex; flex-direction:column; gap:4px; border-top:1px solid var(--line); padding-top:10px;}
#ddbHookListup .sc .sc-subs .st{display:block; font-size:12.5px; color:var(--text); line-height:1.35; font-weight:600;}
#ddbHookListup .sc .sc-subs .ex{display:block; font-style:normal; font-size:11px; color:var(--muted); font-weight:400; margin:1px 0 7px 9px; line-height:1.4;}
#ddbHookListup .toolbar{position:static; z-index:1;
    background:transparent; border-bottom:1px solid var(--line); margin:22px 0 18px;}
#ddbHookListup .toolbar .wrap{display:flex; align-items:center; gap:14px; padding:11px 24px; flex-wrap:wrap;}
#ddbHookListup .prog{font-size:13px; color:var(--text-2); font-weight:500;}
#ddbHookListup .store-size{font-size:12px; color:var(--muted); font-weight:500;}
#ddbHookListup .sortwrap{display:flex; align-items:center; gap:7px; font-size:12.5px; color:var(--text-2); margin-left:auto;}
#ddbHookListup .sortsel{border:none; background:rgba(0,0,0,.05); border-radius:99px; padding:6px 26px 6px 13px; font:inherit;
    font-size:12.5px; font-weight:600; color:var(--text); cursor:pointer; -webkit-appearance:none; appearance:none;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' stroke='%238e8e93' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
    background-repeat:no-repeat; background-position:right 10px center;}
#ddbHookListup .btn{border:none; background:rgba(0,0,0,.05); border-radius:99px; padding:7px 15px;
    font-size:13px; font-weight:500; color:var(--text); cursor:pointer; transition:all .15s; letter-spacing:-.01em;}
#ddbHookListup .btn:hover{background:rgba(0,0,0,.09);}
#ddbHookListup .btn.primary{background:var(--brand); color:#fff;}
#ddbHookListup .btn.primary:hover{background:#0077ed;}
#ddbHookListup .tbl{background:var(--surface); border-radius:18px; box-shadow:0 1px 2px rgba(20,25,30,.05), 0 8px 22px rgba(20,25,30,.05); overflow:hidden; margin-bottom:16px;}
#ddbHookListup table{width:100%; border-collapse:collapse;}
#ddbHookListup thead th{background:#fbfbfd; color:var(--muted); font-weight:600; font-size:11px; letter-spacing:.03em;
    text-transform:uppercase; padding:11px 14px; text-align:left; border-bottom:1px solid var(--line); vertical-align:top;}
#ddbHookListup tbody td{padding:13px 14px; border-bottom:1px solid var(--line); vertical-align:top;}
#ddbHookListup tbody tr:last-child td{border-bottom:none;}
#ddbHookListup tbody tr.hide{display:none;}
#ddbHookListup .c-sub{width:210px;}
#ddbHookListup .selsub-ro{font-size:14.5px; font-weight:700; color:var(--text); line-height:1.4; letter-spacing:-.02em; padding:2px 0;}
#ddbHookListup.hl-ro .c-memo{display:none;}
#ddbHookListup .memo-ro{margin-top:10px; padding-top:9px; border-top:1px dashed var(--line);
  font-size:12.5px; color:var(--text-2); line-height:1.55;}
#ddbHookListup .memo-ro b{display:inline-block; color:var(--muted); font-weight:700; font-size:10.5px;
  margin-right:6px; padding:2px 7px; background:var(--surface-2); border-radius:5px; vertical-align:middle;}
#ddbHookListup .c-own{width:200px;}
#ddbHookListup .c-ref{min-width:420px;}
#ddbHookListup .c-memo{width:140px;}
#ddbHookListup .c-del{width:38px;}
#ddbHookListup .hfilter{margin-top:7px; width:100%; border:1px solid var(--line); border-radius:8px; padding:5px 22px 5px 8px;
    font:inherit; font-size:11.5px; font-weight:600; color:var(--text-2); background:var(--surface); cursor:pointer;
    text-transform:none; letter-spacing:0; -webkit-appearance:none; appearance:none;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' stroke='%238e8e93' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
    background-repeat:no-repeat; background-position:right 7px center;}
#ddbHookListup .hfilter:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .hfilter.active{border-color:var(--brand); color:var(--brand); background-color:var(--sage-tint);}
#ddbHookListup .selsub{width:100%; border:1px solid var(--line); border-radius:10px; padding:12px 30px 12px 13px; font:inherit;
    font-size:14.5px; font-weight:700; color:var(--text); letter-spacing:-.02em; background:var(--surface); cursor:pointer;
    -webkit-appearance:none; appearance:none;
    background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 4.5L6 7.5L9 4.5' stroke='%238e8e93' stroke-width='1.4' fill='none' stroke-linecap='round'/></svg>");
    background-repeat:no-repeat; background-position:right 10px center; transition:border-color .15s, box-shadow .15s;}
#ddbHookListup .selsub:hover{border-color:var(--line-strong);}
#ddbHookListup .selsub:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .selsub.empty{color:var(--muted); font-weight:400;}
#ddbHookListup .grp-badge{display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; color:var(--gc,#8e8e93);
    letter-spacing:-.01em; line-height:1.3;}
#ddbHookListup .grp-badge .gdot{flex:none; width:9px; height:9px; border-radius:50%; background:var(--gc,#c7c7cc);}
#ddbHookListup .grp-none{font-size:12.5px; color:var(--muted);}
#ddbHookListup .state-badge{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:600;
    padding:4px 10px; border-radius:99px; cursor:pointer; user-select:none; transition:transform .12s; margin-bottom:8px;}
#ddbHookListup .state-badge:active{transform:scale(.94);}
#ddbHookListup .state-badge.none{background:#FBEAEA; color:var(--neg);}
#ddbHookListup .state-badge.weak{background:#F6EEDD; color:#C0791A;}
#ddbHookListup .state-badge.have{background:#E4F1E9; color:var(--pos);}
#ddbHookListup .state-badge .dot{width:6px; height:6px; border-radius:50%; background:currentColor;}
#ddbHookListup .own{font-size:13px; color:var(--text-2); line-height:1.55; border-radius:8px; padding:5px 7px; margin:0 -7px;
    outline:none; transition:background .15s; min-height:24px;}
#ddbHookListup .own:hover{background:rgba(0,0,0,.03);}
#ddbHookListup .own:focus{background:var(--sage-tint); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .own.empty{color:var(--muted);}
#ddbHookListup .own-cut{display:inline-block; margin-top:7px; font-size:11px; font-weight:600; color:var(--muted);
    background:rgba(0,0,0,.05); padding:2px 8px; border-radius:99px;}
#ddbHookListup .ta{width:100%; border:1px solid var(--line); border-radius:10px; padding:9px 11px;
    font:inherit; font-size:13.5px; line-height:1.5; color:var(--text); background:var(--surface);
    resize:vertical; min-height:40px; transition:border-color .15s, box-shadow .15s;}
#ddbHookListup .ta:hover{border-color:var(--line-strong);}
#ddbHookListup .ta:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .ta::placeholder{color:var(--muted);}
#ddbHookListup .ref-top{display:flex; gap:8px; align-items:center; margin-bottom:7px;}
#ddbHookListup .ref-brand{flex:1; border:1px solid var(--line); border-radius:8px; padding:7px 10px; font:inherit; font-size:13px;
    font-weight:600; color:var(--text); background:var(--surface);}
#ddbHookListup .ref-brand:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .ref-brand::placeholder{color:var(--muted); font-weight:400;}
#ddbHookListup .ref-src{font-size:10px; font-weight:700; padding:2px 7px; border-radius:99px; white-space:nowrap;
    background:var(--sage-tint-2); color:var(--brand-ink);}
#ddbHookListup .ref-note{width:100%; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; font-size:13px;
    line-height:1.5; color:var(--text); background:var(--surface); resize:vertical; min-height:36px;}
#ddbHookListup .ref-note:focus{outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(0,113,227,.12);}
#ddbHookListup .ref-note::placeholder{color:var(--muted);}
#ddbHookListup /* 레퍼런스: 왼쪽 이미지(크게) + 오른쪽 본문 */
  .ref-wrap{display:flex; gap:13px; align-items:flex-start;}
#ddbHookListup .ref-imgs{flex:none; width:136px; display:flex; flex-direction:column; gap:7px;}
#ddbHookListup .ref-imgs .thumbs{flex-direction:column; gap:7px; margin:0;}
#ddbHookListup .ref-imgs .thumb{width:136px; height:118px;}
#ddbHookListup .ref-imgs .dropzone{margin:0;}
#ddbHookListup .ref-body{flex:1; min-width:0;}
#ddbHookListup .ref-body .ref-top{margin-bottom:8px;}
#ddbHookListup .thumbs{display:flex; flex-wrap:wrap; gap:6px; margin-top:8px;}
#ddbHookListup .thumb{position:relative; width:66px; height:66px; border-radius:10px; overflow:hidden;
    border:1px solid var(--line); background:var(--surface-2); cursor:zoom-in; box-shadow:0 1px 2px rgba(20,25,30,.05);}
#ddbHookListup .thumb img{width:100%; height:100%; object-fit:cover; display:block;}
#ddbHookListup .thumb .rm{position:absolute; top:3px; right:3px; width:18px; height:18px; border-radius:50%;
    background:rgba(0,0,0,.6); color:#fff; border:none; font-size:11px; line-height:1; cursor:pointer;
    display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .15s;}
#ddbHookListup .thumb:hover .rm{opacity:1;}
#ddbHookListup .thumb .gifbadge{position:absolute; bottom:2px; left:2px; font-size:8px; font-weight:700; color:#fff;
    background:rgba(0,0,0,.55); padding:1px 4px; border-radius:4px;}
#ddbHookListup .dropzone{border:1.5px dashed var(--line-strong); border-radius:9px; padding:7px; text-align:center;
    font-size:11px; color:var(--muted); cursor:pointer; transition:all .15s; background:var(--surface); margin-top:7px;}
#ddbHookListup .dropzone:hover{border-color:var(--brand); color:var(--brand); background:var(--sage-tint);}
#ddbHookListup .dropzone.drag{border-color:var(--brand); background:var(--sage-tint); color:var(--brand);}
#ddbHookListup .ref-actions{display:flex; gap:8px; margin-top:9px; flex-wrap:wrap;}
#ddbHookListup .mini-btn{border:1px solid var(--line); background:var(--surface); border-radius:8px; padding:6px 11px;
    font:inherit; font-size:12px; font-weight:600; cursor:pointer; transition:all .15s;}
#ddbHookListup .mini-btn.add{color:var(--brand);}
#ddbHookListup .mini-btn.add:hover{border-color:var(--brand); background:var(--sage-tint);}
#ddbHookListup .mini-btn.reco{color:var(--brand-ink);}
#ddbHookListup .mini-btn.reco:hover{border-color:var(--brand-ink); background:var(--sage-tint-2);}
#ddbHookListup .recos{margin-top:10px; background:var(--sage-tint-2); border-radius:11px; padding:10px;}
#ddbHookListup .recos-list{display:flex; flex-direction:column; gap:6px;}
#ddbHookListup .reco{display:flex; gap:9px; align-items:center; background:var(--surface); border-radius:9px; padding:6px 8px;}
#ddbHookListup .reco.added{opacity:.45;}
#ddbHookListup .reco img{width:44px; height:44px; object-fit:cover; border-radius:7px; border:1px solid #e3d8f5; cursor:zoom-in; flex:none; background:#fff;}
#ddbHookListup .reco .rc{flex:1; min-width:0;}
#ddbHookListup .reco .rc b{font-size:12px; font-weight:700; color:var(--text); display:block;}
#ddbHookListup .reco .rc span{font-size:11px; color:var(--text-2); line-height:1.4; display:block;}
#ddbHookListup .reco .rc .rsrc{font-size:9.5px; color:var(--brand-ink); font-weight:600; margin-top:1px;}
#ddbHookListup .reco-add{flex:none; border:none; background:var(--brand-ink); color:#fff; border-radius:8px; padding:6px 12px;
    font:inherit; font-size:11.5px; font-weight:700; cursor:pointer; transition:filter .15s;}
#ddbHookListup .reco-add:hover{filter:brightness(1.08);}
#ddbHookListup .reco-add:disabled{background:#c9bce3; cursor:default;}
#ddbHookListup .del-btn{border:none; background:transparent; color:var(--muted); cursor:pointer; font-size:17px;
    width:30px; height:30px; border-radius:8px; transition:all .15s;}
#ddbHookListup .del-btn:hover{background:#FBEAEA; color:var(--neg);}
#ddbHookListup .addrow{display:flex; justify-content:center; margin-bottom:20px;}
#ddbHookListup .addrow button{border:1.5px dashed var(--line-strong); background:var(--surface); border-radius:12px; padding:11px 22px;
    font:inherit; font-size:14px; font-weight:600; color:var(--brand); cursor:pointer; transition:all .15s;}
#ddbHookListup .addrow button:hover{border-color:var(--brand); background:var(--sage-tint);}
#ddbHookListup .toast{position:fixed; bottom:26px; left:50%; transform:translateX(-50%) translateY(24px);
    background:rgba(29,29,31,.92); color:#fff; padding:10px 20px; border-radius:99px; font-size:13.5px; font-weight:500;
    opacity:0; pointer-events:none; transition:opacity .25s, transform .25s; z-index:60; backdrop-filter:blur(10px);}
#ddbHookListup .toast.on{opacity:1; transform:translateX(-50%) translateY(0);}
#ddbHookListup .lb{position:fixed; inset:0; background:rgba(0,0,0,.82); backdrop-filter:blur(8px);
    display:none; align-items:center; justify-content:center; padding:40px; z-index:100; cursor:zoom-out;}
#ddbHookListup .lb.on{display:flex;}
#ddbHookListup .lb img{max-width:92vw; max-height:90vh; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.5);}
#ddbHookListup /* 대분류 그룹 헤더 (회의용) */
  tbody tr.grouphead td{ padding:0; border-bottom:none; }
#ddbHookListup tbody tr.grouphead .gh-inner{ display:flex; align-items:center; gap:13px; padding:15px 18px;
    cursor:pointer; user-select:none; border-top:1px solid var(--line); border-bottom:2px solid var(--line-strong);
    border-left:5px solid var(--gc,#ccc); background:#fbfbfd; transition:background .15s; }
#ddbHookListup tbody tr:first-child.grouphead .gh-inner{ border-top:none; }
#ddbHookListup tbody tr.grouphead .gh-inner:hover{ background:#f4f6fb; }
#ddbHookListup tbody tr.grouphead.hide{ display:none; }
#ddbHookListup .gh-toggle{ font-size:12px; color:var(--gc,#8e8e93); width:14px; text-align:center; }
#ddbHookListup .gh-num{ flex:none; width:30px; height:30px; border-radius:9px; background:var(--gc,#1d1d1f); color:#fff;
    font-weight:700; font-size:16px; display:flex; align-items:center; justify-content:center; }
#ddbHookListup .gh-name{ font-size:18px; font-weight:700; color:var(--text); letter-spacing:-.02em; }
#ddbHookListup .gh-desc{ font-size:13px; color:var(--muted); }
#ddbHookListup .gh-summary{ margin-left:auto; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
#ddbHookListup .gh-mini{ font-size:11px; font-weight:600; padding:3px 9px; border-radius:99px; }
#ddbHookListup .gh-mini.n{ background:#FBEAEA; color:var(--neg); }
#ddbHookListup .gh-mini.w{ background:#F6EEDD; color:#C0791A; }
#ddbHookListup .gh-mini.h{ background:#E4F1E9; color:var(--pos); }
#ddbHookListup .gh-count{ font-size:12px; color:var(--text-2); font-weight:600; background:rgba(0,0,0,.05); padding:4px 12px; border-radius:99px; }
#ddbHookListup .foot{margin:6px 0 90px; padding:22px 24px; background:var(--surface); border-radius:18px;
    box-shadow:0 1px 2px rgba(20,25,30,.05); font-size:13.5px; color:var(--text-2); line-height:1.75;}
#ddbHookListup .foot b{color:var(--text); font-weight:600;}


/* wrist step4 챕터2 — 후킹 리스트업 읽기 전용(보기) 모드 */
#ddbHookListup.hl-ro .dropzone,
#ddbHookListup.hl-ro .del-btn,
#ddbHookListup.hl-ro #btnExport,
#ddbHookListup.hl-ro #btnImport,
#ddbHookListup.hl-ro #btnReset { display:none; }
#ddbHookListup.hl-ro .state-badge { pointer-events:none; }
#ddbHookListup.hl-ro .sc .st { cursor:default; }
#ddbHookListup.hl-ro .selsub { background-image:none; pointer-events:none;
  border-color:transparent; background-color:transparent; padding-left:0; font-weight:700; }
#ddbHookListup.hl-ro .selsub:disabled { color:var(--text); opacity:1; }
#ddbHookListup.hl-ro .ref-brand,
#ddbHookListup.hl-ro .ref-note,
#ddbHookListup.hl-ro .ta { border-color:transparent; background:transparent; padding-left:0; }
#ddbHookListup.hl-ro .ref-brand:read-only,
#ddbHookListup.hl-ro .ref-note:read-only,
#ddbHookListup.hl-ro .ta:read-only { color:var(--text); }


/* 후킹 리스트업 — 선정 항목 분리 표시 */
#ddbHookListup .pk-box { background: var(--sage-tint); border: 1px solid var(--sage-tint-2);
  border-radius: var(--radius-md); padding: 18px 20px; margin: 4px 0 18px; }
#ddbHookListup .pk-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 16px; font-weight: 700; color: var(--brand-ink); margin-bottom: 14px; }
#ddbHookListup .pk-cnt { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand);
  padding: 2px 10px; border-radius: 999px; }
#ddbHookListup .pk-sub { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
#ddbHookListup .pk-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
#ddbHookListup .pk-item { display: flex; gap: 11px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--gc, var(--brand)); border-radius: var(--radius-sm); padding: 12px 14px; }
#ddbHookListup .pk-no { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--gc, var(--brand));
  color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
#ddbHookListup .pk-body { flex: 1; min-width: 0; }
#ddbHookListup .pk-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
#ddbHookListup .pk-label { font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
#ddbHookListup .pk-type { font-size: 11px; font-weight: 600; color: var(--gc, var(--muted)); }
#ddbHookListup .pk-ref { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
#ddbHookListup .pk-refnote { color: var(--muted); }
#ddbHookListup .pk-note { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line);
  font-size: 12.5px; color: var(--text); line-height: 1.55; }
#ddbHookListup .pk-note b { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--brand-ink);
  background: var(--sage-tint); padding: 2px 7px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }

#ddbHookListup .pk-badge { display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff;
  background: var(--brand); padding: 3px 9px; border-radius: 999px; margin-bottom: 7px; }
#ddbHookListup tbody tr.is-picked td { background: #F7FAF8; }
#ddbHookListup tbody tr.is-picked:hover td { background: #F2F7F4; }

@media (max-width: 900px){ #ddbHookListup .pk-list { grid-template-columns: 1fr; } }

/* 선정 카드 — 레퍼런스 썸네일 */
#ddbHookListup .pk-thumb { flex: none; width: 86px; height: 86px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); cursor: zoom-in; }
#ddbHookListup .pk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* 개선안 도출 — 선정 정리 카드 */
.ddb-chap-group { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px;
  padding-left: 14px; border-left: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.ddb-w4-chaptab.sm { font-size: 13.5px; padding: 8px 13px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); margin-bottom: 0; }
.ddb-w4-chaptab.sm.is-active { border-color: var(--brand); background: var(--sage-tint); border-bottom-color: var(--brand); }
.pk-loading { color: var(--muted); font-size: 13.5px; padding: 20px 0; }
.pks-head { margin-bottom: 16px; }
.pks-cnt { font-size: 12.5px; font-weight: 700; color: #fff; background: var(--brand);
  padding: 2px 10px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.pks-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pks-item { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: var(--radius-md); padding: 14px 16px; }
.pks-item.is-wide { grid-column: 1 / -1; }
.pks-no { flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--brand);
  color: #fff; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pks-shots { flex: none; display: flex; gap: 8px; }
.pks-shots figure { margin: 0; width: 92px; }
.pks-item.is-wide .pks-shots figure { width: 118px; }
.pks-shots img { width: 100%; height: 92px; object-fit: cover; object-position: top; display: block;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.pks-item.is-wide .pks-shots img { height: 132px; }
.pks-shots figcaption { font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; margin-top: 5px; }
.pks-body { flex: 1; min-width: 0; }
.pks-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pks-top b { font-size: 15.5px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.pks-ref, .pks-plan { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.pks-plan { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); color: var(--text); }
.pks-ref .lab, .pks-plan .lab { display: inline-block; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; margin-right: 6px; vertical-align: middle;
  background: rgba(0,0,0,.05); color: var(--muted); }
.pks-plan .lab { background: var(--sage-tint); color: var(--brand-ink); }
.pks-ref .mut { color: var(--muted); }


/* 상단 후킹 — 설명 컷 워딩 */
.ddb-w4-wsum { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: var(--radius-md); padding: 16px 18px; margin: 0 0 12px; }
.ddb-w4-wsum .ws-main { flex: 1; min-width: 0; }
.ddb-w4-wsum .ws-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.ddb-w4-wsum .ws-h { font-size: 15.5px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.ddb-w4-wsum .ws-lead { font-size: 13px; line-height: 1.7; color: var(--text-2); margin: 0 0 16px; }
.ddb-w4-wsum .ws-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ddb-w4-wsum .ws-card { min-width: 0; }
.ddb-w4-wsum .ws-card img { width: 100%; display: block; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface-2); }
.ddb-w4-wsum .ws-cap { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 8px 0 6px; }
.ddb-w4-wsum .ws-box { background: #1F2A37; border-radius: var(--radius-sm); padding: 15px 16px; }
.ddb-w4-wsum .ws-t { font-size: 14.5px; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: -.02em; }
.ddb-w4-wsum .ws-d { font-size: 12.5px; line-height: 1.75; color: rgba(255,255,255,.82); }
@media (max-width: 900px){ .ddb-w4-wsum .ws-grid { grid-template-columns: 1fr; } }

.pks-done { font-size: 10.5px; font-weight: 700; color: var(--pos); background: rgba(31,138,76,.1);
  padding: 2px 8px; border-radius: 999px; }

/* 선정 정리 — 제작 결과물 자리 */
.pks-out, .ws-out { flex: none; width: 168px; display: flex; flex-direction: column; }
.po-lab { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.pks-out img, .ws-out img { width: 100%; flex: 1; min-height: 110px; object-fit: cover; object-position: top;
  display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.po-empty { flex: 1; min-height: 110px; display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2);
  color: var(--muted); font-size: 11px; line-height: 1.5; }
@media (max-width: 900px){
  .pks-item, .ddb-w4-wsum { flex-wrap: wrap; }
  .pks-out, .ws-out { width: 100%; }
  .po-empty { min-height: 80px; }
}

/* 선정 정리 — 미완성 배지·결과물 대기칸 */
.pks-todo { font-size: 10.5px; font-weight: 700; color: #B26A00; background: rgba(178,106,0,.12);
  padding: 2px 8px; border-radius: 999px; }
.po-empty.po-wip { color: #B26A00; border-color: #E7C48A; background: #FFF7EC; font-weight: 700; }

/* 선정 정리 — 제외 사유 */
.pks-ex .ex-tag { display:inline-block; font-size:10.5px; font-weight:700; color:#B26A00;
  background:rgba(178,106,0,.12); padding:2px 8px; border-radius:999px; margin-right:6px; vertical-align:middle; }

/* 상단 후킹 — 결과물 워딩 수정 안내 */
.ddb-w4-wsum .ws-note { font-size: 12.5px; line-height: 1.65; color: var(--text-2);
  background: var(--surface-2); border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  padding: 9px 12px; margin: 0 0 14px; }
.ddb-w4-wsum .ws-note b { color: var(--text); }

/* 선정 정리 — 적용된 실제 페이지 버튼 */
.pks-applied { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap;
  background:var(--sage-tint); border:1px solid var(--sage-tint-2); border-radius:var(--radius-md);
  padding:14px 18px; margin-bottom:16px; }
.pks-applied .pa-txt { display:flex; flex-direction:column; gap:3px; min-width:0; }
.pks-applied .pa-txt b { font-size:14.5px; font-weight:700; color:var(--brand-ink); }
.pks-applied .pa-txt span { font-size:12.5px; color:var(--text-2); }
.pks-applied .pa-btn { flex:none; display:inline-flex; align-items:center; gap:6px;
  font-size:13.5px; font-weight:700; color:#fff; background:var(--brand);
  padding:10px 18px; border-radius:var(--radius-pill); text-decoration:none; white-space:nowrap;
  transition:background .15s; }
.pks-applied .pa-btn:hover { background:var(--brand-ink); }

/* 선정 정리 — 순서 배치 근거 */
.ow-sec { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.ow-flow { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ow-flow li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.ow-flow .ow-n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--brand);
  color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ow-flow li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ow-flow b { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.ow-flow b em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--brand); }
.ow-flow span { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }
.ow-flow .ow-next { background: var(--surface-2); border-style: dashed; }
.ow-flow .ow-next .ow-n { background: var(--muted); }
.ow-cut { background: var(--surface-2); border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0; padding: 12px 14px; }
.ow-cut > b { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.ow-cut p { font-size: 12.5px; line-height: 1.6; color: var(--text-2); margin: 0 0 4px; }
.ow-cut p b { color: var(--text); }
