@charset "utf-8";

/* =========================================================
   analyze.css
   features/analyze/ 페이지 공통 CSS 변수 + UI 컴포넌트
   ========================================================= */

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── 테마 변수 ── */
:root {
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface2: #f5f7fa;
    --border: rgba(0,0,0,0.08);
    --pink: #e91e8c;
    --pink2: #ff6bb5;
    --purple: #9b59e8;
    --blue: #2d8fd5;
    --green: #00a855;
    --orange: #e07800;
    --yellow: #d48000;
    --red: #e53935;
    --text: #1a1a2e;
    --text2: #505070;
    --text3: #888899;
    --gold: #c8970a;
    --silver: #7a8a90;
    --bronze: #a06030;
    --row-hover: rgba(0,0,0,0.03);
    --row-border: rgba(0,0,0,0.04);
    --fw-600: 600;
}

html[data-theme="dark"] {
    --bg: #0a0a14;
    --surface: #13131f;
    --surface2: #1c1c2e;
    --border: rgba(255,255,255,0.07);
    --blue: #4facfe;
    --green: #00e676;
    --orange: #ff9800;
    --yellow: #ffb74d;
    --red: #ff5252;
    --text: #f0f0f8;
    --text2: #a0a0b8;
    --text3: #606078;
    --gold: #ffd54f;
    --silver: #cfd8dc;
    --bronze: #d49060;
    --row-hover: rgba(255,255,255,0.03);
    --row-border: rgba(255,255,255,0.04);
}

/* ── 유틸 ── */
.place-input-section-print { color: var(--text2); }
.place-input-section-print:hover { color: var(--text); }

/* ── 로딩 ── */
#loadingSection { display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.loading-spinner { display: block; width: 48px; height: 48px; border: 4px solid var(--row-hover); border-top-color: var(--blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
.loading-text { margin-top: 16px; color: var(--text2); }

/* ── 섹션 공통 ── */
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-title i { color: var(--blue); }

/* ── 안내 박스 ── */
.place-input-notice-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; width: 100%; }
.place-input-notice { flex: 1 1 auto; min-width: 0; background: rgba(79,172,254,0.08); border: 1px solid rgba(79,172,254,0.2); border-radius: 8px; padding: 14px 18px; box-sizing: border-box; }
.place-input-notice-wrap .place-input-section-print { flex-shrink: 0; }
.place-input-notice p { margin: 0; color: var(--text2); font-size: 0.9rem; line-height: 1.6; }
.place-input-notice i { color: var(--blue); margin-right: 8px; }

/* ── 통합검색 순위 조회 ── */
.blog-page--int-rank #saveResultBtn {
	padding: 14px 20px;
	border-radius: var(--rp-radius-sm);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.blog-page--int-rank #saveResultBtn:hover { opacity: 0.92; }
.blog-page--int-rank #saveResultBtn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── 상태 배너 ── */
.status-banner-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; }
.status-banner { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 12px; font-size: 0.95rem; font-weight: 600; flex: 1 1 auto; min-width: 0; }
.status-banner-wrap #naverLinkWrap { flex-shrink: 0; margin-left: auto; }
.status-banner.status-found { background: linear-gradient(135deg, rgba(0,230,118,.15), rgba(0,200,83,.08)); border: 1px solid rgba(0,230,118,.35); color: var(--green); }
.status-banner.status-miss { background: linear-gradient(135deg, rgba(255,82,82,.15), rgba(255,82,82,.08)); border: 1px solid rgba(255,82,82,.3); color: #ff7070; }
.status-banner .status-icon { font-size: 1.2rem; }
.status-banner strong { color: var(--text); }
.naver-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(3,199,90,.15); border: 1px solid rgba(3,199,90,.35); border-radius: 20px; color: #03c75a; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
.naver-link:hover { background: rgba(3,199,90,.25); }

/* ── 카드/테이블 공통 ── */
.section-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 0.88rem; font-weight: 700; color: var(--text2); }
.card-head-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--purple)); flex-shrink: 0; }
.table-wrap { overflow-x: auto; }

