/* BLOG OS Post Detail V2 */

.v2-wrap{
  display:flex;
  flex-direction:column;
  gap:22px;
}

.v2-toolbar,
.v2-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.v2-toolbar{
  justify-content:space-between;
}

.v2-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  align-items:start;
}

.v2-grid-3{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr;
  gap:18px;
}

.v2-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  padding:22px;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.v2-card h3{
  margin-top:0;
  margin-bottom:18px;
}

.v2-muted{
  color:#64748b;
  font-size:14px;
  font-weight:700;
}

/* SEO Main */
.v2-kpi-main{
  background:linear-gradient(135deg,#2563eb 0%,#1d4ed8 100%);
  color:#fff;
  border:none;
  box-shadow:0 18px 40px rgba(37,99,235,.25);
}

.v2-kpi-main .v2-muted{
  color:rgba(255,255,255,.75);
  text-transform:uppercase;
  letter-spacing:.08em;
}

.v2-seo-main-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-top:10px;
}

.v2-seo-main-row strong{
  font-size:64px;
  line-height:.9;
}

.v2-seo-grade{
  min-width:54px;
  height:38px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  color:#fff;
  font-weight:900;
  font-size:18px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.v2-seo-bar{
  height:10px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  overflow:hidden;
  margin:20px 0 12px;
}

.v2-seo-bar span{
  display:block;
  height:100%;
  border-radius:999px;
  background:#22c55e;
}

.v2-seo-state{
  margin:0;
  color:#d1d5db!important;
  font-weight:800;
  text-transform:uppercase;
}

/* KPI */
.v2-grid-3 .v2-card:not(.v2-kpi-main){
  min-height:170px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.v2-grid-3 h2{
  font-size:30px;
  margin:16px 0 6px;
}

/* Potential */
.seo-potential-panel{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:26px;
  align-items:center;
}

.seo-potential-panel h3{
  grid-column:1 / -1;
}

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

.potential-summary.compact{
  margin:0;
  padding:22px;
  border-radius:16px;
  background:#f8fafc;
}

/* Quick Actions */
.v2-card.quick-actions{
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
}

.v2-card.quick-actions h3::before{
  content:"⚡ ";
}

.quick-action-row{
  margin:12px 0;
}

.quick-actions .action-btn{
  min-height:56px;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:16px;
  padding:0 16px;
  font-weight:800;
  color:#111827;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.gain-badge{
  background:#dcfce7;
  color:#15803d;
  padding:5px 11px;
  border-radius:999px;
  font-size:13px;
  font-weight:900;
}

/* Diagnosis */
.issue-row,
.deduction-row{
  border:1px solid #eef2f7;
  background:#f9fafb;
  border-radius:14px;
  padding:12px 14px;
  margin:10px 0;
}

.issue-row{
  display:flex;
  gap:10px;
}

.deduction-row{
  display:grid;
  grid-template-columns:80px 50px 1fr;
  gap:10px;
  align-items:center;
}

.deduction-row strong{
  color:#dc2626;
  font-size:17px;
}

/* Summary Panels */
.summary-number{
  display:flex;
  align-items:baseline;
  gap:6px;
  margin:14px 0 12px;
}

.summary-number strong{
  font-size:38px;
  line-height:1;
}

.detail-toggle summary{
  cursor:pointer;
  display:inline-flex;
  padding:9px 13px;
  border-radius:12px;
  background:#f3f4f6;
  font-weight:800;
}

/* ALT */
.alt-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:14px 0;
}

.alt-summary div{
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f9fafb;
  padding:14px;
}

.alt-summary strong{
  display:block;
  font-size:26px;
}

/* Rows */
.link-row,
.image-row,
.recommend-card{
  border:1px solid #eef2f7;
  background:#fff;
  border-radius:12px;
  padding:12px;
  margin:8px 0;
}

.link-row a,
.image-row a{
  word-break:break-all;
  font-size:13px;
  color:#2563eb;
}

.content-preview{
  margin-top:16px;
  max-height:720px;
  overflow:auto;
  border-radius:14px;
}

@media(max-width:900px){
  .v2-grid,
  .v2-grid-3,
  .seo-potential-panel{
    grid-template-columns:1fr;
  }

  .v2-potential-list{
    grid-template-columns:1fr;
  }
}

/* Header Action Buttons */
.v2-toolbar{
  margin-top:4px;
}

.v2-actions{
  gap:10px;
}

.v2-action-form{
  margin:0;
}

.v2-action-btn{
  height:46px;
  min-width:190px;
  padding:0 18px;
  border:1px solid #2563eb;
  border-radius:14px;
  background:#fff;
  color:#1d4ed8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-weight:800;
  text-decoration:none;
  box-shadow:0 8px 20px rgba(37,99,235,.08);
  cursor:pointer;
  transition:.18s ease;
}

.v2-action-btn span{
  font-size:18px;
  line-height:1;
}

.v2-action-btn strong{
  font-size:14px;
  line-height:1;
}

.v2-action-btn:hover{
  background:#2563eb;
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(37,99,235,.18);
}

.v2-action-btn.primary{
  background:#eff6ff;
}

.v2-action-btn.primary:hover{
  background:#2563eb;
}

@media(max-width:900px){
  .v2-toolbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .v2-actions{
    width:100%;
    flex-direction:column;
    align-items:stretch;
  }

  .v2-action-btn,
  .v2-action-form{
    width:100%;
  }
}

/* Task Cards */
.task-card-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.task-card{
  margin:0;
}

.task-card-btn{
  width:100%;
  min-height:78px;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px 16px;
  display:grid;
  grid-template-columns:42px 1fr auto 22px;
  align-items:center;
  gap:12px;
  cursor:pointer;
  text-align:left;
  transition:.18s ease;
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.task-card-btn:hover{
  border-color:#2563eb;
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(37,99,235,.12);
}

.task-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:#eff6ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
}

.task-body{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.task-body strong{
  color:#111827;
  font-size:15px;
}

.task-body small{
  color:#6b7280;
  font-size:13px;
  line-height:1.35;
}

.task-gain{
  padding:6px 10px;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  font-weight:900;
  font-size:13px;
}

.task-arrow{
  color:#94a3b8;
  font-weight:900;
}

/* Link Health Cards */
.card-title-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}

.card-title-row h3{
  margin:0;
}

.health-badge{
  display:inline-flex;
  align-items:center;
  height:28px;
  padding:0 11px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}

.health-badge.excellent{
  background:#dcfce7;
  color:#15803d;
}

.health-badge.good{
  background:#dbeafe;
  color:#1d4ed8;
}

.health-badge.warning{
  background:#fef3c7;
  color:#b45309;
}

.link-health-number{
  display:flex;
  align-items:flex-end;
  gap:10px;
  margin:18px 0;
}

.link-health-number strong{
  font-size:48px;
  line-height:.9;
  color:#111827;
}

.link-health-number span{
  color:#6b7280;
  font-size:14px;
  font-weight:700;
}

.link-health-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:16px 0 18px;
}

