/* VIRUSMACHINE — 바이럴 캠페인 자동화 · TEAM INSPIRAIN 톤앤매너 (라이트/다크) */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface2: #f8f9fa;   /* 테이블 헤더/합계 */
  --surface3: #fafbfc;   /* hover */
  --ink: #1f2328;
  --muted: #6d6e6f;
  --faint: #9b9ca0;
  --line: #e6e7eb;
  --line-soft: #f0f1f3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 14px rgba(0, 0, 0, .05);
  --accent: #2eb88a;
  --accent-deep: #1f7a4d;
  --accent-soft: #e7f6ef;
  --accent-line: #cdeadd;
  --blue: #4573d2;
  --blue-soft: #eaf0fb;
  --blue-line: #d5e0f5;
  --orange: #cf8a2c;
  --orange-ink: #9a6314;
  --orange-soft: #f9efdc;
  --orange-line: #eddfc0;
  --green: #1f7a4d;
  --green-soft: #e7f6ef;
  --purple: #7b68ee;
  --purple-ink: #5b48d6;
  --purple-soft: #efeafe;
  --purple-line: #ded7f9;
  --red: #d9534f;
  --red-soft: #fdecec;
  --red-line: #f3cccb;
  /* 페이즈 컬러 (라이트: CVD 검증 통과) */
  --ph-branding: #4573d2;
  --ph-preorder: #cf8a2c;
  --ph-launch: #1f7a4d;
  --ph-retention: #7b68ee;
  --ph-branding-ink: #4573d2;
  --ph-preorder-ink: #9a6314;
  --ph-launch-ink: #1f7a4d;
  --ph-retention-ink: #5b48d6;
  --wknd: #fafafa;
  --wknd-ink: #c9cacd;
}
:root[data-theme="dark"] {
  --bg: #15171c;
  --surface: #1d2026;
  --surface2: #23262d;
  --surface3: #262a32;
  --ink: #e8eaed;
  --muted: #a6abb3;
  --faint: #71767f;
  --line: #2c313b;
  --line-soft: #262a32;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --accent: #2eb88a;
  --accent-deep: #2eb88a;
  --accent-soft: #17352a;
  --accent-line: #245c44;
  --blue: #8fadf0;
  --blue-soft: #222c43;
  --blue-line: #33436b;
  --orange: #eec272;
  --orange-ink: #eec272;
  --orange-soft: #362c17;
  --orange-line: #5c4a24;
  --green: #5ccfc4;
  --green-soft: #14333a;
  --purple: #c9b3ff;
  --purple-ink: #c9b3ff;
  --purple-soft: #2b2547;
  --purple-line: #443a6e;
  --red: #f08a8a;
  --red-soft: #3a2224;
  --red-line: #6b3a3c;
  /* 페이즈 컬러 (다크: CVD 검증 — 라벨 병기 필수) */
  --ph-branding: #8fadf0;
  --ph-preorder: #eec272;
  --ph-launch: #5ccfc4;
  --ph-retention: #c9b3ff;
  --ph-branding-ink: #8fadf0;
  --ph-preorder-ink: #eec272;
  --ph-launch-ink: #5ccfc4;
  --ph-retention-ink: #c9b3ff;
  --wknd: #1a1d22;
  --wknd-ink: #4a4f58;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; color: inherit; }

/* ── 레이아웃 ─────────────────────────── */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #2eb88a, #4573d2);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff; flex-shrink: 0;
}
.brand b { font-size: 15px; letter-spacing: .3px; }
.brand small { display: block; color: var(--faint); font-size: 11px; font-weight: 400; }

.side-label { font-size: 11px; color: var(--faint); font-weight: 700; padding: 12px 8px 4px; letter-spacing: .4px; }
.camp-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; font-size: 13px; color: var(--ink);
}
.camp-item:hover { background: var(--bg); }
.camp-item.active { background: var(--accent-soft); border-color: var(--accent-line); font-weight: 600; }
.camp-item .sub { font-size: 11px; color: var(--faint); font-weight: 400; }
.btn-new {
  margin-top: 8px; padding: 10px; border-radius: 9px;
  border: 1px dashed var(--accent-line); background: transparent;
  color: var(--accent-deep); font-weight: 600; font-size: 13px;
}
.btn-new:hover { background: var(--accent-soft); }

.main { flex: 1; padding: 24px 28px 60px; min-width: 0; }
.container { max-width: 1200px; margin: 0 auto; }

