/* ============================================
   전역 스타일 - CSS 변수 기반 테마 시스템
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg, #f8fafc);
  color: var(--text, #0f172a);
  font-family: var(--font-family-site, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, sans-serif);
  font-size: var(--font-size-base, 15px);
  margin: 0;
  min-height: 100vh;
}
@media (max-width: 640px) {
  body {
    font-size: var(--font-size-base-mobile, 14px);
  }
}

/* 관리자 설정 기반 글씨 크기 유틸리티 클래스 */
.text-site-heading {
  font-size: var(--font-size-heading, 20px);
}
.text-site-menu {
  font-size: var(--font-size-menu, 14px);
}
.text-site-small {
  font-size: var(--font-size-small, 12px);
}
@media (max-width: 640px) {
  .text-site-heading {
    font-size: var(--font-size-heading-mobile, 18px);
  }
  .text-site-menu {
    font-size: var(--font-size-menu-mobile, 13px);
  }
  .text-site-small {
    font-size: var(--font-size-small-mobile, 11px);
  }
}

/* ============================================
   메뉴(카테고리) 개별/전역 폰트·아이콘 크기 설정 반영용 유틸리티
   각 메뉴 항목에 인라인으로 --menu-font-pc/--menu-font-mobile,
   --menu-icon-pc/--menu-icon-mobile 커스텀 프로퍼티를 지정하면
   PC/모바일 미디어쿼리에 따라 자동으로 알맞은 값이 적용된다.
   ============================================ */
