  body { font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif;
         background: var(--bg); color: var(--navy); min-height: 100vh; }

  /* ── 헤더 ── */
  header {
    background: var(--navy);
    color: white;
    padding: 1.2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
  }
  header .logo { font-size: 1.6rem; }
  header h1 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.3px; }
  header p  { font-size: .8rem; color: #94a3b8; margin-top: 2px; }
  header .badge {
    margin-left: auto;
    background: #1e3a5f;
    color: #60a5fa;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .75rem;
    white-space: nowrap;
  }

  /* ── 메인 ── */
  main { max-width: 1280px; margin: 0 auto; padding: 2rem 2.5rem 4rem; }

  /* ── 입력 카드 ── */
  .input-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.8rem 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  .input-card label { font-size: .85rem; font-weight: 600; color: #475569;
                       display: block; margin-bottom: .5rem; }
  textarea {
    width: 100%; height: 200px;
    border: 2px solid #e2e8f0; border-radius: 8px;
    padding: .8rem 1rem; font-size: 1rem; line-height: 1.6;
    resize: vertical; outline: none; transition: border .2s;
    font-family: inherit; color: var(--navy);
  }
  textarea:focus { border-color: var(--blue); }
  textarea::placeholder { color: #94a3b8; font-size: .9rem; }

  .side-controls { display: flex; flex-direction: column; gap: .9rem; }
  .side-controls input {
    width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: .7rem .9rem; font-size: .9rem; outline: none; transition: border .2s;
    font-family: inherit;
  }
  .side-controls input:focus { border-color: var(--blue); }
  .side-controls input::placeholder { color: #94a3b8; }

  .btn-analyze {
    width: 100%; padding: .95rem;
    background: var(--blue); color: white;
    border: none; border-radius: 8px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    transition: background .2s, transform .1s;
    margin-top: auto;
  }
  .btn-analyze:hover  { background: #2563eb; }
  .btn-analyze:active { transform: scale(.98); }
  .btn-analyze:disabled { background: #94a3b8; cursor: not-allowed; }

  .hint { font-size: .75rem; color: #94a3b8; text-align: center; margin-top: .4rem; }

  /* ── 메트릭 카드 ── */
  .metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
  .metric-card {
    background: white; border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
  }
  .metric-card .label { font-size: .78rem; font-weight: 600; color: #64748b; margin-bottom: .3rem; }
  .metric-card .value { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
  .metric-card .sub   { font-size: .78rem; color: #94a3b8; margin-top: .3rem; }

  /* ── 결과 테이블 카드 ── */
  .result-card {
    background: white; border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
  }
  .result-card h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
                     display: flex; align-items: center; gap: .5rem; }

  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; }
  thead th {
    background: var(--navy); color: white;
    padding: .75rem 1rem; text-align: left;
    font-size: .82rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    user-select: none;
  }
  thead th:hover { background: #1e293b; }
  thead th.sorted-asc::after  { content: " ▲"; }
  thead th.sorted-desc::after { content: " ▼"; }

  tbody tr:nth-child(even) { background: #f8fafc; }
  tbody tr:hover { background: #eff6ff; }
  td { padding: .72rem 1rem; font-size: .93rem; border-bottom: 1px solid #f1f5f9; }
  td.kw { font-weight: 600; }

  /* 검색량 컬러 배지 */
  .vol {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: 3px 10px 3px 6px; border-radius: 99px;
    font-weight: 700; font-size: .88rem;
  }
  .vol-s  { background: #fef2f2; color: #dc2626; }
  .vol-a  { background: #fff7ed; color: #c2410c; }
  .vol-b  { background: #fefce8; color: #a16207; }
  .vol-c  { background: #f0fdf4; color: #15803d; }
  .vol-d  { background: #f8fafc; color: #94a3b8; }

  .bar-wrap { display: flex; align-items: center; gap: .5rem; }
  .bar { height: 6px; border-radius: 3px; background: #e2e8f0; flex: 1; overflow: hidden; }
  .bar-fill { height: 100%; border-radius: 3px; transition: width .4s; }

  .comp-badge {
    padding: 2px 8px; border-radius: 4px; font-size: .78rem; font-weight: 600;
  }
  .comp-high { background: #fef2f2; color: #dc2626; }
  .comp-mid  { background: #fefce8; color: #a16207; }
  .comp-low  { background: #f0fdf4; color: #16a34a; }
  .comp-na   { background: #f8fafc; color: #94a3b8; }

  .grade {
    display: inline-block; width: 26px; height: 26px; line-height: 26px;
    text-align: center; border-radius: 50%; font-weight: 800; font-size: .82rem;
  }
  .g-S { background: #dc2626; color: white; }
  .g-A { background: #ea580c; color: white; }
  .g-B { background: #ca8a04; color: white; }
  .g-C { background: #16a34a; color: white; }
  .g-D { background: #94a3b8; color: white; }

  /* ── 인사이트 ── */
  .insights { margin-bottom: 1.5rem; }
  .insights h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .9rem; }
  .insight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; }
  .insight-item {
    background: white; border-radius: 10px;
    padding: 1rem 1.2rem; border-left: 4px solid;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    display: flex; align-items: flex-start; gap: .8rem;
  }
  .insight-item .emoji { font-size: 1.4rem; flex-shrink: 0; }
  .insight-item .text h3 { font-size: .92rem; font-weight: 700; margin-bottom: .2rem; }
  .insight-item .text p  { font-size: .78rem; color: #64748b; }

  /* ── 다운로드 ── */
  .dl-row { display: flex; gap: 1rem; margin-bottom: 2rem; }
  .btn-dl {
    padding: .75rem 1.5rem;
    border: 2px solid; border-radius: 8px;
    font-size: .9rem; font-weight: 700; cursor: pointer;
    background: white; transition: all .15s;
    display: flex; align-items: center; gap: .5rem;
  }
  .btn-dl-csv   { border-color: #3b82f6; color: #3b82f6; }
  .btn-dl-csv:hover   { background: #eff6ff; }
  .btn-dl-excel { border-color: #16a34a; color: #16a34a; }
  .btn-dl-excel:hover { background: #f0fdf4; }
  .btn-dl-rank  { border-color: #7c3aed; color: #7c3aed; }
  .btn-dl-rank:hover  { background: #f5f3ff; }
  .btn-dl-rank:disabled { border-color: #94a3b8; color: #94a3b8; cursor: not-allowed; }

  /* ── 관련 키워드 토글 ── */
  .related-toggle {
    background: white; border-radius: var(--radius);
    padding: 1rem 1.5rem; cursor: pointer;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    display: flex; align-items: center; justify-content: space-between;
    user-select: none; margin-bottom: .5rem;
    font-weight: 600; font-size: .9rem;
  }
  .related-toggle .arrow { transition: transform .2s; }
  .related-toggle.open .arrow { transform: rotate(180deg); }
  .related-content { display: none; }
  .related-content.open { display: block; }

  /* ── 로딩 ── */
  #loading {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.5); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; z-index: 999;
  }
  #loading.show { display: flex; }
  .loading-box {
    background: white; border-radius: 16px;
    padding: 2.5rem 3rem; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
  }
  .spinner {
    width: 48px; height: 48px; border: 4px solid #e2e8f0;
    border-top-color: var(--blue); border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 1.2rem;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading-box h3 { font-size: 1.1rem; margin-bottom: .4rem; }
  .loading-box p  { font-size: .85rem; color: #64748b; }

  /* ── 숨김 ── */
  #results-section { display: none; }
  #results-section.show { display: block; }

  /* ── 히스토리 ── */
  .history-wrap {
    background: white; border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    margin-bottom: 1.5rem; overflow: hidden;
  }
  .history-header {
    padding: .9rem 1.5rem; cursor: pointer;
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600; font-size: .9rem; user-select: none;
    border-bottom: 1px solid transparent; transition: border .2s;
  }
  .history-header.open { border-bottom-color: #f1f5f9; }
  .history-header .arrow { transition: transform .2s; }
  .history-header.open .arrow { transform: rotate(180deg); }
  .history-body { display: none; padding: .8rem 1rem; }
  .history-body.open { display: block; }
  .history-list { display: flex; flex-direction: column; gap: .5rem; }
  .history-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .65rem 1rem; border-radius: 8px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    cursor: pointer; transition: background .15s;
  }
  .history-item:hover { background: #eff6ff; border-color: #bfdbfe; }
  .history-item .hi-meta { flex: 1; min-width: 0; }
  .history-item .hi-store { font-weight: 700; font-size: .88rem; color: var(--navy); }
  .history-item .hi-kws { font-size: .78rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .history-item .hi-date { font-size: .75rem; color: #94a3b8; white-space: nowrap; }
  .history-item .hi-del {
    width: 22px; height: 22px; border-radius: 50%;
    background: none; border: none; cursor: pointer;
    color: #94a3b8; font-size: .85rem; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
  }
  .history-item .hi-del:hover { background: #fee2e2; color: #dc2626; }
  .history-empty { text-align: center; color: #94a3b8; font-size: .85rem; padding: 1rem; }

  /* ── 트렌드 ── */
  .trend-grade { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
  .trend-up   { color: #16a34a; }
  .trend-down { color: #dc2626; }
  .trend-flat { color: #94a3b8; }
  .trend-badge { font-size: .7rem; font-weight: 600; padding: 1px 5px; border-radius: 99px; }
  .trend-badge-up   { background: #dcfce7; color: #16a34a; }
  .trend-badge-down { background: #fee2e2; color: #dc2626; }
  .trend-badge-flat { background: #f1f5f9; color: #94a3b8; }
  .trend-cell { cursor: pointer; }
  .trend-cell:hover .trend-grade { text-decoration: underline; }

  .btn-trend { border-color: #f59e0b; color: #b45309; }
  .btn-trend:hover { background: #fffbeb; }
  .btn-trend:disabled { border-color: #94a3b8; color: #94a3b8; cursor: not-allowed; }

  /* ── 트렌드 모달 ── */
  .trend-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 1000;
    align-items: center; justify-content: center;
    padding: 1rem;
  }
  .trend-overlay.show { display: flex; }
  .trend-modal {
    background: white; border-radius: 16px;
    padding: 1.8rem 2rem; width: min(660px, 96vw);
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    position: relative;
  }
  .trend-modal-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem; }
  .trend-close {
    position: absolute; top: 1rem; right: 1.2rem;
    background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #94a3b8; line-height: 1; padding: 4px;
  }
  .trend-close:hover { color: var(--navy); }
  .trend-section-title { font-size: .8rem; font-weight: 600; color: #64748b; margin-bottom: .6rem; text-transform: uppercase; letter-spacing: .04em; }
  .trend-chart-wrap { background: #f8fafc; border-radius: 10px; padding: 1rem 1rem .5rem; margin-bottom: 1.2rem; }
  .trend-stat-row { display: flex; gap: .8rem; margin-bottom: 1.2rem; }
  .trend-stat { flex: 1; padding: .75rem; background: #f8fafc; border-radius: 8px; text-align: center; }
  .trend-stat .ts-val { font-size: 1.15rem; font-weight: 800; }
  .trend-stat .ts-lbl { font-size: .72rem; color: #94a3b8; margin-top: .2rem; }
  .gender-row { display: flex; gap: .8rem; margin-bottom: 1.2rem; }
  .gender-card { flex: 1; padding: .8rem; border-radius: 10px; text-align: center; }
  .gender-m { background: #eff6ff; }
  .gender-f { background: #fdf4ff; }
  .gender-card .gv { font-size: 1.5rem; font-weight: 800; }
  .gender-card .gl { font-size: .75rem; color: #64748b; margin-top: .15rem; }
  .gender-m .gv { color: #2563eb; }
  .gender-f .gv { color: #9333ea; }
  .age-row { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; }
  .age-lbl { width: 38px; font-size: .78rem; color: #64748b; text-align: right; flex-shrink: 0; }
  .age-track { flex: 1; height: 13px; background: #e2e8f0; border-radius: 7px; overflow: hidden; }
  .age-fill { height: 100%; border-radius: 7px; background: linear-gradient(90deg, #3b82f6, #60a5fa); transition: width .5s; }
  .age-pct { width: 34px; font-size: .78rem; color: #475569; text-align: right; flex-shrink: 0; }
  .trend-loading { text-align: center; padding: 2rem; color: #94a3b8; font-size: .9rem; }

  /* ── 반응형 ── */
  @media(max-width: 900px) {
    .input-card { grid-template-columns: 1fr; }
    .metrics { grid-template-columns: repeat(2, 1fr); }
  }

  /* ── Chapter 탭 네비게이션 ── */
  .chapter-nav {
    background: var(--navy2);
    display: flex;
    padding: 0 2rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow-x: auto;
  }
  .chapter-tab {
    padding: .72rem 1.1rem;
    font-size: .82rem; font-weight: 600;
    color: #64748b;
    border: none; background: none; cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
    letter-spacing: -.2px;
    flex-shrink: 0;
  }
  .chapter-tab:hover { color: #94a3b8; }
  .chapter-tab.active { color: white; border-bottom-color: var(--blue); }

  /* ── Chapter 뷰 ── */
  .chapter-view { display: none; }
  .chapter-view.active { display: block; }

  /* ── Chapter 2 / 3 스켈레톤 공통 ── */
  .skeleton-page { max-width: 1280px; margin: 0 auto; padding: 2rem 2.5rem 4rem; }

  .skeleton-banner {
    background: white; border-radius: var(--radius);
    padding: 2.5rem; text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
    border: 2px dashed #e2e8f0;
  }
  .skeleton-banner .sk-icon { font-size: 2.8rem; margin-bottom: .8rem; }
  .skeleton-banner h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: .4rem; }
  .skeleton-banner p  { font-size: .9rem; color: #64748b; }
  .skeleton-banner .sk-badge {
    display: inline-block; margin-top: 1rem;
    background: #f1f5f9; color: #94a3b8;
    padding: .35rem 1rem; border-radius: 99px;
    font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  }

  .skeleton-form-card {
    background: white; border-radius: var(--radius);
    padding: 1.8rem 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
  }
  .skeleton-form-card h3 {
    font-size: 1rem; font-weight: 700; color: var(--navy);
    margin-bottom: 1.2rem; display: flex; align-items: center; gap: .5rem;
  }
  .skeleton-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
  .sk-field label { font-size: .82rem; font-weight: 600; color: #475569; display: block; margin-bottom: .4rem; }
  .sk-field input, .sk-field textarea {
    width: 100%; border: 2px solid #e2e8f0; border-radius: 8px;
    padding: .65rem .9rem; font-size: .9rem; outline: none;
    font-family: inherit; color: var(--navy); transition: border .2s; background: white;
  }
  .sk-field input:focus, .sk-field textarea:focus { border-color: var(--blue); }
  .sk-field textarea { resize: vertical; height: 80px; }
  .sk-field-full { grid-column: 1 / -1; }

  .sk-btn-row { display: flex; gap: .8rem; margin-top: .5rem; }
  .sk-btn {
    padding: .8rem 1.6rem; border-radius: 8px;
    font-size: .9rem; font-weight: 700; cursor: not-allowed;
    border: 2px solid transparent; opacity: .55;
  }
  .sk-btn-primary   { background: var(--blue); color: white; }
  .sk-btn-secondary { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }

  .skeleton-list-card {
    background: white; border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
  }
  .skeleton-list-card h3 {
    font-size: 1rem; font-weight: 700; margin-bottom: 1rem;
    display: flex; align-items: center; gap: .5rem;
  }
  .sk-list-row {
    display: flex; gap: 1rem; align-items: center;
    padding: .9rem 1rem; border-radius: 8px; background: #f8fafc;
    border: 1px solid #e2e8f0; margin-bottom: .6rem;
  }
  .sk-placeholder-bar {
    height: 12px; border-radius: 6px; background: #e2e8f0;
    animation: sk-pulse 1.6s ease-in-out infinite;
  }
  .sk-placeholder-chip {
    height: 24px; border-radius: 12px; background: #e2e8f0;
    animation: sk-pulse 1.6s ease-in-out infinite; flex-shrink: 0;
  }
  @keyframes sk-pulse { 0%,100%{opacity:1} 50%{opacity:.45} }
  @media(max-width: 900px) { .skeleton-form-grid { grid-template-columns: 1fr; } }

  /* 활성 sk-btn (진단 준비) */
  .sk-btn-enable { cursor: pointer; opacity: 1; }
  .sk-btn-enable:hover  { filter: brightness(.92); }
  .sk-btn-enable:active { transform: scale(.97); }

  /* Chapter 3 업체 목록 */
  .cw-table th {
    text-align: left; padding: .65rem .9rem;
    font-size: .78rem; font-weight: 600; color: #475569;
    border-bottom: 2px solid #e2e8f0; white-space: nowrap;
  }
  .cw-table td { padding: .7rem .9rem; border-bottom: 1px solid #f1f5f9; }
  .cw-table tbody tr:hover { background: #f8fafc; }
  .cw-status {
    display: inline-block; padding: 2px 9px; border-radius: 99px;
    font-size: .75rem; font-weight: 700; color: white;
  }

  /* Chapter 2 저장 결과 */
  .sd-result-card {
    background: #f0fdf4; border-radius: var(--radius);
    padding: 1.5rem 2rem; margin-top: 1rem;
    border: 1.5px solid #bbf7d0;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
  }
  .sd-result-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem;
    margin-top: 1rem;
  }
  .sd-result-cell {
    background: white; border-radius: 8px; padding: .65rem .85rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
  }
  .sd-result-cell .rc-lbl { font-size: .72rem; color: #94a3b8; margin-bottom: .2rem; }
  .sd-result-cell .rc-val { font-size: .9rem; font-weight: 700; color: var(--navy); word-break: break-all; }

  /* ── 선택 업체 배너 (Chapter 1 상단) ── */
  .store-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.2rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    border: 1px solid #2d4a6e;
  }
  .store-banner .sb-icon { font-size: 1.4rem; flex-shrink: 0; }
  .store-banner .sb-info { flex: 1; min-width: 0; }
  .store-banner .sb-title {
    font-size: .75rem; font-weight: 700; color: #60a5fa;
    letter-spacing: .05em; text-transform: uppercase; margin-bottom: .22rem;
  }
  .store-banner .sb-name { font-size: 1.05rem; font-weight: 800; color: white; }
  .store-banner .sb-meta { font-size: .78rem; color: #94a3b8; margin-top: .2rem; }
  .store-banner .sb-pid  {
    font-size: .75rem; color: #60a5fa; margin-top: .15rem;
    font-family: monospace; letter-spacing: .02em;
  }
  .sb-clear-btn {
    background: rgba(255,255,255,.07); color: #94a3b8;
    border: 1px solid rgba(255,255,255,.14); border-radius: 6px;
    padding: .45rem .9rem; font-size: .8rem; cursor: pointer;
    white-space: nowrap; flex-shrink: 0;
    transition: background .15s, color .15s;
  }
  .sb-clear-btn:hover { background: rgba(255,255,255,.16); color: white; }

  /* ── Chapter 2 탭 바 ── */
  .ch2-tabbar { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 1.4rem; }
  .ch2-tab {
    padding: .65rem 1.4rem; font-size: .88rem; font-weight: 600; color: #64748b;
    background: none; border: none; cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s;
  }
  .ch2-tab:hover { color: var(--navy); }
  .ch2-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

  /* ── 진단 업체 선택 ── */
  .diag-store-btn {
    display: flex; align-items: center; gap: .8rem;
    padding: .75rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; background: white; text-align: left; width: 100%;
    transition: border-color .15s, background .15s; margin-bottom: .5rem;
  }
  .diag-store-btn:hover    { border-color: var(--blue); background: #f0f7ff; }
  .diag-store-btn.selected { border-color: var(--blue); background: #eff6ff; }
  .dsb-id   { font-size: .72rem; font-family: monospace; color: #94a3b8; margin-bottom: .15rem; }
  .dsb-name { font-size: .92rem; font-weight: 700; color: var(--navy); }
  .dsb-meta { font-size: .78rem; color: #64748b; margin-top: .1rem; }

  /* ── 진단 대시보드 ── */
  .diag-card {
    background: white; border-radius: var(--radius);
    padding: 1.4rem 1.6rem; box-shadow: 0 2px 10px rgba(0,0,0,.07); margin-bottom: 1.1rem;
  }
  .diag-card h3 {
    font-size: .93rem; font-weight: 700; color: var(--navy);
    margin-bottom: .9rem; display: flex; align-items: center; gap: .4rem;
  }
  .diag-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%);
    border-radius: var(--radius); padding: 1.1rem 1.4rem; margin-bottom: 1.1rem;
  }
  .dh-name { font-size: 1.05rem; font-weight: 800; color: white; }
  .dh-meta { font-size: .78rem; color: #94a3b8; margin-top: .18rem; }
  .dh-ts   { font-size: .72rem; color: #60a5fa; margin-top: .22rem; }
  .diag-stat-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1.1rem;
  }
  .diag-stat {
    background: white; border-radius: 8px; padding: .8rem 1rem;
    text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,.06);
  }
  .diag-stat .dv { font-size: 1.4rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
  .diag-stat .dl { font-size: .73rem; color: #94a3b8; margin-top: .15rem; }
  .diag-kw-row {
    display: flex; align-items: center; gap: .55rem;
    padding: .58rem 0; border-bottom: 1px solid #f1f5f9;
  }
  .diag-kw-row:last-child { border-bottom: none; }
  .diag-kw-rank {
    width: 22px; height: 22px; line-height: 22px; text-align: center;
    border-radius: 50%; font-size: .7rem; font-weight: 800; flex-shrink: 0;
  }
  .rank-1 { background: #dc2626; color: white; }
  .rank-2 { background: #f97316; color: white; }
  .rank-3 { background: #eab308; color: #1e293b; }
  .rank-4 { background: #22c55e; color: white; }
  .rank-5 { background: #94a3b8; color: white; }
  .diag-kw-name { flex: 1; font-size: .88rem; font-weight: 600; }
  .diag-kw-vol  { font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; }
  .diag-opp-badge { font-size: .68rem; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
  .opp-high { background: #dcfce7; color: #16a34a; }
  .opp-mid  { background: #fefce8; color: #a16207; }
  .opp-low  { background: #fef2f2; color: #dc2626; }
  /* ── Ch2 보강 추천 카드 ── */
  .rec-card {
    background: white; border-radius: 12px;
    border-left: 4px solid #e2e8f0;
    padding: 1.1rem 1.4rem; margin-bottom: .8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
  }
  .rec-card.rec-recommend { border-left-color: #f59e0b; }
  .rec-card.rec-ok        { border-left-color: #22c55e; }
  .rec-card.rec-nodata    { border-left-color: #94a3b8; }
  .rec-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: .65rem;
  }
  .rec-card-title { font-size: .88rem; font-weight: 700; color: var(--navy); }
  .rec-status-dot { font-size: .9rem; }
  .rec-items { display: flex; flex-direction: column; gap: .22rem; }
  .rec-item {
    display: flex; align-items: center; gap: .45rem;
    font-size: .82rem; color: #475569; padding: .12rem 0;
  }
  .rec-item-arrow { color: #cbd5e1; flex-shrink: 0; font-size: .75rem; }
  .rec-tag {
    font-size: .67rem; font-weight: 700; padding: 1px 6px; border-radius: 6px;
    flex-shrink: 0;
  }
  .tag-추천 { background: #fef9c3; color: #a16207; }
  .tag-필요 { background: #fff7ed; color: #c2410c; }
  .tag-완료 { background: #f0fdf4; color: #166534; }
  .rec-action-hint {
    margin-top: .7rem; font-size: .78rem; color: #f59e0b; font-weight: 600;
    padding-top: .6rem; border-top: 1px solid #f1f5f9;
  }
  .rec-action-hint.disabled { color: #94a3b8; }
  .diag-action-row {
    display: flex; flex-wrap: wrap; gap: .6rem;
    padding: 1rem 0; margin-top: .4rem;
  }
  .diag-action-btn {
    flex: 1 1 130px;
    padding: .62rem 1rem; border-radius: 8px;
    border: 1.5px solid #e2e8f0; background: white;
    font-size: .82rem; font-weight: 600; color: var(--navy);
    cursor: pointer; transition: border-color .15s, background .15s;
  }
  .diag-action-btn:hover:not(:disabled) { border-color: var(--amber); background: #fffbeb; }
  .diag-action-btn:disabled { color: #94a3b8; cursor: default; }
  .soon-tag {
    font-size: .67rem; background: #f1f5f9; color: #94a3b8;
    padding: 1px 5px; border-radius: 4px; margin-left: .3rem;
  }

  /* ── Chapter 3: Keyword Ranking ── */
  .rank-store-btn {
    display: flex; align-items: center; gap: .8rem;
    padding: .65rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
    cursor: pointer; background: white; text-align: left; width: 100%;
    transition: border-color .15s, background .15s; margin-bottom: .5rem;
  }
  .rank-store-btn:hover    { border-color: #f59e0b; background: #fffbeb; }
  .rank-store-btn.selected { border-color: #f59e0b; background: #fef9c3; }
  .rsb-id   { font-size: .72rem; font-family: monospace; color: #94a3b8; }
  .rsb-name { font-size: .92rem; font-weight: 700; color: var(--navy); }
  .rsb-meta { font-size: .78rem; color: #64748b; margin-top: .1rem; }
  .rank-form-row {
    display: flex; gap: .7rem; align-items: center; flex-wrap: wrap;
  }
  .rank-form-row .rank-kw-inp {
    flex: 1; min-width: 180px;
    padding: .55rem .9rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: .88rem; outline: none;
  }
  .rank-form-row .rank-kw-inp:focus { border-color: #f59e0b; }
  .rank-num-wrap {
    display: flex; align-items: center; gap: .35rem; flex-shrink: 0;
  }
  .rank-form-row .rank-num-inp {
    width: 60px; padding: .55rem .6rem; border: 1.5px solid #e2e8f0;
    border-radius: 8px; font-size: .88rem; text-align: center; outline: none;
  }
  .rank-form-row .rank-num-inp:focus { border-color: #f59e0b; }
  .rank-num-label { font-size: .82rem; color: #64748b; }
  .rank-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
  .rank-table th {
    padding: .5rem .8rem; background: #1e293b; color: #94a3b8;
    font-size: .72rem; font-weight: 700; text-align: left;
    text-transform: uppercase; letter-spacing: .05em;
  }
  .rank-table td {
    padding: .55rem .8rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle;
  }
  .rank-table tr:hover td { background: #f8fafc; }
  .rank-table td.rank-kw-cell { font-weight: 600; color: #1e293b; }
  .rank-val { font-weight: 700; font-variant-numeric: tabular-nums; }
  .rank-val.none { color: #94a3b8; font-weight: 400; }
  .rank-status { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; }
  .status-pending  { background: #f1f5f9; color: #64748b; }
  .status-tracking { background: #dcfce7; color: #166534; }
  .rank-del-btn {
    padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 600;
    cursor: pointer; border: 1.5px solid #fca5a5; color: #dc2626;
    background: white; transition: background .12s;
  }
  .rank-del-btn:hover { background: #fef2f2; }
  .rank-check-btn {
    padding: 2px 9px; border-radius: 4px; font-size: .72rem; font-weight: 600;
    cursor: pointer; border: 1.5px solid #818cf8; color: #4f46e5;
    background: white; transition: background .12s;
  }
  .rank-check-btn:hover    { background: #eef2ff; }
  .rank-check-btn:disabled { border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; background: #f8fafc; }
  /* 추가 상태 배지 */
  .status-notfound { background: #fef9c3; color: #a16207; }
  .status-blocked  { background: #fee2e2; color: #dc2626; }
  .status-timeout  { background: #ffedd5; color: #c2410c; }
  .status-error    { background: #fee2e2; color: #dc2626; }
  /* 현재 순위 열 인라인 배지 */
  .rank-badge { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 10px; }
  .rstat-notfound { background: #fef9c3; color: #a16207; }
  .rstat-blocked  { background: #fee2e2; color: #dc2626; letter-spacing: .03em; }
  .rstat-timeout  { background: #ffedd5; color: #c2410c; }
  .rstat-error    { background: #fee2e2; color: #dc2626; }
  .rank-empty-msg {
    text-align: center; padding: 2.5rem 1rem; color: #94a3b8; font-size: .85rem;
  }
  .rank-empty-msg .rem-icon { font-size: 2rem; margin-bottom: .5rem; }

  /* ── Ch7 Progress ── */
  .pg7-summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
  .pg7-kpi { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: .8rem 1rem; }
  .pg7-kpi .k { font-size: .72rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }
  .pg7-kpi .v { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin-top: .2rem; }

  .pg7-action-card { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 1.1rem 1.3rem; margin-bottom: 1rem; }
  .pg7-timeline { display: flex; align-items: center; margin-bottom: 1rem; }
  .pg7-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; flex: 1; text-align: center; }
  .pg7-step .dot {
    width: 20px; height: 20px; border-radius: 50%; background: #e2e8f0;
    border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center;
    font-size: .62rem; font-weight: 800; color: #94a3b8;
  }
  .pg7-step.done .dot { background: var(--blue); border-color: var(--blue); color: white; }
  .pg7-step.current .dot { background: white; border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 3px #dbeafe; }
  .pg7-step .lbl { font-size: .68rem; font-weight: 700; color: #94a3b8; }
  .pg7-step.done .lbl, .pg7-step.current .lbl { color: var(--navy); }
  .pg7-connector { flex: .5; height: 2px; background: #e2e8f0; margin-bottom: 1.4rem; }
  .pg7-connector.done { background: var(--blue); }

  .pg7-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .2rem; }
  .pg7-head .title { font-size: .98rem; font-weight: 700; color: var(--navy); }
  .pg7-head .meta { font-size: .72rem; color: #94a3b8; margin-top: .2rem; }
  .pg7-state-pill { font-size: .68rem; font-weight: 700; padding: .15rem .55rem; border-radius: 10px; background: #f1f5f9; color: #64748b; white-space: nowrap; }

  .pg7-empty-compare { border: 1.5px dashed #e2e8f0; border-radius: 8px; padding: .9rem; text-align: center; font-size: .8rem; color: #94a3b8; margin: .8rem 0; }
  .pg7-ba-row { display: flex; align-items: center; gap: .8rem; margin: .8rem 0; font-size: .85rem; }
  .pg7-ba-row .arrow { color: #94a3b8; }
  .pg7-ba-row .after-val { font-weight: 800; color: var(--navy); }

  .pg7-confidence-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .68rem; font-weight: 800; padding: .2rem .6rem; border-radius: 10px; }
  .pg7-confidence-badge.high { background: #dcfce7; color: #166534; }
  .pg7-confidence-badge.medium { background: #fef3c7; color: #92400e; }
  .pg7-confidence-badge.low { background: #fee2e2; color: #dc2626; }
  .pg7-confidence-badge.insufficient { background: #f1f5f9; color: #94a3b8; }

  .pg7-ai-note { background: #f8fafc; border-radius: 8px; padding: .7rem .9rem; font-size: .83rem; line-height: 1.6; color: #334155; margin: .7rem 0; }
  .pg7-context-card { display: flex; gap: .6rem; align-items: flex-start; border: 1.5px solid #e2e8f0; border-radius: 8px; padding: .65rem .85rem; margin: .5rem 0; font-size: .78rem; color: #475569; background: #fafbfc; }
  .pg7-next-rec { border: 1.5px dashed var(--blue); border-radius: 8px; padding: .7rem .85rem; margin-top: .7rem; background: #eff6ff; font-size: .78rem; }
  .pg7-next-rec .k { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #1d4ed8; margin-bottom: .2rem; }
  .pg7-next-rec.pending { border-style: solid; border-color: #e2e8f0; background: #f8fafc; color: #94a3b8; text-align: center; }

  .pg7-history-row { display: flex; align-items: center; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid #f1f5f9; font-size: .8rem; }
  .pg7-history-row:last-child { border-bottom: none; }
  .pg7-history-row .at { color: #94a3b8; font-size: .72rem; min-width: 120px; font-family: monospace; }
  .pg7-history-row .ev-title { font-weight: 600; color: var(--navy); flex: 1; }
  .pg7-history-row .ev-type { color: #64748b; font-size: .72rem; }

  /* ── Ch3 순위 변화 & 이력 ── */
  .rch-up   { color: #16a34a; font-weight: 700; font-size: .82rem; }
  .rch-down { color: #dc2626; font-weight: 700; font-size: .82rem; }
  .rch-same { color: #94a3b8; font-size: .82rem; }
  .rch-none { color: #cbd5e1; font-size: .82rem; }
  .rhist-text { font-size: .76rem; color: #64748b; font-variant-numeric: tabular-nums; }
  .rhist-text b { color: var(--navy); font-weight: 700; }
  .rhist-nf { font-size: .72rem; color: #94a3b8; }
  .rhist-bl { font-size: .72rem; color: #dc2626; }
  .rhist-empty { color: #cbd5e1; font-size: .76rem; }

  /* ── Ch3 전체 순위 조회 ── */
  .rank-bulk-area {
    margin-top: .85rem; padding-top: .85rem;
    border-top: 1px solid #f1f5f9;
    display: flex; flex-direction: column; gap: .45rem;
  }
  .rank-bulk-top { display: flex; align-items: center; gap: .65rem; }
  .rank-bulk-btn {
    padding: .5rem 1.1rem; border-radius: 8px;
    border: 1.5px solid #e2e8f0; background: white;
    font-size: .83rem; font-weight: 600; color: var(--navy);
    cursor: pointer; transition: border-color .15s, background .15s; flex-shrink: 0;
  }
  .rank-bulk-btn:hover:not(:disabled) { border-color: var(--amber); background: #fffbeb; }
  .rank-bulk-btn:disabled { color: #94a3b8; cursor: default; }
  .rank-bulk-hint { font-size: .78rem; color: #94a3b8; }
  .rank-bulk-status { display: flex; flex-direction: column; gap: .3rem; }
  .rank-bulk-bar {
    height: 5px; border-radius: 3px; background: #f1f5f9; overflow: hidden;
  }
  .rank-bulk-fill {
    height: 100%; width: 0%; background: var(--amber);
    border-radius: 3px; transition: width .25s ease;
  }
  .rank-bulk-row { display: flex; align-items: center; gap: .45rem; }
  .rank-bulk-text { font-size: .79rem; color: #64748b; flex: 1; }
  .rank-bulk-stop {
    font-size: .73rem; padding: .2rem .6rem; border-radius: 6px;
    border: 1px solid #fca5a5; background: white; color: #dc2626;
    cursor: pointer; flex-shrink: 0;
  }
  .rank-bulk-stop:disabled { border-color: #e2e8f0; color: #94a3b8; cursor: default; }

  /* ── Ch3 TOP20 경쟁 업체 ── */
  .comp-section { margin-top: 1rem; border-top: 1px solid #f1f5f9; padding-top: .9rem; }
  .comp-header  { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; flex-wrap: wrap; }
  .comp-title   { font-size: .88rem; font-weight: 700; color: var(--navy); }
  .comp-kw-tag  { font-size: .72rem; background: #fef9c3; color: #92400e; padding: 2px 7px; border-radius: 6px; font-weight: 600; }
  .comp-date    { font-size: .72rem; color: #94a3b8; margin-left: auto; }
  .comp-empty   { font-size: .82rem; color: #94a3b8; padding: .6rem 0; display: block; }
  .comp-table   { width: 100%; border-collapse: collapse; font-size: .8rem; }
  .comp-table th { text-align: left; font-size: .74rem; color: #64748b; font-weight: 600;
                   padding: .3rem .6rem; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
  .comp-table td { padding: .35rem .6rem; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
  .comp-table tr:hover td { background: #fffbeb; }
  .comp-rank-num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); min-width: 2.4rem; display: inline-block; }
  .comp-ours td  { font-weight: 700; background: #fffbeb !important; }
  .comp-ad-tag   { font-size: .65rem; background: #fee2e2; color: #dc2626; padding: 1px 5px; border-radius: 4px; font-weight: 700; margin-left: .25rem; }
  .comp-ours-tag { font-size: .65rem; background: #fef9c3; color: #92400e; padding: 1px 5px; border-radius: 4px; font-weight: 700; margin-left: .25rem; }
  .comp-pid      { font-size: .72rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
  /* 2026-08-14 — .dm-table과 같은 이유로 .comp-table(경쟁 업체 목록,
     keyword_ranking.js)도 좁은 화면에서 업체명이 글자 단위로 잘렸다.
     이미 overflow-x:auto로 감싸져 있으니 표만 필요한 폭만큼 넓어지게 한다. */
  @media (max-width: 900px) {
    .comp-table { width: max-content; min-width: 100%; }
    .comp-table td, .comp-table th { white-space: nowrap; }
  }
  .rank-kw-cell  { cursor: pointer; }
  .rank-kw-cell:hover { color: var(--amber); text-decoration: underline; }

  /* ── Ch4 Place Market Explorer ── */
  .pme-banner   { background: linear-gradient(135deg,#0f172a 0%,#1e3a5f 100%);
                  border-radius: 14px; padding: 1.6rem 2rem; margin-bottom: 1.2rem;
                  display: flex; align-items: center; gap: 1.2rem; }
  .pme-icon     { font-size: 2rem; line-height: 1; }
  .pme-banner h2 { font-size: 1.15rem; font-weight: 800; color: #f8fafc; margin-bottom:.2rem; }
  .pme-banner p  { font-size: .8rem; color: #94a3b8; }
  .pme-badge    { margin-left: auto; font-size:.68rem; font-weight:700; background:#f59e0b;
                  color:#1c1917; padding:2px 8px; border-radius:6px; white-space:nowrap; }
  .pme-search-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0;
                     padding: 1.1rem 1.4rem; margin-bottom: 1rem;
                     box-shadow: 0 2px 8px rgba(0,0,0,.04); }
  .pme-search-row  { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
  .pme-label    { font-size: .76rem; font-weight: 600; color: #64748b; margin-bottom: .28rem; display: block; }
  .pme-store-sel { flex: 1 1 180px; }
  .pme-kw-inp  { flex: 2 1 220px; padding: .52rem .85rem; border: 1.5px solid #e2e8f0;
                 border-radius: 8px; font-size: .88rem; color: var(--navy); outline: none; }
  .pme-kw-inp:focus { border-color: var(--amber); }
  .pme-rank-sel { padding: .52rem .85rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
                  font-size: .85rem; color: var(--navy); background: white; cursor: pointer; }
  .pme-run-btn  { padding: .55rem 1.4rem; border-radius: 8px; border: none;
                  background: var(--amber); color: white; font-size: .88rem; font-weight: 700;
                  cursor: pointer; white-space: nowrap; }
  .pme-run-btn:disabled { background: #e2e8f0; color: #94a3b8; cursor: default; }
  .pme-progress { font-size: .8rem; color: #64748b; padding: .4rem 0; display: none; }
  .pme-stat-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr));
                  gap: .7rem; margin-bottom: 1rem; }
  .pme-stat     { background: white; border-radius: 10px; border: 1px solid #f1f5f9;
                  padding: .85rem 1rem; text-align: center;
                  box-shadow: 0 1px 4px rgba(0,0,0,.04); }
  .pme-stat .sv { font-size: 1.5rem; font-weight: 800; color: var(--navy);
                  font-variant-numeric: tabular-nums; }
  .pme-stat .sl { font-size: .73rem; color: #64748b; margin-top: .15rem; }
  .pme-score-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0;
                    padding: 1rem 1.2rem; margin-bottom: 1rem;
                    box-shadow: 0 1px 4px rgba(0,0,0,.04); }
  .pme-score-hdr  { display: flex; align-items: center; gap: .4rem; font-size: .85rem;
                    font-weight: 700; color: var(--navy); margin-bottom: .6rem; }
  .pme-score-info { font-size: .78rem; color: #94a3b8; cursor: help; border: 1px solid #cbd5e1;
                    border-radius: 50%; width: 1.05rem; height: 1.05rem; line-height: 1rem;
                    text-align: center; }
  .pme-score-main  { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .5rem; }
  .pme-score-num   { font-size: 2rem; font-weight: 800; color: var(--navy);
                     font-variant-numeric: tabular-nums; }
  .pme-score-max   { font-size: .95rem; color: #94a3b8; }
  .pme-score-unavailable { font-size: 1.05rem; font-weight: 700; color: #94a3b8; }
  .pme-score-detail { font-size: .78rem; color: #64748b; margin-top: .2rem; }
  .pme-score-tags  { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .55rem; }
  .pme-score-tag   { font-size: .72rem; padding: .25rem .6rem; border-radius: 999px;
                     background: #f1f5f9; color: #475569; }
  .pme-score-tag-good        { background: #dcfce7; color: #166534; }
  .pme-score-tag-limited     { background: #fef9c3; color: #854d0e; }
  .pme-score-tag-insufficient,
  .pme-score-tag-error       { background: #fee2e2; color: #991b1b; }
  .pme-review-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr));
                        gap: .6rem; margin-top: .7rem; }
  .pme-review-metric  { background: #f8fafc; border-radius: 8px; padding: .55rem .7rem; }
  .pme-review-metric .rm-label { font-size: .7rem; color: #94a3b8; margin-bottom: .15rem; }
  .pme-review-metric .rm-value { font-size: 1.05rem; font-weight: 700; color: var(--navy);
                                 font-variant-numeric: tabular-nums; }
  .pme-review-metric .rm-avg   { font-size: .68rem; color: #94a3b8; margin-top: .1rem; }
  .pme-diff-stars  { font-size: 1.6rem; letter-spacing: .1rem; color: #d97706; line-height: 1; }
  .pme-diff-label  { font-size: .95rem; font-weight: 700; color: var(--navy); margin-top: .2rem; }
  .pme-diff-reason { font-size: .78rem; color: #64748b; margin-top: .5rem; line-height: 1.4; }

  /* ── Ch4 Action Center (Sprint 07.4) ── */
  .pme-action-card { border: 1.5px solid #e2e8f0; border-radius: 10px; padding: .9rem 1.05rem; margin-bottom: .75rem; }
  .pme-action-card:last-child { margin-bottom: 0; }
  .pme-action-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
  .pme-action-title { font-size: .92rem; font-weight: 700; color: var(--navy); }
  .pme-action-reason { font-size: .78rem; color: #64748b; margin-top: .25rem; line-height: 1.45; }
  .pme-action-stars { color: #d97706; font-size: .82rem; letter-spacing: .05rem; white-space: nowrap; }
  .pme-action-meta { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .55rem; }
  .pme-action-tag { font-size: .68rem; padding: .2rem .55rem; border-radius: 999px; background: #f1f5f9; color: #64748b; font-weight: 600; }
  .pme-action-state { font-size: .68rem; padding: .2rem .55rem; border-radius: 999px; font-weight: 700; }
  .pme-action-state.st-recommended { background: #f1f5f9; color: #64748b; }
  .pme-action-state.st-in_progress { background: #dbeafe; color: #1d4ed8; }
  .pme-action-state.st-on_hold     { background: #fef9c3; color: #a16207; }
  .pme-action-state.st-completed, .pme-action-state.st-awaiting_feedback { background: #e0e7ff; color: #4338ca; }
  .pme-action-state.st-effective   { background: #dcfce7; color: #166534; }
  .pme-action-state.st-ineffective { background: #fee2e2; color: #991b1b; }
  .pme-action-state.st-inconclusive { background: #f1f5f9; color: #64748b; }
  .pme-action-btn-row { display: flex; gap: .5rem; margin-top: .7rem; }
  .pme-action-btn {
    padding: .4rem 1rem; border-radius: 7px; font-size: .78rem; font-weight: 700;
    cursor: pointer; border: 1.5px solid #e2e8f0; background: white; color: #475569;
    transition: background .12s;
  }
  .pme-action-btn:hover { background: #f8fafc; }
  .pme-action-btn.primary { background: var(--blue); color: white; border-color: var(--blue); }
  .pme-action-btn.primary:hover { filter: brightness(.93); }
  .pme-action-btn.danger  { border-color: #fca5a5; color: #dc2626; }
  .pme-action-btn.danger:hover { background: #fef2f2; }
  .pme-action-btn:disabled { opacity: .5; cursor: not-allowed; }
  .pme-action-summary { font-size: .84rem; color: #334155; background: #f8fafc; border-radius: 8px;
                         padding: .6rem .8rem; margin-bottom: .8rem; line-height: 1.5; }
  .pme-result-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0;
                     padding: 1.1rem 1.4rem; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
  .pme-result-hdr  { display: flex; align-items: center; gap: .6rem;
                     margin-bottom: .8rem; flex-wrap: wrap; }
  .pme-result-title { font-size: .9rem; font-weight: 700; color: var(--navy); }
  .pme-kw-chip  { font-size: .72rem; background: #eff6ff; color: #1d4ed8;
                  padding: 2px 8px; border-radius: 6px; font-weight: 600; }
  .pme-date-chip { font-size: .72rem; color: #94a3b8; margin-left: auto; }
  .pme-blocked  { font-size: .85rem; color: #dc2626; background: #fef2f2;
                  border: 1px solid #fecaca; border-radius: 8px; padding: .8rem 1rem; }
  .pme-empty    { font-size: .83rem; color: #94a3b8; padding: .6rem 0; }
  .pme-table    { width: 100%; border-collapse: collapse; font-size: .82rem; }
  .pme-table th { text-align: left; font-size: .74rem; color: #64748b; font-weight: 600;
                  padding: .32rem .65rem; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
  .pme-table td { padding: .38rem .65rem; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
  .pme-table tr:hover td { background: #fffbeb; }
  .pme-rank-n   { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy);
                  min-width: 2.2rem; display: inline-block; }
  .pme-sort-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
  .pme-sort-btn { padding: 3px 10px; border-radius: 6px; border: 1.5px solid #e2e8f0;
                  font-size: .73rem; font-weight: 600; background: white; cursor: pointer;
                  color: #64748b; transition: all .15s; }
  .pme-sort-btn:hover { border-color: #cbd5e1; }
  .pme-sort-active { border-color: var(--amber) !important; background: var(--amber) !important; color: white !important; }
  .pme-kw-tags  { display: flex; flex-wrap: wrap; gap: 3px; }
  .pme-kw-tag   { font-size: .69rem; background: #f0f9ff; color: #0369a1;
                  padding: 1px 5px; border-radius: 3px; white-space: nowrap; }
  .pme-ours-row td { background: #fffbeb !important; font-weight: 700; }
  /* Data Hub 캐시 뱃지 */
  .hub-badge      { display: inline-flex; align-items: center; gap: 4px;
                    font-size: .7rem; padding: 2px 7px; border-radius: 4px;
                    background: #e0f2fe; color: #0369a1; white-space: nowrap; }
  .hub-badge-eng  { background: #dcfce7; color: #15803d; }
  .hub-badge a    { color: inherit; text-decoration: underline dotted; cursor: pointer; font-size: .68rem; }
  .pme-ad-tag   { font-size: .65rem; background: #fee2e2; color: #dc2626;
                  padding: 1px 5px; border-radius: 4px; font-weight: 700; margin-left: .2rem; }
  .pme-ours-tag { font-size: .65rem; background: #fef9c3; color: #92400e;
                  padding: 1px 5px; border-radius: 4px; font-weight: 700; margin-left: .2rem; }
  .pme-pid      { font-size: .72rem; color: #94a3b8; font-variant-numeric: tabular-nums; }
  .pme-store-btn { display: block; width: 100%; text-align: left; padding: .55rem .9rem;
                   border-radius: 8px; border: 1.5px solid #e2e8f0; background: white;
                   font-size: .85rem; color: var(--navy); cursor: pointer; margin-bottom: .35rem; }
  .pme-store-btn:hover { border-color: var(--amber); background: #fffbeb; }
  .pme-store-btn.selected { border-color: var(--amber); background: #fef9c3; font-weight: 700; }

  /* ── Chapter 6: Keyword Profile ── */
  .kp-run-btn   { background: var(--navy); color: white; border: none; border-radius: 8px;
                  padding: .55rem 1.2rem; font-size: .83rem; font-weight: 700; cursor: pointer; }
  .kp-run-btn:hover    { opacity: .88; }
  .kp-run-btn:disabled { background: #e2e8f0; color: #94a3b8; cursor: default; }
  .kp-store-btn  { display: block; width: 100%; text-align: left; padding: .5rem .9rem;
                   border-radius: 8px; border: 1.5px solid #e2e8f0; background: white;
                   font-size: .83rem; color: var(--navy); cursor: pointer; margin-bottom: .3rem; }
  .kp-store-btn:hover  { border-color: var(--amber); background: #fffbeb; }
  .kp-store-btn.selected { border-color: var(--amber); background: #fef9c3; font-weight: 700; }
  .kp-tier-label { font-size: .68rem; font-weight: 700; background: #f1f5f9; color: #64748b;
                   padding: .15rem .5rem; border-radius: 4px; display: inline-block; margin-bottom: .35rem; }
  .kp-tags-row   { display: flex; flex-wrap: wrap; gap: .4rem; }
  .kp-tag        { padding: .3rem .65rem; background: #fef3c7; color: #92400e;
                   border-radius: 6px; font-size: .8rem; font-weight: 600;
                   cursor: pointer; border: 1.5px solid #fde68a; transition: all .15s; }
  .kp-tag:hover  { background: #fde68a; border-color: #fbbf24; }
  .kp-table      { width: 100%; border-collapse: collapse; font-size: .82rem; }
  .kp-table th   { text-align: left; font-size: .74rem; color: #64748b; font-weight: 600;
                   padding: .32rem .65rem; border-bottom: 1px solid #f1f5f9; }
  .kp-table td   { padding: .38rem .65rem; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
  .kp-table tr:hover td { background: #fffbeb; }
  .kp-rank-n     { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--navy); }
  .kp-add-btn    { padding: 2px 8px; border-radius: 5px; border: 1px solid #e2e8f0;
                   font-size: .72rem; font-weight: 600; cursor: pointer;
                   background: white; color: #64748b; }
  .kp-add-btn:hover  { border-color: var(--amber); color: var(--amber); }
  .kp-add-btn.added  { background: var(--amber); color: white; border-color: var(--amber); }

  /* ── Chapter 4(구)/5(신) 액션 버튼 ── */
  .cw-action-btn {
    padding: 3px 10px; border-radius: 5px; font-size: .76rem; font-weight: 600;
    cursor: pointer; border: 1.5px solid; white-space: nowrap;
    transition: background .12s;
  }
  .cw-btn-kw   { border-color: #3b82f6; color: #2563eb; background: white; }
  .cw-btn-kw:hover   { background: #eff6ff; }
  .cw-btn-diag { border-color: #059669; color: #047857; background: white; }
  .cw-btn-diag:hover { background: #ecfdf5; }
  .cw-btn-view { border-color: #e2e8f0; color: #64748b; background: white; }
  .cw-btn-view:hover { background: #f8fafc; }

