:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #17233a;
  --muted: #697487;
  --line: #e6ebf2;
  --primary: #ff6336;
  --primary-dark: #ed3f4d;
  --primary-soft: #fff0ea;
  --navy: #17233a;
  --success: #159b72;
  --shadow-sm: 0 8px 24px rgba(27, 42, 74, 0.07);
  --shadow-md: 0 18px 48px rgba(27, 42, 74, 0.12);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 4% 0%, rgba(255, 132, 59, 0.11), transparent 25rem),
    radial-gradient(circle at 100% 14%, rgba(57, 123, 236, 0.09), transparent 28rem),
    var(--bg);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

button {
  color: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.utility-bar {
  min-height: 38px;
  border-bottom: 1px solid rgba(221, 227, 237, 0.8);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
}

.utility-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}

.utility-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-link,
.utility-button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.18s ease;
}

.utility-link:hover,
.utility-button:hover {
  color: var(--primary);
}

.utility-highlight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.utility-highlight::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb21c, #f13b4c);
  box-shadow: 0 0 0 4px rgba(255, 99, 54, 0.1);
}

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 241, 0.86);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  height: 50px;
  max-width: 220px;
}

.brand img {
  height: 100%;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

/* 관리자가 지정한 커스텀 로고(tables/settings.logo_url)로 교체되기 전까지
   기본 이미지가 잠깐 노출되는 깜빡임(FOUC)을 막기 위해, 로고가 최종 확정될 때까지
   살짝 투명하게 숨겨두고 확정 즉시 부드럽게 페이드인합니다. */
.js-logo-img {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.js-logo-img.is-logo-ready {
  opacity: 1;
}

/* ===== 상단 공지 티커 (로고 오른쪽, 한 줄만 표시) ===== */
.notice-ticker {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.notice-ticker:empty {
  display: none;
}

.notice-ticker-badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.notice-ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.notice-ticker-inner {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.notice-ticker-text {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

.notice-ticker-text:hover {
  color: var(--primary);
}

.notice-ticker-text + .notice-ticker-text {
  margin-left: 48px;
}

.notice-ticker-viewport.is-overflowing .notice-ticker-inner {
  animation: notice-scroll linear infinite;
}

@keyframes notice-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.mobile-menu-button span,
.mobile-menu-button::before,
.mobile-menu-button::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-button.is-active::before {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-button.is-active::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-button.is-active span {
  opacity: 0;
}

/* =====================================================================
   모바일 전용 Off-canvas 사이드 드로어 (카테고리 전체 메뉴)
   - PC(761px 이상)에서는 하단 @media(min-width:761px) 규칙으로 항상 완전히 숨김/비활성화됨.
   - 기본 상태: 화면 왼쪽 바깥으로 translateX(-100%), pointer-events:none.
   ===================================================================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: min(86vw, 360px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: var(--shadow-md);
  transform: translateX(-100%);
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
  overflow-y: auto;
  pointer-events: none;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-drawer.is-active {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-drawer-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.mobile-drawer-logo {
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

.mobile-drawer-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
}

.mobile-drawer-close:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.mobile-drawer-body {
  flex: 1;
  padding: 16px;
}

.mobile-drawer-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mobile-drawer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mobile-drawer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 6px;
  border: 1px solid #e0e6ee;
  border-radius: 16px;
  background: #fff;
  color: #454f61;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  transition: 0.18s ease;
}

.mobile-drawer-item:hover,
.mobile-drawer-item.is-active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.mobile-drawer-item-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--icon-color, #fff);
  background: var(--icon-bg, currentColor);
}

.mobile-drawer-item-icon svg {
  width: 60%;
  height: 60%;
}

.mobile-drawer-item.is-active .mobile-drawer-item-icon,
.mobile-drawer-item:hover .mobile-drawer-item-icon {
  filter: brightness(1.08);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.mobile-drawer-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* 모바일 하단(Footer 바로 위)으로 이동된 사이트 통계 텍스트. PC에서는 숨김. */
.mobile-site-stats {
  display: none;
}

.hero {
  padding: 26px 0 14px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px 34px 20px;
  border: 1px solid rgba(226, 230, 238, 0.9);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 245, 0.95)),
    #fff;
  box-shadow: var(--shadow-md);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-card::before {
  width: 260px;
  height: 260px;
  top: -150px;
  right: -40px;
  background: rgba(255, 162, 74, 0.16);
}

.hero-card::after {
  width: 200px;
  height: 200px;
  right: 120px;
  bottom: -160px;
  background: rgba(60, 127, 235, 0.1);
}

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #d34a2c;
  background: #fff0e9;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6336;
}

.hero h1 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.22;
  letter-spacing: -0.04em;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero-description {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.search-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 820px);
  margin: 16px auto 0;
}

.engine-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.engine-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  color: #6e788b;
  background: transparent;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

.engine-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.engine-tab.is-active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(23, 35, 58, 0.2);
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-height: 44px;
  padding-left: 16px;
  border: 2px solid var(--navy);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(24, 36, 59, 0.12);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 16px 38px rgba(255, 99, 54, 0.15);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

.search-box input::placeholder {
  color: #a1a9b8;
}

.search-submit {
  align-self: stretch;
  border: 0;
  border-radius: 0 12px 12px 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff7a2e, #ee3e4d);
  cursor: pointer;
  transition: filter 0.18s ease;
}

.search-submit svg {
  width: 18px;
  height: 18px;
}

.search-submit:hover {
  filter: brightness(0.96);
}

.search-helper {
  min-height: 16px;
  margin: 6px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.search-helper strong {
  color: var(--primary);
}

.quick-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #e7ebf1;
  border-radius: 10px;
  color: #596477;
  background: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.quick-link:hover {
  transform: translateY(-2px);
  color: var(--primary);
  border-color: #ffd0c1;
}

.quick-link-rank {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--navy);
  font-size: 9px;
}

.banner-section {
  padding: 0 0 12px;
}

.banner-section[hidden] {
  display: none;
}

.banner-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  touch-action: pan-y;
}

.banner-track {
  display: flex;
  transition: transform 0.35s ease;
}

.banner-track.is-multi {
  flex-wrap: wrap;
  transform: none !important;
}

.banner-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.banner-track.is-multi .banner-slide {
  flex: 0 0 calc(50% - 6px);
}

.banner-slide a,
.banner-slide picture,
.banner-slide img {
  display: block;
  width: 100%;
}

.banner-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 160;
  object-fit: cover;
}

.banner-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.banner-arrow-prev { left: 8px; }
.banner-arrow-next { right: 8px; }

.banner-carousel[data-single="true"] .banner-arrow,
.banner-carousel[data-single="true"] .banner-controls {
  display: none;
}

.banner-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.banner-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.banner-dot.is-active {
  width: 20px;
  border-radius: 999px;
  background: #fff;
}

.category-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 9px 0;
  border-top: 1px solid rgba(226, 231, 239, 0.76);
  border-bottom: 1px solid rgba(226, 231, 239, 0.9);
  background: rgba(243, 246, 251, 0.9);
  backdrop-filter: blur(16px);
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid #e0e6ee;
  border-radius: 999px;
  color: #626d80;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: 0.18s ease;
}

