:root {
  --green: #03c75a;
  --green-dark: #02a94c;
  --wp: #21759b;
  --wp-dark: #1b5e7e;
  --hi: #ff2d78;
  --hi-dark: #d81b60;
  --ink: #1a1a1a;
  --body: #3b3b3b;
  --muted: #8b8b8b;
  --line: #e6e8eb;
  --bg: #f4f6f8;
  --card: #ffffff;
  --warn: #f59f00;
  --bad: #e03131;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic',
               '맑은 고딕', 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 레이아웃 ─────────────────────────────────────────── */

header.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.top-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: 58px;
}
.brand {
  font-weight: 800; font-size: 16px; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--green);
}
/* 플랫폼 탭 — 네이버 / 워드프레스. 글쓰기 방식도 전달 방식도 다른 두 갈래다. */
nav.platform {
  display: flex; gap: 2px; padding: 3px;
  background: var(--bg); border-radius: 10px;
}
nav.platform a {
  padding: 6px 16px; border-radius: 8px; color: var(--muted);
  font-weight: 700; font-size: 13px;
}
nav.platform a:hover { color: var(--ink); text-decoration: none; }
nav.platform a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
nav.platform a.pf-naver.on { color: var(--green-dark); }
nav.platform a.pf-wp.on    { color: var(--wp-dark); }
nav.platform a.pf-hi.on    { color: var(--hi-dark); }

.brand .dot.wp { background: var(--wp); }
.brand .dot.hi { background: var(--hi); }

/* 핫이슈(카드뉴스·쇼츠) 화면은 분홍 */
body.hi nav.main a.on { background: var(--hi); }
body.hi button:not(.ghost):not(.danger):not(.topic-item):not(.cd-thumb) { background: var(--hi); }
body.hi button:not(.ghost):not(.danger):not(.topic-item):not(.cd-thumb):hover:not(:disabled) { background: var(--hi-dark); }

/* 워드프레스 화면에서는 강조색을 파랑으로 바꾼다 */
body.wp nav.main a.on { background: var(--wp); }
body.wp .btn-primary,
body.wp button[type="submit"] { background: var(--wp); }
body.wp .btn-primary:hover,
body.wp button[type="submit"]:hover { background: var(--wp-dark); }

nav.main { display: flex; gap: 4px; min-width: 0; }
nav.main a {
  padding: 7px 14px; border-radius: 8px; color: var(--muted);
  font-weight: 600; font-size: 14px;
}
nav.main a:hover { background: var(--bg); text-decoration: none; }
nav.main a.on { background: var(--green); color: #fff; }
nav.platform a, nav.main a { white-space: nowrap; }
/* 공용 메뉴(비용·사용법·설정) — 플랫폼 메뉴와 섞이지 않게 오른쪽 끝, 옅은 글씨 */
nav.util { display: flex; gap: 2px; margin-left: auto; padding-left: 12px; border-left: 1px solid var(--line); }
nav.util a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
nav.util a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
nav.util a.on { color: var(--ink); font-weight: 700; background: var(--bg); }

/* 중간 폭 — 핫이슈 메뉴가 6개라 공용 메뉴와 맞닿았다. 간격만 줄인다 */
@media (max-width: 1100px) {
  .top-inner { gap: 14px; }
  nav.main a { padding: 7px 9px; font-size: 13.5px; }
  nav.util a { padding: 6px 7px; }
}

/* 좁은 화면 — 한 줄에 다 넣으려다 메뉴 글자가 한 자씩 세로로 쌓였다.
   두 줄로 나눈다: 위에 로고 + 플랫폼, 아래에 메뉴. */
@media (max-width: 640px) {
  .top-inner { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 10px 16px; }
  nav.util { border-left: 0; padding-left: 0; }
  /* 플랫폼 메뉴는 아래 줄 전체. 핫이슈처럼 많으면 옆으로 밀어 본다(글자가 세로로 쌓이지 않게) */
  nav.main { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { padding: 6px 10px; font-size: 13px; }
  nav.platform a { padding: 5px 12px; }
  main { padding: 20px 16px 60px; }
}

main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px; }

.page-title { font-size: 22px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.page-sub { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

/* ── 카드 ─────────────────────────────────────────────── */

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-bottom: 18px;
}
.card h2 {
  font-size: 15px; font-weight: 700; color: var(--ink);
  margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.card h2 .step {
  background: var(--green); color: #fff; width: 20px; height: 20px;
  border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 800;
}
.grid2 { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
/* 좌우 같은 폭. 오른쪽이 보조 안내가 아니라 글감처럼 직접 고르는 패널일 때.
   minmax(0, 1fr)이어야 긴 제목이 칸을 밀어 넓히지 않는다. */
.grid2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid2, .grid2.even { grid-template-columns: 1fr; } }

/* ── 폼 ───────────────────────────────────────────────── */

label.f { display: block; font-weight: 600; font-size: 13px; color: var(--ink); margin: 0 0 6px; }
label.f .hint { font-weight: 400; color: var(--muted); margin-left: 6px; }

input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(3, 199, 90, .12);
}
textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

/* hidden 속성이 아래 button { display } 같은 규칙에 지지 않게 */
[hidden] { display: none !important; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; background: var(--green); color: #fff; transition: .12s;
}
button:hover:not(:disabled), .btn:hover { background: var(--green-dark); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost, .btn.ghost {
  background: #fff; color: var(--ink); border-color: var(--line);
}
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--bg); }
button.sm { padding: 6px 12px; font-size: 13px; }
button.danger { background: var(--bad); }

/* ── 탭 ───────────────────────────────────────────────── */

.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  background: #fff; color: var(--muted); border: 1px solid var(--line);
  font-weight: 700;
}
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabpane { display: none; }
.tabpane.on { display: block; }

