/* ===== 디자인 토큰 ===== */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --text: #191f28;
  --text-2: #4e5968;
  --muted: #8b95a1;
  --line: #e5e8eb;
  --brand: #0e7c86;
  --brand-2: #36c4d6;
  --brand-soft: #e3f6f8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .05), 0 10px 28px rgba(0, 0, 0, .09);
  --radius: 16px;
  --maxw: 1080px;
  --narrow: 760px;

  /* 카테고리 색 */
  --c-arrive: #0e7c86; --c-arrive-soft: #e3f6f8;
  --c-essentials: #3b5bdb; --c-essentials-soft: #edf2ff;
  --c-stay: #c2255c; --c-stay-soft: #fff0f6;
  --c-places: #e8590c; --c-places-soft: #fff4e6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #181c21;
    --surface-2: #20252c;
    --text: #e9ecef;
    --text-2: #b0b8c1;
    --muted: #7d8794;
    --line: #2b3138;
    --brand: #4fd1de;
    --brand-2: #7fe3ec;
    --brand-soft: #123236;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-hover: 0 6px 20px rgba(0, 0, 0, .45);
    --c-arrive: #4fd1de; --c-arrive-soft: #123236;
    --c-essentials: #8ea2ff; --c-essentials-soft: #1c2448;
    --c-stay: #f783ac; --c-stay-soft: #3a1626;
    --c-places: #ffa94d; --c-places-soft: #3a2412;
  }
}
.cat-arrive { --c: var(--c-arrive); --c-soft: var(--c-arrive-soft); }
.cat-essentials { --c: var(--c-essentials); --c-soft: var(--c-essentials-soft); }
.cat-stay { --c: var(--c-stay); --c-soft: var(--c-stay-soft); }
.cat-places { --c: var(--c-places); --c-soft: var(--c-places-soft); }

/* ===== 기본 ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.75 Inter, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: var(--narrow); margin-left: auto; margin-right: auto; }
.wrap.narrow { padding: 0 16px; }

/* ===== 헤더 ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: .95rem; font-weight: 900;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-link { padding: 6px 14px; border-radius: 999px; color: var(--text-2); font-size: .93rem; font-weight: 600; transition: background .15s, color .15s; }
.nav-link:hover { text-decoration: none; background: var(--c-soft); color: var(--c); }
.nav-link.is-active { background: var(--c-soft); color: var(--c); }

/* ===== 홈 히어로 ===== */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -20%, rgba(54, 196, 214, .35), transparent 60%),
    linear-gradient(135deg, #0b5f69 0%, #0e7c86 50%, #1c9aa8 100%);
  color: #fff;
}
.hero-inner { padding-top: 56px; padding-bottom: 44px; }
.hero-eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .85rem; font-weight: 600; }
.hero-title { margin: 0 0 12px; font-size: clamp(1.7rem, 4.2vw, 2.5rem); line-height: 1.3; letter-spacing: -0.03em; font-weight: 800; }
.hero-desc { margin: 0 0 28px; max-width: 640px; color: rgba(255, 255, 255, .85); font-size: 1.02rem; }
.hero-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.cat-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius); background: rgba(255, 255, 255, .96); color: #191f28;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12); transition: transform .15s, box-shadow .15s;
}
.cat-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
.cat-tile-icon { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: var(--c-soft); font-size: 1.45rem; }
.cat-tile-name { font-weight: 800; font-size: 1.18rem; letter-spacing: -0.02em; }
.cat-tile-count { color: #6b7684; font-size: .88rem; }
@media (prefers-color-scheme: dark) {
  .cat-tile { background: rgba(24, 28, 33, .92); color: var(--text); }
  .cat-tile-count { color: var(--muted); }
}

/* ===== 카테고리·정책 페이지 히어로 ===== */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 36px 0 30px; }
.page-hero.cat-arrive, .page-hero.cat-essentials, .page-hero.cat-stay, .page-hero.cat-places { background: linear-gradient(180deg, var(--c-soft), var(--surface)); }
.page-hero-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 1.6rem; margin-bottom: 12px; }
.page-hero-title { margin: 0; font-size: clamp(1.7rem, 4vw, 2.3rem); letter-spacing: -0.02em; }
.page-hero-desc { margin: 4px 0 0; color: var(--text-2); }

/* ===== 본문 영역 ===== */
.main { padding-top: 36px; padding-bottom: 72px; min-height: 50vh; }
.section-title { margin: 0 0 16px; font-size: 1.25rem; letter-spacing: -0.02em; }
.empty { color: var(--muted); }

/* ===== 글 카드 ===== */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.post-card {
  position: relative; display: flex; flex-direction: column; height: 100%;
  padding: 22px 22px 18px; border-radius: var(--radius); background: var(--surface); color: inherit;
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.post-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c, var(--brand)); }
.post-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: transparent; }
.post-card:hover .post-card-title { color: var(--c, var(--brand)); }
.post-card.has-thumb::before { display: none; }
.post-card-thumb { display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; margin: -22px -22px 16px; }
.post-card:hover .post-card-thumb { filter: brightness(1.04); }
.badge { align-self: flex-start; display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--c-soft, var(--brand-soft)); color: var(--c, var(--brand)); font-size: .8rem; font-weight: 700; }
.post-card-title { margin: 12px 0 8px; font-size: 1.15rem; line-height: 1.45; letter-spacing: -0.02em; transition: color .15s; }
.compact .post-card-title { margin-top: 4px; font-size: 1rem; }
.post-card-desc { margin: 0 0 14px; color: var(--text-2); font-size: .94rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-meta { margin-top: auto; color: var(--muted); font-size: .84rem; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; }
.pager-count { color: var(--muted); font-size: .9rem; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .93rem; }
.btn:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }

/* ===== 글 상세 히어로 ===== */
.post-hero { background: linear-gradient(180deg, var(--c-soft), var(--bg)); padding: 32px 0 8px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--c); font-weight: 600; }
.post-title { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.35; letter-spacing: -0.03em; }
.post-lead { margin: 0 0 16px; color: var(--text-2); font-size: 1.05rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); font-size: .88rem; }

/* ===== 글 본문 ===== */
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .post { padding: 22px 18px; border-radius: 16px; } }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2 {
  position: relative; margin: 2.4em 0 .8em; padding-left: 14px;
  font-size: 1.4rem; line-height: 1.4; letter-spacing: -0.02em;
}
.post-body h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--c, var(--brand)); }
.post-body h3 { margin: 1.8em 0 .5em; font-size: 1.15rem; letter-spacing: -0.01em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-body li { margin: .3em 0; }
.post-body li::marker { color: var(--c, var(--brand)); font-weight: 700; }
.post-body strong { color: var(--text); background: linear-gradient(transparent 62%, var(--c-soft, var(--brand-soft)) 62%); }
.post-body img { max-width: 100%; height: auto; border-radius: 12px; }
.post-body blockquote {
  margin: 1.4em 0; padding: 14px 18px; border-radius: 12px;
  background: var(--c-soft, var(--brand-soft)); border-left: 4px solid var(--c, var(--brand)); color: var(--text);
}
.post-body blockquote p { margin: .2em 0; }
.post-body table {
  width: 100%; margin: 1.2em 0 1.6em; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: .95rem;
  display: block; overflow-x: auto;
}
.post-body thead th { background: var(--c-soft, var(--brand-soft)); color: var(--text); font-weight: 700; }
.post-body th, .post-body td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body tr:last-child td { border-bottom: 0; }
.post-body tbody tr:nth-child(even) td { background: var(--surface-2); }
.post-body code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

.summary-box { margin: 0 0 16px; padding: 16px 20px; border-radius: 14px; background: var(--surface-2); border-left: 5px solid var(--c, var(--brand)); }
.summary-title { margin: 0 0 6px; font-weight: 800; color: var(--c, var(--brand)); }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin: .25em 0; }

.stats-box { margin: 0 0 24px; padding: 18px 20px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stats-title { margin: 0 0 4px; font-weight: 800; color: var(--c, var(--brand)); }
.stats-sub { margin: 0 0 14px; color: var(--text-2); font-size: .92rem; }
.stats-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stats-bars li { display: grid; grid-template-columns: 7.5em 1fr 3.4em; align-items: center; gap: 10px; font-size: .93rem; }
.stats-track { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.stats-fill { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 55%, #fff)); }
.stats-bars li.is-hi .stats-label, .stats-bars li.is-hi .stats-val { font-weight: 800; color: var(--c, var(--brand)); }
.stats-val { text-align: right; font-variant-numeric: tabular-nums; }
.stats-note { margin: 12px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }

.experience-box { margin: 0 0 24px; padding: 16px 20px; border-radius: 14px; background: var(--c-soft, var(--brand-soft)); border: 1px dashed var(--c, var(--brand)); }
.experience-title { margin: 0 0 6px; font-weight: 800; color: var(--c, var(--brand)); }
.experience-box p { margin: .3em 0; }

.toc { margin: 0 0 28px; padding: 16px 20px; border-radius: 14px; background: var(--surface-2); font-size: .95rem; }
.toc summary { font-weight: 700; cursor: pointer; }
.toc ul { margin: 8px 0 0; padding-left: 18px; }
.toc li { margin: 4px 0; }
.toc a { color: var(--text-2); }
.toc a:hover { color: var(--c, var(--brand)); }

.sources { margin-top: 36px; padding: 18px 20px; border-radius: 14px; background: var(--surface-2); }
.sources h2 { margin: 0 0 8px; font-size: 1.05rem; }
.sources ul { margin: 0; padding-left: 18px; font-size: .95rem; }
.sources-note { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.tags { margin: 20px 0 0; }
.tags span { display: inline-block; margin: 0 6px 6px 0; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .85rem; }

.author-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 24px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.author-avatar { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; font-size: 1.1rem; }
.author-name { margin: 0 0 4px; font-weight: 700; }
.author-desc { margin: 0; color: var(--text-2); font-size: .92rem; line-height: 1.6; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.post-nav-item { display: block; padding: 14px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .95rem; line-height: 1.5; }
.post-nav-item small { display: block; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.post-nav-item.is-next { text-align: right; grid-column: 2; }
.post-nav-item:hover { text-decoration: none; border-color: var(--brand); }
@media (max-width: 640px) { .post-nav { grid-template-columns: 1fr; } .post-nav-item.is-next { grid-column: auto; } }
.related { margin-top: 40px; }

/* ===== 사이트맵 ===== */
.sitemap-group { margin-bottom: 24px; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.sitemap-group h2 { margin: 0 0 8px; font-size: 1.1rem; }
.sitemap-group ul { margin: 0; padding-left: 18px; }
.sitemap-group time { color: var(--muted); font-size: .85rem; margin-left: 6px; }

/* ===== 푸터 ===== */
.site-footer { margin-top: 24px; background: #12161b; color: #aeb6bf; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.site-footer .logo { color: #fff; }
.footer-brand p { margin: 10px 0 0; color: #8b95a1; }
.footer-title { margin: 0 0 10px; color: #fff; font-size: .95rem; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin: 6px 0; }
.site-footer a { color: #cfd5db; }
.site-footer a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid #262c33; color: #7d8794; font-size: .85rem; }