/* ── 헤더/탭 ─────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 21px; font-weight: 800; }
.page-head .meta { color: var(--muted); font-size: 13px; margin-top: 3px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto;
  position: sticky; top: 0; z-index: 30; background: var(--bg); padding-top: 6px;
}
.tab {
  padding: 9px 14px; border: none; background: none; font-size: 13.5px;
  color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-deep); border-bottom-color: var(--accent); font-weight: 700; }

/* ── 카드/그리드 ─────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.card h2 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.card h2 .badge { font-weight: 500; }
.card h3 { font-size: 13.5px; font-weight: 700; margin: 14px 0 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── 스탯 타일 ───────────────────────── */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat .v { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.stat .v small { font-size: 12px; color: var(--faint); font-weight: 500; margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* ── 페이즈 타임라인 바 ──────────────── */
.phase-bar-wrap { margin: 2px 0 16px; }
.phase-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.phase-bar .seg {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; white-space: nowrap;
}
:root[data-theme="dark"] .phase-bar .seg { color: #15171c; }
.phase-bar .seg.ph-branding  { background: var(--ph-branding); }
.phase-bar .seg.ph-preorder  { background: var(--ph-preorder); }
.phase-bar .seg.ph-launch    { background: var(--ph-launch); }
.phase-bar .seg.ph-retention { background: var(--ph-retention); }
.phase-bar-legend { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 3px; }

/* ── 배지/칩 ─────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.badge.ph-branding  { background: var(--blue-soft);   color: var(--ph-branding-ink);  border-color: var(--blue-line); }
.badge.ph-preorder  { background: var(--orange-soft); color: var(--ph-preorder-ink);  border-color: var(--orange-line); }
.badge.ph-launch    { background: var(--green-soft);  color: var(--ph-launch-ink);    border-color: var(--accent-line); }
.badge.ph-retention { background: var(--purple-soft); color: var(--ph-retention-ink); border-color: var(--purple-line); }
.badge.ok   { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }
.badge.warn { background: var(--orange-soft); color: var(--orange-ink); border-color: var(--orange-line); }
.badge.info { background: var(--blue-soft);   color: var(--blue); border-color: var(--blue-line); }
.tag {
  display: inline-block; font-size: 11.5px; color: var(--blue);
  background: var(--blue-soft); border-radius: 6px; padding: 1px 7px; margin: 1px 2px 1px 0;
}

/* ── 버튼 ────────────────────────────── */
.btn {
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #10241b; }
.btn.primary:hover { filter: brightness(.93); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }

/* ── 테이블 ──────────────────────────── */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 12.5px; background: var(--surface); }
.tbl th {
  background: var(--surface2); color: var(--muted); font-weight: 600; font-size: 11.5px;
  padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; white-space: nowrap;
}
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--surface3); }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .group-row td { background: var(--surface2); font-weight: 700; }

/* ── 플랜 캘린더 ─────────────────────── */
.cal-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.cal { border-collapse: collapse; font-size: 11px; }
.cal th, .cal td { border: 1px solid var(--line-soft); padding: 3px 5px; text-align: center; white-space: nowrap; }
.cal th { background: var(--surface2); color: var(--muted); font-weight: 600; }
.cal th.mon { background: var(--blue-soft); color: var(--blue); }
.cal td.side { text-align: left; background: var(--surface); position: sticky; z-index: 2; white-space: normal; font-size: 12px; line-height: 1.45; }
.cal th.side { position: sticky; z-index: 4; background: var(--surface2); white-space: normal; }
.cal .side-last { box-shadow: 1px 0 0 var(--line); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-bottom: 10px; }
.cal-legend-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cal td.qty { font-weight: 700; background: var(--surface2); }
.cal td.wknd { background: var(--wknd); color: var(--wknd-ink); }
.cal td.cnt { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 26px; }
.cal td.cnt.ph-branding  { background: var(--blue-soft);   color: var(--ph-branding-ink); }
.cal td.cnt.ph-preorder  { background: var(--orange-soft); color: var(--ph-preorder-ink); }
.cal td.cnt.ph-launch    { background: var(--green-soft);  color: var(--ph-launch-ink); }
.cal td.cnt.ph-retention { background: var(--purple-soft); color: var(--ph-retention-ink); }
.cal tr.total td.cnt { background: var(--surface2); color: var(--ink); }
/* 주요 이슈일(마일스톤) — 날짜 헤더 강조 + 세로 스트라이프 */
.cal th.milestone { background: var(--red-soft); color: var(--red); font-weight: 800; }
.cal .ms-col { box-shadow: inset 2px 0 0 0 var(--red-line); }
.cal th.milestone.ms-col { box-shadow: inset 2px 0 0 0 var(--red); }
.badge.ms-chip { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }

/* ── 진행률 바 ───────────────────────── */
.prog { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.prog > i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.prog > i.blue { background: var(--blue); }
.prog-row { margin-bottom: 12px; }
.prog-row .lbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.prog-row .lbl b { color: var(--ink); }

/* ── 폼 ──────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 184, 138, .15);
}
.field .hint { font-size: 11px; color: var(--faint); margin-top: 3px; }
.chk-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chk-chip { position: relative; }
.chk-chip input { position: absolute; opacity: 0; }
.chk-chip span {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
}
.chk-chip input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); font-weight: 600; }

/* ── 전략 시트 ───────────────────────── */
.sec-title {
  font-size: 13px; font-weight: 800; letter-spacing: .5px; color: var(--accent-deep);
  display: flex; align-items: center; gap: 8px; margin: 26px 0 10px;
}
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
ul.clean { list-style: none; }
ul.clean li { padding-left: 16px; position: relative; margin-bottom: 5px; }
ul.clean li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 900; }
.exec-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.exec-block .bh { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-weight: 700; font-size: 13px; }

/* 게임정의 인용구 */
.quote {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: 14.5px; font-weight: 600; line-height: 1.6;
}
/* 특성 카드 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.feature-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--surface); }
.feature-card .fi { font-size: 20px; margin-bottom: 6px; }
.feature-card b { display: block; font-size: 13px; margin-bottom: 3px; }
.feature-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }
/* 채널 카드 */
.chan-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; margin-bottom: 8px; }
.chan-card .ch { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.chan-card p { font-size: 12px; color: var(--muted); }
/* 아코디언 */
details.acc { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--surface); overflow: hidden; }
details.acc > summary {
  list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 13.5px;
  display: flex; align-items: center; gap: 8px; user-select: none;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "▾"; margin-left: auto; color: var(--faint); transition: transform .15s; }