.link-health-meta div{
  background:#f8fafc;
  border:1px solid #eef2f7;
  border-radius:14px;
  padding:12px;
}

.link-health-meta span{
  display:block;
  color:#6b7280;
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
}

.link-health-meta strong{
  color:#111827;
  font-size:14px;
}

/* SEO History Timeline */
.seo-timeline{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:12px;
}

.seo-timeline-item{
  display:grid;
  grid-template-columns:18px 86px 1fr;
  gap:12px;
  align-items:center;
  position:relative;
}

.seo-timeline-item::before{
  content:"";
  position:absolute;
  left:8px;
  top:24px;
  bottom:-22px;
  width:2px;
  background:#e5e7eb;
}

.seo-timeline-item:last-child::before{
  display:none;
}

.timeline-dot{
  width:18px;
  height:18px;
  border-radius:999px;
  background:#2563eb;
  box-shadow:0 0 0 5px #eff6ff;
  z-index:1;
}

.timeline-score{
  display:flex;
  align-items:center;
  gap:7px;
}

.timeline-score strong{
  font-size:28px;
  line-height:1;
  color:#111827;
}

.timeline-up{
  color:#15803d;
  font-weight:900;
  font-size:13px;
}

.timeline-down{
  color:#dc2626;
  font-weight:900;
  font-size:13px;
}

.timeline-info strong{
  display:block;
  font-size:14px;
  color:#111827;
}

.timeline-info small{
  display:block;
  margin-top:3px;
  color:#6b7280;
  font-size:12px;
}

