:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-muted: #efede6;
  --text: #1d1f24;
  --text-muted: #5d6270;
  --line: #dedbd2;
  --accent: #2f5bea;
  --accent-text: #ffffff;
  --star: #f2a516;
  --star-empty: #d5d2c8;
  --good: #1f7a4d;
  --bad: #b23b3b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 30, 0.06), 0 6px 20px rgba(20, 20, 30, 0.05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131417;
    --surface: #1c1e22;
    --surface-muted: #24272c;
    --text: #ebecef;
    --text-muted: #a2a7b3;
    --line: #30333a;
    --accent: #7c9cff;
    --accent-text: #0e1116;
    --star: #f5b83d;
    --star-empty: #444851;
    --good: #5fcf96;
    --bad: #f08282;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.header-inner,
.page-wrap,
.site-footer {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 15px;
}

.header-right { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 16px; }
.header-nav { display: flex; gap: 16px; }
.lang-nav { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.lang-nav a {
  padding: 2px 10px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
}
.lang-nav a:hover { color: var(--text); }
.lang-nav a[aria-current="true"] { background: var(--surface-muted); color: var(--text); font-weight: 700; }
.header-nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
.header-nav a:hover { color: var(--text); }

.page-wrap { padding: 36px 0 64px; }

.list-hero h1,
.article-header h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.lead { margin: 0 0 20px; color: var(--text-muted); font-size: 17px; }

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.category-nav a {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.category-nav a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.post-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-muted);
}

.post-cover-link { text-decoration: none; }

.post-cover-empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 40px;
  font-weight: 800;
}

.post-card-body { padding: 16px 18px 18px; }
.post-card h2 { margin: 4px 0 6px; font-size: 18px; line-height: 1.45; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; }
.post-summary { margin: 0 0 12px; color: var(--text-muted); font-size: 15px; }

.eyebrow { margin: 0; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.eyebrow a { color: inherit; text-decoration: none; }

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.stars { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stars b { color: var(--text); font-size: 14px; }

.stars-track {
  position: relative;
  display: inline-block;
  color: var(--star-empty);
  letter-spacing: 1px;
  line-height: 1;
}

.stars-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: var(--star);
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
}

.pager { display: flex; justify-content: space-between; margin-top: 32px; }
.pager a[rel="next"] { margin-left: auto; }

.breadcrumbs { display: flex; gap: 8px; margin-bottom: 20px; color: var(--text-muted); font-size: 14px; }
.breadcrumbs a { color: inherit; }

.article-wrap { max-width: 760px; }
.article-date { margin: 0 0 24px; color: var(--text-muted); font-size: 14px; }
.article-cover { display: block; width: 100%; margin-bottom: 24px; border-radius: var(--radius); }

.review-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.review-label { display: block; color: var(--text-muted); font-size: 13px; }
.review-app { display: block; font-size: 20px; }
.review-platform { color: var(--text-muted); font-size: 14px; }
.review-score .stars-track { font-size: 22px; }
.review-score .stars b { font-size: 20px; }

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
}

.verdict {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.verdict section {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.verdict h2 { margin: 0 0 6px; font-size: 16px; }
.verdict-pros h2 { color: var(--good); }
.verdict-cons h2 { color: var(--bad); }
.verdict ul { margin: 0; padding-left: 20px; }

.article-body { font-size: 17px; line-height: 1.85; }
.article-body h2, .article-body h3, .article-body h4 { margin: 1.8em 0 0.6em; line-height: 1.4; }
.article-body h2 { font-size: 24px; }
.article-body h3 { font-size: 21px; }
.article-body h4 { font-size: 18px; }
.article-body img { display: block; margin: 20px auto; border-radius: 10px; }
.article-body blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 4px solid var(--accent);
  color: var(--text-muted);
}
.article-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
  font-size: 0.9em;
}
.article-body pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-muted);
}
.article-body pre code { padding: 0; background: none; }

.related { margin-top: 56px; }
.related h2 { font-size: 20px; }

.prose { max-width: 760px; }
.prose h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.3; }
.prose h2 { margin-top: 32px; font-size: 20px; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 16px; }
.site-footer a { color: inherit; }

@media (max-width: 600px) {
  .header-inner { padding: 10px 0; }
  .brand { font-size: 16px; }
  .page-wrap { padding-top: 24px; }
  .post-grid { grid-template-columns: 1fr; }
  .review-card { flex-direction: column; align-items: flex-start; }
  .primary-action { width: 100%; justify-content: center; }
}
