:root {
  --bg: #f7f5f1;
  --bg-card: #ffffff;
  --fg: #1a1a1a;
  --fg-soft: #555;
  --fg-mute: #888;
  --accent: #d94343;
  --accent-soft: #fde6e6;
  --border: #e8e4dc;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.10);
  --max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/woff2/Pretendard-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.site-header .container {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: flex; align-items: baseline; gap: 2px;
  font-weight: 900; font-size: 24px;
  text-decoration: none;
}
.brand-mark { color: var(--accent); }
.brand-name { color: var(--fg); }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; }
.nav-link {
  font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-link .emoji { font-size: 16px; }
.hamburger {
  display: none;
  background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px 8px;
}

/* Main */
.site-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #fff4d6 0%, #ffd0d0 100%);
  padding: 32px 24px;
  border-radius: 12px;
  text-align: center;
}
.hero h1 { margin: 0 0 6px; font-size: 28px; font-weight: 900; }
.hero p { margin: 0; color: var(--fg-soft); font-size: 14px; }

.section-title {
  font-size: 20px; font-weight: 800;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.section-title .more {
  margin-left: auto;
  font-size: 13px; font-weight: 500; color: var(--fg-soft);
}

/* Post Grid + Cards */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.post-card {
  background: var(--bg-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.post-card-thumb {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 800; font-size: 22px;
}
.post-card-body { padding: 12px 14px 16px; }
.post-card-cat {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px; font-weight: 700;
}
.post-card-title {
  margin: 8px 0 6px;
  font-size: 15px; font-weight: 700;
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-desc {
  margin: 0 0 8px;
  font-size: 13px; color: var(--fg-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-date { font-size: 11px; color: var(--fg-mute); }

/* Category section */
.cat-section { padding-top: 8px; }
.cat-header {
  background: var(--bg-card);
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.cat-header h1 { margin: 0; font-size: 26px; font-weight: 900; }
.cat-header p { margin: 4px 0 0; color: var(--fg-soft); }

/* Post Article + Sidebar */
.site-main:has(.post-article) {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 980px) {
  .site-main:has(.post-article) {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
.post-article {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.post-header { margin-bottom: 16px; }
.post-cat-link {
  display: inline-block;
  background: var(--accent-soft); color: var(--accent);
  padding: 4px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 700;
}
.post-title {
  margin: 10px 0 6px;
  font-size: 28px; font-weight: 900; line-height: 1.3;
}
.post-meta { color: var(--fg-mute); font-size: 13px; }
.post-hero {
  width: 100%; border-radius: 8px;
  margin-top: 16px;
}
.post-content {
  font-size: 17px; line-height: 1.85;
  margin: 24px 0;
}
.post-content p { margin: 0 0 1.1em; }
.post-content h2, .post-content h3 { margin-top: 1.8em; font-weight: 800; }
.post-content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 12px 16px;
  margin: 1em 0;
  border-radius: 4px;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.post-tags .tag {
  background: #efece6; color: var(--fg-soft);
  padding: 3px 8px; border-radius: 4px;
  font-size: 12px;
}
.post-source { font-size: 12px; color: var(--fg-mute); margin: 12px 0; }
.post-share { display: flex; gap: 8px; margin: 24px 0; }
.post-share button {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
}
.post-share button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.post-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Ad slots */
.adslot {
  display: block;
  background: #faf9f5;
  border: 1px dashed #d9d4c8;
  border-radius: 6px;
  margin: 16px 0;
  padding: 8px;
  text-align: center;
  min-height: 100px;
  position: relative;
}
.adslot::before {
  content: 'AD';
  position: absolute; top: 4px; left: 6px;
  font-size: 9px; color: #aaa; font-weight: 700;
}
.coupang-slot {
  background: #fff7ea;
  border: 1px dashed #f0c47a;
  border-radius: 6px;
  margin: 16px 0;
  padding: 8px;
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.coupang-slot::before {
  content: 'PARTNERS';
  position: absolute; top: 4px; left: 6px;
  font-size: 9px; color: #c68a2e; font-weight: 700;
}

/* Footer */
.site-footer {
  background: #2a2521;
  color: #d4cfc5;
  padding: 40px 0 24px;
  margin-top: 60px;
}
.site-footer h4 { color: #fff; font-size: 14px; margin: 0 0 12px; }
.site-footer a { color: #d4cfc5; font-size: 13px; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 6px; }
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #3d3631;
}
.footer-bottom { padding-top: 16px; font-size: 11px; color: #8a8378; }
.footer-bottom p { margin: 4px 0; }

/* Mobile */
@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 12px 0 0; }
  .hamburger { display: inline-block; margin-left: auto; }
  .post-article { padding: 18px 16px; }
  .post-title { font-size: 22px; }
  .post-content { font-size: 16px; }
  .footer-cols { grid-template-columns: 1fr; gap: 18px; }
  .hero h1 { font-size: 22px; }
}