/* ALT Status Card */
.alt-summary{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.alt-summary div{
  min-height:86px;
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.alt-summary div:nth-child(1){
  background:#eff6ff;
  border-color:#bfdbfe;
}

.alt-summary div:nth-child(2){
  background:#f0fdf4;
  border-color:#bbf7d0;
}

.alt-summary div:nth-child(3){
  background:#fff7ed;
  border-color:#fed7aa;
}

.alt-summary div:nth-child(1) strong{
  color:#1d4ed8;
}

.alt-summary div:nth-child(2) strong{
  color:#15803d;
}

.alt-summary div:nth-child(3) strong{
  color:#c2410c;
}

/* Preview Card */
.preview-excerpt{
  padding:18px;
  border:1px solid #eef2f7;
  background:#f8fafc;
  border-radius:16px;
  color:#374151;
  line-height:1.8;
  margin-bottom:16px;
}

.preview-card .content-preview{
  border:1px solid #e5e7eb;
  background:#fff;
  padding:18px;
}

/* Requested task cards */
.task-card-link{
  text-decoration:none;
  color:inherit;
  display:block;
}

.task-card-link.requested{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  border-radius:18px;
  padding:14px 16px;
  display:grid;
  grid-template-columns:42px 1fr auto 22px;
  align-items:center;
  gap:12px;
  min-height:78px;
}

.task-card-link.requested .task-icon{
  background:#dcfce7;
  color:#15803d;
  font-weight:900;
}

.task-card-link.requested:hover{
  border-color:#22c55e;
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(34,197,94,.12);
}


/* SEO Potential Badge UI */
.improvement-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-content:flex-start;
}

.improvement-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:999px;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
}

.improvement-badge .gain{
  color:#16a34a;
  font-weight:900;
}

.improvement-badge .label{
  color:#334155;
}

.seo-potential-panel .potential-summary.compact{
  min-width:320px;
}

/* ===== Post Detail V2 iPad Adaptive ===== */

@media(max-width:1280px){
  .v2-grid-3{
    grid-template-columns:1fr 1fr !important;
  }

  .v2-grid{
    grid-template-columns:1fr 1fr !important;
    gap:18px !important;
  }

  .v2-card{
    padding:18px !important;
  }

  .v2-toolbar{
    gap:12px !important;
  }

  .v2-action-btn{
    min-width:160px !important;
    height:40px !important;
  }

  .seo-potential-panel{
    grid-template-columns:1fr !important;
  }

  .seo-potential-panel .potential-summary.compact{
    min-width:0 !important;
    width:100% !important;
  }
}


/* Analysis row: Potential + History */
.analysis-row .seo-potential-panel{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.analysis-row .seo-potential-panel h3{
  margin-bottom:0;
}

.analysis-row .seo-potential-panel .potential-summary.compact{
  min-width:0;
  width:100%;
}

.analysis-row .history-card{
  min-height:100%;
}

/* Analysis row alignment */
.analysis-row{
  align-items:stretch !important;
}

.analysis-row > .v2-card,
.analysis-row .seo-potential-panel,
.analysis-row .history-card{
  height:100%;
}

.analysis-row .seo-potential-panel,
.analysis-row .history-card{
  display:flex !important;
  flex-direction:column !important;
}

.analysis-row .seo-potential-panel h3,
.analysis-row .history-card h3{
  margin-bottom:18px !important;
}

.analysis-row .improvement-list,
.analysis-row .seo-timeline{
  margin-top:0 !important;
}

/* Top deductions */
.top-deductions-card{
  margin-top:-4px;
}

.top-deductions-card .card-title-row{
  margin-bottom:12px;
}

.top-deduction-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}

.top-deductions-card .deduction-row{
  margin:0;
}

@media(max-width:1280px){
  .top-deduction-list{
    grid-template-columns:1fr;
  }
}

/* Top 4-column KPI row */
.v2-grid-4{
  display:grid;
  grid-template-columns:1.15fr 1fr 1fr 1fr;
  gap:18px;
  align-items:stretch;
}

.top-kpi-row .v2-card{
  min-height:170px;
}

.kpi-deductions-card h3{
  margin:0;
}

.kpi-deduction-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.kpi-deduction-row{
  display:grid;
  grid-template-columns:58px 38px 1fr;
  gap:8px;
  align-items:center;
  padding:9px 10px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #eef2f7;
}

.kpi-deduction-row span{
  font-size:12px;
  font-weight:800;
  color:#2563eb;
}

.kpi-deduction-row strong{
  color:#dc2626;
  font-size:13px;
}

.kpi-deduction-row p{
  margin:0;
  font-size:12px;
  line-height:1.35;
  color:#111827;
}

