/* KooDong — modern magazine theme */
:root {
  --ink: #14213d;
  --text: #1f2937;
  --muted: #6b7280;
  --bg: #faf9f6;
  --surface: #ffffff;
  --line: #e7e5e0;
  --red: #d63a4a;
  --red-dark: #b42838;
  --blue: #2450b8;
  --soft: #f3efe8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 8px 24px rgba(20, 33, 61, .06);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6; --text: #e5e7eb; --muted: #9ca3af; --bg: #0f1420; --surface: #161d2c;
    --line: #263043; --soft: #1b2436; --blue: #7aa2ff; --red: #ff6b78; --red-dark: #ff8a95;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.7; font-size: 16px; word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo img { height: 34px; width: auto; }
@media (prefers-color-scheme: dark) { .logo img { content: url("../img/logo-light.svg"); } }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current] { background: var(--soft); color: var(--red); }
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { background: var(--soft); }
.menu-btn { display: none; }
.lang-switch { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; }
.lang-btn:hover { border-color: var(--ink); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); display: none; }
.lang-menu.open { display: block; }
.lang-menu a { display: block; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.lang-menu a:hover { background: var(--soft); }
.lang-menu a[aria-current] { color: var(--red); font-weight: 700; }
.search-bar { border-top: 1px solid var(--line); padding: 14px 0; background: var(--surface); }
.search-bar .wrap, .search-inline { display: flex; gap: 10px; }
.search-bar input, .search-inline input { flex: 1; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; }
.search-bar button { height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 700; }

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--red); color: #fff; font-weight: 700; }
.btn:hover { background: var(--red-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--soft); color: var(--text); }
.chip { align-self: flex-start; display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.chip:hover { background: var(--red); color: #fff; }
.meta { color: var(--muted); font-size: 13.5px; margin: 0; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* Hero */
.hero { padding: 56px 0 40px; background:
  radial-gradient(800px 300px at 10% -10%, color-mix(in srgb, var(--red) 12%, transparent), transparent 70%),
  radial-gradient(700px 300px at 100% 0%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 70%); }
.hero-inner { display: grid; gap: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--red); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.hero h1 { margin: 0; font-size: clamp(28px, 4.4vw, 48px); line-height: 1.22; letter-spacing: -.025em; color: var(--ink); max-width: 17em; }
.hero-text { margin: 14px 0 0; font-size: 18px; color: var(--muted); max-width: 40em; }
.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.cat-pills a { display: inline-flex; gap: 8px; align-items: center; padding: 10px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; box-shadow: var(--shadow); }
.cat-pills a:hover { border-color: var(--red); }

/* Sections & grids */
.section { padding: 28px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; gap: 12px; }
.section-head h2, .related h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; color: var(--ink); }
.section-head a { color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-bottom: 40px; }
.layout .grid-3 { grid-template-columns: repeat(2, 1fr); }
.layout .cat-section .grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { margin: 0; font-size: 18px; line-height: 1.4; letter-spacing: -.015em; color: var(--ink); }
.card-excerpt { margin: 0; color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; }
.featured-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; }
.card-lg .card-img { aspect-ratio: 16 / 9; }
.card-lg .card-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; }
.card-lg .card-excerpt { -webkit-line-clamp: 3; font-size: 16px; }
.featured-side { display: grid; gap: 16px; }
.card-sm { flex-direction: row; }
.card-sm .card-img { width: 38%; flex-shrink: 0; aspect-ratio: auto; }
.card-sm .card-body { padding: 14px 16px; }
.card-sm .card-title { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Sidebar */
.layout-side, .post-side { display: flex; flex-direction: column; gap: 22px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side-box h2 { margin: 0 0 12px; font-size: 17px; color: var(--ink); }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 15px; line-height: 1.45; }
.rank { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.rank-list li:first-child .rank { background: var(--red); color: #fff; }
.side-cats { list-style: none; margin: 0; padding: 0; }
.side-cats a { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.side-cats li:last-child a { border-bottom: 0; }
.side-cats .count { margin-left: auto; color: var(--muted); font-size: 13px; }

/* Page head */
.page-head { padding: 40px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; background: linear-gradient(180deg, var(--soft), transparent); }
.page-head h1 { margin: 6px 0 10px; font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.025em; color: var(--ink); line-height: 1.25; }
.page-head p { margin: 0 0 6px; color: var(--muted); max-width: 46em; }
.breadcrumb { font-size: 13.5px; color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }

/* Article */
.post-head { padding: 36px 20px 10px; }
.post-head h1 { margin: 12px 0 14px; font-size: clamp(28px, 4vw, 44px); line-height: 1.25; letter-spacing: -.03em; color: var(--ink); }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 18px; line-height: 1.6; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; color: var(--muted); font-size: 14px; padding-bottom: 6px; }
.author { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.post-hero { margin: 20px auto 30px; max-width: 1100px; }
.post-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; background: var(--soft); }
.post-hero figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: right; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; max-width: 1100px; }
.post-side { position: sticky; top: 90px; align-self: start; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 28px; }
.toc summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.toc ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; }
.toc a:hover { color: var(--red); }

.prose { font-size: 17.5px; line-height: 1.85; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin: 2.2em 0 .2em; font-size: 26px; line-height: 1.35; letter-spacing: -.02em; color: var(--ink); padding-top: .2em; }
.prose h3 { margin: 1.8em 0 .1em; font-size: 20px; line-height: 1.4; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1.6em 0; padding: 14px 22px; border-left: 4px solid var(--red); background: var(--soft); border-radius: 0 12px 12px 0; font-size: 17px; }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--soft); color: var(--ink); white-space: nowrap; }
.prose .tip { padding: 16px 20px; border-radius: 14px; background: color-mix(in srgb, var(--blue) 8%, transparent); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); }
.prose .tip strong:first-child { display: block; margin-bottom: 4px; color: var(--blue); }
.legal h2 { font-size: 21px; margin-top: 1.8em; }
.updated { color: var(--muted); font-size: 14px; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 36px 0 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.share span { font-weight: 800; margin-right: 6px; color: var(--ink); }
.share a, .share button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.share a:hover, .share button:hover { border-color: var(--ink); color: var(--ink); }
.related { border-top: 1px solid var(--line); margin-top: 20px; }
.related h2 { margin-bottom: 18px; }

/* Ads */
.ad { margin: 28px auto; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 34px 0; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 14px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.pagination span { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Forms */
.contact-form { display: grid; gap: 16px; margin-top: 26px; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea { width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; }
.contact-form textarea { resize: vertical; }
.contact-form .check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.contact-form .check a { color: var(--blue); text-decoration: underline; }
.contact-form .btn { justify-self: start; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 16px 20px; border-radius: 12px; margin-top: 22px; font-weight: 600; }
.notice.ok { background: #e7f6ec; color: #17603a; }
.notice.err { background: #fdeaea; color: #9b1c1c; }

/* 404 & empty */
.notfound { text-align: center; padding: 90px 20px; }
.notfound .big { font-size: 96px; font-weight: 900; margin: 0; color: var(--red); line-height: 1; letter-spacing: -.04em; }
.notfound h1 { color: var(--ink); }
.notfound p { color: var(--muted); }
.empty { color: var(--muted); padding: 30px 0; }

/* Footer */
.site-footer { margin-top: 40px; background: #101a30; color: #c7cede; padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.footer-brand p { font-size: 14.5px; margin: 0 0 10px; max-width: 30em; }
.site-footer h2 { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #fff; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
.site-footer a:hover, .site-footer .link-btn:hover { color: #fff; }
.footer-mail a { color: #fff; font-weight: 600; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; }
.footer-langs { display: flex; gap: 16px; }

/* Cookie banner */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin: 0 auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 18px 20px; display: flex; gap: 16px; align-items: center; }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 14.5px; flex: 1; }
.cookie-banner a { color: var(--blue); text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-actions .btn { min-height: 42px; padding: 0 16px; font-size: 14px; }

/* Responsive */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 9px; font-size: 14px; }
  .layout, .post-layout { grid-template-columns: 1fr; }
  .post-side { position: static; }
}
@media (max-width: 920px) {
  .menu-btn { display: grid; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 12px; font-size: 16px; border-radius: 10px; }
  .featured-grid { grid-template-columns: 1fr; }
  .grid-3, .layout .cat-section .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 16px; }
  .post-head { padding: 26px 16px 6px; }
  .header-inner { height: 60px; gap: 12px; }
  .main-nav { top: 60px; }
  .logo img { height: 28px; }
  .hero { padding: 36px 0 26px; }
  .hero-text { font-size: 16px; }
  .grid-3, .grid-2, .layout .grid-3, .layout .cat-section .grid-3 { grid-template-columns: 1fr; }
  .card-sm .card-img { width: 34%; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 22px; }
  .lead { font-size: 17px; }
  .post-hero img { border-radius: 0; }
  .post-hero { margin-left: -16px; margin-right: -16px; }
  .post-hero figcaption { padding: 0 16px; }
  .row-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-actions .btn { flex: 1; }
  .cat-pills a { padding: 9px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.post-meta .reads{display:inline-flex;align-items:center;gap:5px}
