.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--sidebar-line);
  padding: 12px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.brand h1 {
  font-size: 18px;
  color: var(--sidebar-text);
}

.brand p {
  margin-top: 4px;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.menu-group {
  display: grid;
  gap: 4px;
}

.menu-btn {
  width: 100%;
  border: 1px solid var(--sidebar-line);
  background: transparent;
  color: var(--sidebar-text);
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
}

.menu-btn.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--sidebar-active);
}

/* 입력 페이지 등 본문에서 쓰는 탭 — 브랜드 컬러(빨강 + 흰색) */
.tab.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .25);
}

.content {
  padding: 20px;
  overflow: auto;
  background: var(--bg-page);
}

.input-wrap {
  max-width: 780px;
  margin: 32px auto;
  display: grid;
  gap: 12px;
}

.integration-grid {
  align-items: stretch;
}

.integration-card-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.integration-card h4 {
  margin: 0;
  font-size: 15px;
}

.integration-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--muted);
}

.integration-status.on {
  background: rgba(22, 163, 74, .1);
  color: var(--ok);
}

.integration-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.integration-label {
  margin-top: 8px;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.integration-btn {
  flex: 1;
  min-width: 140px;
}

.integration-err {
  color: var(--bad);
  font-size: 12px;
  margin-top: 8px;
}

.integration-warn {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.integration-warn code {
  font-size: 10px;
  background: var(--soft-bg);
  padding: 1px 4px;
  border-radius: 4px;
}

.integration-banner {
  margin-top: 8px;
}

.integration-banner p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.integration-banner-dash p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.delta-pill {
  font-size: 11px;
  font-weight: 800;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.card-clickable {
  cursor: pointer;
  transition: border-color .2s;
}

.card-clickable:hover {
  border-color: var(--brand);
}

.card.soft {
  background: var(--soft-bg);
}

.card.success {
  border-color: rgba(22, 163, 74, .3);
}

.card.danger {
  border-color: rgba(220, 38, 38, .3);
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row.between {
  justify-content: space-between;
}

.row.wrap {
  flex-wrap: wrap;
}

.row.gap-sm {
  gap: 4px;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 12px;
}

input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 10px;
}

.primary {
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}

.primary:hover {
  opacity: .9;
}

.tab,
.link-btn,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color .2s;
}

.tab:hover,
.link-btn:hover,
.chip:hover {
  border-color: var(--brand);
}

.link-btn {
  border-radius: 8px;
}

/* === 전역 기본 버튼 디자인 — 네이티브 회색 버튼 방지 ===
   클래스(.primary/.tab/.menu-btn…)나 인라인 style이 있는 버튼은 우선순위로 그대로 유지되고,
   클래스/배경이 없는 '맨' 버튼과 .secondary/.ghost만 이 디자인을 따릅니다. */
button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, opacity .15s, transform .1s;
}
button:hover { border-color: var(--brand); background: var(--panel-hover); }
button:active { transform: translateY(1px); }
button:disabled, button[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* 보조 액션 — 테두리 강조형(연보라 틴트) */
.secondary {
  background: #f5f3ff;
  border: 1.5px solid #ddd6fe;
  color: #6d28d9;
  font-weight: 700;
  border-radius: 9px;
  padding: 8px 14px;
}
.secondary:hover:not(:disabled) { background: #ede9fe; border-color: #c4b5fd; color: #5b21b6; }

/* 가벼운 보조 액션 — 고스트(연한 테두리) */
.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
  border-radius: 8px;
  padding: 6px 12px;
}
.ghost:hover:not(:disabled) { background: var(--panel); color: var(--text); border-color: var(--line); }

.score {
  font-weight: 800;
}

.score-box {
  font-size: 24px;
  font-weight: 900;
}

.bar {
  width: 100%;
  height: 6px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
}

.section-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--divider);
}

.item-row p {
  font-size: 13px;
  color: var(--muted);
}

.score-col {
  text-align: right;
}

.pill {
  border: 1px solid;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
}

.tag {
  display: inline-block;
  margin-right: 6px;
  color: var(--warn);
  font-weight: 600;
}

/* === Sidebar footer & membership badge === */
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--sidebar-line);
  display: grid;
  gap: 6px;
}

.membership-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: .5px;
}

.badge-free {
  background: rgba(156, 163, 175, .2);
  color: #9ca3af;
}

.badge-pro {
  background: linear-gradient(135deg, rgba(220, 38, 38, .25), rgba(249, 115, 22, .25));
  color: #f97316;
}

.beta-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  vertical-align: middle;
  box-shadow: 0 1px 4px rgba(99,102,241,.35);
}

.sidebar-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sidebar-line);
  font-size: 11px;
}
.sidebar-contact .contact-link {
  color: var(--sidebar-muted);
  text-decoration: none;
  transition: color .15s;
}
.sidebar-contact .contact-link:hover { color: #8b5cf6; }
.sidebar-contact .contact-sep { color: var(--sidebar-muted); opacity: .5; }

/* 분석 상태 배너 */
.analysis-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.analysis-banner > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.analysis-banner strong { font-size: 14px; font-weight: 700; }
.analysis-banner small { font-size: 12px; color: var(--muted); }
.analysis-banner.analyzing {
  border-color: #6366f1;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.08));
}
.analysis-banner.success {
  border-color: #16a34a;
  background: rgba(34,197,94,.08);
}
.analysis-banner.error {
  border-color: #dc2626;
  background: rgba(220,38,38,.06);
}
.analysis-banner.pending {
  border-style: dashed;
  background: rgba(156,163,175,.06);
}
.analysis-banner.warning {
  border-color: #f59e0b;
  background: rgba(245,158,11,.08);
}
.analysis-banner.info {
  border-color: #0ea5e9;
  background: rgba(14,165,233,.08);
}

/* ─── 메뉴 버튼 점수·상태 정렬 ─── */
.menu-btn > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn > small { margin-left: auto; flex-shrink: 0; font-weight: 700; }

/* ─── 챕터 상태 아이콘 (사이드바) ─── */
.ch-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
}
.ch-status.done {
  background: #16a34a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(34,197,94,.25);
}
.ch-status.demo {
  color: rgba(255,255,255,.35);
  font-size: 9px;
}
.ch-status.analyzing {
  background: rgba(99,102,241,.2);
}
.ch-spinner {
  width: 10px; height: 10px;
  border: 2px solid rgba(99,102,241,.3);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: sf-spin .7s linear infinite;
}
/* 분석 완료된 챕터 메뉴 — 점수 더 강조 */
.menu-btn.ch-done small { font-weight: 800; }
/* 분석 중 메뉴 — 살짝 펄스 */
.menu-btn.ch-analyzing {
  background: linear-gradient(90deg, transparent, rgba(99,102,241,.08), transparent);
  background-size: 200% 100%;
  animation: ch-pulse 1.8s ease-in-out infinite;
}
@keyframes ch-pulse {
  0%, 100% { background-position: -100% 0; }
  50% { background-position: 100% 0; }
}

/* ─── 상단 진행 바 ─── */
.analysis-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  margin: -20px -20px 20px -20px;        /* main padding 상쇄해서 가장자리 닿게 */
  background: linear-gradient(90deg, rgba(99,102,241,.06), rgba(139,92,246,.06));
  border-bottom: 1px solid rgba(99,102,241,.2);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.analysis-progress.all-done {
  background: linear-gradient(90deg, rgba(34,197,94,.08), rgba(16,185,129,.08));
  border-bottom-color: rgba(34,197,94,.3);
}
.analysis-progress .progress-info {
  display: flex; flex-direction: column; gap: 1px;
  flex-shrink: 0;
}
.analysis-progress .progress-info strong { font-size: 13px; font-weight: 700; color: var(--text); }
.analysis-progress .progress-info small { font-size: 11px; color: var(--muted); }
.analysis-progress .progress-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(99,102,241,.12);
  border-radius: 4px;
  overflow: hidden;
}
.analysis-progress .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width .5s ease;
  animation: progress-shine 2.5s linear infinite;
}
@keyframes progress-shine {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.analysis-progress .progress-percent {
  font-size: 13px;
  font-weight: 800;
  color: #6366f1;
  min-width: 40px;
  text-align: right;
}
.analysis-progress.all-done .progress-percent,
.analysis-progress.all-done .progress-bar-fill {
  display: none;
}
.analysis-progress .progress-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.06);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.analysis-progress .progress-close:hover { background: rgba(0,0,0,.12); }
.analysis-spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(99,102,241,.25);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: sf-spin .8s linear infinite;
  flex-shrink: 0;
}

/* 진단 방식 선택 카드 */
.diag-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  .diag-mode-grid { grid-template-columns: 1fr; }
}
.diag-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 18px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s, border-color .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.diag-mode-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 6px 18px rgba(220,38,38,.12);
}
.diag-mode-card.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(220,38,38,.06), rgba(249,115,22,.06));
  box-shadow: 0 4px 14px rgba(220,38,38,.15);
}
.diag-mode-card.active::before {
  content: "✓ 선택됨";
  position: absolute;
  top: 10px; right: 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--brand);
  background: rgba(220,38,38,.12);
  padding: 3px 8px;
  border-radius: 999px;
}
.diag-mode-icon { font-size: 28px; line-height: 1; }
.diag-mode-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.diag-mode-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .08em;
}
.tag-beta { background: linear-gradient(135deg,#6366f1,#8b5cf6); color:#fff; }
.tag-stable { background: rgba(34,197,94,.18); color: #16a34a; }
.diag-mode-desc { font-size: 13px; line-height: 1.5; color: var(--muted); }
.diag-mode-meta { font-size: 11.5px; color: var(--muted); margin-top: 4px; opacity: .85; }
.diag-mode-card.manual:hover .diag-mode-meta { color: var(--brand); }

/* 입력 페이지 — 메인 CTA */
.primary-cta {
  width: 100%;
  margin-top: 18px;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 20px rgba(139, 92, 246, .35);
  transition: transform .15s, box-shadow .15s;
}
.primary-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, .45);
}
.primary-cta:active { transform: translateY(0); }

/* 고급 영역 토글 */
.advanced-toggle-wrap {
  margin-top: 24px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}
.advanced-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(99,102,241,.05), rgba(236,72,153,.04));
  border: 1.5px solid rgba(139,92,246,.35);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.advanced-toggle:hover {
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(236,72,153,.07));
  border-color: #8b5cf6;
  box-shadow: 0 2px 10px rgba(139,92,246,.12);
}
.advanced-toggle.open {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(236,72,153,.05));
  border-color: #8b5cf6;
}
.advanced-toggle-icon {
  font-size: 22px;
  margin-top: 0;
  flex-shrink: 0;
  line-height: 1;
}
.advanced-toggle-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.advanced-toggle-text strong { font-size: 14.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 6px; }
.advanced-toggle-text small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.advanced-toggle-text small b { color: #7c3aed; font-weight: 700; }
.optional-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(139,92,246,.15);
  color: #8b5cf6;
  letter-spacing: .04em;
}
/* 펼침 화살표 (우측) */
.advanced-toggle-chevron {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  color: #8b5cf6;
  padding-left: 6px;
}
.advanced-toggle-chevron .chevron-label {
  font-size: 10px;
  font-weight: 700;
  color: #8b5cf6;
  letter-spacing: .02em;
}
.advanced-toggle-chevron svg {
  transition: transform .25s ease;
}
.advanced-toggle-chevron.open svg {
  transform: rotate(180deg);
}
.advanced-toggle:hover .advanced-toggle-chevron:not(.open) svg {
  animation: chevronBounce 1s ease-in-out infinite;
}
@keyframes chevronBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}
.advanced-panel {
  margin-top: 14px;
  animation: advancedFadeIn .25s ease-out;
}
@keyframes advancedFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.paid-toggle-btn {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--sidebar-line);
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  font-size: 13px;
  transition: all .2s;
}

