/* 막힘해결 — site.css */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1d23;
  --text-muted: #5c6570;
  --border: #e4e7ec;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #059669;
  --warning: #d97706;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --shadow-hover: 0 4px 16px rgba(0,0,0,.1);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: "D2Coding", "Consolas", "Menlo", monospace;
  --max: 720px;
  --max-wide: 1080px;
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
code, kbd {
  font-family: var(--mono);
  font-size: .9em;
  background: #f0f2f5;
  padding: .15em .4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}
kbd { border-bottom-width: 2px; }
pre {
  background: #1a1d23;
  color: #e8eaed;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: .875rem;
  line-height: 1.55;
}
pre code { background: none; border: none; padding: 0; color: inherit; }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .95rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
th, td {
  padding: .65rem .85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { background: #f0f2f5; font-weight: 600; }
tr:last-child td { border-bottom: none; }
blockquote {
  margin: 1.25rem 0;
  padding: .85rem 1.1rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
blockquote p { margin: 0; }
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  line-height: 1.2;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.logo-tag {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400;
  display: none;
}
@media (min-width: 640px) {
  .logo-tag { display: block; }
}
.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.nav a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .65rem;
  border-radius: 6px;
  text-decoration: none;
}
.nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}
.search-wrap {
  position: relative;
}
.search-input {
  width: 140px;
  padding: .45rem .75rem .45rem 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .875rem;
  font-family: inherit;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%235c6570' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat .65rem center;
  transition: width .2s, border-color .2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  width: 200px;
  background-color: var(--surface);
}
@media (max-width: 640px) {
  .search-input { width: 110px; }
  .search-input:focus { width: 140px; }
  .nav .nav-hide-sm { display: none; }
}
.search-results {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(320px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: .7rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: .875rem;
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover { background: var(--accent-soft); }
.search-results .sr-tags {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.search-empty {
  padding: 1rem;
  color: var(--text-muted);
  font-size: .875rem;
}

/* Main */
.main { min-height: calc(100vh - var(--header-h) - 180px); }

/* Hero */
.hero {
  background: linear-gradient(160deg, #eff6ff 0%, #f7f8fa 55%, #f7f8fa 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.25rem 2.75rem;
}
.hero-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
}
.hero h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.25;
}
.hero .tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 32em;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.badge {
  display: inline-block;
  padding: .3rem .7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Sections */
.section {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 2.25rem 1.25rem;
}
.section-title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.section-head .section-title { margin: 0; }

/* Category cards */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
@media (min-width: 900px) {
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, border-color .15s, transform .15s;
  box-shadow: var(--shadow);
}
.cat-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.cat-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.cat-name {
  font-weight: 700;
  font-size: .9rem;
}
.cat-desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Post cards */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s, border-color .15s, transform .15s;
  box-shadow: var(--shadow);
  height: 100%;
}
.post-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--text);
}
.post-card.teaser {
  border-style: dashed;
  opacity: .92;
}
.post-card .pc-cat {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .4rem;
}
.post-card h3 {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.post-card .pc-excerpt {
  margin: 0;
  font-size: .875rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.55;
}
.post-card .pc-meta {
  margin-top: .85rem;
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  background: #f0f2f5;
  border-radius: 4px;
  font-size: .7rem;
  color: var(--text-muted);
}
.badge-soon {
  background: #fef3c7;
  color: #92400e;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
}
.badge-live {
  background: #d1fae5;
  color: #065f46;
  font-weight: 600;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .7rem;
}

/* Post page */
.post-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
.post-header {
  margin-bottom: 1.75rem;
}
.post-header .breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.post-header .breadcrumb a { color: var(--text-muted); }
.post-header h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.35;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
}
.post-body h2 {
  margin: 2.25rem 0 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.02em;
  padding-top: .25rem;
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
}
.post-body h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.post-body h3 {
  margin: 1.5rem 0 .65rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.post-body p { margin: 0 0 1rem; }
.post-body ul, .post-body ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}
.post-body li { margin-bottom: .4rem; }
.post-body li::marker { color: var(--accent); }
.screenshot-ph {
  display: block;
  margin: 1.15rem 0;
  padding: 1.5rem 1rem;
  background: #f0f2f5;
  border: 1px dashed #c5cad3;
  border-radius: var(--radius-sm);
  text-align: center;
  font-style: italic;
  color: var(--text-muted);
  font-size: .875rem;
}
.affiliate-slot {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: #92400e;
}
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.toc-title {
  font-weight: 700;
  font-size: .875rem;
  margin: 0 0 .5rem;
}
.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: .875rem;
}
.toc li { margin-bottom: .25rem; }
.related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.related h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  border: none;
  padding: 0;
}
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related li {
  margin-bottom: .5rem;
}
.related a {
  display: block;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
}
.related a:hover {
  border-color: #bfdbfe;
  background: var(--accent-soft);
  text-decoration: none;
}

/* Placeholder / planned pages */
.planned-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 2rem auto;
  max-width: var(--max);
}
.planned-box h1 {
  font-size: 1.5rem;
  margin: 0 0 .75rem;
}
.planned-box p { color: var(--text-muted); margin: 0 0 1.25rem; }
.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none !important;
}
.btn:hover { background: var(--accent-hover); }

/* 404 */
.err-page {
  text-align: center;
  padding: 4rem 1.25rem;
  max-width: 480px;
  margin: 0 auto;
}
.err-page h1 { font-size: 4rem; margin: 0; color: var(--accent); }
.err-page p { color: var(--text-muted); }

/* Footer */
.site-footer {
  background: #1a1d23;
  color: #a0a8b4;
  padding: 2.5rem 1.25rem;
  margin-top: 2rem;
  font-size: .875rem;
}
.footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}
.footer-brand strong {
  display: block;
  color: #fff;
  font-size: 1rem;
  margin-bottom: .35rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links a { color: #a0a8b4; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  width: 100%;
  margin-top: .5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2d3340;
  font-size: .8rem;
}

/* AdSense placeholders */
.ad-slot {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: #f0f2f5;
  border: 1px dashed #c5cad3;
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-muted);
  font-size: .75rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Category filter section on home */
#categories { scroll-margin-top: calc(var(--header-h) + 1rem); }
#latest { scroll-margin-top: calc(var(--header-h) + 1rem); }
#planned { scroll-margin-top: calc(var(--header-h) + 1rem); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