details.acc[open] > summary::after { transform: rotate(180deg); }
details.acc > summary:hover { background: var(--surface3); }
details.acc .acc-body { padding: 4px 16px 14px; border-top: 1px solid var(--line-soft); }
/* 이미지 */
.hero-banner {
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; position: relative;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-banner img { width: 100%; height: 240px; object-fit: cover; display: block; }
.hero-banner .hb-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-size: 12.5px; font-weight: 600;
}
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.img-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.img-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.img-card .ic-cap { padding: 6px 9px; font-size: 11.5px; color: var(--muted); }
.img-card .ic-actions { display: flex; gap: 4px; padding: 0 6px 6px; flex-wrap: wrap; }

/* ── 인라인 편집 입력 (관리자 표/카드 등 .field 밖 요소) ── */
.tbl input, .tbl select, .tbl textarea,
.exec-block input, .exec-block select, .exec-block textarea,
.card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.card select, .card textarea,
.acc-body input:not([type="range"]):not([type="file"]), .acc-body select, .acc-body textarea {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 5px 8px; font-family: inherit; font-size: 12.5px;
}
.tbl input:focus, .tbl select:focus, .exec-block input:focus, .exec-block textarea:focus,
.card input:focus, .card select:focus, .card textarea:focus,
.acc-body input:focus, .acc-body select:focus, .acc-body textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 184, 138, .15);
}
:root[data-theme="dark"] select option { background: var(--surface); color: var(--ink); }

/* ── 게시글 작업대 ───────────────────── */
.date-strip { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; }
.date-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); border-radius: 9px; padding: 5px 9px; font-size: 11.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; line-height: 1.3; min-width: 52px;
}
.date-chip small { font-size: 10px; color: var(--faint); font-weight: 500; }
.date-chip:hover { background: var(--bg); color: var(--ink); }
.date-chip.done { border-color: var(--accent-line); color: var(--accent-deep); }
.date-chip.done small { color: var(--accent-deep); }
.date-chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

.post-card.confirmed { border-left: 3px solid var(--accent); }
.brief {
  background: var(--surface2); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; margin-bottom: 10px; font-size: 12px; line-height: 1.7;
}
.brief b { display: inline-block; min-width: 62px; color: var(--muted); font-weight: 600; }
input.post-title {
  width: 100%; font-size: 14.5px; font-weight: 700; margin-bottom: 8px;
  padding: 9px 11px !important; border-radius: 9px !important;
}
textarea.post-body {
  width: 100%; font-size: 13px; line-height: 1.75; resize: vertical;
  padding: 11px !important; border-radius: 9px !important; min-height: 90px;
}