@media(max-width:1280px){
  .v2-grid-4{
    grid-template-columns:1fr 1fr;
  }
}

/* ===== Post Detail V2 Card Alignment Fix ===== */

/* 2열 카드들의 내부 시작선 통일 */
.analysis-row,
.v2-grid{
  align-items:stretch !important;
}

.analysis-row > .v2-card,
.v2-grid > .v2-card{
  height:100%;
}

/* SEO 개선 가능성 카드: 중앙 쏠림 제거 */
.analysis-row .seo-potential-panel{
  justify-content:flex-start !important;
  align-items:stretch !important;
  padding-top:22px !important;
}

.analysis-row .seo-potential-panel h3{
  text-align:left !important;
  margin:0 0 18px !important;
}

.analysis-row .improvement-list{
  justify-content:flex-start !important;
  margin-bottom:18px !important;
}

.analysis-row .potential-summary.compact{
  margin-top:auto !important;
}

/* SEO 변경 이력 카드: 개선 가능성 카드와 상단 기준 맞춤 */
.analysis-row .history-card{
  padding-top:22px !important;
}

.analysis-row .history-card .card-title-row{
  margin-bottom:18px !important;
}

/* SEO 진단 / 추천 작업 카드 상단 기준 통일 */
.v2-grid .v2-card h3{
  margin-top:0 !important;
}

.v2-grid .quick-actions{
  padding-top:22px !important;
}

.v2-grid .quick-actions h3{
  margin-bottom:18px !important;
}

/* 추천 작업 카드 내부 여백 압축 */
.task-card-list{
  gap:10px !important;
}

.task-card-btn,
.task-card-link.requested{
  min-height:66px !important;
  padding:12px 14px !important;
}

/* SEO 진단 행 높이와 추천 작업 카드 균형 */
.issue-row{
  min-height:44px !important;
  align-items:center !important;
}


/* ===== Analysis Cards Redesign ===== */
.analysis-row{
  align-items:stretch !important;
}

.analysis-row > .analysis-card{
  height:100%;
}

.analysis-card{
  min-height:250px;
  display:flex !important;
  flex-direction:column !important;
  padding:22px !important;
}

.analysis-card-head{
  height:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:18px;
}

.analysis-card-head h3{
  margin:0 !important;
  font-size:18px;
  line-height:1;
}

.analysis-pill{
  height:28px;
  padding:0 11px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#e0f2fe;
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
}

.analysis-empty{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #e5e7eb;
  border-radius:16px;
  color:#64748b;
  font-weight:700;
  background:#f8fafc;
}

.analysis-badge-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}

.analysis-badge{
  min-height:42px;
  padding:10px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  display:flex;
  align-items:center;
  gap:8px;
}

.analysis-badge strong{
  color:#16a34a;
  font-size:14px;
  font-weight:900;
  flex:0 0 auto;
}

.analysis-badge span{
  color:#334155;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.analysis-score-box{
  margin-top:auto;
  min-height:76px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #eef2f7;
  display:grid;
  grid-template-columns:1fr 44px 1fr;
  align-items:center;
  text-align:center;
}

.analysis-score-box span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:5px;
}

.analysis-score-box strong{
  font-size:26px;
  line-height:1;
  color:#111827;
}

.analysis-arrow{
  color:#94a3b8;
  font-size:24px;
  font-weight:900;
}

