*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f4f7fb;
  --card: #fff;
  --card-soft: #f8fafc;
  --text: #172033;
  --muted: #607089;
  --faint: #8b99ad;
  --border: #dfe6ef;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

html { font-size: 18px; scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.62;
  letter-spacing: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.10), transparent 28%),
    radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.10), transparent 24%),
    var(--bg);
}

a { color: inherit; }
.page { width: min(1440px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 34px; overflow-x: clip; }
.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; }

.header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.header__left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.logo { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.logo__brand {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 16px;
  font-weight: 850;
  text-decoration: none;
}
.logo__sep { color: var(--faint); font-size: 18px; }
.logo__crumb { font-size: clamp(18px, 2.2vw, 22px); font-weight: 800; letter-spacing: 0; }
.logo__accent { color: var(--accent); }
.time-info {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.header__right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex: 1 1 auto; flex-wrap: wrap; }
.site-nav { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.site-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  transition: .16s ease;
}
.site-nav__item:hover,
.site-nav__item.is-active {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-1px);
}
.site-nav__item[href$="ai/"]::before { content: "\2728"; }
.site-nav__item[href$="shopping/"]::before { content: "\1F6CD"; }
.site-nav__item[href$="news/"]::before { content: "\1F4F0"; }
.site-nav__item[href$="video/"]::before { content: "\1F3AC"; }
.site-nav__item[href$="book/"]::before { content: "\1F4DA"; }
.site-nav__item[href$="voice/"]::before { content: "\1F399"; }
.site-nav__item[href$="travel/"]::before { content: "\2708"; }
.site-nav__item[href$="transport/"]::before { content: "\1F9ED"; }
.site-nav__item[href$="life/"]::before { content: "\1F3E1"; }
.site-nav__item[href$="tools/"]::before { content: "\1F9E9"; }
.site-nav__item[href$="widgets/"]::before { content: "\1F9F0"; }
.site-nav__item[href$="org/"]::before { content: "\1F3DB"; }
.site-nav__item[href$="bank/"]::before { content: "\1F3E6"; }
.site-nav__item[href$="health/"]::before { content: "\1FA7A"; }
.site-nav__item[href$="kids/"]::before { content: "\1F388"; }
.site-nav__item[href$="dic/"]::before { content: "\1F4D8"; }
.site-nav__item[href$="english/"]::before { content: "\1F524"; }
.site-nav__item[href$="japan/"]::before { content: "\1F5FE"; }
.site-nav__item[href$="china/"]::before { content: "\1F004"; }

.theme-toggle {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #dbeafe);
  color: #1e293b;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 6px 16px rgba(15, 23, 42, .07);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  font-size: 13px;
  line-height: 1;
}