/* ── 캠페인 하이라이트 타일 ──────────── */
.hl-tile {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 12px 14px; background: var(--surface);
}
.hl-tile .hl-k { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.hl-tile .hl-v { font-size: 21px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; }
.hl-tile .hl-v small { font-size: 11.5px; color: var(--faint); font-weight: 500; margin-left: 4px; }
.hl-tile .hl-n { font-size: 12.5px; font-weight: 700; margin-top: 5px; word-break: keep-all; }
.hl-tile .hl-s { font-size: 11px; color: var(--faint); margin-top: 2px; }

/* ── 호버 툴팁 ───────────────────────── */
.vm-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--ink); color: var(--surface);
  border-radius: 8px; padding: 7px 11px; font-size: 11.5px; line-height: 1.55;
  max-width: 320px; white-space: pre-line; box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  opacity: 0; transition: opacity .1s;
}
.vm-tip.on { opacity: 1; }
[data-tip] { cursor: help; }

/* ── 차트 ────────────────────────────── */
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-note { font-size: 11px; color: var(--faint); margin-top: 6px; }
svg .c-bar { fill: var(--blue); }
svg .c-lbl { fill: var(--ink); font-weight: 600; }
svg .c-axis { fill: var(--faint); }
svg .c-line { stroke: var(--line); }
svg .c-name { fill: var(--muted); }

/* ── 모달 ────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0; background: rgba(10, 14, 18, .55);
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50;
  overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: 14px; box-shadow: 0 8px 40px rgba(0,0,0,.35);
  width: 100%; max-width: 860px; padding: 24px 26px; border: 1px solid var(--line);
}
.modal h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ── 리포트 게이트 (광고주용) ─────────── */
.gate {
  position: fixed; inset: 0; background: var(--bg); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 36px 34px; max-width: 420px; width: 100%; text-align: center;
}
.gate-card .logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #2eb88a, #4573d2);
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff;
}
.gate-card h1 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.gate-card p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.gate-card input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; margin-bottom: 10px; font-family: inherit; background: var(--surface); color: var(--ink);
}
.gate-card .err { color: var(--red); font-size: 12.5px; margin-top: 8px; display: none; }

/* ── 인쇄 ────────────────────────────── */
@media print {
  .sidebar, .head-actions, .tabs, .no-print { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
  .card, .stat { box-shadow: none; break-inside: avoid; }
  .print-all section.tabpane { display: block !important; }
  .cal-wrap, .tbl-wrap { overflow: visible; }
  details.acc .acc-body { display: block !important; }
}
.empty { text-align: center; color: var(--faint); padding: 40px 0; font-size: 13px; }

/* ── 🚀 발행 워크스테이션 ─────────────── */
.pub-row { margin-bottom: 8px; }
.pub-field label {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px;
}
.pub-copy {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px;
}
.pub-copy code, .pub-copy pre {
  flex: 1; margin: 0; font-family: inherit; font-size: 13px; line-height: 1.75;
  color: var(--ink); white-space: pre-wrap; word-break: break-word; background: none; border: 0; padding: 0;
}
.pub-copy code { font-weight: 600; }
.pub-copy .btn { flex: 0 0 auto; }
input.pub-url {
  flex: 1 1 260px; min-width: 200px; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 12.5px; background: var(--surface); color: var(--ink);
}
input.pub-url:focus { outline: none; border-color: var(--accent); }
.metrics-log {
  max-height: 260px; overflow-y: auto; font-size: 12px; line-height: 1.7;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; margin-top: 10px;
}
.metrics-log .fail { color: var(--orange-ink); }
input.pool-line {
  display: block; width: 100%; margin-bottom: 4px; border: 1px solid var(--line);
  border-radius: 7px; padding: 6px 9px; font-size: 12.5px;
  background: var(--surface); color: var(--ink);
}
input.pool-line:focus { outline: none; border-color: var(--accent); }

/* ── 💰 ROI 분석 ─────────────────────── */
.tbl th.r, .tbl td.r { text-align: right; white-space: nowrap; }
.tbl tfoot td {
  background: var(--surface2); border-top: 2px solid var(--line);
  border-bottom: none; font-weight: 600;
}
/* 커뮤니티 DB — 글쓰기 URL 등록 버튼 (등록되면 초록으로 구분) */
.url-btn { min-width: 34px; padding: 4px 8px; }
.url-btn.on { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
