: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: 104px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  align-items: center;
  gap: 32px;
}

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

.brand img {
  width: 100%;
  height: auto;
}

.header-message {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.header-message-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
}

.header-message strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.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);
}

.hero {
  padding: 56px 0 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 38px 44px 34px;
  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: 7px;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #d34a2c;
  background: #fff0e9;
  font-size: 12px;
  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(28px, 4vw, 46px);
  line-height: 1.2;
  letter-spacing: -0.045em;
}

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

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

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

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

.engine-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 13px;
  color: #6e788b;
  background: transparent;
  font-size: 12px;
  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) 58px;
  align-items: center;
  min-height: 62px;
  padding-left: 22px;
  border: 2px solid var(--navy);
  border-radius: 19px;
  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: 16px;
}

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

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

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

.search-helper {
  min-height: 22px;
  margin: 9px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

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

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

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #e7ebf1;
  border-radius: 12px;
  color: #596477;
  background: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  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: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--navy);
  font-size: 10px;
}

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

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

.banner-slide {
  display: none;
}

.banner-slide.is-active {
  display: block;
}

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

.banner-slide img {
  aspect-ratio: 7.5 / 1;
  object-fit: cover;
}

.banner-controls {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.banner-dot {
  width: 8px;
  height: 8px;
  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: 23px;
  border-radius: 999px;
  background: #fff;
}

.notice-strip {
  margin-bottom: 24px;
}

.notice-inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border: 1px solid #e5e9f0;
  border-radius: 15px;
  color: #687386;
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.notice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.notice-label::before {
  content: "공지";
  padding: 4px 7px;
  border-radius: 7px;
  color: #fff;
  background: var(--primary);
  font-size: 10px;
}

.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;
}

.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-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-item:nth-child(-n + 3) .link-rank {
  color: #fff;
  background: var(--accent);
}

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

.link-name {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  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 {
  width: 172px;
  margin-bottom: 13px;
  filter: brightness(0) invert(1);
  opacity: 0.94;
}

.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;
}

.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) {
  .header-inner {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .header-message {
    display: none;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .utility-inner {
    justify-content: center;
  }

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

  .utility-group {
    gap: 14px;
  }

  .header-inner {
    min-height: 76px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .brand {
    width: 171px;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero {
    padding: 22px 0 20px;
  }

  .hero-card {
    padding: 28px 15px 25px;
    border-radius: 22px;
  }

  .hero-description {
    font-size: 13px;
  }

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

  .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: 56px;
    grid-template-columns: minmax(0, 1fr) 54px;
    padding-left: 16px;
    border-radius: 16px;
  }

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

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

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

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

  .banner-slide img {
    aspect-ratio: 3 / 1;
  }

  .notice-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .category-nav-wrap {
    top: 0;
  }

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

  .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 {
    width: 43px;
    height: 43px;
  }

  .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: 11px;
  }

  .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;
  }
}

@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;
  }
}