.theme-toggle.is-dark {
  background: linear-gradient(135deg, #111827, #334155);
  color: #e5e7eb;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  filter: brightness(1.02);
  transform: translateY(-1px);
  outline: 2px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}

.card {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: clamp(22px, 2.4vw, 34px);
}

.search-card { margin-bottom: 18px; position: relative; overflow: hidden; }
.search-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--accent), #14b8a6); }
.search-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 12px; border-radius: 999px; color: #fff; background: var(--accent); font-size: 15px; font-weight: 850; }
.lead { color: var(--muted); font-size: 17px; }
.search-form { display: flex; gap: 10px; align-items: stretch; }
.search-engine,
.search-input,
.search-button {
  min-height: 48px;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 16px;
}
.search-engine { flex: 0 0 auto; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 0 14px; cursor: pointer; }
.search-input { flex: 1 1 auto; min-width: 0; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 0 18px; outline: none; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.search-button { flex: 0 0 auto; border: 0; background: var(--accent); color: #fff; padding: 0 28px; font-weight: 850; cursor: pointer; }
.quick-engines { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  padding: 5px 11px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.engine-ico {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
  flex: 0 0 auto;
}
.chip__logo {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
  flex: 0 0 auto;
  overflow: hidden;
}
.chip__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chip > img {
  max-width: 18px;
  max-height: 18px;
}
.jump-hint { margin-top: 12px; color: var(--muted); font-size: 16px; }

body[data-service="video"] {
  --accent: #e11d48;
  --accent-soft: #fff1f2;
  --bg: #f8fafc;
  background:
    radial-gradient(circle at 15% 0%, rgba(225, 29, 72, 0.13), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(15, 23, 42, 0.12), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}
body[data-service="video"] .search-card::before {
  background: linear-gradient(90deg, #e11d48, #7c3aed, #0f172a);
}
body[data-service="video"] .badge,
body[data-service="video"] .search-button,
body[data-service="video"] .site-nav__item.is-active {
  background: linear-gradient(135deg, #e11d48, #7c3aed);
  border-color: transparent;
}
body[data-service="video"] .card {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

body[data-service="book"] {
  --accent: #7c3f16;
  --accent-soft: #fff7ed;
  --bg: #f8fafc;
  background:
    radial-gradient(circle at 12% 0%, rgba(180, 83, 9, 0.12), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(20, 184, 166, 0.10), transparent 24%),
    linear-gradient(180deg, #fffaf2 0%, #eef6f5 100%);
}
body[data-service="book"] .search-card::before {
  background: linear-gradient(90deg, #92400e, #14b8a6, #334155);
}
body[data-service="book"] .badge,
body[data-service="book"] .search-button,
body[data-service="book"] .site-nav__item.is-active {
  background: linear-gradient(135deg, #92400e, #0f766e);
  border-color: transparent;
}

body[data-service="travel"] {
  --accent: #0ea5a4;
  --accent-soft: #ecfeff;
  --bg: #f3fbfb;
  background:
    radial-gradient(circle at 12% 0%, rgba(14, 165, 164, 0.14), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(56, 189, 248, 0.14), transparent 24%),
    linear-gradient(180deg, #f7fffb 0%, #edf7ff 100%);
}
body[data-service="travel"] .search-card::before {
  background: linear-gradient(90deg, #0ea5a4, #38bdf8, #f59e0b);
}
body[data-service="travel"] .badge,
body[data-service="travel"] .search-button,
body[data-service="travel"] .site-nav__item.is-active {
  background: linear-gradient(135deg, #0ea5a4, #38bdf8);
  border-color: transparent;
}

.tools-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.tool-link {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}
.tool-link b { font-size: 17px; }
.tool-link small { display: block; color: var(--muted); font-size: 13px; font-weight: 650; line-height: 1.35; }
.tool-link__main { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.tool-link__ico { width: 24px; height: 24px; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); flex: 0 0 auto; }
.tool-link__go { color: var(--faint); }
.tool-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.service-intel { display: grid; gap: 14px; margin-bottom: 18px; }
.insight-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.insight-card {
  min-height: 168px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card), var(--card-soft));
  box-shadow: var(--shadow);
}
.insight-card strong { display: block; margin-bottom: 8px; font-size: 19px; line-height: 1.35; }
.insight-card p { color: var(--muted); font-size: 16px; line-height: 1.6; }
.insight-card a { display: inline-flex; margin-top: 12px; color: var(--accent); font-size: 15px; font-weight: 850; text-decoration: none; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.guide-card h3 { margin-bottom: 10px; font-size: 19px; }
.guide-card ol { display: grid; gap: 8px; padding-left: 1.2em; color: var(--muted); font-size: 16px; }
.guide-card li::marker { color: var(--accent); font-weight: 850; }

.topic-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
}
.topic-row span { margin-right: 4px; color: var(--muted); font-size: 15px; font-weight: 850; }
.topic-chip {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--text);
  padding: 7px 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 750;
  cursor: pointer;
}
.topic-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-title { font-size: clamp(22px, 2vw, 30px); font-weight: 850; }
.count { color: var(--muted); font-size: 16px; }
.filter-row { margin-bottom: 16px; }
.filter-input { width: 100%; min-height: 52px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card); color: var(--text); padding: 0 16px; font: inherit; font-size: 17px; outline: none; }
.filter-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }

.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.link-section { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--card-soft); padding: 16px; }
.link-section__title { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); font-size: 20px; font-weight: 850; }
.link-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.link-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
}
.link-list a span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-favicon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
  flex: 0 0 auto;
}
.link-list a:hover { color: var(--accent); background: var(--accent-soft); }
.empty { display: none; color: var(--muted); padding: 16px 0; }
.empty.is-visible { display: block; }

.footer { text-align: center; color: var(--faint); font-size: 14px; padding: 24px 0 0; }
.footer__legal {
  display: grid;
  gap: 4px;
  max-width: 980px;
  margin: 0 auto;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.6;
}

body.theme-dark {
  --bg: #0b1020;
  --card: #151d31;
  --card-soft: #111827;
  --text: #eef3fb;
  --muted: #a8b3c7;
  --faint: #7d8aa2;
  --border: rgba(255,255,255,.12);
  --accent: #60a5fa;
  --accent-soft: rgba(96,165,250,.14);
  --shadow: 0 16px 44px rgba(0,0,0,.34);
}

@media (max-width: 980px) {
  .tools-row,
  .directory-grid,
  .insight-grid,
  .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .page { width: min(100% - 24px, 1440px); max-width: 100%; overflow-x: clip; }
  .header,
  .header__left,
  .header__right { min-width: 0; max-width: 100%; }
  .header__right { width: 100%; overflow: hidden; }
  .logo { gap: 7px; }
  .logo__brand {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 14px;
  }
  .logo__sep { font-size: 15px; }
  .logo__crumb { font-size: clamp(18px, 5vw, 22px); }
  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .site-nav__item {
    justify-content: center;
    min-width: 0;
    min-height: 46px;
    padding: 8px 6px;
    font-size: 14px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }
  .theme-toggle,
  .search-engine,
  .search-input,
  .search-button {
    min-height: 56px;
    font-size: 18px;
  }
  .chip {
    min-height: 38px;
    padding: 5px 11px;
    font-size: 14px;
  }
  .engine-ico {
    width: 18px;
    height: 18px;
  }
  .search-form { flex-wrap: wrap; }
  .search-engine,
  .search-button { flex: 1 1 100%; }
  .tools-row,
  .directory-grid,
  .insight-grid,
  .guide-grid { grid-template-columns: 1fr; }
}

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