.paid-toggle-btn:hover {
  border-color: var(--brand);
  color: var(--sidebar-text);
}

.paid-toggle-btn.is-pro {
  border-style: solid;
  border-color: rgba(249, 115, 22, .4);
  color: #f97316;
  background: rgba(249, 115, 22, .08);
}

/* === Theme toggle === */
.theme-toggle-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  background: transparent;
  color: var(--sidebar-muted);
  cursor: pointer;
  font-size: 12px;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.theme-toggle-btn:hover {
  border-color: var(--brand);
  color: var(--sidebar-text);
}

/* === Analysis panel === */
.analysis-panel {
  gap: 14px;
}

.analysis-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.analysis-stat {
  text-align: center;
  padding: 10px 4px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analysis-stat-num {
  font-size: 24px;
  font-weight: 900;
  display: block;
}

.analysis-stat small {
  color: var(--muted);
  font-size: 11px;
}

.analysis-insights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.analysis-insight {
  padding: 10px 12px;
  border-radius: 8px;
}

.analysis-insight strong {
  font-size: 12px;
  display: block;
  margin-bottom: 4px;
}

.analysis-insight p {
  font-size: 13px;
}

.analysis-insight.danger {
  background: rgba(220, 38, 38, .06);
  border: 1px solid rgba(220, 38, 38, .15);
}

.analysis-insight.danger strong {
  color: var(--bad);
}

.analysis-insight.success {
  background: rgba(22, 163, 74, .06);
  border: 1px solid rgba(22, 163, 74, .15);
}

.analysis-insight.success strong {
  color: var(--ok);
}

.analysis-priority {
  display: grid;
  gap: 6px;
}

.analysis-priority > strong {
  font-size: 13px;
  color: var(--muted);
}

.analysis-priority-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--soft-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analysis-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 38, 38, .1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

/* === PRO detail button === */
.pro-detail-section {
  margin: 4px 0;
}

.pro-detail-btn {
  width: 100%;
  padding: 0;
  border: 1px dashed rgba(220, 38, 38, .3);
  border-radius: 12px;
  background: var(--brand-light);
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
}

.pro-detail-btn:hover {
  border-color: rgba(220, 38, 38, .5);
  background: rgba(220, 38, 38, .08);
}

.pro-detail-btn-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.pro-detail-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pro-detail-icon {
  font-size: 24px;
}

.pro-detail-btn-left strong {
  display: block;
  font-size: 14px;
}

.pro-detail-btn-left p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.pro-badge {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
}

.pro-detail-divider {
  text-align: center;
  position: relative;
  padding: 8px 0;
}

.pro-detail-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .3;
}

.pro-detail-divider span {
  position: relative;
  background: var(--bg);
  padding: 0 16px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
}

/* === Pricing page === */
.pricing-wrap {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.pricing-header {
  text-align: center;
  padding: 24px 0;
}

.pricing-header p {
  color: var(--muted);
  margin-top: 6px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.pricing-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  display: grid;
  gap: 20px;
  position: relative;
}

.pricing-card.pro {
  border-color: rgba(220, 38, 38, .35);
  box-shadow: 0 4px 24px rgba(220, 38, 38, .08);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.pricing-card-hd h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.pricing-price {
  font-size: 32px;
  font-weight: 900;
}

.pricing-price small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.pricing-features li {
  font-size: 13px;
  line-height: 1.5;
}

.pricing-features li.disabled {
  color: var(--muted);
  opacity: .5;
}

.pricing-features li.highlight {
  color: var(--brand);
}

.pricing-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}

.pricing-btn:hover {
  border-color: var(--brand);
}

.pricing-btn:disabled {
  opacity: .5;
  cursor: default;
}

.pricing-btn.pro-btn {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border: 0;
}

.pricing-btn.pro-btn:hover {
  opacity: .9;
}

.pricing-btn.enterprise {
  border-color: var(--line);
}

.pricing-faq {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.pricing-faq h4 {
  font-size: 16px;
}

.pricing-faq-item {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.pricing-faq-item strong {
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.pricing-faq-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* === Report page — 카드·히어로·TOC 레이아웃은 layout.css === */

.report-summary {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.report-groups {
  display: grid;
  gap: 6px;
}

.report-group-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-group-name {
  min-width: 160px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-tag {
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1.4;
}

.report-tag.success {
  background: rgba(22, 163, 74, .08);
  color: var(--ok);
}

.report-tag.danger {
  background: rgba(220, 38, 38, .08);
  color: var(--bad);
}

.report-actions {
  display: grid;
  gap: 4px;
}

.report-action {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* === Chapter hero with donut === */
.chapter-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.chapter-hero-text {
  flex: 1;
  display: grid;
  gap: 6px;
}

.chapter-hero-text h2 {
  font-size: 20px;
}

.chapter-hero-text p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* === Score badge (compact triad: gauge arc + number + pill) === */
.score-badge {
  display: grid;
  grid-template-rows: auto auto;
  align-items: end;
  justify-items: center;
  gap: 6px;
  position: relative;
  min-width: 120px;
  padding: 6px 4px 0;
}

.score-badge-gauge {
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05));
}

.score-badge-text {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  pointer-events: none;
}

.score-badge-num {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.score-badge-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.7;
}

.score-badge-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
}

/* === Score donut === */
.donut-wrap {
  position: relative;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.06));
}

.donut-svg {
  display: block;
}

.donut-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-score {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.donut-status {
  font-size: 10.5px;
  font-weight: 700;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* === Group bars === */
.group-bars {
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}

.group-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-bar-label {
  min-width: 150px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.group-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

.group-bar-score {
  font-weight: 800;
  font-size: 14px;
  min-width: 28px;
  text-align: right;
}

.group-bar-status {
  font-size: 10px;
  min-width: 32px;
  text-align: center;
}

/* === Radar chart === */
.radar-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse at top, rgba(168, 85, 247, 0.04), transparent 60%),
    linear-gradient(180deg, var(--panel), var(--panel));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.radar-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  overflow: visible;
}

/* === Gauge chart === */
.gauge-panel {
  gap: 12px;
}

.gauge-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.gauge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.gauge-label {
  position: absolute;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-score {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.gauge-status {
  font-size: 11px;
  color: var(--muted);
}

.gauge-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 4px;
}

/* === Channel bars === */
.channel-bars-card {
  gap: 12px;
}

.channel-bars {
  display: grid;
  gap: 12px;
}

.channel-bar-item {
  display: grid;
  gap: 4px;
}

.channel-bar-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.channel-bar-name {
  font-size: 13px;
  font-weight: 600;
}

.channel-bar-score {
  font-weight: 800;
  font-size: 14px;
}

.channel-bar-track {
  height: 24px;
  background: var(--bar-bg);
  border-radius: 6px;
  overflow: hidden;
}

.channel-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  min-width: fit-content;
  transition: width .4s ease;
}

.channel-bar-pct {
  font-size: 10px;
  color: #fff;
  font-weight: 700;
}

.channel-bar-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}

.channel-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--divider);
}

.channel-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.channel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* === Checklist === */
.checklist-panel {
  gap: 12px;
}

.checklist-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checklist-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

.checklist-pct {
  font-weight: 800;
  font-size: 14px;
  min-width: 64px;
}

