:root {
  --blue: #2563eb;
  --blue-soft: #eff4ff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6e9f0;
  --pink: #ec4899;
  --card-shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard", "Inter", -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 28px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.logo .logo-box {
  background: var(--ink); color: #fff; border-radius: 6px;
  padding: 1px 6px; margin-left: 1px; font-weight: 800;
}
.main-nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.main-nav a, .main-nav .nav-more {
  font-size: 15px; font-weight: 600; color: #475569;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.main-nav a.active { color: var(--blue); }
.badge-new {
  font-size: 10px; font-weight: 800; font-style: normal;
  background: var(--pink); color: #fff;
  border-radius: 999px; padding: 2px 6px; letter-spacing: .02em;
}
.nav-more svg { width: 14px; height: 14px; }
.header-actions { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }
.btn-feature {
  font-size: 14px; font-weight: 600; color: var(--blue);
  background: var(--blue-soft); border-radius: 10px; padding: 8px 16px;
}
.btn-signin {
  font-size: 14px; font-weight: 600; color: var(--blue);
  border: 1.5px solid var(--blue); border-radius: 10px; padding: 7px 16px;
  background: #fff;
}

/* ---------- hero ---------- */
.world-main { max-width: 1280px; margin: 0 auto; padding: 24px 28px 80px; }
.hero {
  position: relative; overflow: hidden;
  border-radius: 24px; min-height: 300px;
  display: flex; align-items: center;
  background: #1c1917;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(10, 10, 12, .52);
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  width: 100%; padding: 48px 56px;
}
.hero-eyebrow {
  color: rgba(255,255,255,.75); font-size: 12px; font-weight: 700;
  letter-spacing: .18em; margin-bottom: 10px;
}
.hero-title {
  color: #fff; font-size: 42px; font-weight: 800; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.hero-title .badge-new { font-size: 12px; padding: 3px 9px; }
.hero-desc { color: rgba(255,255,255,.88); font-size: 16px; max-width: 560px; }
.hero-buttons { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
.btn-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #0b0f19; color: #fff; font-size: 15px; font-weight: 700;
  border-radius: 12px; padding: 14px 26px; min-width: 220px;
  border: 1px solid rgba(255,255,255,.14);
}
.btn-hero:hover { background: #1e293b; }

/* ---------- filter row ---------- */
.filter-row {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 8px;
}
.pills {
  display: flex; gap: 8px; overflow-x: auto; flex: 1;
  scrollbar-width: none; padding: 2px;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  white-space: nowrap; font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; color: #334155; background: #fff;
}
.pill .pill-count { color: var(--blue); font-weight: 700; margin-left: 5px; }
.pill.active { background: #0b0f19; border-color: #0b0f19; color: #fff; }
.pill.active .pill-count { color: #93c5fd; }
.search-wrap {
  position: relative; flex-shrink: 0; width: 300px;
}
.search-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: #94a3b8;
}
.search-input {
  width: 100%; font: inherit; font-size: 14px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px 10px 40px; outline: none; background: #fff;
}
.search-input:focus { border-color: var(--blue); }
.map-count { font-size: 14px; color: var(--muted); margin: 4px 0 18px; }

/* ---------- card grid ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.map-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; cursor: pointer; text-align: left;
  transition: box-shadow .18s ease, transform .18s ease;
  display: flex; flex-direction: column;
}
.map-card:hover { box-shadow: var(--card-shadow); transform: translateY(-2px); }
.card-thumb { position: relative; aspect-ratio: 4 / 3; background: #f1f5f9; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.count-pill {
  position: absolute; left: 10px; bottom: 10px;
  background: rgba(15, 23, 42, .85); color: #fff;
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 10px;
  display: inline-flex; align-items: center; gap: 4px;
}
.cat-pill {
  position: absolute; right: 10px; top: 10px;
  background: rgba(255,255,255,.92); color: var(--blue);
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 4px 10px;
  border: 1px solid var(--line);
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.card-desc {
  font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-link {
  margin-top: auto; padding-top: 8px;
  font-size: 13px; font-weight: 600; color: var(--blue);
  display: flex; align-items: center; gap: 6px;
}
.card-link .domain { color: #94a3b8; font-weight: 500; }
.card-link .arrow { margin-left: auto; }
.empty-state { padding: 60px 0; text-align: center; color: var(--muted); font-size: 15px; grid-column: 1 / -1; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 20px; width: min(880px, 100%);
  max-height: calc(100vh - 48px); overflow-y: auto;
  position: relative;
}
.modal-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px 0;
}
.modal-fullpage {
  font-size: 14px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 5px;
}
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; color: #475569;
}
.modal-close:hover { background: #f1f5f9; }
.modal-body { padding: 12px 20px 24px; }
.modal-img { border-radius: 14px; overflow: hidden; aspect-ratio: 4/3; background: #f1f5f9; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 10px; }
.meta-cat {
  background: var(--blue-soft); color: var(--blue);
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px;
}
.meta-count {
  background: #0f172a; color: #fff;
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 4px 12px;
  display: inline-flex; gap: 4px; align-items: center;
}
.meta-host { font-size: 13px; color: var(--blue); font-weight: 600; }
.meta-host span { color: #94a3b8; font-weight: 500; }
.modal-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.modal-desc { font-size: 15px; color: var(--muted); margin: 6px 0 18px; }
.btn-openmap {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #0b0f19; color: #fff;
  font-size: 15px; font-weight: 700; border-radius: 12px; padding: 15px;
}
.btn-openmap:hover { background: #1e293b; }

/* ---------- detail page ---------- */
.detail-main { max-width: 860px; margin: 0 auto; padding: 24px 28px 90px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: #475569; margin-bottom: 18px;
}
.back-link:hover { color: var(--ink); }
.detail-img { border-radius: 18px; overflow: hidden; aspect-ratio: 16/8.5; background: #f1f5f9; margin-bottom: 20px; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 6px; }
.detail-short { font-size: 16px; color: var(--muted); margin-bottom: 18px; }
.detail-intro { font-size: 15px; color: #334155; margin: 22px 0; }
.detail-section { margin: 22px 0; }
.detail-section h3 {
  font-size: 12px; font-weight: 800; letter-spacing: .12em;
  color: #64748b; text-transform: uppercase; margin-bottom: 6px;
}
.detail-section p { font-size: 15px; color: #1e293b; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-note {
  font-size: 13px; color: #94a3b8; border-top: 1px solid var(--line);
  padding-top: 16px; margin-top: 28px;
}
.pairs { margin-top: 36px; }
.pairs h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.pair-list { list-style: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pair-list li + li { border-top: 1px solid var(--line); }
.pair-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px; font-size: 14px; font-weight: 600;
}
.pair-list a:hover { background: #f8fafc; }
.pair-list .pair-domain { color: #94a3b8; font-weight: 500; font-size: 13px; white-space: nowrap; }

/* ---------- floating chat ---------- */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 50;
  width: 52px; height: 52px; border-radius: 14px;
  background: #4f7df9; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(79,125,249,.4);
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { padding: 40px; }
}
@media (max-width: 700px) {
  .site-header { padding: 0 16px; gap: 14px; height: 56px; }
  .main-nav { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .world-main { padding: 16px 16px 64px; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 22px; }
  .hero-title { font-size: 32px; }
  .hero-buttons { width: 100%; }
  .btn-hero { width: 100%; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .search-wrap { width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
  .detail-main { padding: 16px 16px 70px; }
}

/* ---------- demo labeling + toast ---------- */
.demo-banner {
  background: #fff8e6; color: #7a5b00;
  font-size: 12.5px; text-align: center;
  padding: 6px 16px; border-bottom: 1px solid #f0e2b0;
}
.sample-word { font-style: normal; font-size: 10px; opacity: .72; margin-left: 2px; }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(8px);
  background: #16181d; color: #fff; font-size: 13.5px;
  padding: 10px 18px; border-radius: 10px; z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.btn-feature, .btn-signin { white-space: nowrap; }

/* ---------- tablet header ---------- */
@media (max-width: 1024px) {
  .site-header { gap: 16px; }
  .main-nav { gap: 16px; }
}
@media (max-width: 900px) {
  .header-actions .btn-feature { display: none; }
}
