:root {
  --primary: #2563eb;
  --text: #1e293b;
  --muted: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --max-width: 800px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

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

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { font-size: 1.25rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.site-nav a { margin-left: 1.5rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.site-nav a:hover, .site-nav a.active { color: var(--primary); }

/* Hero */
.hero { text-align: center; padding: 3rem 0; }
.hero h1 { font-size: 1.75rem; margin-bottom: 1rem; }
.hero p { color: var(--muted); margin-bottom: 1.5rem; }

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.btn-primary:hover { opacity: 0.9; }

/* Post Grid */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.post-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.post-card h2, .post-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.post-card a { color: var(--text); text-decoration: none; }
.post-card a:hover { color: var(--primary); }
.post-card time { font-size: 0.8rem; color: var(--muted); }

/* Article */
.post { background: var(--white); padding: 2rem; border-radius: 8px; margin: 2rem 0; }
.post-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.post-header h1 { font-size: 1.6rem; }
.post-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; }
.post-content h2 { font-size: 1.35rem; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary); }
.post-content h3 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
.post-content p { margin-bottom: 1rem; }
.post-content ul, .post-content ol { margin: 1rem 0 1rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 0.75rem; text-align: left; }
.post-content th { background: var(--bg); }

/* Affiliate Placeholder */
.affiliate-link-placeholder {
  background: #fef3c7;
  border: 2px dashed #f59e0b;
  padding: 1rem;
  text-align: center;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.affiliate-btn { font-weight: 700; color: #92400e; }

/* CTA Box */
.cta-box {
  background: #eff6ff;
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}
.cta-box a { color: var(--primary); font-weight: 600; }

/* Related Posts */
.related-posts { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.related-posts ul { list-style: none; padding: 0; }
.related-posts li { margin-bottom: 0.5rem; }
.related-posts a { color: var(--primary); text-decoration: none; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.site-footer nav a { margin: 0 0.75rem; color: var(--muted); text-decoration: none; }

/* Latest Posts Section */
.latest-posts { padding: 2rem 0; }
.latest-posts h2 { font-size: 1.4rem; margin-bottom: 1rem; }

@media (max-width: 600px) {
  .site-header .container { flex-direction: column; gap: 0.5rem; }
  .site-nav a { margin-left: 0.75rem; }
  .hero h1 { font-size: 1.4rem; }
}