.checklist-count {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.checklist-items {
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow-y: auto;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
}

.checklist-row.done {
  background: rgba(22, 163, 74, .05);
}

.checklist-row.partial {
  background: rgba(217, 119, 6, .05);
}

.checklist-row.missing {
  background: rgba(220, 38, 38, .05);
}

.checklist-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.checklist-name {
  flex: 1;
}

.checklist-score {
  font-weight: 800;
  font-size: 13px;
  min-width: 24px;
  text-align: right;
}

/* === Report infographic elements === */
.report-infographic {
  padding: 8px 0;
}

.report-infographic .radar-wrap {
  padding: 12px;
  border: 0;
  background: transparent;
}

.report-infographic .radar-svg {
  max-width: 280px;
}

/* Report channel mini bars */
.report-channel-mini {
  display: grid;
  gap: 6px;
}

.report-ch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-ch-bar-name {
  min-width: 100px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-ch-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.report-ch-bar-fill {
  height: 100%;
  border-radius: 999px;
}

/* Report gauge mini */
.report-gauge-mini {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.report-mini-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.report-mini-gauge-score {
  font-size: 20px;
  font-weight: 900;
  margin-top: -18px;
}

.report-mini-gauge-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Report checklist mini */
.report-checklist-mini {
  display: grid;
  gap: 8px;
}

.report-ck-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-ck-bar {
  flex: 1;
  height: 8px;
  background: var(--bar-bg);
  border-radius: 999px;
  overflow: hidden;
}

.report-ck-fill {
  height: 100%;
  border-radius: 999px;
}

.report-ck-stats {
  display: flex;
  gap: 12px;
}

.report-ck-stat {
  font-size: 14px;
  font-weight: 600;
}

.report-ck-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-ck-item {
  font-size: 14px;
  color: var(--muted);
  padding: 3px 6px;
  background: rgba(220, 38, 38, .04);
  border-radius: 4px;
}

.report-ck-item strong {
  float: right;
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-line);
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .chapter-hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .group-bar-label {
    min-width: 100px;
    font-size: 11px;
  }

  .report-overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .report-swot {
    grid-template-columns: 1fr;
  }

  .report-group-name {
    min-width: 120px;
  }

  .analysis-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .analysis-insights {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .gauge-grid {
    gap: 16px;
  }

  .channel-legend {
    gap: 8px;
  }

  .report-gauge-mini {
    gap: 10px;
  }

  .report-ch-bar-name {
    min-width: 70px;
    font-size: 11px;
  }
}

/* ======================= 마케팅 실행 플랜 ======================= */
.plan-wrap { display: flex; flex-direction: column; gap: 20px; }

.plan-hero { background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(236,72,153,.08)); }
.plan-hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.plan-hero-kicker { font-size: 13px; font-weight: 700; color: var(--brand); margin: 0 0 8px; }
.plan-hero-stats { display: flex; gap: 16px; }
.plan-hero-stat { display: flex; flex-direction: column; align-items: center; padding: 12px 20px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); min-width: 88px; }
.plan-hero-stat-num { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.plan-hero-stat-lb { font-size: 11px; color: var(--muted); margin-top: 4px; }

.plan-weakest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.plan-weakest-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.plan-weakest-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.plan-weakest-ic { font-size: 24px; }
.plan-weakest-lb { font-size: 13px; font-weight: 700; color: var(--text); }
.plan-weakest-score { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

.plan-roadmap { display: flex; flex-direction: column; gap: 16px; }
.plan-phase {
  border: 2px solid; border-radius: 18px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.plan-phase-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.plan-phase-title { display: flex; align-items: center; gap: 12px; }
.plan-phase-ic {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.plan-phase-title h3 { margin: 0; font-size: 18px; font-weight: 800; }
.plan-phase-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.plan-phase-meta { display: flex; gap: 8px; align-items: center; }
.plan-phase-count { font-size: 13px; font-weight: 800; }
.plan-phase-effort {
  font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.plan-phase-list { display: flex; flex-direction: column; gap: 10px; }
.plan-phase-empty { color: var(--muted); font-size: 13px; margin: 0; padding: 12px; text-align: center; }

.plan-action {
  padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.plan-action:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); border-color: var(--brand); }
.plan-action-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.plan-action-ch { display: flex; align-items: center; gap: 6px; }
.plan-action-ic { font-size: 16px; }
.plan-action-lb { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.plan-action-score {
  font-size: 11px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid; font-weight: 700; font-variant-numeric: tabular-nums;
}
.plan-action-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--text); }

.plan-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.plan-cta-text h3 { margin: 0 0 4px; font-size: 16px; }
.plan-cta .primary { flex-shrink: 0; }

/* --- Plan PRO banner --- */
.plan-pro-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  background: linear-gradient(135deg, rgba(139,92,246,.1), rgba(236,72,153,.1));
  border: 1px solid rgba(139,92,246,.25); border-radius: 14px;
}
.plan-pro-ic { font-size: 28px; }
.plan-pro-text { flex: 1; }
.plan-pro-text strong { display: block; font-size: 14px; margin-bottom: 2px; }
.plan-pro-text p { margin: 0; font-size: 12px; color: var(--muted); }

/* --- Plan action card (expandable) --- */
.plan-action { cursor: default; }
.plan-action-head { cursor: pointer; }
.plan-action-text { cursor: pointer; }
.plan-action-meta { display: flex; align-items: center; gap: 8px; }
.plan-action-lock { font-size: 14px; }
.plan-action-chevron {
  font-size: 14px; color: var(--muted); transition: transform .2s ease;
  display: inline-block; min-width: 14px; text-align: center;
}
.plan-action.is-open { border-color: var(--brand); box-shadow: var(--shadow-md); }
.plan-action.is-open .plan-action-chevron { color: var(--brand); }

/* --- Plan detail (expanded) --- */
.plan-action-detail { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); position: relative; }
.plan-detail { display: flex; flex-direction: column; gap: 16px; }
.plan-detail-block { }
.plan-detail-hd {
  margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--text);
  letter-spacing: .01em;
}
.plan-detail-text { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.plan-detail-steps {
  margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.8; color: var(--text-secondary);
}
.plan-detail-steps li { padding-left: 4px; }
.plan-detail-steps li::marker { color: var(--brand); font-weight: 800; }
.plan-detail-list {
  margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--text-secondary);
}
.plan-detail-list li { padding-left: 2px; }
.plan-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-detail-meta {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
  margin: 0; font-size: 13px;
}
.plan-detail-meta dt {
  color: var(--muted); font-weight: 600;
}
.plan-detail-meta dd {
  margin: 0; color: var(--text-secondary);
}
.plan-detail-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-tool-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(37,99,235,.2);
}

