/* ============================================
   전역 스타일 - 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,
.favorite-btn.is-favorited {
  background: color-mix(in srgb, var(--primary, #4f46e5) 15%, transparent);
  color: #f59e0b;
}
.favorite-btn.is-favorited i {
  color: #f59e0b;
}
.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; }
}

/* 랭크카드 메타 행(조회수/좋아요/URL상태) - 반드시 한 줄로만 표시 */
.rank-card-meta-row {
  overflow: hidden;
  max-width: 100%;
}
.rank-card-meta-row > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
/* URL 상태 배지 - 관리자 링크관리의 STATUS_DISPLAY 색상을 인라인 style로 주입받아 사용 */
.rank-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.6;
  flex-shrink: 0;
}
.rank-status-badge i {
  font-size: 9px;
}

/* 게시판(콘텐츠) 그리드: 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;
}

/* 모바일 상단 카테고리 바로가기 (가로 스크롤) */
.mobile-category-scroll-wrap {
  background-color: var(--header-bg, var(--surface));
}
.mobile-category-scroll {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-category-scroll::-webkit-scrollbar {
  display: none;
}
.mobile-category-scroll-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--header-text, var(--text));
}
.mobile-category-scroll-item.active {
  color: var(--primary, #4f46e5);
  font-weight: 700;
}

/* 모바일 카테고리 Pill 버튼 (관리자 설정 반영: 높이/폰트/아이콘/간격/모서리/색상) */
.mobile-category-scroll-wrap .mobile-category-scroll {
  gap: var(--pill-gap, 8px);
}
.mobile-category-pill {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: var(--pill-height, 36px);
  padding: 0 14px;
  border-radius: var(--pill-radius, 999px);
  border: 1px solid var(--pill-border, var(--border, #e2e8f0));
  background: var(--pill-bg, var(--surface, #fff));
  color: var(--pill-text, var(--header-text, var(--text)));
  font-size: var(--pill-font-size, 13px);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.mobile-category-pill .menu-icon-sized {
  width: var(--pill-icon-size, 16px);
  height: var(--pill-icon-size, 16px);
}
.mobile-category-pill:hover,
.mobile-category-pill.active {
  border-color: var(--pill-hover, var(--primary, #4f46e5));
  color: var(--pill-hover, var(--primary, #4f46e5));
  font-weight: 700;
}

/* 모바일 검색엔진 바로가기(로고바): 카테고리 Pill과 약간 구분되는 스타일(사각 라운드) */
.logo-bar-item-mobile {
  border-radius: 8px;
}

/* ============================================
   모바일 햄버거 드로어 개편: 로그인그룹 / 카테고리 박스 그리드 / 퀵링크 목록 / 구분선
   (관리자 설정값은 Header.tsx의 inline style로 CSS 변수 형태로 주입됨 - menuDisplay.ts 참고)
   ============================================ */

/* 상단/하단 구분선: 로그인그룹 - 카테고리 그리드 - 퀵링크 사이를 시각적으로 분리 */
.drawer-divider {
  border: none;
  border-top: 1px solid var(--border, #e2e8f0);
  margin: 0;
}

/* 로그인/회원가입/찜목록/문의(URL) 그룹 - 카테고리 박스와 약간 다른 스타일(핑크 배경 기본, pill형 라운드) */
.drawer-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 10px;
  background: #fbcfe8;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.drawer-auth-btn:hover {
  opacity: 0.85;
}
.drawer-auth-btn:active {
  transform: scale(0.98);
}

/* 카테고리 2열 박스 그리드 (이모지 아이콘 + 이름) */
.drawer-category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.drawer-category-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--drawer-cat-box-size, 76px);
  padding: 8px 4px;
  border-radius: var(--drawer-cat-box-radius, 12px);
  background: var(--drawer-cat-box-bg, var(--surface, #fff));
  color: var(--drawer-cat-box-text, var(--text, #0f172a));
  border: 1px solid var(--drawer-cat-box-border, var(--border, #e2e8f0));
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.drawer-category-box-icon {
  font-size: 1.8em;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-category-box-name {
  font-size: var(--menu-font-mobile, 13px);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.drawer-category-box:hover,
.drawer-category-box.active {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}

/* 카테고리 그리드 좌우/상하 간격을 관리자 설정값(간격)으로 오버라이드 */
.drawer-category-grid.grid {
  gap: var(--drawer-cat-box-gap, 10px) !important;
}

/* 퀵링크 세로 목록 (공식채널/텔레그램고객센터/바뀐도메인주소 등, 이모지 포함 가능, 항목별 색상 우선) */
.drawer-quicklink-list {
  gap: var(--quicklink-gap, 8px);
}
.drawer-quicklink-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--quicklink-height, 48px);
  border-radius: var(--quicklink-radius, 8px);
  background: var(--quicklink-bg, #2563eb);
  color: var(--quicklink-text, #ffffff);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  padding: 0 12px;
  transition: opacity 0.15s ease;
}
.drawer-quicklink-item:hover {
  opacity: 0.88;
}

/* PC 퀵링크 바로가기 (공식채널/텔레그램고객센터/바뀐도메인주소 등) - 헤더 상단 정보바(날짜/시간·인기검색어와 같은 줄), PC(md 이상)에서만 노출 */
.pc-quicklink-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pc-quicklink-item {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--quicklink-bg, #2563eb);
  color: var(--quicklink-text, #ffffff);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.pc-quicklink-item:hover {
  opacity: 0.88;
}

/* 모바일 헤더 */
.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;
  /* 위 여백 = 고정배너 영역 ~ 상단 배너그리드 사이 간격 (관리자: 헤더/로고 설정 > 섹션 간격, PC/모바일 개별) */
  padding: var(--gap-fixed-top-pc, 16px) 16px 0;
}
@media (max-width: 640px) {
  .banner-grid-wrap {
    padding-top: var(--gap-fixed-top-mobile, 16px);
  }
}
.banner-grid {
  display: grid;
  grid-template-columns: repeat(var(--banner-cols-pc, 4), minmax(0, 1fr));
  gap: var(--banner-gap-pc, 10px);
}
.banner-item {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  aspect-ratio: 4 / 1; /* 기본값(4:1, 400x100 권장 사이즈 비율) - size_type별 클래스로 재정의됨 */
  background: var(--surface, #fff);
}
.banner-item-4-1 {
  aspect-ratio: 4 / 1;
}
.banner-item-3-1 {
  aspect-ratio: 3 / 1; /* 300x100 배너 사이즈 비율 */
}
.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;
}
/* 배너별 PC/모바일 노출 필터 (show_pc/show_mobile) */
@media (min-width: 641px) {
  .banner-hide-pc {
    display: none !important;
  }
}
@media (max-width: 640px) {
  .banner-grid {
    grid-template-columns: repeat(var(--banner-cols-mobile, 2), minmax(0, 1fr));
    gap: var(--banner-gap-mobile, 8px);
  }
  .banner-hide-mobile {
    display: none !important;
  }
}

/* ============================================
   고정 배너 영역 (zone='fixed') - 배너그리드/TOP10과 동일한 콘텐츠 폭(1152px)을
   배너 1개가 한 줄 전체를 꽉 채우며, 최대 3줄까지 세로로 쌓임.
   위/아래 여백은 관리자 설정(margin_top/margin_bottom)에 따라 CSS 변수로 제어되며 PC/모바일 동일 적용.
   ============================================ */
.fixed-banner-stack {
  max-width: 1152px;
  margin: 0 auto;
  padding: var(--fixed-banner-margin-top, 16px) 16px var(--fixed-banner-margin-bottom, 0px);
  display: flex;
  flex-direction: column;
  /* 고정배너 1번째~2번째~3번째 줄 사이 간격 (관리자: 헤더/로고 설정 > 섹션 간격, PC) */
  gap: var(--gap-fixed-rows-pc, 10px);
}
@media (max-width: 640px) {
  .fixed-banner-stack {
    gap: var(--gap-fixed-rows-mobile, 10px);
  }
}
.fixed-banner-item {
  display: block;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
}
.fixed-banner-item-100 {
  aspect-ratio: 12 / 1; /* 1200x100 - PC/모바일 동일 비율 유지 (모바일에서 비율을 바꾸면 아래 object-fit:cover와 만나 이미지 좌우가 잘려 보이는 문제가 있었음) */
}
.fixed-banner-item-150 {
  aspect-ratio: 8 / 1; /* 1200x150 - PC/모바일 동일 비율 유지 */
}
.fixed-banner-item img,
.fixed-banner-item picture {
  display: block;
  width: 100%;
  height: 100%;
}
.fixed-banner-item img {
  /* cover 대신 contain을 사용해 업로드된 이미지 비율이 컨테이너 비율과 정확히 일치하지 않아도
     절대 잘리지 않고 전체 이미지가 항상 보이도록 함(모바일 잘림 현상 방지) */
  object-fit: contain;
}

/* ============================================
   슬라이드 배너 영역 (zone='slide') - TOP10 카테고리 카드 아래, zone='top' 배너 풀을 재사용해
   슬롯별로 계속 자동 회전(클라이언트: /static/slide-banner.js)
   ============================================ */
.slide-banner-wrap {
  display: grid;
  grid-template-columns: repeat(var(--slide-slot-count, 2), minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}
.slide-banner-slot {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface, #fff);
  aspect-ratio: 4 / 1;
}
.slide-banner-slot a {
  display: block;
  width: 100%;
  height: 100%;
}
.slide-banner-slot picture,
.slide-banner-slot img {
  display: block;
  width: 100%;
  height: 100%;
}
.slide-banner-slot img {
  object-fit: cover;
}
@media (max-width: 640px) {
  .slide-banner-wrap {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   안내 문구 영역
   ============================================ */
.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;
  }
}

/* ============================================
   메인 콘텐츠 영역 (TOP10 그리드 / 카테고리 목록 등을 감싸는 <main>)
   위쪽 여백 = 안내 문구 ~ 카테고리/상단 콘텐츠 사이 간격
   (관리자: 헤더/로고 설정 > 섹션 간격, PC/모바일 개별). 기존 Tailwind py-8(32px)을 대체.
   ============================================ */
.site-main-content {
  padding-top: var(--gap-notice-content-pc, 32px);
  padding-bottom: 32px;
}
@media (max-width: 640px) {
  .site-main-content {
    padding-top: var(--gap-notice-content-mobile, 32px);
  }
}

/* ============================================
   좌측 카테고리 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 3~6열(관리자 설정, 기본 5), 모바일 2열
   --top10-columns / --top10-gap-pc / --top10-gap-mobile 은
   /admin/menus 의 "TOP10 카드 표시 설정"에서 관리자가 직접 조정한다 (menuDisplay.ts의 getTop10GridStyle).
   ============================================ */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(var(--top10-columns, 5), minmax(0, 1fr));
  gap: var(--top10-gap-pc, 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: var(--top10-gap-mobile, 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; }
}

/* TOP10 카테고리별 접기(is_collapsed): 헤더(아이콘+이름+TOP10+화살표)만 남기고 순위 리스트를 숨김.
   display:none 기반이라 별도 미디어쿼리 없이 PC/모바일에 동일하게 적용된다. */
.group-card.is-collapsed .group-card-list {
  display: none;
}

/* ============================================
   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; }

/* ===== 링크 관리 표 재설계 (2026-08) =====
   - 가로 스크롤바 없이 표가 화면 폭 전체를 사용 (AdminLayout fullWidth 옵션과 함께 사용)
   - 체크박스를 선택하면 해당 <tr>이 팝업 없이 바로 인라인 편집 상태로 바뀜
   - 이미지(로고)는 원본 사이즈와 무관하게 항상 동일한 고정 크기로 표시 */
.link-compact-table-full {
  table-layout: auto;
  width: 100%;
}
.link-compact-table-full .link-name-cell {
  max-width: none; /* 표가 전체 폭을 쓰므로 더 이상 사이트명을 좁게 자르지 않음 */
}
.link-url-cell .truncate-cell {
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

/* 이미지(로고) 썸네일 - 업로드 원본 사이즈가 달라도 항상 동일 크기로 표시 */
.link-logo-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.link-logo-thumb-sm {
  width: 24px;
  height: 24px;
}
.link-logo-initial {
  font-size: 12px;
  font-weight: 700;
}
.link-image-cell {
  position: relative;
}
.link-image-edit {
  display: flex;
  align-items: center;
  gap: 6px;
}
.link-edit-logo-upload-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px dashed #c7c9d9;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.link-edit-logo-upload-btn:hover {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}

/* 인라인 편집 입력요소 - 표 폭 안에서 적당히 작게 */
.link-edit-input {
  border: 1px solid #c7c9d9;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 12px;
  width: 100%;
  min-width: 60px;
  box-sizing: border-box;
}
.link-edit-rank,
.link-edit-manual-views {
  min-width: 56px;
  text-align: center;
}
.link-rank-cell,
.link-image-cell {
  min-width: 60px;
}

/* 체크박스로 선택되어 편집 중인 줄 강조 (사용자 스크린샷의 "파란 부분") */
tr.link-row.is-editing {
  background: #eef2ff;
}
tr.link-row.is-editing td {
  background: #eef2ff;
}

/* URL상태 칸 안에 응답시간/검사시각을 아주 작게 보조로 표시 */
.link-status-sub {
  margin-top: 2px;
  font-size: 10px;
  color: #9ca3af;
  white-space: nowrap;
}

/* 작업(검사/삭제) 아이콘 버튼 - 좁은 폭에서도 잘 보이게 */
.link-actions-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.link-actions-cell button {
  color: #6b7280;
  font-size: 13px;
  width: 24px;
  height: 24px;
}
.link-actions-cell .btn-check-link:hover { color: #4f46e5; }
.link-actions-cell .btn-delete-link:hover { color: #dc2626; }

/* 링크 관리 상단 상태바 - [저장] 버튼이 항상 눈에 보이도록 스크롤해도 화면 위에 고정 */
.status-summary-bar-sticky {
  position: sticky;
  top: 8px;
  z-index: 30;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 작은 사이즈 토글 스위치 (숨김 컬럼 전용 - 기존 .switch보다 살짝 작게) */
.switch-sm {
  width: 36px;
  height: 20px;
}
.switch-sm .slider::before {
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
}
.switch-sm input:checked + .slider::before {
  transform: translateX(16px);
}

/* ============================================
   회원(로그인) 시스템 - 헤더 로그인영역 / 로그인·회원가입·찜목록 모달 / 토스트
   (member-auth.js가 클래스를 토글/생성하며 사용)
   ============================================ */

/* 헤더 로그인 영역 (PC/모바일 공통, member-auth.js가 innerHTML로 채움) */
.member-auth-area {
  display: flex;
  align-items: center;
}
.member-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text, #0f172a);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.member-login-btn:hover {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}
.member-logged-in {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.member-nickname {
  font-weight: 700;
  color: var(--text, #0f172a);
}
.member-fav-link,
.member-logout-link {
  background: transparent;
  border: none;
  color: var(--muted, #64748b);
  cursor: pointer;
  padding: 4px 2px;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.15s ease;
}
.member-fav-link:hover,
.member-logout-link:hover {
  color: var(--primary, #4f46e5);
}
.member-fav-link {
  position: relative;
  padding-left: 12px;
  border-left: 1px solid var(--border, #e2e8f0);
}

/* 로그인/회원가입/찜목록 모달 공통 레이아웃 */
.member-auth-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 100;
}
.member-auth-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  width: 100%;
  max-width: 380px;
  padding: 0 16px;
}
.member-auth-modal-box {
  background: var(--card, #fff);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  max-height: 85vh;
  overflow-y: auto;
}
.member-auth-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--text, #0f172a);
}
.member-auth-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted, #64748b);
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}
.member-auth-modal-close:hover {
  color: var(--text, #0f172a);
}

/* 로그인/회원가입 폼 */
.member-auth-form {
  display: flex;
  flex-direction: column;
}
.member-auth-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  margin-top: 10px;
  margin-bottom: 4px;
}
.member-auth-label:first-child {
  margin-top: 0;
}
.member-auth-input {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  width: 100%;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
}
.member-auth-input:focus {
  outline: none;
  border-color: var(--primary, #4f46e5);
}
.member-auth-error {
  color: var(--danger, #ef4444);
  font-size: 12px;
  margin-top: 10px;
}
.member-auth-submit {
  width: 100%;
  margin-top: 16px;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.member-auth-switch {
  text-align: center;
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-top: 14px;
}
.member-auth-link {
  background: transparent;
  border: none;
  color: var(--primary, #4f46e5);
  font-weight: 700;
  cursor: pointer;
  padding: 0 0 0 4px;
  font-size: 12px;
  text-decoration: underline;
}

/* 찜목록 모달 - 카테고리 상세페이지 랭크카드(.rank-grid/.rank-card)와 동일한 카드형 그리드로 표시.
   PC: 5칸 x 2줄(최대 10개 한도와 정확히 일치), 모바일: 2칸.
   외곽 .member-auth-modal 컨테이너 자체의 max-width(380px)를 찜목록 모달에서만 넓혀준다. */
#member-favorites-modal.member-auth-modal {
  max-width: 640px;
}
.member-favorites-box {
  max-width: 640px;
}
.member-favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 65vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .member-favorites-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}
.member-favorites-item {
  position: relative;
  background-color: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 12px 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.member-favorites-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.member-favorites-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
}
.member-favorites-logo-box {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
}
.member-favorites-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.member-favorites-logo-fallback {
  font-weight: 800;
  font-size: 16px;
}
.member-favorites-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  margin-bottom: 4px;
}
.member-favorites-link:hover .member-favorites-name {
  color: var(--primary, #4f46e5);
}
/* 찜목록 카드의 조회수/좋아요/URL상태 배지 메타 행 - 카드 폭이 좁으므로(5칸 그리드) 10px로 축소해 한 줄 유지 */
.member-favorites-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 10px;
  color: var(--muted, #64748b);
}
.member-favorites-meta-row > span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .member-favorites-meta-row { font-size: 9px; gap: 4px; }
}
.member-favorites-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 999px;
  color: var(--muted, #94a3b8);
  cursor: pointer;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.member-favorites-remove:hover {
  color: #fff;
  background: var(--danger, #ef4444);
}
.member-favorites-empty {
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 13px;
  padding: 24px 0;
}
@media (max-width: 640px) {
  .member-favorites-item { padding: 8px 6px; }
  .member-favorites-logo-box { height: 44px; }
}

/* 찜 10개 제한 등 안내 토스트 - 하단 고정, fade in/out */
.member-favorite-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 12px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: 90vw;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-favorite-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 640px) {
  .member-auth-modal,
  #member-favorites-modal.member-auth-modal {
    max-width: none;
  }
  .member-auth-modal-box {
    padding: 18px;
  }
  .member-nickname {
    display: none;
  }
}