/* ── 저장내역 모달 ── */
.history-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; }
.history-modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; width: 90%; max-width: 900px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.history-modal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.history-modal-header h3 { margin: 0; font-size: 18px; color: var(--text); }
.history-modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text3); line-height: 1; }
.history-modal-close:hover { color: var(--text); }
.history-modal-body { overflow-y: auto; padding: 16px 24px; }
.history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.history-table th { background: var(--surface2); padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.history-table td { padding: 10px 12px; border-bottom: 1px solid var(--row-border); color: var(--text2); }
.history-table tbody tr:hover td { background: var(--row-hover); cursor: pointer; }
.history-table .rank-found { color: var(--green); font-weight: 700; }
.history-table .rank-miss { color: var(--red); font-weight: 600; }
.history-delete-btn { background: var(--red); color: #fff; border: none; border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.history-delete-btn:hover { opacity: 0.85; }

/* ── 달력형 모달 ── */
.h-type-badge { display: inline-block; font-size: .7rem; font-weight: 600; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.h-type-blog { background: rgba(79,172,254,.15); color: var(--blue); border: 1px solid rgba(79,172,254,.3); }
.h-type-cafe { background: rgba(255,152,0,.15); color: var(--orange); border: 1px solid rgba(255,152,0,.3); }
.h-type-influencer { background: rgba(155,89,232,.2); color: #c084fc; border: 1px solid rgba(155,89,232,.35); }
.h-day-box-wrapper { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.h-day-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; min-width: 100px; padding: 6px 8px; flex-shrink: 0; cursor: pointer; transition: border-color .2s; }
.h-day-box--empty { opacity: 0.55; border-style: dashed; }
.h-day-box:hover { border-color: var(--blue); }
.h-day-box-date { font-size: .72rem; color: var(--text3); margin-bottom: 4px; text-align: center; }
.h-day-box-section { font-size: .72rem; line-height: 1.5; color: var(--text2); white-space: nowrap; }
.h-day-box-section strong { color: var(--blue); font-weight: 700; }
.h-day-box-norank { color: var(--red); font-size: .78rem; font-weight: 600; }
.h-norank-text { color: var(--text3); font-weight: 400; }
.h-action-btn { background: var(--orange); border: none; border-radius: 4px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: #fff; margin-right: 4px; }
.h-refresh-btn { background: #1976d2; }
.h-refresh-btn:hover { background: #1565c0; }
.h-delete-btn { background: var(--red); }
.h-delete-btn:hover { opacity: 0.85; }

/* ── 슬롯 정보 ── */
.slot-info { display: flex; align-items: center; gap: 10px; margin-left: auto; margin-right: 12px; font-size: 13px; flex-wrap: wrap; }
.slot-plan { background: var(--purple); color: #fff; padding: 2px 10px; border-radius: 10px; font-weight: 600; font-size: 12px; }
.slot-count { color: var(--text2); }
.slot-count strong { color: var(--text); }

/* ==========================================================
   features/analyze/kc 전용 스타일 (원래 blog.css에 있었음, 여기로 통합
   — kc/index.php가 analyze.css를 이미 로드하므로 별도 파일 불필요)
   ========================================================= */
/* 키워드 챌린지 */
@scope (.blog-page--kc) {
:scope {
}

/* blog/analyze/kc/index 전용 스타일 */

/* PHP/JS 템플릿에서 추출한 프레젠테이션 규칙 */
.blog-analyze-kc-u001 { margin-bottom:0; }
.blog-analyze-kc-u002 { margin:0; }
.blog-analyze-kc-u003 { width:140px; }
.blog-analyze-kc-u004 { width:180px; }
.blog-analyze-kc-u005 { width:150px; }
.blog-analyze-kc-u006 { text-align:center;padding:20px; }

/* 인플루언서 키워드 챌린지 */

#report_cont .rpt_cont { display: none; margin-bottom: 24px; width: 100%; }
#report_cont #kcLandingHint.rpt_cont { display: block; }

/* 카드 내부 여백 (통계/상위권/목록 섹션이 너무 붙어보이지 않도록) */
#report_cont .stat-section,
#report_cont .kc-top-section,
#report_cont .section-table {
	padding: 20px;
}

.kc-header { background: linear-gradient(135deg, color-mix(in srgb, var(--purple) 18%, transparent), color-mix(in srgb, var(--blue) 12%, transparent)); border: 1px solid color-mix(in srgb, var(--purple) 30%, transparent); border-radius: var(--rp-radius); padding: 22px; box-shadow: var(--rp-shadow-sm); }
.kc-header-inner { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.kc-header-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--pink), var(--purple)); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: var(--rp-chrome-title); flex-shrink: 0; overflow: hidden; }
.kc-header-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kc-header-info h2 { margin: 0 0 4px; font-size: 1.35rem; color: var(--text); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kc-inf-type { font-size: 0.72rem; padding: 3px 10px; border-radius: 20px; background: rgba(155,89,232,.25); color: #c084fc; border: 1px solid rgba(155,89,232,.35); }
.kc-inf-id { font-size: 0.85rem; color: var(--text2); }
.kc-inf-id a { color: var(--blue); text-decoration: none; }
.kc-inf-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; font-size: 0.85rem; color: var(--text2); }
.kc-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kc-cat-chip { padding: 3px 10px; border-radius: 20px; font-size: 0.74rem; border: 1px solid var(--border); color: var(--text2); }
.kc-cat-chip.primary { background: linear-gradient(135deg, color-mix(in srgb, var(--pink) 18%, transparent), color-mix(in srgb, var(--purple) 18%, transparent)); color: var(--text); border-color: color-mix(in srgb, var(--pink) 35%, transparent); }

.kc-desc {
	margin-top: 10px;
	font-size: 0.88rem;
	line-height: 1.55;
	color: var(--text);
	word-break: break-word;
}

.kc-header-meta {
	flex: 1 1 200px;
	min-width: 0;
	align-self: flex-start;
	padding-top: 4px;
	font-size: 0.82rem;
	line-height: 1.45;
	color: var(--text);
	word-break: break-word;
}

.kc-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px; }
.kc-stat-grid > .kc-stat-card { min-width: 0; }
.kc-stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rp-radius); padding: 14px; box-shadow: var(--rp-shadow-sm); }
.kc-stat-label { font-size: 0.72rem; color: var(--text3); margin-bottom: 6px; }
.kc-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.kc-stat-sub { font-size: 0.72rem; color: var(--text3); margin-top: 4px; }
.val-green { color: var(--green); } .val-yellow { color: var(--yellow); } .val-accent { color: var(--blue); }

.kc-top-keywords { display: flex; flex-wrap: wrap; gap: 8px; }
.kc-top-kw-chip { padding: 6px 14px; border-radius: 20px; background: rgba(0,230,118,.12); border: 1px solid rgba(0,230,118,.35); color: var(--green); font-size: 0.82rem; font-weight: 600; }

.kc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.kc-toolbar.kc-toolbar-cat { align-items: center; }
.kc-toolbar.kc-toolbar-cat .kc-cat-toolbar-title {
	margin: 0;
	flex: 0 0 auto;
	font-size: 1.1rem;
	gap: 8px;
}
.kc-toolbar.kc-toolbar-cat .kc-cat-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
}
.kc-search-box { flex: 1 1 200px; min-width: 180px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 9px 16px; color: var(--text); outline: none; }
.kc-search-box:focus { border-color: var(--rp-primary); box-shadow: var(--rp-input-shadow); }
.kc-filter-btn { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); font-size: 0.78rem; cursor: pointer; }
.kc-filter-btn.active { background: linear-gradient(135deg, var(--pink), var(--purple)); color: var(--rp-chrome-title); border-color: transparent; }

#kcTable { width: 100%; border-collapse: collapse; min-width: 680px; }
#kcTable th { padding: 10px 14px; text-align: left; font-size: 0.75rem; color: var(--text3); background: var(--rp-surface-alt); border-bottom: 1px solid var(--border); cursor: pointer; }
#kcTable td { padding: 11px 14px; font-size: 0.84rem; color: var(--text2); border-bottom: 1px solid var(--rp-border); vertical-align: middle; }
#kcTable tbody tr:hover td { background: var(--rp-surface-hover); }
#kcTable tbody tr.hidden { display: none; }
#kcTable tr.grade-top td:first-child { box-shadow: inset 3px 0 0 var(--green); }
#kcTable tr.not-participated-row td:first-child { box-shadow: inset 3px 0 0 var(--text3); opacity: 0.88; }
.kc-keyword-hash { color: var(--pink); font-weight: 700; }
.kc-keyword-link { color: var(--text); text-decoration: none; }
.kc-keyword-link:hover { color: var(--pink); text-decoration: underline; }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.badge-gold { background: rgba(255,213,79,.22); color: var(--gold); border: 1px solid rgba(255,213,79,.45); }
.badge-silver { background: rgba(207,216,220,.18); color: var(--silver); border: 1px solid rgba(207,216,220,.35); }
.badge-bronze { background: rgba(212,144,96,.22); color: var(--bronze); border: 1px solid rgba(212,144,96,.45); }
.badge-default { background: rgba(79,172,254,.15); color: var(--blue); border: 1px solid rgba(79,172,254,.35); }
.badge-gray { background: var(--rp-surface-alt); color: var(--text3); border: 1px solid var(--border); }
.grade { display: inline-block; padding: 3px 10px; border-radius: 16px; font-size: 0.72rem; font-weight: 700; }
.grade-green { background: rgba(0,230,118,.15); color: var(--green); border: 1px solid rgba(0,230,118,.35); }
.grade-yellow { background: rgba(255,183,77,.12); color: var(--yellow); border: 1px solid rgba(255,183,77,.35); }
.grade-red { background: rgba(255,82,82,.12); color: #ff7070; border: 1px solid rgba(255,82,82,.35); }
.grade-gray { background: var(--rp-surface-alt); color: var(--text3); border: 1px solid var(--border); }
.grade-participated { background: linear-gradient(135deg, color-mix(in srgb, var(--pink) 22%, transparent), color-mix(in srgb, var(--purple) 22%, transparent)); color: var(--text); border: 1px solid color-mix(in srgb, var(--pink) 35%, transparent); }

.kc-detail-row { display: none; }
.kc-detail-row.open { display: table-row; }
.kc-detail-td { padding: 0 14px 12px !important; background: var(--rp-surface-alt); }
.kc-detail-inner { background: var(--surface2); border: 1px solid var(--border); border-radius: var(--rp-radius-sm); padding: 14px; font-size: 0.82rem; color: var(--text2); }
.kc-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.kc-detail-meta strong { color: var(--text); margin-right: 4px; }
.kc-link { color: var(--blue); }
.kc-top3-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.kc-top3-card { border: 1px solid var(--border); border-radius: var(--rp-radius-sm); padding: 8px 12px; display: flex; align-items: center; gap: 8px; background: var(--surface); min-width: 160px; }
.kc-inf-sentinel td { pointer-events: none; }

.kc-h-view-btn { background: linear-gradient(135deg, var(--purple), var(--pink)); font-weight: 600; }

#submitBtn {
	padding: 14px 24px;
	background: linear-gradient(135deg, #0ea5e9, var(--purple));
	border: none;
	border-radius: var(--rp-radius-sm);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
#submitBtn:hover { opacity: 0.92; }
#submitBtn:disabled { opacity: 0.55; cursor: not-allowed; }
#resetBtn {
	padding: 14px 20px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--rp-radius-sm);
	font-size: 15px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
#resetBtn:hover { border-color: var(--blue);}

.kc-empty { text-align: center; padding: 40px; color: var(--text3); }

@media (max-width: 720px) {
	#kcTable .kc-hide-mobile, #kcTable thead .kc-hide-mobile { display: none; }
}

/* 키첼 데모 배지 (?kc_demo=1) */
.example-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text2);
	background: var(--rp-surface-alt);
	border-radius: var(--rp-radius-sm);
	vertical-align: middle;
}

/* 테이블 아래 등급 범례 */
.kc-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 22px;
	margin-top: 18px;
	padding: 14px 18px;
	background: linear-gradient(180deg, var(--rp-surface-alt), var(--rp-surface-hover));
	border: 1px solid var(--border);
	border-radius: var(--rp-radius);
	box-sizing: border-box;
}
.kc-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}
.kc-legend .grade {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	flex-shrink: 0;
}
.kc-legend-desc {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text);
	letter-spacing: -0.01em;
}
.kc-legend-note {
	flex: 1 1 100%;
	font-size: 0.74rem;
	line-height: 1.45;
	color: var(--text);
}