/* ── 상태/알림 ────────────────────────────────────────── */

.note {
  padding: 12px 14px; border-radius: 8px; font-size: 13.5px;
  border: 1px solid var(--line); background: #fff; margin-bottom: 16px;
}
.note.warn { border-color: #ffe8b3; background: #fffaf0; color: #8a6100; }
.note.bad { border-color: #ffd4d4; background: #fff5f5; color: #a12222; }
.note.good { border-color: #c9f0d9; background: #f2fdf6; color: #0a6e39; }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--green); width: 0; transition: width .3s; }

/* ── 제목 후보 ────────────────────────────────────────── */

.title-list { display: flex; flex-direction: column; gap: 8px; }
.title-opt {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #fff;
}
.title-opt:hover { border-color: var(--green); background: #f7fefa; }
.title-opt.on { border-color: var(--green); background: #f2fdf6; }
.title-opt .type {
  font-size: 11px; font-weight: 800; color: var(--green-dark);
  background: #e8f9ef; padding: 2px 8px; border-radius: 99px; white-space: nowrap;
}
.title-opt .t { font-weight: 600; color: var(--ink); }
.title-opt .len { font-size: 12px; color: var(--muted); margin-left: auto; white-space: nowrap; }

/* ── 점수 ─────────────────────────────────────────────── */

.score-big { font-size: 42px; font-weight: 800; line-height: 1; color: var(--green); }
.score-big.mid { color: var(--warn); }
.score-big.low { color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 14px 0 0; }
.checks li {
  display: flex; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line);
  font-size: 13px; align-items: flex-start;
}
.checks .ico { flex: none; width: 16px; text-align: center; }
.checks .lb { font-weight: 700; color: var(--ink); }
.checks .tp { color: var(--muted); font-size: 12.5px; }

.stats { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 4px; }
.stat b { display: block; font-size: 19px; color: var(--ink); font-weight: 800; }
.stat span { font-size: 12px; color: var(--muted); }

/* ── 미리보기 ─────────────────────────────────────────── */

.preview-frame {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 26px 24px; max-height: 640px; overflow-y: auto;
}
.preview-frame.mobile { max-width: 420px; margin: 0 auto; }
.preview-frame img { max-width: 100%; }

pre.plain {
  white-space: pre-wrap; word-break: break-word; font-family: inherit;
  font-size: 14px; line-height: 1.85; margin: 0;
  max-height: 640px; overflow-y: auto;
}

.tag-line {
  font-size: 14px; line-height: 2; color: var(--green-dark); font-weight: 600;
  word-break: keep-all;
}

/* ── 이미지 ───────────────────────────────────────────── */

.imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.imgs figure { margin: 0; }
.imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.imgs figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.imgs .slot-empty {
  aspect-ratio: 4/3; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 12px; background: #fafbfc;
}

/* ── 표 ───────────────────────────────────────────────── */

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td {
  padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left;
}
table.list th { font-size: 12px; color: var(--muted); font-weight: 700; }
table.list td.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; background: var(--bg); color: var(--muted);
  white-space: nowrap;   /* 좁은 칸에서 "안 보/냄"처럼 꺾이지 않게 */
}
.badge.g { background: #e8f9ef; color: var(--green-dark); }
.badge.w { background: #fff4e0; color: #8a6100; }
.badge.r { background: #ffecec; color: #a12222; }

/* ── 토스트 ───────────────────────────────────────────── */

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 99px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .22s;
  z-index: 200; box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 로그인 ───────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-box { width: 100%; max-width: 360px; }
.login-box .card { padding: 30px; }
.login-box h1 { font-size: 19px; margin: 0 0 6px; color: var(--ink); }
.login-box p { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 30px;
  text-align: center; color: var(--muted); cursor: pointer; background: #fafbfc;
}
.dropzone.hover { border-color: var(--green); background: #f2fdf6; color: var(--green-dark); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 82px; height: 82px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.thumbs .no {
  position: absolute; left: 4px; top: 4px; background: rgba(0, 0, 0, .65); color: #fff;
  font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px;
}

/* 미리보기에만 네이버 계열 폰트를 입힌다.
   붙여넣기 HTML에는 font-family를 넣지 않는다 — 값에 한글이 섞이고 문단마다
   반복돼 페이로드가 3배가 되며, 스마트에디터가 붙여넣기를 거부하는 원인이 될 수 있다.
   에디터는 어차피 자기 폰트 설정을 적용한다. */
.preview-frame {
  font-family: '나눔고딕', NanumGothic, 'Malgun Gothic', '맑은 고딕', sans-serif;
}
.preview-frame p { margin: 0 0 22px; line-height: 1.9; }
.preview-frame p[style*="19px"] { margin: 36px 0 16px; line-height: 1.6; }
.preview-frame p[style*="03c75a"] {
  border-left: 3px solid var(--green); padding-left: 14px; margin: 26px 0; line-height: 1.8;
}
.preview-frame hr { margin: 32px 0; }


/* ── 글감 패널 (워드프레스 글쓰기) ───────────────────── */
.topic-cat { border-top: 1px solid var(--line); padding: 10px 0; }
.topic-cat:first-of-type { border-top: none; }
.topic-cat > summary {
  cursor: pointer; list-style: none; display: flex;
  align-items: baseline; gap: 8px; padding: 4px 0;
}
.topic-cat > summary::-webkit-details-marker { display: none; }
.topic-cat > summary::before {
  content: '▸'; color: var(--muted); font-size: 11px; transition: transform .15s;
}
.topic-cat[open] > summary::before { transform: rotate(90deg); }
.tc-name  { font-weight: 800; font-size: 14px; color: var(--ink); }
.tc-blurb { font-size: 12px; color: var(--muted); flex: 1; }
.tc-count {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--bg); border-radius: 10px; padding: 2px 8px;
}
.topic-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; }
.topic-item {
  text-align: left; justify-content: flex-start;   /* 기본 button이 가운데 정렬 flex라서 */
  width: 100%; padding: 8px 10px; border-radius: 8px;
  background: var(--bg); border: 1px solid transparent; color: var(--body);
  font-size: 13px; line-height: 1.45; cursor: pointer;
}
/* :not(:disabled)까지 붙여야 기본 button:hover:not(:disabled)의 초록 배경을 이긴다 */
.topic-item:hover:not(:disabled) { border-color: var(--wp); background: #fff; color: var(--ink); }
.regen-btn { width: 100%; }

/* 보안 뉴스 이슈 — 구분 색은 브리핑 메일의 카드 색 띠와 같다 */
.issue-row { display: flex; gap: 4px; align-items: stretch; }
.issue-item {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  gap: 3px; flex: 1; min-width: 0; font-weight: 400;
}
.issue-item.used { opacity: .62; }
.issue-kind {
  align-self: flex-start; font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 10px; color: #fff;
}
.issue-kind.k-breach { background: #c0392b; }
.issue-kind.k-vuln   { background: #d97706; }
.issue-kind.k-policy { background: #2f855a; }
.issue-kind.k-threat { background: #6b46c1; }
.issue-title { overflow-wrap: anywhere; }
.issue-meta  { font-size: 11px; color: var(--muted); }
.issue-del {
  flex: none; width: 28px; padding: 0; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  font-size: 16px; cursor: pointer;
}
.issue-del:hover:not(:disabled) { border-color: var(--line); color: var(--ink); background: #fff; }
.issue-open, .trend-refresh { width: 100%; }
.row-btns .issue-open { width: auto; flex: 1; }
.issue-sync { margin: 2px 0 8px; font-size: 12px; }
.trend-src { font-size: 11px; font-weight: 700; color: var(--green-dark); }
.issue-paste { margin: 8px 0 12px; }
.issue-paste textarea { min-height: 140px; }
.row-btns { display: flex; gap: 8px; }
.issue-chip {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 8px 10px; border-radius: 8px; background: var(--bg);
  border-left: 3px solid var(--wp); font-size: 13px;
}
.ic-label { font-size: 11px; font-weight: 700; color: var(--wp-dark); flex: none; }
.ic-title { flex: 1; min-width: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ── 결과 화면 머리 (워드프레스) ──────────────────────────
   예전에는 이 클래스들에 스타일이 없어서 점수가 제목 아래에 "85 SEO"로
   혼자 떠 있었다. */
.result-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 18px;
}
.rh-main { min-width: 0; }
.rh-main .page-title { overflow-wrap: anywhere; }
.meta-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; background: #fff; border: 1px solid var(--line);
  color: var(--body);
}
.chip.ok { background: #e8f9ef; border-color: #c9f0d9; color: var(--green-dark); }
.chip.plain { background: transparent; border-color: transparent; color: var(--muted); font-weight: 400; }
.score-badge {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 84px; height: 84px; border-radius: 16px; background: #fff;
  border: 1px solid var(--line); line-height: 1.1;
}
.score-badge b { font-size: 30px; font-weight: 800; }
.score-badge span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.score-badge.good b { color: var(--green-dark); }
.score-badge.mid b  { color: var(--warn); }
.score-badge.low b  { color: var(--bad); }
.issue-basis {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 0 0 18px; padding: 10px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--wp);
  font-size: 13px;
}
.ib-label { font-size: 11px; font-weight: 700; color: var(--wp-dark); }
.ib-title { color: var(--ink); font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ib-sources { color: var(--muted); font-size: 12px; }
@media (max-width: 600px) {
  .result-head { flex-direction: column-reverse; }
  .score-badge { width: auto; height: auto; flex-direction: row; gap: 8px; padding: 6px 12px; }
  .score-badge b { font-size: 20px; }
  .score-badge span { margin: 0; }
}

/* ── 워드프레스 미리보기 ──────────────────────────────────
   지금까지 스타일이 없어 맨 HTML로 보였다. 발행된 글과 같은 리듬으로 그려야
   "답답한지"를 여기서 판단할 수 있다. 값은 워드프레스 추가 CSS와 맞춰 둔다.
   한글은 영문보다 글자가 빽빽해서 행간 1.6 이하면 답답하게 읽힌다. */
.wp-preview {
  color: var(--body);
  font-size: 16px;
  line-height: 1.9;
  word-break: keep-all;        /* 한글은 어절 단위로 끊어야 읽기 편하다 */
}
.wp-preview > *:first-child { margin-top: 0; }

.wp-preview p { margin: 0 0 1.5em; }

.wp-preview h2 {
  font-size: 1.4em; line-height: 1.4; color: var(--ink);
  margin: 2.4em 0 .8em; padding-top: .9em;
  border-top: 1px solid var(--line);   /* 섹션이 바뀌는 지점을 눈에 보이게 */
}
.wp-preview h3 {
  font-size: 1.12em; line-height: 1.45; color: var(--ink);
  margin: 1.9em 0 .6em;
}

.wp-preview ul,
.wp-preview ol { margin: 0 0 1.5em; padding-left: 1.3em; }
.wp-preview li { margin-bottom: .55em; }
.wp-preview li:last-child { margin-bottom: 0; }

.wp-preview blockquote {
  margin: 1.8em 0; padding: .2em 0 .2em 1.1em;
  border-left: 3px solid var(--wp);
  color: var(--ink); font-style: normal;
}
.wp-preview blockquote p:last-child { margin-bottom: 0; }

/* 표가 이 블로그의 차별점이다. 좁은 화면에서 깨지지 않게 가로 스크롤을 준다. */
.wp-preview table {
  width: 100%; margin: 1.8em 0;
  border-collapse: collapse; font-size: .94em;
}
.wp-preview th,
.wp-preview td {
  border: 1px solid var(--line);
  padding: .7em .8em; text-align: left; vertical-align: top;
}
.wp-preview th { background: var(--bg); color: var(--ink); font-weight: 700; }
.wp-preview tbody tr:nth-child(even) td { background: #fafbfc; }

.wp-preview strong { color: var(--ink); }
.wp-preview a { color: var(--wp); }

/* ── 핫이슈 · 카드뉴스 ────────────────────────────────── */
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cn-item { display: block; color: var(--ink); text-decoration: none; }
.cn-item:hover { text-decoration: none; }
.cn-item:hover .cn-thumb { outline: 2px solid var(--hi); }
.cn-thumb {
  aspect-ratio: 9 / 16; border-radius: 10px; background: #1b2433 center / cover no-repeat;
  margin-bottom: 6px;
}
.cn-title { font-size: 13px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cn-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.card h2.flex { display: flex; align-items: center; gap: 8px; }

/* 상세 */
.cd-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cd-layout { grid-template-columns: 1fr; } }
.cd-stage { position: relative; width: 100%; overflow: hidden; border-radius: 14px; background: #000; }
.cd-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cd-thumb { width: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  background: #000; cursor: pointer; }
.cd-thumb.on { border-color: var(--hi); }
.cd-thumb .stage { position: relative; overflow: hidden; pointer-events: none; }
.cd-caption { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px 14px;
  font-size: 14px; max-height: 280px; overflow: auto; }

/* 쇼핑쇼츠 */
.sh-src { padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.sh-src .hint { color: var(--muted); }
.sh-boxrow { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 260px; gap: 14px;
  padding: 12px 0; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .sh-boxrow { grid-template-columns: 1fr; } }
.sh-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.sh-empty { aspect-ratio: 9/16; border: 1px dashed var(--line); border-radius: 10px; display: flex;
  align-items: center; justify-content: center; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.sh-radios { display: flex; flex-direction: column; gap: 8px; }
.sh-radio { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.sh-radio small { display: block; color: var(--muted); font-size: 11.5px; }
.sh-striprow { padding: 10px 0; border-top: 1px solid var(--line); }
.sh-strip { position: relative; overflow-x: auto; overflow-y: hidden; border-radius: 10px; background: #0B1220;
  cursor: col-resize; touch-action: none; user-select: none; }
.sh-cut { padding: 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sh-num { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.sh-issue { font-size: 12px; color: var(--bad); }
.sh-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 150; display: flex;
  align-items: center; justify-content: center; padding: 20px; }
.sh-player { background: #fff; border-radius: 14px; padding: 16px; width: min(420px, 100%); }

/* 동물쇼츠 */
.an-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 700px) { .an-grid { grid-template-columns: 1fr; } }
.an-vid { display: flex; gap: 12px; align-items: center; margin-top: 12px; padding: 10px;
  border: 1px solid var(--line); border-radius: 10px; }
.an-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.an-time { flex: none; width: 82px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 리믹스 */
.rx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.rx-shot { position: relative; margin: 0; }
.rx-shot img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 8px; display: block; background: var(--bg); }
.rx-num { position: absolute; top: 6px; left: 6px; background: var(--hi); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 99px; padding: 1px 7px; }
.rx-btns { display: flex; gap: 4px; margin-top: 4px; }
.rx-btns button { flex: 1; padding: 3px 0; }

/* 성과 */
.pf-f { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); }
.pf-pre { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 12.5px;
  margin: 0; max-height: 260px; overflow: auto; font-family: inherit; }

/* 카드 사진 검색 */
.cd-search { width: min(860px, 100%); max-height: 90vh; overflow: auto; }
.cd-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 10px 0; }
.cd-pick { display: block; width: 100%; padding: 0; background: #fff !important; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  color: var(--ink); text-align: left; cursor: pointer; }
.cd-pick:hover { outline: 2px solid var(--hi); }
.cd-pick img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: var(--bg); }
.cd-pick small { display: block; padding: 4px 6px; font-size: 10.5px; color: var(--muted); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }

/* 비용 */
.usage-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.usage-table th, .usage-table td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.usage-table th { font-size: 12px; color: var(--muted); font-weight: 700; border-top: none; }
.usage-table .chip { margin: 0 4px 4px 0; display: inline-block; }
.cd-rewrite { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cd-remake-result { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin: 10px 0; }
.cd-remake-result figure { margin: 0; width: 160px; }
.cd-remake-result img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 8px; display: block; background: var(--bg); }
.cd-remake-result figcaption { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