.history-compact-list{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.history-compact-item{
  min-height:48px;
  display:grid;
  grid-template-columns:18px 82px 1fr;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid #eef2f7;
}

.history-dot{
  width:14px;
  height:14px;
  border-radius:999px;
  background:#2563eb;
  box-shadow:0 0 0 5px #eff6ff;
}

.history-score{
  display:flex;
  align-items:center;
  gap:6px;
}

.history-score strong{
  font-size:24px;
  line-height:1;
  color:#111827;
}

.history-score em{
  font-style:normal;
  font-size:12px;
  font-weight:900;
}

.history-score .up{
  color:#16a34a;
}

.history-score .down{
  color:#dc2626;
}

.history-meta strong{
  display:block;
  color:#111827;
  font-size:13px;
  line-height:1.2;
}

.history-meta span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

@media(max-width:1280px){
  .analysis-card{
    min-height:230px;
  }

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

/* ===== Company Link Recommendation Compact ===== */

.recommend-card{
  padding:12px 14px !important;
  margin-bottom:10px !important;
  min-height:0 !important;
  display:grid !important;
  grid-template-columns:1fr auto !important;
  grid-template-areas:
    "title button"
    "desc button" !important;
  column-gap:14px !important;
  row-gap:4px !important;
  align-items:center !important;
}

.recommend-card strong{
  grid-area:title !important;
  font-size:14px !important;
  line-height:1.35 !important;
  margin:0 !important;
}

.recommend-card p{
  grid-area:desc !important;
  margin:0 !important;
  font-size:13px !important;
  line-height:1.35 !important;
  color:#64748b !important;
}

.recommend-card a{
  grid-area:button !important;
  margin:0 !important;
  white-space:nowrap !important;
  align-self:center !important;
}

.v2-card .recommend-card:last-of-type{
  margin-bottom:10px !important;
}

.v2-card form[action*="apply-company-links"]{
  margin-top:6px !important;
}


/* ==========================
   Top spacing compact
========================== */

/* 페이지 상단 */
.post-detail-page{
    padding-top:12px !important;
}

/* Post Detail V2 제목 영역 */
.page-header{
    margin-bottom:18px !important;
    padding-bottom:0 !important;
}

/* 제목 카드 */
.post-header-card{
    margin-top:0 !important;
    margin-bottom:18px !important;
}

/* 첫 번째 KPI 카드와의 간격 */
.kpi-grid{
    margin-top:0 !important;
}


/* ===== Post Detail V2 Top Pull-up ===== */

.v2-wrap{
  padding-top:18px !important;
}

.v2-wrap > .page-header,
.v2-wrap > header{
  margin-bottom:12px !important;
}

.v2-toolbar{
  margin-top:0 !important;
  margin-bottom:14px !important;
}

.v2-wrap > .v2-card:first-of-type{
  margin-top:0 !important;
}

.v2-wrap section{
  margin-bottom:18px !important;
}


/* ===== Top spacing fine tuning ===== */

.v2-wrap{
    padding-top:4px !important;
}

.v2-wrap > *:first-child{
    margin-top:0 !important;
}

.v2-wrap > *{
    margin-top:0 !important;
}


/* ===== Top KPI / Analysis Grid Alignment ===== */

/* 상단 4개 카드를 정확히 4등분 */
.v2-grid-4{
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:18px !important;
}

/* 아래 분석 2개 카드는 정확히 2등분 */
.analysis-row{
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  gap:18px !important;
}

/* 상단 KPI 카드 높이 통일 */
.top-kpi-row .v2-card{
  min-height:178px !important;
}

/* SEO 카드가 혼자 넓어 보이지 않도록 내부 크기만 강조 */
.top-kpi-row .v2-kpi-main{
  min-width:0 !important;
}

.top-kpi-row .v2-kpi-main .v2-seo-main-row strong{
  font-size:56px !important;
}

/* 1280 이하에서는 2열 */
@media(max-width:1280px){
  .v2-grid-4{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }

  .analysis-row{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ===== Header action buttons compact ===== */

.v2-toolbar{
  margin-bottom:6px !important;
  align-items:center !important;
}

.v2-actions{
  gap:8px !important;
}

.v2-action-btn{
  height:34px !important;
  min-width:138px !important;
  padding:0 12px !important;
  border-radius:9px !important;
  gap:6px !important;
  box-shadow:0 4px 10px rgba(37,99,235,.07) !important;
}

.v2-action-btn span{
  font-size:14px !important;
}

.v2-action-btn strong{
  font-size:12px !important;
  font-weight:800 !important;
}

/* 버튼 아래 제목 카드와 간격 줄이기 */
.v2-toolbar + .v2-card{
  margin-top:0 !important;
}

/* 상단 제목 카드 여백도 약간 압축 */
.v2-wrap > .v2-card:first-of-type{
  padding-top:18px !important;
  padding-bottom:18px !important;
}

/* ===== Toolbar를 제목 카드에 밀착 ===== */

.v2-toolbar{
    margin-bottom:-8px !important;
    padding-bottom:0 !important;
}

/* 제목 카드 위 여백 제거 */
.v2-toolbar + .v2-card{
    margin-top:0 !important;
}

/* 제목 카드 자체도 살짝 위로 */
.post-title-card{
    margin-top:0 !important;
}

/* ===== Real Compact Spacing Override ===== */

.v2-wrap{
  gap:16px !important;
}

.v2-wrap > section,
.v2-wrap > .v2-grid,
.v2-wrap > .v2-grid-4,
.v2-wrap > .analysis-row{
  margin-bottom:0 !important;
}

.v2-grid,
.v2-grid-3,
.v2-grid-4,
.analysis-row{
  gap:16px !important;
}

.v2-card{
  padding:16px 18px !important;
}

.v2-card h3{
  margin-bottom:12px !important;
}

.top-kpi-row .v2-card{
  min-height:166px !important;
}

.analysis-card{
  min-height:230px !important;
}


/* Company apply button polish */
.company-apply-form{
  margin-top:8px !important;
  display:flex;
  justify-content:flex-end;
}

.company-apply-btn{
  height:34px;
  padding:0 14px;
  border:1px solid #2563eb;
  border-radius:9px;
  background:#eff6ff;
  color:#1d4ed8;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-weight:800;
  cursor:pointer;
  transition:.18s ease;
}

.company-apply-btn:hover{
  background:#2563eb;
  color:#fff;
  transform:translateY(-1px);
}

.company-apply-btn span,
.company-apply-btn strong{
  font-size:12px;
}

.company-applied-state{
  margin-top:8px;
  height:34px;
  padding:0 13px;
  border-radius:9px;
  background:#dcfce7;
  color:#15803d;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:900;
}

/* ===== Category Footer Card ===== */

.company-footer-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  align-items:stretch;
}

.company-footer-row > section{
  height:100%;
}

.category-footer-card{
  min-height:190px;
}

.category-footer-body{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.category-footer-meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
}

.category-footer-meta span{
  color:#64748b;
  font-size:12px;
  font-weight:800;
}

.category-footer-meta strong{
  color:#111827;
  font-size:13px;
}

.category-footer-preview{
  min-height:54px;
  padding:12px;
  border-radius:12px;
  background:#fff;
  border:1px solid #e5e7eb;
  color:#334155;
  font-size:13px;
  line-height:1.55;
}

.category-footer-preview hr{
  display:none;
}

.category-footer-preview p{
  margin:0;
}

.category-footer-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
}

.v2-btn-primary,
.v2-btn-light{
  height:34px;
  padding:0 12px;
  border-radius:9px;
  border:0;
  font-size:12px;
  font-weight:900;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.v2-btn-primary{
  background:#2563eb;
  color:#fff;
}

.v2-btn-light{
  background:#f1f5f9;
  color:#334155;
  border:1px solid #e2e8f0;
}

.mini-badge.warn{
  background:#fef3c7;
  color:#92400e;
}

.mini-badge.danger{
  background:#fee2e2;
  color:#b91c1c;
}

@media(max-width:1100px){
  .company-footer-row{
    grid-template-columns:1fr;
  }
}

/* ===== SEO History Sparkline ===== */

.history-spark-card{
  cursor:pointer;
  transition:.16s ease;
}

.history-spark-card:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}

.sparkline-wrap{
  margin-top:8px;
}

.seo-sparkline{
  width:100%;
  height:72px;
  color:#2563eb;
  overflow:visible;
}

.seo-sparkline circle{
  fill:#2563eb;
}

.sparkline-bottom{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
}

.sparkline-bottom strong{
  font-size:22px;
  font-weight:900;
  color:#111827;
}

.sparkline-bottom span{
  font-size:12px;
  font-weight:900;
}

.sparkline-bottom .up{
  color:#16a34a;
}

.sparkline-bottom .down{
  color:#dc2626;
}

.sparkline-bottom em{
  margin-left:auto;
  color:#64748b;
  font-size:12px;
  font-style:normal;
  font-weight:800;
}

/* ===== SEO History Sparkline ===== */

.history-spark-card{
  cursor:pointer;
  transition:.16s ease;
}

.history-spark-card:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(15,23,42,.08);
}

.sparkline-wrap{
  margin-top:8px;
}

.seo-sparkline{
  width:100%;
  height:72px;
  color:#2563eb;
  overflow:visible;
}

.seo-sparkline circle{
  fill:#2563eb;
}

.sparkline-bottom{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:6px;
}

.sparkline-bottom strong{
  font-size:22px;
  font-weight:900;
  color:#111827;
}

.sparkline-bottom span{
  font-size:12px;
  font-weight:900;
}

.sparkline-bottom .up{
  color:#16a34a;
}

.sparkline-bottom .down{
  color:#dc2626;
}

.sparkline-bottom em{
  margin-left:auto;
  color:#64748b;
  font-size:12px;
  font-style:normal;
  font-weight:800;
}


/* ===== SEO History Compact Preview ===== */

.compact-history-line{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:34px;
  padding:0 6px;
}

.history-dot{
  width:44px;
  height:44px;
  border-radius:999px;
  background:#eef2ff;
  color:#1d4ed8;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  font-weight:900;
}

.history-dot.current{
  background:#2563eb;
  color:#fff;
}

.history-bar{
  flex:1;
  height:8px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.history-bar-fill{
  width:100%;
  height:100%;
  background:#2563eb;
  border-radius:999px;
}


/* ===== SEO History Detail ===== */

.seo-history-big-score{
  display:flex;
  align-items:flex-end;
  gap:10px;
  margin:18px 0 22px;
}

.seo-history-big-score strong{
  font-size:52px;
  line-height:1;
  font-weight:900;
  color:#111827;
}

.seo-history-big-score span,
.seo-history-item .up{
  color:#16a34a;
  font-weight:900;
}

.seo-history-big-score .down,
.seo-history-item .down{
  color:#dc2626;
  font-weight:900;
}

.seo-history-timeline{
  display:grid;
  gap:12px;
}

.seo-history-item{
  display:grid;
  grid-template-columns:64px 1fr;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f8fafc;
}

.seo-history-score{
  width:54px;
  height:54px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:900;
}

.seo-history-item p{
  margin:4px 0;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}

.seo-history-sub{
  color:#334155;
  font-size:13px;
  font-weight:800;
}


/* ===== SEO History Real Sparkline ===== */

.real-sparkline-wrap{
  position:relative;
  margin-top:18px;
  padding:0 10px;
}

.real-seo-sparkline{
  width:100%;
  height:110px;
  color:#2563eb;
  overflow:visible;
}

.real-seo-sparkline line{
  stroke:#e5e7eb;
  stroke-width:1;
}

.real-seo-sparkline polyline{
  fill:none;
  stroke:#2563eb;
  stroke-width:3.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.real-seo-sparkline circle{
  fill:#2563eb;
  stroke:#fff;
  stroke-width:3;
}

.sparkline-score{
  position:absolute;
  width:38px;
  height:38px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}

.sparkline-score.start{
  left:10px;
  bottom:20px;
}

.sparkline-score.end{
  right:10px;
  top:12px;
}


/* ===== SEO History Real Sparkline ===== */

.real-sparkline-wrap{
  position:relative;
  margin-top:18px;
  padding:0 10px;
}

.real-seo-sparkline{
  width:100%;
  height:110px;
  color:#2563eb;
  overflow:visible;
}

.real-seo-sparkline line{
  stroke:#e5e7eb;
  stroke-width:1;
}

.real-seo-sparkline polyline{
  fill:none;
  stroke:#2563eb;
  stroke-width:3.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.real-seo-sparkline circle{
  fill:#2563eb;
  stroke:#fff;
  stroke-width:3;
}

.sparkline-score{
  position:absolute;
  width:38px;
  height:38px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}

.sparkline-score.start{
  left:10px;
  bottom:20px;
}

.sparkline-score.end{
  right:10px;
  top:12px;
}



/* ===== SEO History ChartJS ===== */

.history-preview-score{
  display:flex;
  align-items:flex-end;
  gap:8px;
  margin-top:22px;
}

.history-preview-score strong{
  font-size:42px;
  line-height:1;
  font-weight:900;
  color:#111827;
}

.history-preview-score span{
  font-size:13px;
  font-weight:900;
}

.history-preview-score .up,
.seo-history-big-score .up,
.seo-history-item .up{
  color:#16a34a;
}

.history-preview-score .down,
.seo-history-big-score .down,
.seo-history-item .down{
  color:#dc2626;
}

.history-preview-note{
  margin-top:14px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}

.seo-history-page-title{
  margin:8px 0 10px;
}

.seo-history-chart-box{
  height:320px;
  margin-top:18px;
}


/* TAG RECOMMENDATION */
.tag-recommendation-card {
  margin-top: 20px;
}

.tag-recommendation-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-recommendation-item {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid #d7dde5;
  border-radius: 999px;
  background: #f7f9fb;
  color: #263238;
  font-size: 14px;
  font-weight: 700;
}

.tag-recommendation-empty {
  color: #7a7f87;
  font-size: 14px;
}