.menu-item-sized {
  font-size: var(--menu-font-pc, inherit);
}
@media (max-width: 640px) {
  .menu-item-sized {
    font-size: var(--menu-font-mobile, var(--menu-font-pc, inherit));
  }
}
.menu-icon-sized {
  width: var(--menu-icon-pc, 20px);
  height: var(--menu-icon-pc, 20px);
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .menu-icon-sized {
    width: var(--menu-icon-mobile, var(--menu-icon-pc, 18px));
    height: var(--menu-icon-mobile, var(--menu-icon-pc, 18px));
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* 레이아웃 */
.site-header {
  background-color: var(--surface, #fff);
  border-bottom: 1px solid var(--border, #e2e8f0);
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-menu-item {
  color: var(--text, #0f172a);
  transition: color 0.15s ease;
}
.nav-menu-item:hover {
  color: var(--primary, #4f46e5);
}
.nav-menu-item.active {
  color: var(--primary, #4f46e5);
  font-weight: 700;
}

/* 카드 공통 */
.card {
  background-color: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--primary, #4f46e5);
}

/* 버튼 */
.btn-primary {
  background-color: var(--primary, #4f46e5);
  color: white;
  border-radius: 8px;
  transition: opacity 0.15s ease;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text, #0f172a);
  border-radius: 8px;
}
.btn-danger {
  background-color: var(--danger, #ef4444);
  color: white;
  border-radius: 8px;
}

.muted-text {
  color: var(--muted, #64748b);
}
.accent-text {
  color: var(--accent, #6366f1);
}
.border-theme {
  border-color: var(--border, #e2e8f0) !important;
}
.surface-bg {
  background-color: var(--surface, #fff) !important;
}

/* TOP10 순위 카드 그리드 (카테고리 상세 페이지) */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1024px) {
  .rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

.rank-card {
  background-color: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rank-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.rank-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
}
.favorite-btn {
  border: none;
  cursor: pointer;
  color: var(--muted, #64748b);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.favorite-btn i {
  margin-right: 2px;
}
.favorite-btn.favorited {
  background: color-mix(in srgb, var(--primary, #4f46e5) 15%, transparent);
  color: var(--primary, #4f46e5);
}
.rank-badge-num {
  position: absolute;
  top: 10px;
  left: 12px;
  font-weight: 800;
  font-size: 20px;
  color: var(--muted, #94a3b8);
}
.rank-medal {
  font-size: 28px;
  margin-bottom: 6px;
}
/* 순위 아이콘 PC/모바일 개별·전역 크기 반영용 유틸리티 (RankCard, GroupCard 공용) */
.rank-icon-sized {
  width: var(--rank-icon-pc, 28px);
  height: var(--rank-icon-pc, 28px);
  object-fit: contain;
}
@media (max-width: 640px) {
  .rank-icon-sized {
    width: var(--rank-icon-mobile, var(--rank-icon-pc, 24px));
    height: var(--rank-icon-mobile, var(--rank-icon-pc, 24px));
  }
}
.rank-logo-box {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  border-radius: 8px;
  overflow: hidden;
}
.rank-badge-favorite {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 3px 8px;
}
@media (max-width: 640px) {
  .rank-card { padding: 10px; }
  .rank-logo-box { height: 44px; }
  .rank-medal { font-size: 20px; }
}

/* 게시판(콘텐츠) 그리드: PC 4열 / 모바일 2열 */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1024px) {
  .board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

/* 로고 링크바 */
.logo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.logo-bar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  background: var(--surface, #fff);
  font-size: 13px;
  transition: border-color 0.15s ease;
}
.logo-bar-item:hover {
  border-color: var(--primary, #4f46e5);
}
.logo-bar-item img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* 관리자 레이아웃 */
.admin-sidebar {
  background-color: #1e1e2d;
  color: #cfd2e3;
  min-height: 100vh;
  width: 240px;
}
.admin-sidebar a {
  color: #cfd2e3;
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 6px;
  margin: 2px 8px;
  transition: background 0.15s ease;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background-color: #2c2c3f;
  color: #fff;
}
.admin-sidebar .group-title {
  color: #6b7280;
  font-size: 11px;
  padding: 16px 20px 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-main {
  flex: 1;
  background-color: #f1f2f6;
  min-height: 100vh;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
}
.admin-table th {
  background: #f8f9fb;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  color: #6b7280;
  border-bottom: 1px solid #eee;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f2f2f2;
  font-size: 14px;
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: #fafbfc;
}

.theme-swatch {
  width: 100%;
  height: 60px;
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.theme-swatch span {
  flex: 1;
}

.drag-handle {
  cursor: grab;
  color: #9ca3af;
}
.drag-handle:active {
  cursor: grabbing;
}

.sortable-ghost {
  opacity: 0.4;
}

/* 모바일 메뉴 드로어 */
.mobile-drawer {
  transform: translateX(100%);
  transition: transform 0.2s ease;
}
.mobile-drawer.open {
  transform: translateX(0);
}

/* ============================================
   헤더 상단바 (PC 한 줄: 날짜/시간 - 인기검색어 - 로고 - 검색)
   ============================================ */
.header-top-bar {
  background-color: var(--header-bg, var(--surface));
  color: var(--header-text, var(--text));
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
}

.header-main-bar {
  background-color: var(--header-bg, var(--surface));
  color: var(--header-text, var(--text));
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.header-datetime {
  font-weight: 600;
  white-space: nowrap;
  color: var(--header-text, var(--text));
  letter-spacing: 0.02em;
}

.header-trending {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.header-trending-label {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--primary, #4f46e5);
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary, #4f46e5) 12%, transparent);
  font-size: 11px;
}
.header-trending-list {
  position: relative;
  height: 18px;
  overflow: hidden;
  min-width: 0;
}
.header-trending-item {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.header-trending-item.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}
.header-trending-rank {
  font-weight: 800;
}

.header-logo-pc img {
  display: block;
  object-fit: contain;
}

/* 검색엔진 선택 + 검색창 */
.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface, #fff);
}
.search-engine-select {
  border: none;
  background: transparent;
  padding: 6px 6px 6px 12px;
  font-size: 12px;
  color: var(--text, #0f172a);
  border-right: 1px solid var(--border, #e2e8f0);
  cursor: pointer;
  outline: none;
  max-width: 90px;
}
.search-input {
  border: none;
  outline: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 13px;
  width: 200px;
  color: var(--text, #0f172a);
}
.search-submit-btn {
  border: none;
  background-color: var(--primary, #4f46e5);
  color: #fff;
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.search-submit-btn:hover {
  opacity: 0.9;
}

/* 모바일 헤더 */
.header-mobile-bar {
  background-color: var(--header-bg, var(--surface));
  color: var(--header-text, var(--text));
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.header-logo-mobile img {
  display: block;
  object-fit: contain;
}
.mobile-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  font-size: 15px;
}
.header-mobile-meta {
  overflow: hidden;
}
.header-mobile-meta .header-trending {
  flex: 1;
}
.mobile-search-bar .search-form {
  width: 100%;
}
.mobile-search-bar .search-input {
  flex: 1;
  width: auto;
}

/* ============================================
   배너 그리드: PC 4열, 모바일 2열, 이미지 비율 유지
   ============================================ */
.banner-grid-wrap {
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px 16px 0;
}
.banner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.banner-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  aspect-ratio: 4 / 1; /* 400x100 권장 배너 사이즈 비율 */
  background: var(--surface, #fff);
}
.banner-item img,
.banner-item picture {
  display: block;
  width: 100%;
  height: 100%;
}
.banner-item img {
  object-fit: cover;
}
.banner-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted, #94a3b8);
  font-size: 12px;
}
@media (max-width: 640px) {
  .banner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

/* ============================================
   안내 문구 영역
   ============================================ */
.notice-banner {
  max-width: 1152px;
  margin: 12px auto 0;
  padding: 10px 16px;
  border: 1px solid;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}
@media (max-width: 640px) {
  .notice-banner {
    margin: 8px 16px 0;
  }
}

/* ============================================
   좌측 카테고리 Sidebar (헤더 레이아웃 sidebar / 카테고리 위치 sidebar)
   ============================================ */
.layout-with-sidebar {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.category-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 84px;
}
.sidebar-category-nav {
  background-color: var(--card, #fff);
  border: 1px solid var(--card-border, var(--border));
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-category-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text, #0f172a);
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.sidebar-category-item:hover {
  background-color: var(--hover-bg, color-mix(in srgb, var(--primary, #4f46e5) 8%, transparent));
}
.sidebar-category-item.active {
  background-color: var(--primary, #4f46e5);
  color: #fff;
}
.layout-with-sidebar .layout-main-content {
  flex: 1;
  min-width: 0;
}

/* ============================================
   TOP10 그룹 카드 그리드: PC 5열, 모바일 2열
   ============================================ */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1024px) {
  .top10-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .top10-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
/* 좌측 사이드바 레이아웃일 때는 메인 콘텐츠 폭이 줄어드므로 그리드 열 수 축소 */
.layout-with-sidebar .top10-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .layout-with-sidebar .top10-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .layout-with-sidebar .top10-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.layout-with-sidebar .rank-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .layout-with-sidebar .rank-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .layout-with-sidebar .rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.group-card {
  background-color: var(--top10-group-bg, var(--card));
  border: 1px solid var(--card-border, var(--border));
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.group-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.group-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.group-card-more {
  font-size: 11px;
  opacity: 0.7;
}
.group-card-list {
  list-style: none;
  margin: 0;
  padding: 4px 8px 8px;
}
.group-card-item {
  border-radius: 8px;
}
.group-card-item-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
}
.group-card-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}
.group-card-link:hover {
  background-color: var(--hover-bg, color-mix(in srgb, var(--primary, #4f46e5) 8%, transparent));
}
.group-card-rank {
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted, #94a3b8);
}
.group-card-rank-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.group-card-logo {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: color-mix(in srgb, var(--muted, #94a3b8) 12%, transparent);
}
.group-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.group-card-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
@media (max-width: 640px) {
  .group-card-header { padding: 10px 12px; font-size: 13px; }
  .group-card-name { font-size: 12px; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background-color: var(--footer-bg, transparent);
  color: var(--footer-text, inherit);
}
.footer-links-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 13px;
}
.footer-links-row a:hover {
  color: var(--primary, #4f46e5);
}
.footer-sep {
  color: var(--border, #e2e8f0);
}
.footer-info-row {
  text-align: center;
}
.footer-visitor-count::before {
  content: '';
}
@media (min-width: 768px) {
  .footer-links-row {
    justify-content: flex-start;
  }
  .footer-info-row {
    text-align: left;
  }
  .footer-meta-row {
    justify-content: flex-start !important;
  }
}
@media (max-width: 640px) {
  .footer-links-row {
    flex-wrap: wrap;
    font-size: 12px;
  }
}

/* 이용약관/개인정보처리방침 공개 페이지 */
.legal-content {
  line-height: 1.8;
}
.legal-content img {
  max-width: 100%;
}

/* ============================================
   초보자용 SEO + GEO + GSC + Sitemap 자동관리 - 전용 UI 컴포넌트
   ============================================ */

/* 토글 스위치 (ON/OFF) */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #d1d5db;
  border-radius: 999px;
  transition: background-color 0.15s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.switch input:checked + .slider {
  background-color: var(--primary, #4f46e5);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}
.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* "[? 사용방법]" 도움말 팝오버 */
.seo-help-wrap {
  position: relative;
}
.seo-help-popover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.seo-help-popover.hidden {
  display: none;
}

/* 용어 옆 작은 물음표(?) 도움말 아이콘 */
.seo-q {
  position: relative;
}
.seo-q-tip {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  line-height: 1.5;
  pointer-events: none;
}
.seo-q-tip.hidden {
  display: none;
}
.seo-q.seo-q-open .seo-q-tip {
  display: block;
}

/* SEO 시작하기 마법사 - 단계 표시 원(dot) */
.wizard-step-dot {
  transition: background-color 0.15s ease, color 0.15s ease;
}
.wizard-step-dot.is-active {
  background-color: var(--primary, #4f46e5) !important;
  color: #fff !important;
}
.wizard-step-dot.is-done {
  background-color: #16a34a !important;
  color: #fff !important;
}

/* 글자수 카운터 상태 색상 (부족/적정/초과) */
.seo-count-warn {
  color: #d97706 !important;
}
.seo-count-good {
  color: #16a34a !important;
}
.seo-count-bad {
  color: #dc2626 !important;
}

/* ============================================
   링크 관리 - URL 상태 통합 (섹션 19~41)
   "1개 링크 = 1개 Compact Row" 가 핵심이므로
   행이 커지지 않도록 폰트/패딩을 최소화한다.
   ============================================ */

/* 상단 Compact 상태 요약 바 (섹션 26, 27) */
.status-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.status-summary-chip:hover {
  background: #e5e7eb;
}
.status-summary-chip.active {
  background: var(--primary, #4f46e5);
  color: #fff;
}
.status-summary-chip.status-ok.active { background: #16a34a; }
.status-summary-chip.status-redirect.active { background: #2563eb; }
.status-summary-chip.status-caution.active { background: #d97706; }
.status-summary-chip.status-error.active { background: #dc2626; }
.status-summary-chip.status-unreachable.active { background: #7f1d1d; }
.status-summary-chip.status-unchecked.active { background: #6b7280; }

/* 링크 관리 PC 테이블: 한 줄 유지가 최우선 (섹션 20) */
.link-compact-table td,
.link-compact-table th {
  white-space: nowrap;
}
.link-compact-table .link-name-cell {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-compact-table td:last-child {
  white-space: nowrap;
}

/* URL 상태 뱃지 (행 안에서 작게, 섹션 24) */
.link-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  line-height: 1.5;
  white-space: nowrap;
}
.link-status-badge:hover {
  filter: brightness(0.96);
}

/* 상태가 이전 검사와 달라졌을 때 표시하는 작은 뱃지 (섹션 40 - 크게 만들지 말 것) */
.link-changed-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* 응답시간/검사시각은 부가정보이므로 무채색으로 눈에 덜 띄게 (섹션 21) */
.link-resptime-cell,
.link-checktime-cell {
  color: #9ca3af;
}

/* 모바일 Compact Row (섹션 22 - 1~2줄 유지) */
.link-row-mobile {
  background: #fff;
}
.link-row-mobile .link-status-badge {
  font-size: 11px;
  padding: 2px 8px;
}

/* 검사 중인 행 표시 (진행 중 살짝 흐리게) */
.link-row.is-checking,
.link-row-mobile.is-checking {
  opacity: 0.55;
}

/* 상세보기 Drawer (섹션 21, 33) */
#link-detail-drawer.hidden {
  display: none;
}
#link-detail-body dt {
  color: #6b7280;
  font-size: 12px;
  margin-top: 10px;
}
#link-detail-body dd {
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}

/* ===== 링크 관리 - 순위/수동조회/실제클릭/합산 복구 (처음 구축 당시 기능 복구) ===== */
.link-rank-badge {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
}
.link-views-cell b { color: #111827; }
