/* ─────────────────────────────────────────────────────────────
   ui.html 과 admin.html 이 함께 쓰는 스타일. 빌드 도구가 없어 <link> 로 나눠 쓴다.
   원래 ui.html 의 <style> 안에 있었는데, ui/views 를 admin 으로 옮기면서 그 화면들이
   쓰는 .btn·.card·.table-wrap·.collapsed 가 admin.html 에 없어 레이아웃이 깨졌다
   (.collapsed 누락으로 후보 카드 1,932장이 전부 펼쳐져 페이지 높이 164,551px — 실측).
   ───────────────────────────────────────────────────────────── */
  :root{
    color-scheme: light;
    --page:#f9f9f7;
    --surface:#ffffff;
    --surface-alt:#fcfcfb;
    --text-primary:#0b0b0b;
    --text-secondary:#52514e;
    --muted:#898781;
    --gridline:#e1e0d9;
    --border:rgba(11,11,11,0.10);
    --border-strong:rgba(11,11,11,0.16);

    --series-1:#2a78d6; /* blue */
    --series-2:#eb6834; /* orange */
    --series-3:#1baf7a; /* aqua */
    --series-4:#eda100; /* yellow */
    --series-5:#e87ba4; /* magenta */
    --series-6:#008300; /* green */
    --series-7:#4a3aa7; /* violet */
    --series-8:#e34948; /* red */

    --good:#0ca30c;
    --warning:#fab219;
    --serious:#ec835a;
    --critical:#d03b3b;

    --brand-ig:#c13584;
    --brand-fb:#1877f2;
    --brand-tt:#111111;
    --brand-yt:#e02424;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    font-family: system-ui, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
    background:var(--page);
    color:var(--text-primary);
    -webkit-font-smoothing:antialiased;
  }
  /* 문서 차원 가로 오버플로우를 금지한다 — 숨은 툴팁(absolute .bubble)이나 넓은 위젯이
     body 를 옆으로 늘리면 가로 스크롤이 생기고, sticky 사이드바는 세로만 고정이라 옆으로
     밀려 사라진다. 넓은 콘텐츠는 각자 overflow-x:auto 컨테이너가 처리한다. */
  body{ overflow-x:clip; }
  .app{ display:flex; min-height:100vh; }

  /* ---------- Sidebar ---------- */
  .sidebar{
    width:270px; flex:0 0 270px;
    background:var(--surface);
    border-right:1px solid var(--border);
    display:flex; flex-direction:column;
    position:sticky; top:0; height:100vh;
  }
  .brand{
    display:flex; align-items:center; gap:10px;
    padding:20px 18px 16px 18px;
    border-bottom:1px solid var(--border);
  }
  .brand-mark{
    width:30px;height:30px;border-radius:8px;
    background:var(--series-1);
    display:flex;align-items:center;justify-content:center;
    color:#fff;font-weight:700;font-size:13px;
  }
  .brand-text{ line-height:1.25; }
  .brand-text .name{ font-size:13.5px; font-weight:700; }
  .brand-text .sub{ font-size:10.5px; color:var(--muted); }

  .nav{ flex:1; padding:14px 10px; overflow-y:auto; }
  .nav-group-label{
    font-size:10.5px; font-weight:700; letter-spacing:.04em;
    color:var(--muted); text-transform:uppercase;
    padding:10px 10px 6px 10px;
  }
  .nav-item{
    display:flex; align-items:center; gap:10px;
    padding:9px 10px; border-radius:8px;
    font-size:13.5px; color:var(--text-secondary);
    cursor:pointer; user-select:none;
    margin-bottom:2px;
  }
  .nav-item svg{ flex:0 0 18px; width:18px; height:18px; opacity:.75; }
  .nav-item:hover{ background:var(--surface-alt); }
  .nav-item.active{
    background:#eaf2fc; color:var(--series-1); font-weight:700;
  }
  .nav-item.active svg{ opacity:1; }
  /* 페이지를 옮기는 항목은 <a> 다(예: 운영 관리 → /admin) — 밑줄과 링크색을 지워
     같은 앱 안의 <div> 항목과 구분되지 않게 한다. */
  a.nav-item{ text-decoration:none; color:var(--text-secondary); }
  a.nav-item.active{ color:var(--series-1); }
  .nav-badge{
    margin-left:auto; font-size:10.5px; font-weight:700;
    background:var(--critical); color:#fff;
    border-radius:999px; padding:1px 6px;
  }
  .sidebar-foot{
    border-top:1px solid var(--border);
    padding:12px 16px; display:flex; align-items:center; gap:10px;
  }
  .avatar{
    width:28px;height:28px;border-radius:50%;
    background:var(--series-7); color:#fff;
    display:flex;align-items:center;justify-content:center;
    font-size:11.5px; font-weight:700;
  }
  .sidebar-foot .who{ line-height:1.25; }
  .sidebar-foot .who .n{ font-size:12.5px; font-weight:700; }
  .sidebar-foot .who .r{ font-size:10.5px; color:var(--muted); }

  /* ---------- Main ---------- */
  .main{ flex:1; min-width:0; }
  .view{ display:none; padding:28px 34px 60px 34px; max-width:1360px; }
  .view.active{ display:block; }

  .view-head{ margin-bottom:20px; display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; }
  .view-head h1{ font-size:21px; margin:0 0 4px 0; letter-spacing:-.01em; }
  .view-head p{ font-size:12.5px; color:var(--muted); margin:0; }
  .view-actions{ display:flex; gap:8px; }

  .btn{
    font-size:12.5px; font-weight:600; border-radius:7px; padding:8px 13px;
    border:1px solid var(--border-strong); background:var(--surface); color:var(--text-primary);
    cursor:pointer;
  }
  .btn.primary{ background:var(--series-1); border-color:var(--series-1); color:#fff; }
  .btn.ghost{ border-color:transparent; color:var(--text-secondary); }

  .filters{
    display:flex; flex-wrap:wrap; gap:8px; align-items:center;
    background:var(--surface); border:1px solid var(--border); border-radius:10px;
    padding:10px 12px; margin-bottom:18px;
  }
  .chip-select{
    font-size:12px; padding:6px 10px; border-radius:6px; border:1px solid var(--border-strong);
    background:var(--surface-alt); color:var(--text-secondary);
  }
  .filters .sep{ width:1px; height:20px; background:var(--gridline); margin:0 2px; }

  /* ---------- Stat tiles ---------- */
  .stat-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:20px; }
  /* 1fr 트랙은 min-content 밑으로 안 줄어들어 좁은 창에서 타일이 화면 밖으로 삐져나가고,
     그 가로 오버플로우가 생기면 sticky 사이드바가 옆으로 밀려 사라진다 — 트랙이 0까지 줄게 허용 */
  .stat-row .stat-tile{ min-width:0; }
  .perf-charts-grid > .card{ min-width:0; }
  .stat-tile{
    background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px 16px;
  }
  .stat-tile .label{ font-size:11.5px; color:var(--muted); margin-bottom:8px; }
  .stat-tile .value{ font-size:26px; font-weight:700; letter-spacing:-.01em; }
  .stat-tile .delta{ font-size:11.5px; font-weight:600; margin-top:6px; color:var(--text-primary); }
  .delta.up, .delta.down, .delta.flat{ color:var(--text-primary); }
  .stat-tile .spark{ margin-top:10px; }
  .stat-tile .spark svg{ display:block; width:100%; height:26px; }
  .stat-tile .spark .spark-cap{ font-size:9.5px; color:var(--muted); margin-top:2px; }

  /* ---------- Card / Panel ---------- */
  .grid-2{ display:grid; grid-template-columns:1.4fr 1fr; gap:16px; margin-bottom:18px; }
  .grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:18px; }
  @media(max-width:1080px){ .grid-2,.grid-3{ grid-template-columns:1fr; } }

  .card{
    background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 18px;
  }
  .card h3{ font-size:14px; margin:0 0 2px 0; }
  .card .card-sub{ font-size:11.5px; color:var(--muted); margin-bottom:14px; }
  .mini-chart-title{ font-size:11.5px; font-weight:700; color:var(--text-secondary); margin-bottom:4px; text-align:center; }

  /* ---------- All views: fluid, fill-height layout (no page scroll) ---------- */
  .view.active{ display:flex; flex-direction:column; height:calc(100vh - 40px); max-width:none; }
  .view.active > .view-head{ flex:0 0 auto; margin-bottom:16px; }
  .view.active > .filters{ flex:0 0 auto; }
  .view.active > .stat-row{
    flex:0 0 auto; margin-bottom:16px;
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px;
  }
  .view.active .stat-tile{ padding:18px 20px; }
  .view.active .stat-tile .label{ font-size:13px; }
  .view.active .stat-tile .value{ font-size:clamp(24px,2.1vw,36px); }
  .view.active .stat-tile .delta{ font-size:12.5px; }
  .view.active .card h3{ font-size:clamp(14px,1.1vw,17px); }
  .view.active .card .card-sub{ font-size:12px; }
  .view.active > footer.hint{ flex:0 0 auto; }

  /* Fill wrapper: wraps the main content of non-dashboard views so it
     stretches to consume remaining vertical space instead of leaving
     empty space below a short table/card. */
  .view-fill{ flex:1; min-height:0; display:flex; flex-direction:column; gap:16px; }
  .view-fill > .table-wrap{ flex:1; min-height:220px; display:flex; flex-direction:column; margin-bottom:0; }
  .view-fill > .table-wrap .table-scroll{ flex:1; min-height:0; overflow:auto; }
  .view-fill > .grid-2, .view-fill > .grid-3{ margin-bottom:0; }
  .view-fill > .grid-2.charts-row, .view-fill > .grid-3.charts-row{ flex:0 0 auto; min-height:300px; }
  .view-fill > .grid-2.charts-row .card, .view-fill > .grid-3.charts-row .card{ display:flex; flex-direction:column; min-height:0; }
  .view-fill > .grid-2.charts-row svg, .view-fill > .grid-3.charts-row svg{ flex:1; min-height:0; width:100%; height:100%; display:block; }

  /* 성과 분석: 2x2 그리드 — 목업처럼 카드가 내용만큼 늘어나 페이지가 통으로 흐른다(내부 스크롤 없음).
     리스트 두 장(콘텐츠 유형별·채널별)이 윗줄이다 — 이 화면에서 먼저 읽히는 값이라 사용자가
     추이 차트 위로 올렸다(2026-08-21). 아래 두 장은 SVG 라 최소 높이를 보장하고,
     윗줄 리스트는 행 수만큼 자란다. */
  .view-fill > .perf-charts-grid{
    flex:0 0 auto; min-height:0; height:auto; display:grid; gap:12px;
    grid-template-columns:1.3fr 1fr; grid-template-rows:auto auto;
    grid-template-areas:"pc-bar pc-hbar" "pc-trend pc-follower";
  }
  /* 아랫줄(추이 차트)의 최소 높이를 줄여 윗줄(콘텐츠 유형별·채널별 리스트)이 화면에서 더
     큰 비중으로 보이게 한다(사용자 확정 2026-08-24 — "위 네모가 아래 네모보다 커 보이면"). */
  .perf-charts-grid .pc-trend, .perf-charts-grid .pc-follower{ min-height:clamp(160px, 20vh, 220px); }
  .perf-charts-grid .pc-trend{ grid-area:pc-trend; }
  .perf-charts-grid .pc-follower{ grid-area:pc-follower; }
  .perf-charts-grid .pc-bar{ grid-area:pc-bar; }
  .perf-charts-grid .pc-hbar{ grid-area:pc-hbar; }
  /* 윗줄로 올라온 리스트 두 장은 이 화면의 주인공이라 공용 행보다 크게 그린다.
     .perf-charts-grid 안으로 범위를 좁히는 이유는 같은 .plat-compact-row 를 대시보드
     (dashboard.js:73)와 KPI 상세 팝업(kpi-detail.js:88)이 함께 쓰기 때문이다 —
     범위를 안 좁히면 안 본 화면 두 개가 같이 커진다. */
  .view.active .perf-charts-grid .pc-bar h3,
  .view.active .perf-charts-grid .pc-hbar h3{ font-size:14px; }
  .perf-charts-grid .plat-compact{ gap:12px; }
  .perf-charts-grid .plat-compact-row .pr-name{ font-size:13.5px; }
  .perf-charts-grid .plat-compact-row .pcr-track{ height:10px; }
  .perf-charts-grid .plat-compact-row .pcr-meta{ font-size:12px; }
  .perf-charts-grid .card{ display:flex; flex-direction:column; min-height:0; padding:13px 16px; }
  .view.active .perf-charts-grid .card h3{ font-size:12.5px; margin-bottom:1px; }
  .view.active .perf-charts-grid .card .card-sub{ font-size:10.5px; margin-bottom:6px; }
  .perf-charts-grid svg{ flex:1; min-height:0; width:100%; height:100%; display:block; }
  .perf-charts-grid .ft-chart{ flex:1; min-height:0; margin-top:0; display:flex; }
  .perf-charts-grid .ft-chart svg{ width:100%; height:100%; }
  .perf-charts-grid .ft-legend, .perf-charts-grid .legend{ flex:0 0 auto; margin-top:4px; gap:8px; font-size:10.5px; }
  @media(max-width:1080px){
    /* 세로 한 줄로 접힐 때도 리스트가 먼저다 — 넓은 화면과 순서가 어긋나면 안 된다.
       리스트는 행 수만큼 자라야 하므로 고정 180px 을 주지 않는다(8행이 잘린다). */
    .view-fill > .perf-charts-grid{ grid-template-columns:1fr; grid-template-rows:auto auto 180px 180px; grid-template-areas:"pc-bar" "pc-hbar" "pc-trend" "pc-follower"; height:auto; }
  }
  .view-fill > .card{ flex:0 0 auto; }
  .view-fill > .card.chart-card-fill{ flex:1; min-height:300px; display:flex; flex-direction:column; }
  .view-fill > .card.chart-card-fill svg{ flex:1; min-height:0; width:100%; height:100%; display:block; }
  .view-fill .country-groups-scroll{ flex:1; min-height:90px; overflow-y:auto; padding-right:2px; }
  .view-fill .bulk-bar{ flex:0 0 auto; }
  .view-fill .export-grid{ flex:0 0 auto; }
  .view-fill > .content-browser{ flex:1; min-height:0; }
  /* 창 너비가 좁을 때(태블릿/분할 창 등): 한 화면에 욱여넣는 고정 높이 레이아웃을 버리고
     일반적인 페이지 스크롤 레이아웃으로 전환 — 위젯이 잘리지 않고 내용이 전부 보이도록 함 */
  @media(max-width:1200px){
    .view.active{ height:auto; }
    .dash-stack{ overflow-y:visible; }
    .dash-ops-row .widget-body{ max-height:none; }
    .dash-stack .dash-watch{ min-height:0; }
    .dash-watch .widget-body{ overflow:visible; }
    .view-fill > .table-wrap{ min-height:0; }
    .view-fill > .table-wrap .table-scroll{ overflow:visible; }
    .view-fill .country-groups-scroll{ min-height:0; overflow-y:visible; }
    .view-fill > .content-browser{ min-height:0; }
    .view-fill > .card.chart-card-fill{ min-height:260px; }
  }
  /* 작은 노트북 화면(세로 해상도가 낮아 위젯들을 한 화면에 다 담기 부족한 경우) —
     내부 스크롤 영역에 콘텐츠가 거의 안 보이게 눌리는 대신, 페이지 자체를 스크롤하는
     일반적인 반응형 레이아웃으로 전환해 모든 위젯이 잘리지 않고 온전히 보이도록 함 */
  @media(max-height:1024px){
    .view.active{ height:auto; }
    .dash-stack{ overflow-y:visible; }
    .dash-ops-row .widget-body{ max-height:none; }
    .dash-stack .dash-watch{ min-height:0; }
    .dash-watch .widget-body{ overflow:visible; }
    .view-fill > .table-wrap{ min-height:0; }
    .view-fill > .table-wrap .table-scroll{ overflow:visible; }
    .view-fill .country-groups-scroll{ min-height:0; overflow-y:visible; }
    .view-fill > .content-browser{ min-height:0; }
    .view-fill > .card.chart-card-fill{ min-height:260px; }
    /* 이 블록은 1080px 블록보다 뒤에 있어 더 좁은 폭에서도 행 높이를 덮는다. 그래서 고정값을
       주지 않고 auto 로 둔다 — 리스트는 행 수만큼 자라고, 추이 차트는 위의 min-height 가
       높이를 보장한다. 고정 260px 을 주면 4행짜리 채널 리스트 아래에 빈 공간이 남는다. */
    .view-fill > .perf-charts-grid{ height:auto; grid-template-rows:auto auto; }
  }

  /* 대시보드 v2: KPI(상단) - 알림/오늘 할일(짧게) - 국가별 업로드 현황(메인) - 플랫폼별 성과(하단) 세로 스택 */
  .dash-stack{ flex:1; min-height:0; display:flex; flex-direction:column; gap:16px; overflow-y:auto; }
  .dash-stack .card-widget{ flex:0 0 auto; }

  .dash-ops-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; align-items:stretch; }
  .dash-ops-row .card-widget{ display:flex; flex-direction:column; }
  .dash-ops-row .widget-body{ max-height:clamp(128px, 20vh, 172px); overflow-y:auto; }

  .dash-stack .dash-watch{ flex:1 1 auto; min-height:clamp(300px, 46vh, 440px); display:flex; flex-direction:column; }
  .watch-table2 td, .watch-table2 th{ padding:7px 10px; }
  .dash-watch .widget-body{ flex:1; min-height:0; overflow:auto; }

  .card-head-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
  .card-head-row .card-titles{ min-width:0; }
  .widget-controls{ display:flex; gap:4px; flex:0 0 auto; }
  .wbtn{
    width:24px; height:24px; border-radius:6px; border:1px solid var(--border-strong);
    background:var(--surface-alt); color:var(--text-secondary); font-size:13px; line-height:1;
    cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0;
  }
  .wbtn:hover{ background:var(--page); border-color:var(--muted); color:var(--text-primary); }
  .card-widget.minimized{ flex:0 0 auto !important; }
  .card-widget.minimized .widget-body,
  .card-widget.minimized .card-sub{ display:none; }
  /* 위젯 '자세히 보기' 상세 팝업 + 콘텐츠 미리보기 팝업이 공유하는 모달 셸 */
  .modal-backdrop{ position:fixed; inset:0; background:rgba(11,11,11,.46); z-index:110; display:none; align-items:center; justify-content:center; padding:26px; }
  .modal-backdrop.active{ display:flex; }
  .app-modal{
    background:var(--surface); border-radius:14px; box-shadow:0 24px 64px rgba(11,11,11,.32);
    width:100%; max-width:880px; max-height:calc(100vh - 52px); display:flex; flex-direction:column; overflow:hidden;
  }
  .app-modal .am-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:20px 22px; border-bottom:1px solid var(--border); flex:0 0 auto; }
  .app-modal .am-title{ font-size:16px; font-weight:800; margin:0 0 3px 0; }
  .app-modal .am-sub{ font-size:12.5px; color:var(--muted); }
  .app-modal .am-close{
    width:28px; height:28px; border-radius:8px; border:1px solid var(--border-strong); background:var(--surface-alt);
    color:var(--text-secondary); font-size:15px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex:0 0 auto;
  }
  .app-modal .am-close:hover{ background:var(--page); color:var(--text-primary); }
  .app-modal .am-body{ padding:20px 22px; overflow-y:auto; flex:1; min-height:0; }

  /* 플랫폼별 성과 — 플랫폼당 한 행에 게시물수·조회수·좋아요를 가로 막대로 합쳐서 표시(빈 공간 최소화) */
  .plat-compare{ display:flex; flex-direction:column; gap:12px; }
  .plat-row{ display:grid; grid-template-columns:112px repeat(3,1fr); gap:16px; align-items:center; }
  .plat-row .pr-name{ display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; white-space:nowrap; }
  .plat-row .pr-dot{ width:9px; height:9px; border-radius:50%; flex:0 0 auto; }
  .pm{ display:flex; flex-direction:column; gap:4px; min-width:0; }
  .pm .pm-top{ display:flex; justify-content:space-between; font-size:10.5px; color:var(--muted); }
  .pm .pm-top .pm-val{ font-size:11.5px; font-weight:700; color:var(--text-primary); }
  .pm .pm-track{ height:7px; border-radius:999px; background:var(--surface-alt); border:1px solid var(--gridline); overflow:hidden; }
  .pm .pm-fill{ height:100%; border-radius:999px; }
  @media(max-width:760px){ .plat-row{ grid-template-columns:1fr; gap:6px; } }

  /* 목표 KPI 달성률 + 플랫폼별 Follower 목표 달성률 — compact horizontal strip */
  .kpi-strip{ flex:0 0 auto; }
  .kpi-strip .widget-body{ display:flex; align-items:stretch; gap:28px; flex-wrap:wrap; }
  .kpi-gauges{ display:flex; gap:24px; flex:1 1 260px; flex-wrap:wrap; }
  .kpi-gauge{ display:flex; align-items:center; gap:10px; }
  .kpi-gauge svg{ width:60px; height:60px; flex:0 0 auto; }
  .kpi-gauge .kg-label{ font-size:11.5px; color:var(--muted); }
  .kpi-gauge .kg-value{ font-size:19px; font-weight:700; letter-spacing:-.01em; }
  .kpi-gauge .kg-target{ font-size:10.5px; color:var(--muted); }
  /* 플랫폼별 Follower 목표 달성률 — KPI 위젯 내 인라인 섹션 */
  .kpi-vdivider{ width:1px; background:var(--border-strong); flex:0 0 auto; align-self:stretch; }
  .kpi-follower-inline{ flex:1 1 420px; min-width:360px; display:flex; flex-direction:column; justify-content:center; }
  .kpi-sub-head{ font-size:12px; font-weight:700; color:var(--text-secondary); margin-bottom:10px; display:flex; align-items:center; }
  .kpi-gauges-sm{ gap:22px; flex-wrap:wrap; flex:0 0 auto; }
  .kpi-gauge.sm svg{ width:46px; height:46px; }
  .kpi-gauge.sm .kg-label{ font-size:11px; color:var(--muted); display:flex; align-items:center; }
  .kpi-gauge.sm .kg-value{ font-size:15px; font-weight:700; letter-spacing:-.01em; }
  .kpi-gauge.sm .kg-target{ font-size:9.5px; color:var(--muted); }
  .kg-exceed-badge{ font-size:9px; font-weight:800; color:#fff; background:var(--good); border-radius:5px; padding:1.5px 5px; margin-left:5px; white-space:nowrap; }

  /* 성과 분석 탭: 채널별 Follower 추이 카드 */
  .ft-chart{ margin-top:4px; }
  .ft-chart svg{ display:block; width:100%; height:220px; }
  .ft-legend{ display:flex; gap:14px; margin-top:10px; flex-wrap:wrap; }
  .ft-legend span{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; color:var(--text-secondary); }
  .ft-legend .dot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }

  .alert-row{ display:flex; align-items:flex-start; gap:9px; padding:9px 0; border-bottom:1px solid var(--gridline); font-size:12.5px; }
  .alert-row:last-child{ border-bottom:none; }
  .alert-row .dot-ico{ display:inline-flex; align-items:center; justify-content:center; width:18px;height:18px;border-radius:5px; font-size:11px; font-weight:800; background:var(--surface-alt); color:var(--text-secondary); flex:0 0 auto; }

  /* 국가별 업로드 현황 — 전략/비전략국가 → 권역 → 국가×플랫폼 테이블 */
  .watch-controls{ display:flex; align-items:center; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
  .watch-controls .wc-label{ font-size:12px; color:var(--muted); font-weight:600; }
  .watch-controls select{
    font-size:12.5px; font-weight:600; padding:7px 10px; border-radius:7px; border:1px solid var(--border-strong);
    background:var(--surface-alt); color:var(--text-primary); cursor:pointer;
  }
  .seg-toggle{ display:flex; border:1px solid var(--border-strong); border-radius:8px; overflow:hidden; flex:0 0 auto; }
  .seg-toggle .seg-btn{ padding:7px 14px; font-size:12.5px; font-weight:700; border:none; background:var(--surface-alt); color:var(--text-secondary); cursor:pointer; }
  .seg-toggle .seg-btn + .seg-btn{ border-left:1px solid var(--border-strong); }
  .seg-toggle .seg-btn.active{ background:#eaf2fc; color:var(--series-1); }
  .seg-toggle .seg-btn:hover:not(.active){ background:var(--page); }
  .watch-legend{ margin:0; }
  .watch-legend .wp-rate{ font-size:13px; width:auto; }
  /* 국가별 업로드 현황 셀 — 캠페인 시작 이후 누적 업로드율 한 값만 표시(사용자 확정 2026-08-24,
     주차 탐색·이번 주 O/X 줄 삭제) */
  .wp-rate{ font-size:14px; font-weight:800; line-height:1; }
  .wp-rate.on{ color:var(--good); }
  .wp-rate.none{ color:var(--muted); }
  .watch-table2{ font-size:12.5px; }
  .watch-table2 thead th{ position:sticky; top:0; background:var(--surface); }
  .watch-table2 td, .watch-table2 th{ text-align:center; }
  .watch-table2 td:first-child, .watch-table2 th:first-child{ text-align:left; }
  .watch-table2 .wt-country{ display:flex; align-items:center; gap:6px; font-weight:700; white-space:nowrap; }
  .watch-table2 .wt-region-tag{ font-size:10px; font-weight:600; color:var(--muted); background:var(--surface-alt); border:1px solid var(--border); border-radius:5px; padding:1px 5px; }

  /* 비전략국가 업로드 상위 5개국 — 카드 5장을 가로로 (신규, 사용자 확정 2026-08-24) */
  .top5-row{ display:flex; gap:12px; flex-wrap:wrap; }
  .top5-card{
    flex:1 1 140px; min-width:120px; text-align:center; padding:14px 10px;
    background:var(--surface-alt); border:1px solid var(--border); border-radius:10px;
  }
  .top5-name{ font-size:13px; font-weight:700; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .top5-pct{ font-size:20px; font-weight:800; color:var(--good); margin-top:4px; }

  /* 대시보드 위젯 상단 '자세히 보기' 링크 */
  .wlink{ font-size:11.5px; font-weight:700; color:var(--series-1); text-decoration:none; white-space:nowrap; margin-right:2px; }
  .wlink:hover{ text-decoration:underline; }

  /* 업로드 콘텐츠 성과 (컴팩트, ops-row 안) */
  .plat-compact{ display:flex; flex-direction:column; gap:9px; }
  .plat-compact-row{ display:grid; grid-template-columns:88px 1fr auto; gap:10px; align-items:center; }
  .plat-compact-row .pr-name{ display:flex; align-items:center; gap:6px; font-size:12px; font-weight:700; white-space:nowrap; min-width:0; }
  /* 긴 콘텐츠명이 막대를 밀지 않게 이름만 … 로 자른다(전체 이름은 title 에 남는다) */
  .plat-compact-row .pr-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .plat-compact-row .pr-dot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
  .plat-compact-row .pcr-track{ height:6px; border-radius:999px; background:var(--surface-alt); border:1px solid var(--gridline); overflow:hidden; }
  .plat-compact-row .pcr-fill{ height:100%; border-radius:999px; }
  .plat-compact-row .pcr-meta{ font-size:10.5px; color:var(--muted); white-space:nowrap; }
  .plat-compact-row .pcr-meta b{ color:var(--text-primary); font-weight:700; }

  @media(max-width:900px){ .dash-ops-row{ grid-template-columns:1fr; } }

  /* ---------- Term info tooltip ---------- */
  /* 설명 아이콘(term-info) 말풍선 — 기본은 아이콘 위쪽 중앙 정렬이지만, 화면/카드 경계에
     가까워 잘릴 위치라면 JS(positionTermInfoBubble)가 --tt-shift-x(좌우 보정)와
     .flip-down(위→아래 방향 전환)을 실시간으로 계산해 부여함 (전 화면 공통 적용) */
  .term-info{ position:relative; display:inline-flex; align-items:center; vertical-align:middle; margin-left:5px; }
  .term-info .ico{
    width:15px; height:15px; border-radius:50%; background:var(--muted); color:#fff;
    font-size:9.5px; font-weight:700; font-style:normal;
    display:flex; align-items:center; justify-content:center; cursor:help;
  }
  .term-info .bubble{
    position:absolute; left:50%; bottom:calc(100% + 8px);
    transform:translateX(calc(-50% + var(--tt-shift-x, 0px))) translateY(4px);
    width:236px; background:#1c1c1a; color:#fdfdfc; font-size:11.5px; font-weight:400; line-height:1.5;
    padding:9px 11px; border-radius:9px; text-align:left;
    opacity:0; pointer-events:none; transition:opacity .12s ease, transform .12s ease;
    box-shadow:0 8px 22px rgba(11,11,11,.20); z-index:60;
  }
  .term-info .bubble b{ color:#fff; }
  .term-info .bubble::after{
    content:''; position:absolute; top:100%; left:calc(50% - var(--tt-shift-x, 0px)); transform:translateX(-50%);
    border:5px solid transparent; border-top-color:#1c1c1a;
  }
  .term-info:hover .bubble{ opacity:1; transform:translateX(calc(-50% + var(--tt-shift-x, 0px))) translateY(0); pointer-events:auto; }
  th .term-info{ margin-left:4px; }
  th .term-info .ico{ width:13px;height:13px;font-size:8.5px; }
  .stat-tile .label .term-info .bubble{ font-weight:400; }

  /* 위쪽으로 펼치면 화면/카드 경계에 잘리는 위치의 말풍선 — JS가 부여하는 방향 전환 클래스 */
  .term-info .bubble.flip-down{
    bottom:auto; top:calc(100% + 8px);
    transform:translateX(calc(-50% + var(--tt-shift-x, 0px))) translateY(-4px);
  }
  .term-info .bubble.flip-down::after{
    top:auto; bottom:100%; border-top-color:transparent; border-bottom-color:#1c1c1a;
  }
  .term-info:hover .bubble.flip-down{ transform:translateX(calc(-50% + var(--tt-shift-x, 0px))) translateY(0); }

  /* ---------- Table ---------- */
  table{ width:100%; border-collapse:collapse; font-size:12.5px; }
  thead th{
    text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em;
    color:var(--muted); font-weight:700; padding:9px 10px; border-bottom:1px solid var(--gridline);
    white-space:nowrap;
  }
  tbody td{ padding:10px 10px; border-bottom:1px solid var(--gridline); vertical-align:middle; }
  tbody tr:hover{ background:var(--surface-alt); }
  tbody tr:last-child td{ border-bottom:none; }
  td.num, th.num{ text-align:right; font-variant-numeric:tabular-nums; }

  .table-wrap{ background:var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
  .table-wrap.nested{ background:transparent; border:none; border-radius:0; border-top:1px solid var(--gridline); }
  .collapsible-body.collapsed{ display:none; }
  .table-wrap .table-scroll{ overflow-x:auto; }

  /* 성과 분석 — 플랫폼별로 나뉜 국가별 표. table-layout:fixed + 공통 colgroup 으로 국가명 길이와
     무관하게 컬럼 경계가 표마다 세로로 정렬되도록 한다. */
  /* min-width 를 두지 않는다 — 국가별 표는 가로 스크롤 없이 카드 폭에 꽉 차게(풀칸) 그린다.
     table-layout:fixed + colgroup % 라 좁아지면 셀이 줄어들 뿐 스크롤은 생기지 않는다. */
  .perf-country-table{ table-layout:fixed; width:100%; }
  .perf-country-table .ctmix-cell{ vertical-align:middle; }
  .ctmix-bar{ display:flex; width:100%; height:14px; border-radius:4px; overflow:hidden; background:var(--surface-alt); gap:1.5px; }
  .ctmix-seg{ height:100%; min-width:2px; cursor:default; }
  .table-head-bar{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px 6px 16px; }
  .table-head-bar h3{ font-size:14px; margin:0; }
  .table-head-bar .count{ font-size:11.5px; color:var(--muted); }

  /* ---------- Badges ---------- */
  .badge{ display:inline-flex; align-items:center; gap:5px; font-size:10.5px; font-weight:700; padding:2.5px 8px; border-radius:999px; color:#fff; white-space:nowrap; }
  .badge.ig{ background:var(--brand-ig); }
  .badge.fb{ background:var(--brand-fb); }
  .badge.tt{ background:var(--brand-tt); }
  .badge.yt{ background:var(--brand-yt); }
  /* 형식 배지 — 플랫폼 배지 옆에 붙는다. 플랫폼 색과 겨루지 않게 중립색으로 둔다. */
  .badge.form{ background:var(--surface-alt); color:var(--text-secondary); border:1px solid var(--border-strong); }

  .status-dot{ display:inline-block; width:8px;height:8px;border-radius:50%; margin-right:6px; }
  .status-pill{ display:inline-flex; align-items:center; font-size:11px; font-weight:700; padding:3px 9px; border-radius:999px; }
  .status-pill.good{ background:#e6f6e6; color:#0a7a0a; }
  .status-pill.warning{ background:#fff3de; color:#8a5a00; }
  .status-pill.critical{ background:#fce8e8; color:#a3201f; }
  .status-pill.muted{ background:#f0efec; color:var(--text-secondary); }

  .check-ico, .x-ico{ display:inline-flex; align-items:center; justify-content:center; width:18px;height:18px;border-radius:5px; font-size:11px; font-weight:800; }
  .check-ico{ background:#e6f6e6; color:#0a7a0a; }
  .x-ico{ background:#fce8e8; color:#a3201f; }

  .pic-chip{ display:inline-flex; align-items:center; gap:6px; font-size:12px; }
  .pic-avatar{ width:20px;height:20px;border-radius:50%; background:var(--series-3); color:#fff; font-size:9.5px; font-weight:700; display:flex;align-items:center;justify-content:center; }

  /* ---------- Candidate cards ---------- */
  .country-group{ background:var(--surface); border:1px solid var(--border); border-radius:12px; margin-bottom:10px; overflow:hidden; }
  .country-group-head{ display:flex; align-items:center; gap:10px; padding:12px 16px; cursor:pointer; }
  .country-group-head .tw{ transform:rotate(90deg); transition:transform .15s; font-size:11px; color:var(--muted); }
  .country-group-head.collapsed .tw{ transform:rotate(0deg); }
  .country-group-head .name{ font-weight:700; font-size:13px; }
  .country-group-head .meta{ margin-left:auto; font-size:11.5px; color:var(--muted); }
  .candidate-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; padding:0 16px 16px 16px; }
  .candidate-grid.collapsed{ display:none; }
  .cand-card{ border:1px solid var(--border); border-radius:10px; overflow:hidden; background:var(--surface-alt); cursor:pointer; transition:box-shadow .12s ease, border-color .12s ease; }
  .cand-card:hover{ border-color:var(--series-1); box-shadow:0 4px 12px rgba(11,11,11,.08); }
  .cand-thumb{ height:78px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:11px; font-weight:700; text-align:center; padding:6px; }
  .cand-body{ padding:8px 9px 10px 9px; }
  .cand-date{ font-size:10px; color:var(--muted); margin-bottom:3px; }
  .cand-title{ font-size:11px; line-height:1.3; margin-bottom:6px; height:28px; overflow:hidden; }
  .cand-foot{ display:flex; align-items:center; justify-content:space-between; }

  /* ---------- Content browser: facet sidebar + content cards (콘텐츠 모니터링) ---------- */
  .content-browser{ display:flex; gap:16px; flex:1; min-height:0; }
  .facet-panel{ width:224px; flex:0 0 224px; overflow-y:auto; display:flex; flex-direction:column; gap:12px; padding-right:2px; }
  .facet-group{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px; }
  .facet-group-title{ font-size:11px; font-weight:700; color:var(--muted); margin-bottom:8px; text-transform:uppercase; letter-spacing:.03em; display:flex; align-items:center; justify-content:space-between; }
  .facet-group-title .fc-clear{ font-size:10.5px; font-weight:600; color:var(--series-1); cursor:pointer; text-transform:none; letter-spacing:0; }
  .facet-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6.5px 8px; border-radius:8px; cursor:pointer; font-size:12.5px; color:var(--text-primary); transition:background .1s; }
  .facet-row:hover{ background:var(--surface-alt); }
  .facet-row.active{ background:#eaf2fc; color:var(--series-1); font-weight:700; }
  .facet-row.zero{ opacity:.4; }
  .facet-row .fc-name{ display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .facet-row .fc-count{ font-size:11px; color:var(--muted); flex:0 0 auto; }
  .facet-row.active .fc-count{ color:var(--series-1); }
  .facet-row .fc-dot{ width:8px; height:8px; border-radius:50%; flex:0 0 auto; }
  .content-list-wrap{ flex:1; min-width:0; display:flex; flex-direction:column; min-height:0; overflow-x:auto; }
  /* 고정폭 숫자 컬럼(92·96px)이 좁은 화면에서 잘리지 않게 — 헤더·행이 같은 최소폭을 공유하며 함께 가로 스크롤된다 */
  .content-list-cols, .content-card{ min-width:620px; }
  .content-list-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; flex:0 0 auto; }
  .content-list-head .active-chips{ display:flex; gap:6px; flex-wrap:wrap; }
  .content-list-head .active-chip{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; color:var(--series-1); background:#eaf2fc; border:1px solid var(--series-1); border-radius:999px; padding:3px 9px 3px 10px; cursor:pointer; }
  /* 콘텐츠 모니터링 — 카드 그리드 대신 리스트업 형식: [썸네일][콘텐츠 정보][좋아요][댓글][공유][조회수]
     헤더(.content-list-cols)와 각 행(.content-card)이 동일한 grid-template-columns를 공유해 컬럼이 정확히 정렬됨 (디자인초안 6) */
  .content-list-cols{
    display:grid; grid-template-columns:56px 1fr 92px 92px 92px 96px; gap:14px; align-items:center;
    padding:0 14px 6px 14px; flex:0 0 auto;
  }
  .content-list-cols div{ font-size:10.5px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
  .content-list-cols .col-num{ text-align:right; }
  .content-list{ flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:8px; padding-right:2px; }
  .content-card{
    display:grid; grid-template-columns:56px 1fr 92px 92px 92px 96px; gap:14px; align-items:center;
    border:1px solid var(--border); border-radius:10px; background:var(--surface); padding:9px 14px;
    cursor:pointer; transition:box-shadow .12s ease, border-color .12s ease;
  }
  .content-card:hover{ border-color:var(--series-1); box-shadow:0 4px 12px rgba(11,11,11,.08); }
  .content-card .cc-thumb{ width:56px; height:56px; border-radius:8px; position:relative; flex:0 0 56px; overflow:hidden; background:var(--surface-alt); }
  .content-card .cc-thumb .badge{ position:absolute; top:5px; left:5px; font-size:8px; padding:1px 5px; }
  .content-card .cc-main{ min-width:0; display:flex; flex-direction:column; gap:3px; }
  .content-card .cc-title{ font-size:12.5px; line-height:1.3; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .content-card .cc-meta-row{ display:flex; align-items:center; gap:6px; font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .content-card .cc-meta-row .sep{ color:var(--gridline); }
  .content-card .cc-meta-row .status-pill{ margin-left:2px; flex:0 0 auto; }
  .content-card .cc-meta-row .cc-sentiment-sm{ margin-left:2px; flex:0 0 auto; }
  .content-card .cc-num{ text-align:right; font-size:13px; font-weight:700; color:var(--text-primary); font-variant-numeric:tabular-nums; }
  /* 전주(직전 수집) 대비 증감 — 미국 주가 관례: 상승 초록 ▲, 하락 빨강 ▼ */
  .content-card .cc-num .cc-delta{ display:block; font-size:10px; font-weight:700; }
  .content-card .cc-num .cc-delta.up{ color:var(--good); }
  .content-card .cc-num .cc-delta.down{ color:var(--critical); }
  .content-card .cc-num .cc-delta.flat{ color:var(--muted); font-weight:400; }
  .content-list-empty{ padding:40px 20px; text-align:center; color:var(--muted); font-size:13px; }
  /* 성과 분석(디자인초안 6): 국가별 상세 표 최소 높이 + 콘텐츠 유형별 비중 요약 표 5개 */
  /* 성과 분석은 "한 화면 고정 + 내부 스크롤" 설계(.view.active height:100vh)에서 예외다 —
     국가별 그룹·요약 표까지 전부 리스트업하고 페이지 스크롤이 담당한다(사용자 확정 2026-08-20). */
  #view-performance.view.active, #view-sentiment.view.active{ height:auto; min-height:calc(100vh - 40px); }
  #view-sentiment .view-fill{ flex:none; min-height:0; }
  #view-sentiment .chart-card-fill svg{ height:clamp(320px, 42vh, 440px); }
  /* 코멘트 상세만 컴팩트 높이 + 자체 스크롤(사용자 확정) — 나머지는 페이지 흐름 */
  #view-sentiment .table-wrap .table-scroll{ overflow:auto; max-height:clamp(340px, 46vh, 560px); }
  /* 주요(대표) 댓글 별표 — 리포트에 실을 대표 댓글을 사람이 고른다 (highlight 컬럼, 2026-08-27) */
  .voc-major-star{ font-size:16px; line-height:1; background:none; border:none; color:var(--gridline); padding:2px; cursor:pointer; }
  .voc-major-star.on{ color:#d99a00; }
  /* 주요 키워드 / 이슈 하이라이트 — 빈도 기반 태그 클라우드(신규, 사용자 확정 2026-08-24) */
  .kw-cloud{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 14px; max-height:180px; overflow-y:auto; padding:4px 2px; }
  .kw-tag{ font-weight:700; line-height:1.3; cursor:default; }
  .voc-major-star[disabled]{ cursor:default; opacity:.6; }
  #view-performance .country-groups-scroll{ flex:none; min-height:0; overflow-y:visible; padding-right:0; }
  #view-performance .view-fill{ flex:none; min-height:0; }

  .bulk-bar{
    position:sticky; bottom:16px; margin-top:14px;
    display:flex; align-items:center; gap:10px;
    background:var(--surface); border:1px solid var(--border-strong); border-radius:12px;
    padding:10px 14px; box-shadow:0 6px 18px rgba(11,11,11,.08);
  }
  .bulk-bar .sel{ font-size:12.5px; color:var(--text-secondary); margin-right:auto; }

  /* ---------- Legend ---------- */
  .legend{ display:flex; gap:14px; flex-wrap:wrap; margin-top:10px; }
  .legend-item{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--text-secondary); }
  .legend-swatch{ width:10px;height:10px;border-radius:3px; }

  /* ---------- Report cards ---------- */
  .report-card-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:14px; }
  .report-card{
    position:relative; display:flex; align-items:center; gap:14px; width:100%; text-align:left;
    background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:16px 18px;
    cursor:pointer; font:inherit; color:inherit;
  }
  .report-card:hover{ border-color:var(--series-1); box-shadow:0 4px 14px rgba(11,11,11,.06); }
  .report-card .rc-icon{ width:42px; height:42px; border-radius:10px; background:#eef7f1; color:#1f7a4d; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
  .report-card .rc-text{ flex:1; min-width:0; }
  .report-card .rc-title{ font-size:14.5px; font-weight:800; margin-bottom:2px; }
  .report-card .rc-sub{ font-size:12px; color:var(--muted); }
  /* XLSX 뱃지와 '추출' 액션을 오른쪽에 세로로 쌓아 서로 겹치지 않도록 함 */
  .report-card .rc-right{ display:flex; flex-direction:column; align-items:flex-end; gap:7px; flex:0 0 auto; }
  .report-card .rc-badge{ font-size:10px; font-weight:800; color:#0ca35f; background:#e6f7ee; border-radius:6px; padding:3px 8px; line-height:1; }
  .report-card .rc-action{ display:flex; align-items:center; gap:2px; font-size:12.5px; font-weight:700; color:var(--series-1); flex:0 0 auto; white-space:nowrap; }
  .report-card .rc-chevron{ font-size:16px; }
  /* ---------- 주간 로우데이터 (DB 형식 아카이브) ---------- */
  .week-tag{ display:inline-block; font-size:10px; font-weight:700; color:var(--series-1); background:#eaf2fc; border-radius:5px; padding:1px 6px; margin-left:7px; vertical-align:middle; }
  .wk-range{ font-weight:700; }
  .wk-dl-btn{
    display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:var(--series-1);
    background:#eaf2fc; border:1px solid transparent; border-radius:7px; padding:6px 10px; cursor:pointer; white-space:nowrap;
  }
  .wk-dl-btn:hover{ background:#dcebfb; }
  .wk-dl-btn svg{ flex:0 0 auto; }
  /* 콘텐츠 추출 완료 토스트 */
  .toast{
    position:fixed; left:50%; bottom:28px; transform:translate(-50%,12px);
    background:#0b0b0b; color:#fff; font-size:12.5px; font-weight:600; padding:10px 18px; border-radius:999px;
    box-shadow:0 12px 28px rgba(11,11,11,.28); opacity:0; pointer-events:none; transition:opacity .18s ease, transform .18s ease; z-index:200;
  }
  .toast.show{ opacity:1; transform:translate(-50%,0); }

  footer.hint{ margin-top:26px; font-size:11.5px; color:var(--muted); border-top:1px dashed var(--gridline); padding-top:14px; }

  .mock-tag{ font-size:10px; color:var(--muted); background:var(--surface-alt); border:1px solid var(--border); border-radius:6px; padding:2px 7px; }

  /* scrollbar */
  ::-webkit-scrollbar{ width:9px; height:9px; }
  ::-webkit-scrollbar-thumb{ background:var(--border-strong); border-radius:6px; }

  /* ---------- 데이터 준비중 플레이스홀더 (초안에 없음 — 소스 미확보 위젯용) ---------- */
  .ph{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
       border:1px dashed var(--border-strong); border-radius:10px; background:var(--surface-alt); padding:18px; }
  .ph-title{ font-size:12.5px; font-weight:700; color:var(--muted); }
  .ph-need{ font-size:11px; color:var(--muted); opacity:.8; text-align:center; }

/* ── 콘텐츠 URL 찾기 — 행마다 원본과 후보를 붙여 놓는다 ─────────
   예전 카드 격자(.candidate-grid)는 썸네일이 90px 이라 대조가 불가능했고, 비교 대상이
   화면에 아예 없었다. 붙박이 사이드바도 버렸다 — 한 건을 볼 때마다 눈이 좌우로 왕복한다.
   같은 줄 안에서 두 장을 나란히 놓으면 시선이 움직이지 않는다. */
.cmp-row{
  display:grid; grid-template-columns:28px 268px 1fr; gap:12px; align-items:start;
  padding:10px; border:1px solid var(--border); border-radius:10px;
  background:var(--surface); margin-bottom:8px;
}
.cmp-row.on{ border-color:var(--series-1); background:var(--surface-alt); }
.cmp-pick{ display:flex; justify-content:center; padding-top:2px; }
.cmp-pair{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.cmp-shot{
  position:relative; aspect-ratio:1; border-radius:8px; overflow:hidden;
  background:var(--surface-alt); border:1px solid var(--border);
}
/* 원본 쪽에 테두리를 줘서 어느 장이 기준인지 매 줄에서 다시 말해 준다 */
.cmp-shot.ref{ border:2px solid var(--series-1); }
.cmp-cap{
  position:absolute; left:0; right:0; bottom:0; padding:2px 6px;
  background:rgba(0,0,0,.62); color:#fff; font-size:10.5px; font-weight:600;
}
.cmp-body{ min-width:0; }
.cmp-head{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; font-size:12px; margin-bottom:6px; }
.cmp-text{
  font-size:12px; line-height:1.6; color:var(--text-secondary);
  max-height:84px; overflow:auto; white-space:pre-wrap; word-break:break-word;
}
.cmp-tags{ display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; }
/* 원본과 겹치는 해시태그 — 사람이 눈으로 교집합을 세지 않게 한다 */
.cmp-tags .mock-tag.hit{ background:var(--series-1); color:#fff; font-weight:700; }
.cmp-act{ display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:10px; }

@media (max-width:900px){
  .cmp-row{ grid-template-columns:28px 1fr; }
  .cmp-pair{ grid-column:2; }
  .cmp-body{ grid-column:2; }
}