.category-nav-link:hover,
.category-nav-link.is-active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.category-nav-link img {
  width: 22px;
  height: 22px;
}

.category-nav-link-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--icon-color, #fff);
  background: var(--icon-bg, currentColor);
}

.category-nav-link-icon svg {
  width: 70%;
  height: 70%;
}

.category-nav-link.is-active .category-nav-link-icon,
.category-nav-link:hover .category-nav-link-icon {
  filter: brightness(1.08);
}

.content-section {
  padding: 32px 0 72px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.result-summary {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #6a7486;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.result-summary.is-visible {
  display: flex;
}

.result-reset {
  border: 0;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.category-card {
  --accent: #ff6336;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e3e8ef;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  scroll-margin-top: 76px;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 30%, #e3e8ef);
  box-shadow: var(--shadow-md);
}

.category-card.is-hidden,
.link-item.is-hidden {
  display: none;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent);
}

.category-card-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, #fff), #fff);
}

.category-icon {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  filter: drop-shadow(0 8px 8px rgba(22, 35, 58, 0.12));
}

.category-icon-chip {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--icon-color, #fff);
  background: var(--icon-bg, var(--accent));
  filter: drop-shadow(0 8px 8px rgba(22, 35, 58, 0.12));
}

.category-icon-chip svg {
  width: 60%;
  height: 60%;
}

/* 관리자가 직접 업로드한 커스텀 아이콘 이미지: 칩 크기에 맞춰 자동 축소되도록 %/contain 사용 */
.category-icon-chip.has-custom-icon,
.category-nav-link-icon.has-custom-icon,
.mobile-drawer-item-icon.has-custom-icon {
  background: var(--icon-bg, var(--accent));
  overflow: hidden;
}