@media (max-width: 560px) {
	.kc-legend {
		gap: 10px 14px;
		padding: 12px 14px;
	}
	.kc-legend-item {
		flex: 1 1 calc(50% - 8px);
		min-width: 140px;
	}
}
}

/* ==========================================================
   features/analyze/high-rank 전용 스타일 (키워드 상위노출 분석)
   ========================================================= */
.hr-wrap {
  margin: 0 auto;
  padding: 24px 0 48px;
  color: var(--rp-text);
  line-height: 1.55;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

.hr-top {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-card-lg, 16px);
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--rp-shadow-sm);
}
.hr-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hr-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rp-surface-alt);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-pill, 999px);
  padding: 8px 16px;
  font-size: 13px;
  color: var(--rp-text-muted);
  font-weight: 500;
}
.hr-stat-pill i {
  color: var(--rp-primary);
  font-size: 14px;
}
.hr-stat-pill strong {
  color: var(--rp-text);
  font-weight: 700;
  margin-left: 2px;
}

.insight-panel {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-card-lg, 16px);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--rp-shadow);
}
.insight-panel h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--rp-text);
}
.insight-panel h2 i {
  color: var(--rp-info);
}
.insight-sub {
  font-size: 13px;
  color: var(--rp-text-muted);
  margin-bottom: 18px;
}
.insight-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (max-width: 768px) {
  .insight-kpis { grid-template-columns: repeat(2, 1fr); }
}
.insight-kpi {
  background: var(--rp-surface-alt);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.insight-kpi span {
  display: block;
  font-size: 12px;
  color: var(--rp-text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.insight-kpi strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--rp-text);
  line-height: 1.1;
}
.insight-kpi strong small {
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-text-muted);
  margin-left: 2px;
}
.insight-kpi em {
  display: block;
  font-size: 11px;
  color: var(--rp-text-muted);
  margin-top: 4px;
  font-style: normal;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 14px;
}
@media (max-width: 900px) {
  .insight-grid { grid-template-columns: 1fr; }
}
.insight-chart-box {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
}
.insight-chart-sm {
  height: 200px;
  position: relative;
  margin-top: 12px;
  width: 100%;
  min-width: 0;
}
.insight-chart-md {
  height: 220px;
  position: relative;
  margin-top: 8px;
  width: 100%;
  min-width: 0;
}
.insight-chart-sm canvas,
.insight-chart-md canvas,
.kw-chart-canvas canvas {
  max-width: 100%;
}
.insight-avg-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.insight-avg-list div {
  background: var(--rp-surface-alt);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.insight-avg-list span {
  display: block;
  font-size: 11px;
  color: var(--rp-text-muted);
  margin-bottom: 2px;
}
.insight-avg-list strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--rp-text);
}
.insight-reaction-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.insight-react {
  background: linear-gradient(135deg, color-mix(in srgb, var(--rp-primary) 10%, var(--rp-surface)), var(--rp-surface));
  border: 1px solid color-mix(in srgb, var(--rp-primary) 30%, var(--rp-border));
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.insight-react span {
  display: block;
  font-size: 12px;
  color: var(--rp-text-muted);
}
.insight-react strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--rp-primary);
  margin: 4px 0;
}
.insight-react em {
  font-size: 11px;
  color: var(--rp-text-muted);
  font-style: normal;
}
.insight-tip {
  font-size: 13px;
  color: var(--rp-info);
  background: color-mix(in srgb, var(--rp-info) 14%, var(--rp-surface));
  border: 1px solid color-mix(in srgb, var(--rp-info) 28%, var(--rp-border));
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  line-height: 1.5;
}
.insight-topic-tags {
  margin-top: 12px;
}