/* --- Locked detail (non-paid) --- */
.plan-detail-locked { position: relative; min-height: 180px; }
.plan-locked-preview { filter: blur(6px); opacity: .5; pointer-events: none; user-select: none; }
.plan-locked-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.85));
  z-index: 2; border-radius: 10px;
}
[data-theme="dark"] .plan-locked-overlay {
  background: linear-gradient(180deg, rgba(20,24,36,.55), rgba(20,24,36,.9));
}
.plan-locked-content {
  text-align: center; padding: 20px; max-width: 360px;
}
.plan-locked-ic { font-size: 32px; display: block; margin-bottom: 8px; }
.plan-locked-content h4 { margin: 0 0 6px; font-size: 15px; }
.plan-locked-content p { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* --- Plan download section --- */
.plan-download {
  display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(135deg, rgba(13,148,136,.06), rgba(139,92,246,.06));
  border: 1px solid rgba(13,148,136,.2);
}
.plan-download.is-locked {
  background: linear-gradient(135deg, rgba(100,116,139,.05), rgba(139,92,246,.06));
  border-color: var(--line);
}
.plan-download-head { display: flex; align-items: center; gap: 14px; }
.plan-download-ic { font-size: 32px; }
.plan-download-head h3 { margin: 0 0 4px; font-size: 16px; }
.plan-download-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plan-download-actions button.is-disabled {
  opacity: .55; cursor: not-allowed; background: var(--panel); color: var(--muted); border: 1px solid var(--line);
}
.plan-download-actions button.secondary {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 10px; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.plan-download-actions button.secondary:hover:not(.is-disabled) { background: var(--panel-hover); border-color: var(--brand); }

/* --- Print cover (화면에서는 숨김, 인쇄·HTML export에서만 보임) --- */
.plan-print-cover { display: none; }

@media (max-width: 760px) {
  .plan-hero-inner { grid-template-columns: 1fr; }
  .plan-weakest-grid { grid-template-columns: 1fr; }
  .plan-phase { padding: 16px; }
  .plan-detail-grid { grid-template-columns: 1fr; }
  .plan-pro-banner { flex-direction: column; text-align: center; }
  .plan-download-actions { flex-direction: column; }
  .plan-download-actions button { width: 100%; }
}

/* ======================= 인쇄(PDF 저장) 스타일 ======================= */
@media print {
  @page { size: A4; margin: 16mm 14mm; }

  body { background: #fff !important; }

  /* 숨길 UI */
  .sidebar,
  .plan-cta,
  .plan-download,
  .plan-pro-banner,
  .plan-action-chevron,
  .plan-action-lock,
  .theme-toggle-btn,
  .paid-toggle-btn { display: none !important; }

  .app { display: block !important; }
  .content { padding: 0 !important; }
  .plan-wrap { max-width: 100% !important; gap: 12px !important; }

  /* 카드는 페이지 넘어가도 분리되지 않게 */
  .plan-phase, .plan-action, .plan-weakest, .plan-hero { page-break-inside: avoid; break-inside: avoid; }
  .plan-action-detail[hidden] { display: block !important; }
  .plan-action-detail { border-top: 1px dashed #ddd; }

  .plan-action { cursor: default !important; box-shadow: none !important; border: 1px solid #ddd !important; }
  .plan-phase { box-shadow: none !important; }
  .card { box-shadow: none !important; border: 1px solid #e0e0e0 !important; }

  /* 표지 페이지 */
  .plan-print-cover {
    display: flex !important; align-items: center; justify-content: center;
    min-height: 90vh; page-break-after: always; break-after: page;
    text-align: center;
  }
  .plan-print-cover-inner { max-width: 600px; }
  .plan-print-kicker { font-size: 14px; color: #888; letter-spacing: .2em; margin: 0 0 24px; text-transform: uppercase; }
  .plan-print-cover h1 { font-size: 48px; font-weight: 800; margin: 0 0 16px; color: #111; }
  .plan-print-sub { font-size: 16px; color: #444; margin: 0 0 48px; }
  .plan-print-sub strong { color: #dc2626; }
  .plan-print-date { font-size: 13px; color: #888; margin: 0; }

  /* 히어로는 표지 다음 첫 페이지에 */
  .plan-hero { page-break-before: auto; }

  /* 링크 색상 표시 안 함 */
  a { color: inherit; text-decoration: none; }
}

/* 다운로드 실행 중일 때 화면에서도 전체 펼침 유지 (window.print 전 상태 보장) */
body.is-printing-plan .plan-action-detail[hidden] { display: block !important; }

/* ======================= GA4 통계 분석 페이지 ======================= */
.ga4-wrap { display: flex; flex-direction: column; gap: 20px; }

.ga4-hero { background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(13,148,136,.06)); }
.ga4-hero-kicker { font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }

/* 연동 카드 */
.ga4-connect-head { display: flex; align-items: center; gap: 14px; }
.ga4-connect-ic {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; flex-shrink: 0;
}
.ga4-connect-text { flex: 1; }
.ga4-connect-text h3 { margin: 0 0 4px; font-size: 16px; }
.ga4-connect-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ga4-connect-form input {
  width: 100%; max-width: 320px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--input-bg); color: var(--text); font-size: 14px;
}
.ga4-connect-connected { border-left: 4px solid var(--ok); }

/* KPI 카드 그리드 */
.ga4-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.ga4-kpi-card {
  padding: 16px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-xs);
}
.ga4-kpi-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ga4-kpi-ic { font-size: 18px; }
.ga4-kpi-lb { font-size: 12px; color: var(--muted); font-weight: 600; }
.ga4-kpi-value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; margin-bottom: 4px; }
.ga4-kpi-delta { font-size: 12px; color: var(--muted); }
.ga4-kpi-delta span { color: var(--muted); margin-left: 4px; font-size: 11px; }
.ga4-delta { font-weight: 700; }

/* 채널 분석 */
.ga4-channel-list { display: flex; flex-direction: column; gap: 14px; }
.ga4-channel-row {
  padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line);
}
.ga4-channel-hd { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ga4-channel-name { font-weight: 700; font-size: 14px; }
.ga4-channel-pct { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.ga4-channel-bar {
  height: 10px; background: var(--bar-bg); border-radius: 999px; overflow: hidden; margin-bottom: 8px;
}
.ga4-channel-fill { height: 100%; border-radius: 999px; }
.ga4-channel-meta {
  display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.ga4-channel-meta strong { color: var(--text); }

/* 페이지 테이블 */
.ga4-pages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ga4-pages-sub { font-size: 13px; font-weight: 800; margin: 0 0 10px; }
.ga4-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ga4-table th {
  text-align: left; padding: 8px 10px; background: var(--panel); color: var(--muted);
  font-size: 11px; font-weight: 700;
}
.ga4-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--line-light);
  font-variant-numeric: tabular-nums;
}
.ga4-table tr:last-child td { border-bottom: none; }
.ga4-path { color: var(--text); font-family: ui-monospace, monospace; font-size: 12px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 진단 해석 */
.ga4-diag-list { display: flex; flex-direction: column; gap: 10px; }
.ga4-diag-item {
  padding: 14px 16px; border-radius: 10px; background: var(--panel);
  border-left: 4px solid;
}
.ga4-diag-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ga4-diag-level {
  font-size: 11px; padding: 3px 10px; border-radius: 999px; color: #fff; font-weight: 700;
}
.ga4-diag-text { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.link-btn {
  background: none; border: none; color: var(--accent); font-weight: 700; font-size: 13px;
  cursor: pointer; padding: 0; text-decoration: underline;
}
.link-btn:hover { color: var(--brand); }

.ga4-diag-locked-box {
  text-align: center; padding: 40px 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(236,72,153,.06));
  border-radius: 12px;
}
.ga4-diag-locked-box h4 { margin: 8px 0 6px; font-size: 15px; }
.ga4-diag-locked-box p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.ga4-pro-chip {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; font-weight: 700;
  margin-left: 6px; vertical-align: middle;
}

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

@media (max-width: 760px) {
  .ga4-pages-grid { grid-template-columns: 1fr; }
  .ga4-connect-head { flex-wrap: wrap; }
}

/* GA4 확장: 3열 페이지 그리드 · 지역 · 인구통계 · 이벤트 · 소스/매체 */
.ga4-pages-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}
.ga4-pages-sub {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

/* 지역 */
.ga4-geo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}
.ga4-geo-list { display: flex; flex-direction: column; gap: 10px; }

/* 인구통계 */
.ga4-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 14px;
}
.ga4-demo-bars { display: flex; flex-direction: column; gap: 8px; }
.ga4-demo-bar {
  display: grid;
  grid-template-columns: 80px 1fr 130px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.ga4-demo-lb { font-weight: 700; color: var(--text); }
.ga4-demo-track {
  height: 10px; background: var(--bg-muted, #f3f4f6);
  border-radius: 999px; overflow: hidden;
}
.ga4-demo-fill { height: 100%; border-radius: 999px; transition: width .3s; }
.ga4-demo-val { font-size: 12px; color: var(--muted); text-align: right; }
.ga4-demo-hint {
  margin-top: 14px; padding: 10px 12px;
  background: rgba(139,92,246,.08); border-left: 3px solid #8b5cf6;
  border-radius: 6px; font-size: 12px; color: var(--text); line-height: 1.6;
}

/* 이벤트 */
.ga4-events-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ga4-event-row {
  display: grid;
  grid-template-columns: 180px 1fr 140px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--card-bg, transparent);
  transition: background .15s;
}
.ga4-event-row:hover { background: rgba(139,92,246,.04); }
.ga4-event-row.is-conversion {
  background: rgba(13,148,136,.08);
  border-left: 3px solid var(--ok);
}
.ga4-event-name { font-size: 13px; font-weight: 600; color: var(--text); }
.ga4-event-bar {
  height: 10px; background: var(--bg-muted, #f3f4f6);
  border-radius: 999px; overflow: hidden;
}
.ga4-event-fill { height: 100%; border-radius: 999px; transition: width .3s; }
.ga4-event-count { font-size: 13px; font-weight: 700; color: var(--text); text-align: right; }
.ga4-event-count small { font-weight: 500; color: var(--muted); }
.ga4-warn-box {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(190,18,60,.08); border-left: 3px solid var(--bad);
  border-radius: 6px; font-size: 13px; color: var(--text); line-height: 1.6;
}

/* 소스/매체 테이블 */
.ga4-sm-table { margin-top: 12px; }
.ga4-sm-table th,
.ga4-sm-table td { padding: 8px 10px; font-size: 13px; }

.ga4-pill-hint {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--bg-muted, #eef2ff); color: var(--muted);
  font-weight: 600; margin-left: 6px; vertical-align: middle;
}

@media (max-width: 960px) {
  .ga4-pages-grid-3 { grid-template-columns: 1fr; }
  .ga4-geo-grid,
  .ga4-demo-grid { grid-template-columns: 1fr; }
  .ga4-event-row { grid-template-columns: 120px 1fr 100px; }
}

/* =========================================================
 * 경쟁사 비교분석 (compete)
 * ========================================================= */
.compete-wrap { display: flex; flex-direction: column; gap: 18px; }
.compete-hero {
  background: linear-gradient(135deg, rgba(13,148,136,.08), rgba(236,72,153,.08));
  border: 1px solid var(--border);
}
.compete-hero-kicker { font-size: 13px; font-weight: 700; color: var(--brand); margin: 0 0 6px; }

.compete-input-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.compete-input-row { display: flex; flex-direction: column; gap: 4px; }
.compete-input-row label { font-size: 12px; font-weight: 700; color: var(--muted); }
.compete-input-row input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; background: var(--card-bg, #fff); color: var(--text);
}

.compete-summary {
  padding: 22px;
}
.compete-summary-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.compete-team { text-align: center; }
.compete-team-lb {
  display: block; font-size: 13px; font-weight: 700; color: var(--muted);
  margin-bottom: 6px;
}
.compete-team-score { font-size: 56px; font-weight: 900; line-height: 1; }
.compete-team-mine .compete-team-score { color: #0d9488; }
.compete-team-comp .compete-team-score { color: #ec4899; }

.compete-vs { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.compete-vs-badge {
  padding: 6px 14px; border-radius: 999px; color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 1px;
}
.compete-vs small { font-size: 12px; color: var(--muted); font-weight: 700; }

.compete-summary-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 12px; padding-top: 16px; border-top: 1px solid var(--border);
}
.compete-stat { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.compete-stat strong { font-size: 28px; font-weight: 900; }
.compete-stat span { font-size: 12px; color: var(--muted); font-weight: 600; }

.compete-notes {
  margin-top: 12px; padding: 8px 12px;
  background: rgba(236,72,153,.06); border-radius: 6px;
  font-size: 12px; color: var(--muted);
}

.compete-radar-wrap { display: flex; justify-content: center; margin: 12px 0; }
.compete-radar { max-width: 520px; }
.compete-legend {
  display: flex; justify-content: center; gap: 20px; font-size: 13px;
  color: var(--text); font-weight: 600;
}
.compete-legend span { display: inline-flex; align-items: center; gap: 6px; }
.compete-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
}

.compete-ch-ic { margin-right: 4px; }

/* 확장형 카드 리스트 */
.compete-card-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.compete-card {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--card-bg, #fff);
  transition: box-shadow .15s, border-color .15s;
}
.compete-card.is-open { border-color: #8b5cf6; box-shadow: 0 4px 14px rgba(139,92,246,.08); }
.compete-card-mine { border-left: 4px solid #0d9488; }
.compete-card-comp { border-left: 4px solid #ec4899; }
.compete-card-tie  { border-left: 4px solid var(--muted); }

.compete-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 18px; cursor: pointer;
  user-select: none;
}
.compete-card-head:hover { background: rgba(139,92,246,.04); }
.compete-card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.compete-card-title strong { font-weight: 700; }
.compete-card-scores {
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.compete-card-score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.compete-card-score small { font-size: 10px; color: var(--muted); font-weight: 600; }
.compete-card-score strong { font-size: 18px; font-weight: 900; }
.compete-card-vs { font-size: 11px; color: var(--muted); font-weight: 700; }
.compete-card-diff { font-weight: 800; font-size: 14px; min-width: 36px; text-align: center; }
.compete-card-verdict {
  padding: 4px 10px; border-radius: 999px; color: #fff;
  font-size: 11px; font-weight: 800;
}
.compete-card-chev {
  font-size: 16px; color: var(--muted); margin-left: 4px;
  transition: transform .15s;
}

/* 확장 패널 */
.compete-card-detail { border-top: 1px solid var(--border); padding: 18px; background: var(--bg, #fafafa); }
.compete-detail-panel { display: flex; flex-direction: column; gap: 16px; }

.compete-detail-bars { display: flex; flex-direction: column; gap: 8px; }
.compete-detail-bar {
  display: grid; grid-template-columns: 90px 1fr 48px;
  align-items: center; gap: 12px; font-size: 13px;
}
.compete-detail-lb { font-weight: 700; color: var(--text); }
.compete-detail-track {
  height: 14px; background: var(--bg-muted, #eef2ff);
  border-radius: 999px; overflow: hidden;
}
.compete-detail-fill { height: 100%; border-radius: 999px; transition: width .3s; }

.compete-detail-gap {
  margin: 0; padding: 10px 12px;
  background: rgba(139,92,246,.06); border-left: 3px solid #8b5cf6;
  border-radius: 6px; font-size: 13px; color: var(--text); line-height: 1.6;
}

.compete-detail-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.compete-detail-col {
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--border);
}
.compete-detail-mine { background: rgba(13,148,136,.04); border-left: 3px solid #0d9488; }
.compete-detail-comp { background: rgba(236,72,153,.04); border-left: 3px solid #ec4899; }
.compete-detail-col h5 { margin: 0 0 8px; font-size: 13px; }
.compete-detail-col strong { font-size: 12px; color: var(--muted); display: block; margin: 8px 0 4px; }
.compete-detail-col ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.compete-detail-sum { margin: 0 0 6px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.compete-detail-col h5 small {
  font-size: 11px; font-weight: 700; color: var(--muted);
  margin-left: 6px;
}
.compete-detail-hint {
  margin: 10px 0 0; padding: 6px 10px;
  background: rgba(139,92,246,.06); border-radius: 6px;
  font-size: 11px; color: var(--muted); line-height: 1.5;
}

/* 격차 분석 박스 */
.compete-gap-box {
  padding: 14px 16px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(13,148,136,.05), rgba(236,72,153,.05));
  border: 1px solid var(--border);
}
.compete-gap-box h5 { margin: 0 0 10px; font-size: 14px; }
.compete-gap-box p { margin: 0 0 8px; font-size: 13px; color: var(--text); line-height: 1.6; }
.compete-gap-box p strong { font-size: 12px; color: var(--muted); }
.compete-gap-box ul {
  margin: 0 0 12px; padding-left: 20px;
  font-size: 12.5px; color: var(--text); line-height: 1.7;
}
.compete-gap-tip {
  margin: 4px 0 0 !important;
  padding: 8px 10px;
  background: rgba(251,191,36,.1); border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 12.5px !important; font-weight: 600;
}

.compete-detail-actions {
  padding: 12px 14px; border-radius: 8px;
  background: rgba(251,191,36,.06); border-left: 3px solid #f59e0b;
}
.compete-detail-actions h5 { margin: 0 0 8px; font-size: 13px; }
.compete-detail-actions ol { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text); line-height: 1.7; }

/* 레이더 라벨 */
.compete-radar-label text { pointer-events: none; }

.compete-locked {
  text-align: center; padding: 40px 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(236,72,153,.06));
  border: 1px solid var(--border);
}
.compete-locked h4 { margin: 10px 0 6px; font-size: 16px; }
.compete-locked p { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

.compete-action-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.compete-action-item {
  display: grid; grid-template-columns: 50px 1fr; gap: 14px;
  padding: 14px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(236,72,153,.04);
}
.compete-action-rank {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #ec4899, #be123c);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900;
}
.compete-action-body h4 { margin: 0 0 6px; font-size: 15px; }
.compete-action-body p { margin: 0 0 10px; font-size: 13px; color: var(--text); }

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

@media (max-width: 760px) {
  .compete-summary-top { grid-template-columns: 1fr; gap: 14px; }
  .compete-team-score { font-size: 44px; }
  .compete-card-head { flex-direction: column; align-items: flex-start; }
  .compete-card-scores { flex-wrap: wrap; }
  .compete-detail-cols { grid-template-columns: 1fr; }
}

/* =========================================================
 * 변화 추이 분석 (history)
 * ========================================================= */
.history-empty {
  text-align: center; padding: 50px 24px;
  background: linear-gradient(135deg, rgba(13,148,136,.05), rgba(139,92,246,.05));
}
.history-empty h3 { margin: 12px 0 8px; font-size: 17px; }
.history-empty p { color: var(--muted); font-size: 13px; margin: 0 0 18px; }

.history-summary {
  padding: 22px;
}
.history-summary-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.history-team { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.history-team-lb { font-size: 13px; font-weight: 700; color: var(--muted); }
.history-team small { font-size: 11px; color: var(--muted); }
.history-team-score { font-size: 56px; font-weight: 900; line-height: 1; margin-top: 4px; }

.history-vs { text-align: center; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.history-vs-badge {
  padding: 6px 14px; border-radius: 999px; color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: 1px;
}
.history-vs small { font-size: 12px; color: var(--muted); font-weight: 700; }

.history-stats-card { padding: 16px 22px; }

.history-action-bar { padding: 14px 18px; }
.history-action-bar strong { font-size: 14px; }

.history-lock-pill {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: rgba(139,92,246,.12); color: #8b5cf6;
  font-weight: 800; margin-left: 4px;
}

.history-detail-locked {
  text-align: center; padding: 24px;
  background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(236,72,153,.06));
  border-radius: 10px;
}
.history-detail-locked h5 { margin: 8px 0 4px; font-size: 14px; }
.history-detail-locked p { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }

.history-detail-panel { display: flex; flex-direction: column; gap: 14px; }

.history-timeseries-card { padding: 22px; }
.history-timeseries-card svg { display: block; margin-top: 10px; }

.history-auto-card {
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(13,148,136,.06), rgba(13,148,136,.02));
  border-left: 4px solid #0d9488;
}
.history-auto-locked {
  padding: 22px;
  background: linear-gradient(135deg, rgba(139,92,246,.05), rgba(236,72,153,.05));
  text-align: center;
}
.history-auto-locked h3 { margin: 0 0 8px; font-size: 16px; }
.history-auto-locked p { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

@media (max-width: 760px) {
  .history-summary-top { grid-template-columns: 1fr; gap: 14px; }
  .history-team-score { font-size: 44px; }
}

/* ===================== ContentFlow Phase 1 ===================== */
.kw-input-row, .cal-input-row, .draft-form {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px;
}
.kw-input-row input, .cal-input-row input, .draft-form input, .draft-form select {
  flex: 1 1 240px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: 14px;
}
.draft-form select { flex: 0 0 140px; }

.kw-lab .kw-head h4 { margin: 0 0 4px; }
.kw-empty, .cal-empty, .draft-empty { text-align:center; padding: 48px 20px; border: 2px dashed var(--border); border-radius: 12px; }
.kw-empty-ic, .cal-empty-ic, .draft-empty-ic { font-size: 48px; margin-bottom: 12px; }
.kw-empty code { background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

.kw-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.kw-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align:center; }
.kw-stat .n { font-size: 24px; font-weight: 700; }
.kw-stat .l { font-size: 12px; color: var(--muted); }

.kw-block { margin: 18px 0; padding: 14px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); }
.kw-block h5 { margin: 0 0 12px; font-size: 14px; }

.kw-intent { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items:center; margin-bottom: 6px; font-size: 13px; }
.kw-intent-bar { background: var(--border); height: 8px; border-radius: 4px; overflow: hidden; }
.kw-intent-bar > div { height: 100%; }
.kw-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }

.kw-quad-wrap { display: grid; grid-template-columns: 1fr 240px; gap: 16px; }
.kw-quad {
  position: relative; aspect-ratio: 1/1; max-width: 480px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden;
}
.kw-q-cell { padding: 10px; font-size: 12px; opacity: .6; border: 1px dashed var(--border); }
.q-gem { background: rgba(34,197,94,.08); }
.q-hard { background: rgba(245,158,11,.08); }
.q-easy { background: rgba(100,116,139,.08); }
.q-avoid { background: rgba(220,38,38,.06); }
.kw-q-axis-y { position:absolute; left: -8px; top: 50%; transform: rotate(-90deg) translateX(50%); font-size: 11px; color: var(--muted); }
.kw-q-axis-x { position:absolute; right: 8px; bottom: -18px; font-size: 11px; color: var(--muted); }
.kw-q-dot { position:absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, 50%); }
.kw-q-tip { background: var(--surface); border-radius: 8px; padding: 12px; font-size: 13px; border:1px solid var(--border); }

.kw-clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.kw-cluster { background: var(--surface); border:1px solid var(--border); border-radius: 10px; padding: 12px; }
.kw-cluster-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.kw-cluster-head small { color: var(--muted); }
.kw-chips { display:flex; flex-wrap:wrap; gap:5px; margin: 6px 0; }
.kw-chip { display:inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid; }
.small { font-size: 12px; }

.kw-table-wrap { overflow-x: auto; }
.kw-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kw-table th, .kw-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.kw-table th { background: var(--surface); font-weight: 600; }
.kw-pill { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.kw-sug { font-size: 11px; color: var(--muted); }

/* GA4 연동 카드 버튼 (다시 분석 / PDF / 연동 해제) — 통일된 디자인 */
.ga4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: transform .12s, box-shadow .12s, filter .12s;
  line-height: 1;
}
.ga4-btn:hover:not([disabled]) { transform: translateY(-1px); filter: brightness(1.03); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.ga4-btn:active:not([disabled]) { transform: translateY(0); }
.ga4-btn[disabled] { opacity: .6; cursor: default; }

/* 검색의도 분석 버튼 + 모달 */
.kw-intent-btn { margin-left: 6px; padding: 2px 8px; border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca; border-radius: 999px; font-size: 10.5px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.kw-intent-btn:hover { background: #4338ca; color: #fff; border-color: #4338ca; }
.kw-intent-btn.added { background: #dcfce7; border-color: #86efac; color: #15803d; }
.kw-intent-btn.added:hover { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

/* 키워드 검색의도 페이지 */
.ki-cart { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ki-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; border-radius: 999px; font-size: 13px; font-weight: 600; }
.ki-chip-x { border: none; background: rgba(99,102,241,.18); color: #4338ca; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 11px; line-height: 1; padding: 0; }
.ki-chip-x:hover { background: #dc2626; color: #fff; }
.ki-results { display: flex; flex-direction: column; gap: 14px; }
.ki-result { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ki-result-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.ki-result-head strong { font-size: 14px; color: #6366f1; }
.ki-copy { margin-left: auto; font-size: 12px; padding: 4px 10px; }
.ki-titles { margin: 0; padding: 8px 14px 10px 30px; display: flex; flex-direction: column; gap: 0; }
.ki-titles li { font-size: 13.5px; line-height: 1.5; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 7px 4px; border-bottom: 1px solid #f1f3f5; }
.ki-titles li:last-child { border-bottom: none; }
.ki-titles li .ki-q { flex: 0 1 auto; }                 /* 버튼이 제목 바로 옆에 오도록 자연 폭 */
.ki-add-content { flex-shrink: 0; padding: 2px 9px; border: 1px solid #fbcfe8; background: #fdf2f8; color: #be185d; border-radius: 999px; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .15s; align-self: center; }
.ki-add-content:hover { background: #ec4899; color: #fff; border-color: #ec4899; }
.ki-add-content.added { background: #dcfce7; border-color: #86efac; color: #15803d; }
.ki-add-content.added:hover { background: #fee2e2; border-color: #fecaca; color: #dc2626; }

/* 콘텐츠 초안 제작 페이지 */
.cd-intents { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.cd-intent { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fdf2f8; border: 1px solid #fbcfe8; border-radius: 8px; font-size: 13px; }
.cd-intent-num { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: #ec4899; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cd-intent-q { flex: 1; min-width: 0; color: #111827; }
.cd-intent-kw { flex-shrink: 0; font-size: 11px; color: #9ca3af; }
.cd-intent-x { flex-shrink: 0; border: none; background: rgba(236,72,153,.15); color: #be185d; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; font-size: 11px; padding: 0; }
.cd-intent-x:hover { background: #dc2626; color: #fff; }
.cd-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 10px; }
.cd-channel { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; transition: all .15s; text-align: left; }
.cd-channel.on { background: #eef2ff; border: 1.5px solid #6366f1; color: #3730a3; }
.cd-channel.off { background: #f9fafb; border: 1.5px solid #e5e7eb; color: #9ca3af; }
.cd-channel-ic { font-size: 16px; }
.cd-channel-lb { flex: 1; }
.cd-channel-check { width: 18px; height: 18px; border-radius: 50%; background: #6366f1; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cd-channel.off .cd-channel-check { background: #e5e7eb; }
.cd-results { display: flex; flex-direction: column; gap: 14px; }
.cd-result { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cd-result-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.cd-result-head strong { font-size: 14px; color: #6366f1; }
.cd-copy { font-size: 12px; padding: 4px 10px; }
.cd-draft { margin: 0; padding: 14px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; font-family: inherit; color: #1f2937; background: #fff; }

/* AI 성장 플랜 — 90일 로드맵 */
.gp-roadmap { display: flex; flex-direction: column; gap: 8px; }
.gp-week { display: flex; gap: 12px; align-items: stretch; }
.gp-week-num { flex-shrink: 0; width: 48px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#7c3aed,#6366f1); color: #fff; font-size: 13px; font-weight: 800; border-radius: 8px; }
.gp-week-body { flex: 1; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 14px; }
.gp-week-body strong { font-size: 13.5px; color: #111827; }
.gp-week-body ul { margin: 6px 0 0; padding-left: 18px; }
.gp-week-body li { font-size: 12.5px; color: #4b5563; line-height: 1.6; }
/* 탭 */
.ki-tabs { display: flex; gap: 6px; margin: 14px 0 4px; border-bottom: 2px solid var(--border); }
.ki-tab { padding: 9px 16px; border: none; background: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.ki-tab:hover { color: var(--text); }
.ki-tab.active { color: #6366f1; border-bottom-color: #6366f1; }
/* 만족/불만족 */
.ki-pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.ki-pc-col { padding: 8px 14px 12px; }
.ki-pc-col.pros { background: rgba(34,197,94,.05); border-right: 1px solid var(--border); }
.ki-pc-col.cons { background: rgba(239,68,68,.05); }
.ki-pc-head { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.ki-pc-head small { color: #9ca3af; font-weight: 500; }
.ki-pc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ki-pc-list li { font-size: 13px; line-height: 1.45; }
.ki-freq { display: inline-block; font-size: 10px; background: rgba(99,102,241,.15); color: #6366f1; border-radius: 999px; padding: 1px 6px; vertical-align: middle; }
@media (max-width: 640px) { .ki-pc-grid { grid-template-columns: 1fr; } .ki-pc-col.pros { border-right: none; border-bottom: 1px solid var(--border); } }
.ki-pro-lock { text-align: center; padding: 32px 20px; background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(99,102,241,.05)); border: 1px dashed rgba(139,92,246,.35); border-radius: 12px; margin-top: 12px; }

/* GA4 분석 로딩 화면 */
.ga4-progress-track { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 14px 0 6px; }
.ga4-progress-bar { height: 100%; width: 40%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #6366f1, #3b82f6); animation: ga4-indeterminate 1.4s ease-in-out infinite; }
@keyframes ga4-indeterminate { 0% { margin-left: -42%; } 100% { margin-left: 102%; } }
.ga4-load-steps { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ga4-load-steps li { font-size: 13px; color: #4b5563; display: flex; align-items: center; gap: 8px; }
.ga4-load-dot { width: 7px; height: 7px; border-radius: 50%; background: #93c5fd; animation: ga4-dot-pulse 1.2s ease-in-out infinite; }
.ga4-load-steps li:nth-child(2) .ga4-load-dot { animation-delay: .2s; }
.ga4-load-steps li:nth-child(3) .ga4-load-dot { animation-delay: .4s; }
.ga4-load-steps li:nth-child(4) .ga4-load-dot { animation-delay: .6s; }
.ga4-load-steps li:nth-child(5) .ga4-load-dot { animation-delay: .8s; }
@keyframes ga4-dot-pulse { 0%,100% { background: #93c5fd; transform: scale(1); } 50% { background: #3b82f6; transform: scale(1.4); } }
.ga4-skel { border-radius: 10px; background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 37%, #f3f4f6 63%); background-size: 400% 100%; animation: ga4-shimmer 1.4s ease infinite; }
@keyframes ga4-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Calendar */
.cal-summary { background: var(--surface-2); border:1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.cal-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; margin-bottom: 10px; }
.cal-total { display:flex; align-items:center; gap: 10px; padding: 10px; background: var(--surface); border-radius: 8px; border: 1px solid; }
.cal-total-ic { width: 32px; height: 32px; border-radius: 50%; color:#fff; display:flex; align-items:center; justify-content:center; }
.cal-total-n { font-weight: 700; font-size: 18px; }
.cal-total-l { font-size: 11px; color: var(--muted); }
.cal-weak { font-size: 13px; color: var(--text); padding-top: 8px; border-top: 1px dashed var(--border); }

.cal-week { margin-bottom: 18px; }
.cal-week h5 { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { background: var(--surface-2); border:1px solid var(--border); border-radius: 8px; padding: 6px; min-height: 100px; }
.cal-day.is-today { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.15); }
.cal-day-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 4px; font-size: 11px; }
.cal-day-date { font-weight: 700; font-size: 14px; }
.cal-day-wk { color: var(--muted); }
.cal-item { background: var(--surface); border-left: 3px solid; padding: 6px 8px; border-radius: 4px; margin-top: 4px; font-size: 11px; }
.cal-item-ch { font-weight: 700; font-size: 10px; margin-bottom: 2px; }
.cal-item-tp { font-size: 11px; }
.cal-item-tx { font-size: 11px; color: var(--muted); margin-top: 2px; }
.cal-empty-day { font-size: 11px; color: var(--muted); text-align:center; padding-top: 30px; }

/* Draft Generator */
.draft-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 8px; }
.draft-tab { background: var(--surface-2); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text); }
.draft-tab.active { background: #22c55e; color: #fff; border-color: #22c55e; }
.draft-out { background: var(--surface-2); border:1px solid var(--border); border-radius: 10px; padding: 14px; }
.draft-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; font-size: 13px; }
.draft-meta > div { background: var(--surface); padding: 10px; border-radius: 6px; border:1px solid var(--border); }
.draft-body { background: var(--surface); padding: 12px; border-radius: 6px; border:1px solid var(--border); margin-top: 10px; }
.draft-body pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.6; margin: 0; }
.draft-cta { background: #22c55e; color: #fff; padding: 10px 14px; border-radius: 8px; text-align:center; margin-top: 10px; font-weight: 600; }
.ig-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.ig-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ig-download-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; margin-bottom: 14px; background: linear-gradient(135deg, #eef2ff, #faf5ff); border: 1px solid #c7d2fe; border-radius: 12px; }
.ig-download-bar button.primary { font-size: 14px; padding: 10px 18px; font-weight: 700; background: #6366f1; color: #fff; border: none; border-radius: 8px; cursor: pointer; }
.ig-download-bar button.primary:hover { background: #4f46e5; }
.ig-download-bar button.primary:disabled { opacity: .6; cursor: not-allowed; }
[data-theme="dark"] .ig-download-bar { background: linear-gradient(135deg, #1e1b4b, #2e1065); border-color: #4338ca; }

/* Shortform 9:16 frames */
.sf-frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.sf-frame { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.sf-frame-img-wrap { position: relative; aspect-ratio: 9/16; background: linear-gradient(135deg, #1e293b, #334155); overflow: hidden; }
.sf-frame-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; }
.sf-frame-overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 12px; text-align: center; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 50%, rgba(0,0,0,.8) 100%); }
.sf-frame-time { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.6); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 800; }
.sf-frame-role { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.22); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.sf-frame-text { color: #fff; font-weight: 900; font-size: 15px; line-height: 1.35; text-shadow: 0 2px 6px rgba(0,0,0,.6); white-space: pre-wrap; word-break: keep-all; }
.sf-frame-meta { padding: 10px 12px; border-top: 1px solid var(--border); }
.sf-frame-meta strong { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.sf-frame-meta pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 13px; line-height: 1.5; margin: 0; }
.sf-frame-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; background: #000; }
.sf-gen-overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(0,0,0,.65); color: #fff; font-weight: 700; font-size: 13px; }
.sf-text-overlay { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 18px 14px 16px; background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,0) 100%); color: #fff; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.sf-text-overlay .sf-text-role { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .9; background: rgba(255,255,255,.2); padding: 3px 8px; border-radius: 4px; align-self: flex-start; }
.sf-text-overlay .sf-text-line { font-size: 14px; font-weight: 800; line-height: 1.35; white-space: pre-wrap; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.sf-spinner { width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: sf-spin .9s linear infinite; }
@keyframes sf-spin { to { transform: rotate(360deg); } }
.ig-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ig-slide { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.ig-slide-img-wrap { position: relative; aspect-ratio: 1/1; background: linear-gradient(135deg, #e5e7eb, #d1d5db); overflow: hidden; }
.ig-slide-img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; background: transparent; }
.ig-slide-overlay { z-index: 2; }
.ig-slide-badge, .ig-slide-tag { z-index: 3; }
.ig-slide-tag.design { background: rgba(139,92,246,.95); color: #fff; }
.ig-slide-caption { padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.ig-slide-caption pre { white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.5; margin: 0; color: var(--text); }
.ig-slide:hover .ig-slide-img { transform: scale(1.04); }
.ig-slide-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 50%, rgba(0,0,0,.1) 100%); padding: 16px; pointer-events: none; }
.ig-slide-text { color: #fff; font-weight: 700; font-size: 15px; text-align: center; white-space: pre-wrap; line-height: 1.4; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.ig-slide-badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); color: #fff; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.ig-slide-tag { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; }
.ig-slide-tag.ai { background: rgba(139,92,246,.95); color: #fff; }
.ig-slide-tag.user { background: rgba(34,197,94,.95); color: #fff; }
.ig-slide-controls { display: flex; gap: 4px; padding: 8px; flex-wrap: wrap; background: var(--surface-2); }
.ig-upload-btn { font-size: 11px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--text); }
.ig-upload-btn:hover { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.ig-slide-controls .ghost.small { margin-top: 0; font-size: 11px; padding: 6px 8px; }
.draft-slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.draft-slide { background: var(--surface); border:1px solid var(--border); border-radius: 8px; padding: 10px; text-align:center; min-height: 120px; }
.draft-slide-n { background: #22c55e; color:#fff; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items:center; justify-content:center; font-weight: 700; font-size: 12px; }
.draft-slide-role { font-size: 10px; color: var(--muted); margin: 4px 0; }
.draft-slide-text { font-size: 12px; white-space: pre-wrap; }
.draft-beats { display: grid; gap: 6px; margin-bottom: 12px; }
.draft-beat { display: grid; grid-template-columns: 70px 60px 1fr; gap: 8px; padding: 8px; background: var(--surface); border:1px solid var(--border); border-radius: 6px; font-size: 13px; align-items:center; }
.draft-beat-t { font-weight: 700; color: #22c55e; font-size: 12px; }
.draft-beat-role { font-size: 11px; color: var(--muted); }
.draft-section { background: var(--surface); border:1px solid var(--border); border-radius: 8px; padding: 12px; margin-top: 10px; }
.draft-section h6 { margin: 0 0 6px; font-size: 14px; }
.draft-section pre { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.5; margin: 0; }

/* Copy Templates */
.tpl-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin: 14px 0; }
.tpl-tab { background: var(--surface-2); border: 1px solid var(--border); padding: 10px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); display: grid; gap: 2px; }
.tpl-tab strong { font-size: 14px; }
.tpl-tab small { font-size: 10px; color: var(--muted); }
.tpl-tab.active { background: #8b5cf6; color: #fff; border-color: #8b5cf6; }
.tpl-tab.active small { color: rgba(255,255,255,.85); }
.tpl-detail { background: var(--surface-2); border:1px solid var(--border); border-radius: 10px; padding: 14px; }
.tpl-info h5 { margin: 0 0 4px; }
.tpl-info p { color: var(--muted); margin: 0 0 8px; }
.tpl-best { font-size: 12px; padding: 8px 10px; background: var(--surface); border-radius: 6px; border:1px solid var(--border); }
.tpl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tpl-col { background: var(--surface); border:1px solid var(--border); border-radius: 8px; padding: 12px; }
.tpl-col h6 { margin: 0 0 10px; font-size: 13px; }
.tpl-step { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.tpl-step:last-child { border-bottom: 0; }
.tpl-step-n { background: #8b5cf6; color: #fff; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items:center; justify-content:center; font-weight: 700; font-size: 12px; }
.tpl-fill { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.tpl-fill:last-of-type { border-bottom: 0; }
.tpl-fill-k { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.tpl-fill-v { font-size: 13px; }
.ghost.small { font-size: 12px; padding: 6px 10px; margin-top: 8px; }

/* Template variable input form */
.tpl-vars { background: linear-gradient(135deg, rgba(139,92,246,.06), rgba(34,197,94,.05)); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin: 14px 0 18px; }
.tpl-vars-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tpl-vars-head strong { font-size: 15px; }
.tpl-vars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.tpl-vars-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.tpl-vars-grid input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 13px; }
.tpl-vars-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tpl-vars-note { font-size: 12px; padding-top: 6px; border-top: 1px dashed var(--border); }

/* All-frames grid view */
.tpl-all-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.tpl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.tpl-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tpl-card-head strong { font-size: 16px; color: #8b5cf6; }
.tpl-card-desc { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; }
.tpl-card-best { font-size: 11px; padding: 6px 8px; background: var(--surface); border-radius: 6px; margin-bottom: 10px; }
.tpl-card-fills { display: grid; gap: 6px; }
.tpl-card .tpl-fill { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.tpl-card .tpl-fill:last-child { border-bottom: 0; }

@media (max-width: 760px) {
  .tpl-vars-grid { grid-template-columns: 1fr; }
  .tpl-all-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .kw-stats-row { grid-template-columns: repeat(2, 1fr); }
  .kw-quad-wrap { grid-template-columns: 1fr; }
  .kw-intent { grid-template-columns: 140px 1fr; }
  .cal-grid { grid-template-columns: 1fr; }
  .draft-meta { grid-template-columns: 1fr; }
  .tpl-cols { grid-template-columns: 1fr; }
}

/* ───────── YouTube 채널 실측 카드 (Phase 8) ───────── */
.yt-card {
  margin-top: 16px;
  border: 1.5px solid rgba(220,38,38,.2);
  border-radius: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(220,38,38,.03), #fff);
}
.yt-card.yt-empty { background: #fafafa; border-color: var(--border); }
.yt-header { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid #f3f4f6; }
.yt-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.yt-avatar-ph { display: flex; align-items: center; justify-content: center; background: #dc2626; color: #fff; font-size: 22px; }
.yt-header-info { flex: 1; min-width: 0; }
.yt-title { font-size: 16px; font-weight: 800; color: #111827; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.yt-handle { font-size: 12px; font-weight: 500; color: #9ca3af; }
.yt-substats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; font-size: 12.5px; color: #6b7280; }
.yt-substats b { color: #dc2626; font-weight: 700; }
.yt-visit { font-size: 12px; font-weight: 700; color: #dc2626; text-decoration: none; white-space: nowrap; padding: 6px 12px; border: 1px solid rgba(220,38,38,.3); border-radius: 8px; }
.yt-visit:hover { background: rgba(220,38,38,.06); }

.yt-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.yt-metric { background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; padding: 12px; text-align: center; }
.yt-metric-icon { font-size: 18px; }
.yt-metric-label { font-size: 11px; color: #9ca3af; margin-top: 2px; font-weight: 600; }
.yt-metric-value { font-size: 20px; font-weight: 800; margin-top: 2px; }
.yt-metric-sub { font-size: 10px; color: #b0b0b0; margin-top: 2px; }

.yt-freshness { margin-top: 12px; padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.yt-freshness b { font-weight: 800; }
.yt-freshness.fresh { background: rgba(22,163,74,.08); color: #15803d; }
.yt-freshness.ok { background: rgba(217,119,6,.08); color: #b45309; }
.yt-freshness.stale { background: rgba(220,38,38,.08); color: #b91c1c; }

.yt-chart-block { margin-top: 18px; }
.yt-chart-title { font-size: 13.5px; font-weight: 700; color: #374151; margin: 0 0 8px; }
.yt-chart-title small { font-size: 11px; font-weight: 500; color: #9ca3af; }
.yt-chart-empty { margin-top: 14px; padding: 20px; text-align: center; color: #9ca3af; font-size: 12.5px; background: #fafafa; border-radius: 8px; }

.yt-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-top: 10px; }
.yt-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.yt-bar-fill { width: 70%; max-width: 28px; background: linear-gradient(180deg, #dc2626, #f87171); border-radius: 4px 4px 0 0; min-height: 3px; }
.yt-bar-val { font-size: 10px; font-weight: 700; color: #dc2626; margin-top: 3px; }
.yt-bar-label { font-size: 9px; color: #9ca3af; margin-top: 1px; }

.yt-top-list { display: flex; flex-direction: column; gap: 8px; }
.yt-top-item { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid #f0f0f0; border-radius: 8px; text-decoration: none; transition: background .15s; }
.yt-top-item:hover { background: rgba(220,38,38,.03); }
.yt-top-rank { font-size: 14px; font-weight: 800; color: #dc2626; width: 20px; text-align: center; flex-shrink: 0; }
.yt-top-thumb { width: 64px; height: 36px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.yt-top-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yt-top-title { font-size: 12.5px; font-weight: 600; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-top-stats { font-size: 11px; color: #6b7280; }

@media (max-width: 720px) {
  .yt-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* YouTube 섹션 래퍼 */
.yt-section { margin: 14px 0; }
.yt-section-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yt-section-badge { font-size: 13px; font-weight: 800; color: #dc2626; }
.yt-section-note { font-size: 11px; color: #9ca3af; }

/* ───────── 진단 신뢰도 표시 (Phase 9) ───────── */
.conf-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px; white-space: nowrap;
}
.conf-summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.conf-chip { font-size: 11.5px; font-weight: 700; }

.conf-legend { padding: 14px 16px; margin-bottom: 14px; background: linear-gradient(135deg,#f9fafb,#fff); }
.conf-legend-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.conf-legend-hd strong { font-size: 14px; color: #111827; }
.conf-legend-sub { font-size: 11.5px; color: #9ca3af; }
.conf-legend-bars { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #f3f4f6; margin-bottom: 8px; }
.conf-legend-seg { height: 100%; min-width: 3px; }
.conf-legend-keys { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; font-weight: 600; }
.conf-legend-cta {
  margin-top: 12px; padding: 12px 14px;
  background: rgba(107,114,128,.06); border: 1px solid #e5e7eb; border-radius: 8px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #4b5563; line-height: 1.6;
}
.conf-legend-cta > span { flex: 1; min-width: 200px; }
.conf-cta-btn {
  padding: 8px 16px; background: linear-gradient(135deg,#7c3aed,#ec4899); color: #fff;
  border: none; border-radius: 8px; font-weight: 700; font-size: 12.5px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.conf-cta-btn:hover { opacity: .92; }

/* YouTube 성장 곡선 (Phase 10) */
.yt-growth-pending {
  padding: 14px 16px; background: rgba(22,163,74,.05); border: 1px dashed #86efac;
  border-radius: 8px; font-size: 12.5px; color: #15803d; line-height: 1.6;
}
.yt-growth-stat {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  font-size: 13px; color: #374151; margin-bottom: 8px;
}
.yt-growth-stat b { color: #dc2626; }

/* ═══════════ 프리미엄 챕터 카드 (Phase 12 리디자인) ═══════════ */
.rc-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.04);
  scroll-margin-top: 80px;
}
.rc-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  cursor: pointer; flex-wrap: wrap;
}
.rc-hd-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rc-ic {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.rc-hd-text { min-width: 0; }
.rc-hd-text h3 { margin: 0; font-size: 18px; font-weight: 800; color: #111827; letter-spacing: -.01em; }
.rc-type { font-size: 11.5px; color: #9ca3af; font-weight: 600; }
.rc-score-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; flex-shrink: 0; }
.rc-grade-pill { font-size: 11px; font-weight: 800; padding: 2px 11px; border-radius: 999px; }
.rc-ring { position: relative; display: flex; align-items: center; justify-content: center; }
.rc-ring-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 900; letter-spacing: -.02em;
}
.rc-ring-unit { font-size: 8.5px; font-weight: 700; opacity: .55; margin-left: 1px; }


.rc-summary {
  margin: 16px 0; font-size: 14px; color: #4b5563; line-height: 1.7;
  padding: 13px 16px; background: #f9fafb; border-radius: 10px; border-left: 3px solid #e5e7eb;
}

/* 수평 막대 비주얼 */
.rc-visual { margin: 16px 0; }
.rc-bars { display: flex; flex-direction: column; gap: 9px; }
.rc-bar-row { display: flex; align-items: center; gap: 12px; }
.rc-bar-name {
  width: 130px; flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.rc-bar-track {
  flex: 1; position: relative; height: 22px; background: #f4f5f8;
  border-radius: 6px; overflow: hidden;
}
.rc-bar-fill {
  height: 100%; border-radius: 6px; min-width: 2%; opacity: .82;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.rc-bar-val {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; font-weight: 800;
}
.rc-distro {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px;
  font-size: 11.5px; font-weight: 700; align-items: center;
}
.rc-distro-total { margin-left: auto; color: #9ca3af; font-weight: 600; }

/* 강점/개선 2단 카드 */
.rc-swot { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.rc-swot-col { border-radius: 12px; overflow: hidden; border: 1px solid #eef0f4; }
.rc-swot-strong { background: #fff; }
.rc-swot-weak { background: #fff; }
.rc-swot-hd {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800;
  padding: 11px 16px; margin: 0;
}
.rc-swot-strong .rc-swot-hd { background: #f0fdf4; color: #15803d; border-bottom: 1px solid #dcfce7; }
.rc-swot-weak .rc-swot-hd { background: #fef2f2; color: #dc2626; border-bottom: 1px solid #fee2e2; }
.rc-swot-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.rc-swot-body { display: flex; flex-direction: column; gap: 9px; padding: 14px 16px; }
.rc-point { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.55; color: #374151; }
.rc-point-ic {
  flex-shrink: 0; width: 17px; height: 17px; border-radius: 50%; font-size: 10px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; margin-top: 1px; color: #fff;
}
.rc-point-good .rc-point-ic { background: #16a34a; }
.rc-point-bad .rc-point-ic { background: #dc2626; }
.rc-empty { font-size: 12px; color: #9ca3af; }

/* 실행 로드맵 타임라인 */
.rc-actions { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #eef0f4; }
.rc-actions-hd { font-size: 13.5px; font-weight: 800; color: #374151; margin-bottom: 12px; }
.rc-timeline { display: flex; flex-direction: column; gap: 10px; position: relative; }
.rc-tl-item { display: flex; align-items: center; gap: 12px; }
.rc-tl-badge {
  flex-shrink: 0; min-width: 52px; text-align: center;
  font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 7px;
}
.rc-tl-text { font-size: 13px; color: #374151; line-height: 1.5; }

@media (max-width: 640px) {
  .rc-swot { grid-template-columns: 1fr; }
  .rc-bar-name { width: 92px; font-size: 11.5px; }
  .rc-card { padding: 18px 16px; }
}

/* ───────── 진단 시작 버튼 2종 (일반 vs AI 자동) ───────── */
.diag-cta-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; margin-top: 18px; }
.diag-cta {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 18px; border-radius: 12px; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .15s ease; text-align: center;
}
.diag-cta:hover { transform: translateY(-2px); }
.diag-cta-title { font-size: 15.5px; font-weight: 800; }
.diag-cta-sub { font-size: 11.5px; opacity: .85; font-weight: 600; }
.diag-cta-basic {
  background: #fff; border: 2px solid #e5e7eb; color: #374151;
}
.diag-cta-basic:hover { border-color: #a855f7; box-shadow: 0 4px 14px rgba(168,85,247,.12); }
.diag-cta-pro {
  background: linear-gradient(135deg,#7c3aed,#a855f7 55%,#ec4899); color: #fff;
  box-shadow: 0 6px 18px rgba(168,85,247,.3);
}
.diag-cta-pro:hover { box-shadow: 0 8px 24px rgba(168,85,247,.42); }
.diag-cta-badge {
  position: absolute; top: -9px; right: 12px; background: #fbbf24; color: #78350f;
  font-size: 10px; font-weight: 900; padding: 2px 9px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15); letter-spacing: .03em;
}
@media (max-width: 560px) {
  .diag-cta-row { grid-template-columns: 1fr; }
}

/* ───────── 최근 진단 보고서 (Phase 13) ───────── */
.recent-wrap { margin: 16px 0; }
.recent-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.recent-hd strong { font-size: 14px; color: #111827; }
.recent-hint { font-size: 11.5px; color: #9ca3af; }
.recent-hint b { color: #7c3aed; }
.recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.recent-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; background: #fff; border: 1.5px solid #eef0f4; border-radius: 12px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.recent-card:hover { border-color: #a855f7; box-shadow: 0 4px 14px rgba(168,85,247,.12); transform: translateY(-1px); }
.recent-score { font-size: 24px; font-weight: 900; line-height: 1; flex-shrink: 0; }
.recent-score span { font-size: 11px; font-weight: 700; opacity: .6; margin-left: 1px; }
.recent-info { flex: 1; min-width: 0; }
.recent-brand { font-size: 13.5px; font-weight: 800; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-url { font-size: 11px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta { font-size: 10.5px; color: #9ca3af; margin-top: 2px; }
.recent-arrow { color: #a855f7; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.recent-del {
  position: absolute; top: 5px; right: 7px; width: 18px; height: 18px; line-height: 1;
  border: none; background: #f3f4f6; color: #9ca3af; border-radius: 50%; cursor: pointer;
  font-size: 13px; display: flex; align-items: center; justify-content: center; padding: 0;
}
.recent-del:hover { background: #fee2e2; color: #dc2626; }
@media (max-width: 720px) { .recent-grid { grid-template-columns: 1fr; } }

/* ═══════════ AI 작성 라이브 장면 (Phase 14) ═══════════ */
.aiw-card {
  margin: 14px 0; padding: 24px; border-radius: 18px;
  background: linear-gradient(135deg,#fdf2f8,#fff 40%,#eff6ff);
  border: 2px solid #f9a8d4; box-shadow: 0 8px 30px rgba(236,72,153,.14);
}
.aiw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.aiw-orb {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#ec4899,#a855f7,#3b82f6);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  animation: aiwPulse 1.8s ease-in-out infinite; box-shadow: 0 4px 16px rgba(168,85,247,.4);
}
@keyframes aiwPulse { 0%,100% { transform: scale(1); box-shadow: 0 4px 16px rgba(168,85,247,.4); } 50% { transform: scale(1.08); box-shadow: 0 6px 24px rgba(236,72,153,.55); } }
.aiw-title { margin: 0 0 3px; font-size: 18px; font-weight: 900; color: #be185d; }
.aiw-sub { margin: 0; font-size: 13px; color: #9333ea; font-weight: 600; min-height: 18px; }

.aiw-doc { background: #fff; border: 1px solid #f0e6f6; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.aiw-doc-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: #faf7fc; border-bottom: 1px solid #f0e6f6; }
.aiw-dot { width: 10px; height: 10px; border-radius: 50%; }
.aiw-dot.r { background: #ff5f56; } .aiw-dot.y { background: #ffbd2e; } .aiw-dot.g { background: #27c93f; }
.aiw-doc-name { margin-left: 8px; font-size: 11.5px; color: #9ca3af; font-weight: 600; }
.aiw-doc-body { padding: 18px 20px; min-height: 150px; position: relative; }
.aiw-typed { font-size: 13px; line-height: 1.9; color: #374151; white-space: pre-wrap; font-family: ui-monospace, "Pretendard", sans-serif; display: inline; }
.aiw-caret { display: inline-block; width: 2px; height: 15px; background: #ec4899; margin-left: 1px; vertical-align: middle; animation: aiwBlink 1s steps(1) infinite; }
@keyframes aiwBlink { 50% { opacity: 0; } }
.aiw-skeleton { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.aiw-line { height: 9px; border-radius: 5px; background: linear-gradient(90deg,#f3e8ff,#fce7f3,#f3e8ff); background-size: 200% 100%; animation: aiwShimmer 1.6s linear infinite; }
@keyframes aiwShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.aiw-engines { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0 14px; }
.aiw-engine { padding: 12px 10px; border: 1.5px solid #eee; border-radius: 10px; text-align: center; background: #fff; }
.aiw-synth { background: linear-gradient(135deg,#fce7f3,#ede9fe); border-color: #f0abfc; }
.aiw-engine-name { font-size: 13px; font-weight: 800; }
.aiw-engine-state { font-size: 11px; color: #6b7280; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 5px; }
.aiw-thinking { display: inline-flex; gap: 3px; }
.aiw-thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--c, #a855f7); animation: aiwBounce 1.2s ease-in-out infinite; }
.aiw-thinking i:nth-child(2) { animation-delay: .2s; } .aiw-thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes aiwBounce { 0%,100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-4px); opacity: 1; } }

.aiw-progress { height: 6px; background: #fce7f3; border-radius: 3px; overflow: hidden; margin-top: 6px; }
.aiw-progress-fill { height: 100%; width: 35%; background: linear-gradient(90deg,#ec4899,#a855f7,#3b82f6); border-radius: 3px; animation: aiwProg 2.2s ease-in-out infinite; }
@keyframes aiwProg { 0% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }
.aiw-foot { margin: 14px 0 0; font-size: 12.5px; color: #be185d; text-align: center; }

@media (max-width: 640px) { .aiw-engines { grid-template-columns: repeat(2, 1fr); } }