.category-icon-chip.has-custom-icon img,
.category-nav-link-icon.has-custom-icon img,
.mobile-drawer-item-icon.has-custom-icon img {
  width: 68%;
  height: 68%;
  object-fit: contain;
  border-radius: 4px;
}

.category-title-wrap {
  min-width: 0;
  flex: 1;
}

.category-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.category-count {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.category-count strong {
  margin-left: 3px;
  color: var(--accent);
}

.category-anchor {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  transition: transform 0.18s ease;
}

.category-anchor:hover {
  transform: translateY(-2px);
}

.link-list {
  margin: 0;
  padding: 0 14px 14px;
  list-style: none;
}

.link-item {
  border-top: 1px solid #edf0f5;
}

.link-item:first-child {
  border-top: 0;
}

.link-row {
  min-height: 47px;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 8px;
  padding: 7px 5px;
  transition: color 0.16s ease, background 0.16s ease, padding 0.16s ease;
}

.link-row:hover {
  color: var(--accent);
  padding-left: 9px;
  background: color-mix(in srgb, var(--accent) 5%, #fff);
}

.link-rank {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #7a8496;
  background: #f2f5f8;
  font-size: 10px;
  font-weight: 900;
}

.link-rank.is-top-rank {
  color: #fff;
  background: var(--accent);
}

/* TOP11: 1~3위는 살짝 더 도드라지게(과하지 않게) 표시합니다. */
.link-rank.is-top-rank {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent);
}

.link-badge-rec {
  color: #1a7a4c;
  background: #e8f8ef;
}

.link-main {
  min-width: 0;
}

.link-name {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 19px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-domain {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #9aa2b1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #e64d31;
  background: #fff0e9;
  font-size: 9px;
  font-weight: 900;
}

.link-out {
  display: grid;
  place-items: center;
  color: #b0b7c3;
}

.empty-category {
  padding: 24px 16px 30px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.no-results {
  display: none;
  grid-column: 1 / -1;
  padding: 70px 24px;
  border: 1px dashed #d6dde7;
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.no-results.is-visible {
  display: block;
}

.no-results-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: 20px;
  color: var(--primary);
  background: var(--primary-soft);
}

.no-results h3 {
  margin: 0;
  font-size: 18px;
}

.no-results p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid #dde3ec;
  background: #1b273c;
  color: #c5ccda;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  padding: 42px 0;
}

.footer-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.footer-brand {
  height: 30px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 7px;
  padding: 5px 10px;
  box-sizing: content-box;
}

/* 로고 이미지 로드에 실패했을 때를 위한 텍스트 대체 브랜드명 (기본은 숨김) */
.footer-brand-text {
  display: none;
  color: #f4f6fb;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.footer-brand-fallback .footer-brand-text {
  display: inline-block;
}

.footer-copy {
  max-width: 640px;
  margin: 0;
  color: #9da8bb;
  font-size: 12px;
  line-height: 1.8;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 10px 18px;
  font-size: 12px;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #7f8ba1;
  font-size: 11px;
  text-align: center;
}

.telegram-contact {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 31;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 16px;
  color: #fff;
  background: #229ed9;
  box-shadow: 0 12px 30px rgba(34, 158, 217, 0.3);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.telegram-contact:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 15px 34px rgba(34, 158, 217, 0.38);
}

.telegram-contact svg {
  flex: 0 0 auto;
}

.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 10px 28px rgba(23, 35, 58, 0.27);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: min(90vw, 460px);
  padding: 13px 17px;
  border-radius: 13px;
  color: #fff;
  background: #17233a;
  box-shadow: 0 18px 48px rgba(15, 23, 40, 0.26);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1020px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .telegram-contact {
    right: 14px;
    bottom: 72px;
    min-height: 44px;
    padding: 0 13px;
    border-radius: 14px;
    font-size: 12px;
  }

  .back-to-top {
    right: 14px;
    bottom: 16px;
  }

  .container {
    width: min(calc(100% - 22px), var(--container));
  }

  /* 모바일 상단 통계(카테고리 12개 · 주소 120개)는 완전히 숨기고, 해당 공간도 제거합니다.
     (동일 정보는 Footer 바로 위에 .mobile-site-stats로 재노출됩니다 — 중복 방지) */
  .utility-inner {
    justify-content: center;
  }

  .utility-group:first-child {
    display: none;
  }

  .utility-group:last-child {
    display: none;
  }

  .utility-bar {
    display: none;
  }

  .header-inner {
    min-height: 58px;
    gap: 8px;
  }

  .brand {
    flex: 0 0 auto;
    height: 32px;
    max-width: 128px;
  }

  .mobile-menu-button {
    display: block;
    flex: 0 0 auto;
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  /* 로고/버튼은 줄지 않고, 남는 공간만 공지 티커가 차지합니다(밀림 방지). */
  .notice-ticker {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
  }

  /* ===== 모바일 하단(Footer 위) 사이트 통계 텍스트 ===== */
  .mobile-site-stats {
    display: block;
    margin: 0;
    padding: 14px 0;
    text-align: center;
    font-size: 11px;
    color: #8b94a5;
  }

  /* ===== Off-canvas 드로어: 390px 기준 3열, 좁은 화면은 2열로 축소 ===== */
  .mobile-drawer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .notice-ticker {
    height: 30px;
    padding: 0 10px;
    gap: 6px;
  }

  .notice-ticker-text {
    font-size: 11.5px;
  }

  .hero {
    padding: 14px 0 10px;
  }

  .hero-card {
    padding: 18px 14px 16px;
    border-radius: 18px;
  }

  .hero-eyebrow {
    margin-bottom: 5px;
    padding: 4px 9px;
    font-size: 10px;
  }

  .hero h1 {
    font-size: 19px;
  }

  .hero-description {
    margin-top: 4px;
    font-size: 11px;
  }

  .search-panel {
    margin-top: 10px;
  }

  .engine-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 2px 1px;
    scrollbar-width: none;
  }

  .engine-tabs::-webkit-scrollbar {
    display: none;
  }

  .engine-tab {
    flex: 0 0 auto;
  }

  .search-box {
    min-height: 40px;
    grid-template-columns: minmax(0, 1fr) 42px;
    padding-left: 12px;
    border-radius: 13px;
  }

  .search-submit {
    border-radius: 0 11px 11px 0;
  }

  .search-submit svg {
    width: 16px;
    height: 16px;
  }

  .search-helper {
    font-size: 10px;
    margin-top: 4px;
  }

  .quick-links {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .quick-links::-webkit-scrollbar {
    display: none;
  }

  .quick-link {
    flex: 0 0 auto;
  }

  .banner-section {
    padding: 0 0 8px;
  }

  .banner-carousel {
    border-radius: 12px;
  }

  .banner-arrow {
    width: 26px;
    height: 26px;
    font-size: 15px;
  }

  .category-nav-wrap {
    top: 0;
    padding: 7px 0;
  }

  .content-section {
    padding-top: 14px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .section-heading h2 {
    font-size: 23px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 9px;
  }

  .category-card {
    border-radius: 15px;
  }

  .category-card::before {
    height: 3px;
  }

  .category-card-header {
    min-height: 73px;
    gap: 8px;
    padding: 12px 9px 9px;
  }

  .category-icon,
  .category-icon-chip {
    width: 43px;
    height: 43px;
    border-radius: 13px;
  }

  .category-title {
    font-size: 14px;
  }

  .category-count {
    margin-top: 3px;
    font-size: 9px;
  }

  .category-anchor {
    display: none;
  }

  .link-list {
    display: block;
    padding: 0 7px 8px;
  }

  .link-item,
  .link-item:nth-child(2) {
    border-top: 1px solid #edf0f5;
  }

  .link-item:first-child {
    border-top: 0;
  }

  .link-row {
    min-height: 38px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 5px;
    padding: 5px 1px;
  }

  .link-row:hover {
    padding-left: 3px;
  }

  .link-rank {
    width: 19px;
    height: 19px;
    border-radius: 6px;
    font-size: 8px;
  }

  .link-name {
    font-size: 16px;
  }

  .link-domain,
  .link-badge,
  .link-out {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 0;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
  }
}

/* 매우 좁은 화면(340px 이하)에서는 카테고리 카드 그리드를 1열로 낮춰 카드가 눌려 보이지 않도록 합니다. */
@media (max-width: 340px) {
  .category-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* 360px 이하 좁은 화면: 드로어 카테고리 그리드를 2열로 축소해 글자가 겹치지 않도록 함. */
@media (max-width: 380px) {
  .mobile-drawer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-drawer {
    width: min(88vw, 320px);
  }
}

/* PC(761px 이상)에서는 Off-canvas 드로어 관련 요소를 어떤 상태에서도 완전히 비활성화합니다
   (버튼 자체도 기본 규칙에서 display:none 이지만, 방어적으로 한 번 더 차단). */
@media (min-width: 761px) {
  .mobile-menu-button,
  .mobile-drawer,
  .mobile-drawer-overlay,
  .mobile-site-stats {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