.kw-panel {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-card-lg, 16px);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--rp-shadow);
}
.kw-panel h2 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.02em;
  color: var(--rp-text);
}
.kw-panel h2 i {
  color: var(--rp-accent);
}
.kw-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-width: 0;
}
@media (max-width: 900px) {
  .kw-chart-grid { grid-template-columns: 1fr; }
}
.kw-chart-box {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 14px;
  padding: 16px 18px;
  min-width: 0;
}
.kw-chart-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.kw-chart-hd h3 {
  font-size: 13px;
  font-weight: 800;
  color: var(--rp-text);
  margin: 0;
}
.kw-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.kw-dot-title {
  background: var(--rp-primary);
  box-shadow: 0 0 0 3px var(--rp-primary-soft);
}
.kw-dot-body {
  background: var(--rp-info);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-info) 18%, var(--rp-surface));
}
.kw-dot-hash {
  background: var(--rp-accent);
  box-shadow: 0 0 0 3px var(--rp-accent-soft);
}
.kw-chart-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.kw-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
@media (max-width: 768px) {
  .kw-cols { grid-template-columns: 1fr; }
}
.kw-col {
  background: var(--rp-surface-alt);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 16px;
}
.kw-col h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rp-text);
}
.kw-col h3 i {
  color: var(--rp-text-muted);
}
.kw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-pill, 999px);
  padding: calc(5px + var(--scale, 0.5) * 2px) calc(12px + var(--scale, 0.5) * 4px);
  font-size: calc(12px + var(--scale, 0.5) * 1px);
  font-weight: 600;
  color: var(--rp-text);
  transition: transform .15s, box-shadow .15s;
}
.kw-tag:hover {
  transform: translateY(-1px);
  box-shadow: var(--rp-shadow-sm);
}
.kw-tag em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--rp-primary);
  background: var(--rp-primary-soft);
  padding: 2px 8px;
  border-radius: var(--rp-radius-pill, 999px);
}
.kw-tag-hash {
  background: var(--rp-accent-soft);
  border-color: color-mix(in srgb, var(--rp-accent) 30%, var(--rp-border));
  color: var(--rp-accent);
}
.kw-tag-hash em {
  color: var(--rp-accent);
  background: color-mix(in srgb, var(--rp-accent) 20%, var(--rp-surface));
}
.kw-tag-topic em {
  color: var(--rp-info);
  background: color-mix(in srgb, var(--rp-info) 18%, var(--rp-surface));
}
.kw-panel-hashtag {
  margin-top: 0;
}
.kw-chart-single {
  max-width: 100%;
}
.kw-col-full {
  margin-top: 18px;
}
.kw-empty {
  font-size: 12px;
  color: var(--rp-text-muted);
}

.list-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-text-muted);
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.list-head i {
  color: var(--rp-accent);
}
.post-card {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  box-shadow: var(--rp-shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.post-card:hover {
  box-shadow: var(--rp-shadow);
  border-color: var(--rp-border-strong);
}
.post-card.open {
  border-color: color-mix(in srgb, var(--rp-primary) 50%, var(--rp-border));
  box-shadow: var(--rp-shadow-brand);
}
.post-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.post-head:hover {
  background: var(--rp-surface-hover);
}
.rank-badge {
  flex-shrink: 0;
  min-width: 46px;
  padding: 6px 10px;
  border-radius: var(--rp-radius-pill, 999px);
  background: linear-gradient(135deg, var(--rp-primary), var(--rp-accent));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 12px rgba(225, 29, 112, 0.25);
}
.rank-badge small {
  font-size: 11px;
  font-weight: 700;
  opacity: .92;
}
.head-title {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--rp-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.author-av {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: hsl(var(--hue, 200), 65%, 52%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px hsla(var(--hue, 200), 65%, 40%, .35);
}
.author-av.lg {
  width: 48px;
  height: 48px;
  font-size: 18px;
  border-radius: 14px;
}
.author-av-img {
  padding: 0;
  overflow: hidden;
  background: var(--rp-surface-alt);
  border: 2px solid var(--rp-surface);
  box-shadow: var(--rp-shadow-sm);
}
.author-av-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.author-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rp-accent) 12%, var(--rp-surface)), color-mix(in srgb, var(--rp-primary) 10%, var(--rp-surface)));
  border: 1px solid color-mix(in srgb, var(--rp-accent) 28%, var(--rp-border));
  border-radius: 12px;
}
.author-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.author-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--rp-text);
}
.author-id {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rp-info);
  text-decoration: none;
}
.author-id:hover {
  text-decoration: underline;
}
.author-blog {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--rp-text-muted);
}
.head-action {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--rp-success-soft);
  color: var(--rp-success);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.post-card.open .head-action {
  background: var(--rp-primary-soft);
  color: var(--rp-primary);
}
.post-body {
  border-top: 1px solid var(--rp-border);
  padding: 18px 20px;
  background: var(--rp-surface-alt);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
  .head-action { padding: 6px 10px; font-size: 11px; }
}
.detail-col {
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 16px;
}
.detail-col h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rp-border);
  color: var(--rp-text);
}
.detail-col dl div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--rp-border);
}
.detail-col dl div:last-child {
  border-bottom: none;
}
.detail-col dt {
  color: var(--rp-text-muted);
  font-weight: 500;
}
.detail-col dd {
  font-weight: 700;
  color: var(--rp-text);
}
.detail-col a {
  color: var(--rp-info);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-col a:hover {
  text-decoration: underline;
}
.hashtag-section {
  margin-top: 14px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  padding: 16px;
}
.hashtag-section h3 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--rp-text);
}
.hashtag-section h3 i {
  color: var(--rp-accent);
}
.post-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.post-hashtag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--rp-radius-pill, 999px);
  background: var(--rp-accent-soft);
  border: 1px solid color-mix(in srgb, var(--rp-accent) 30%, var(--rp-border));
  color: var(--rp-accent);
  font-size: 12px;
  font-weight: 600;
}
.hashtag-empty {
  color: var(--rp-text-muted);
  font-size: 13px;
}

/* 포스팅 카드 내부 링크 버튼 스타일 */
.hr-btn-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  box-sizing: border-box;
  gap: 4px;
  padding: 0 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--rp-info) 14%, var(--rp-surface));
  color: var(--rp-info);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--rp-info) 28%, var(--rp-border));
}
.hr-btn-source:hover {
  background: color-mix(in srgb, var(--rp-info) 22%, var(--rp-surface));
}
.hr-btn-morpheme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  box-sizing: border-box;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--rp-accent-soft);
  color: var(--rp-accent);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--rp-accent) 28%, var(--rp-border));
}
.hr-btn-morpheme:hover {
  background: color-mix(in srgb, var(--rp-accent) 25%, var(--rp-surface));
}

