*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; line-height: 1.7; color: #1a1a2e; background: #f8f9fa; }
.container { max-width: 820px; margin: 0 auto; padding: 0 20px; }

/* Homepage header (body>header) */
body > header { background: #1a1a2e; color: #fff; padding: 1.5rem 0; }
body > header .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
body > header a { color: #fff; text-decoration: none; }
body > header h1 { font-size: 1.4rem; font-weight: 700; }
body > header nav a { margin-left: 1.5rem; font-size: 0.9rem; opacity: 0.8; }
body > header nav a:hover { opacity: 1; }

/* Article page nav (body>nav) */
body > nav { background: #1a1a2e; color: #fff; padding: 1.5rem 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
body > nav a { color: #fff; text-decoration: none; }
body > nav > a { font-size: 1.4rem; font-weight: 700; }
body > nav .nav-links a { margin-left: 1.5rem; font-size: 0.9rem; opacity: 0.8; }
body > nav .nav-links a:hover { opacity: 1; }

/* Main content area */
main { padding: 2rem 20px; min-height: 60vh; max-width: 820px; margin: 0 auto; }

/* Post listing (homepage) */
.post { background: #fff; border-radius: 10px; padding: 2rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 1.5rem; }
.post h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.post h2 a { color: #1a1a2e; text-decoration: none; }
.post h2 a:hover { color: #e94560; }
.post-meta { font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }
.post-excerpt { color: #444; }
.post-excerpt p { margin-bottom: 0.5rem; }
.tag { display: inline-block; background: #e8e8f0; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.75rem; margin: 0.2rem; color: #555; text-decoration: none; }
.tag:hover { background: #d0d0e0; }

/* Article page structure */
article header { margin-bottom: 2rem; }
article header h1 { font-size: 2rem; line-height: 1.3; margin-bottom: 0.5rem; }
article header .meta { font-size: 0.85rem; color: #666; margin-bottom: 0.75rem; }
article header .meta a { color: #e94560; text-decoration: none; }
article header .meta a:hover { text-decoration: underline; }
.content { font-size: 1.05rem; }
.content h2 { font-size: 1.5rem; margin: 2rem 0 0.75rem; padding-bottom: 0.3rem; border-bottom: 2px solid #f0f0f5; }
.content h3 { font-size: 1.2rem; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul, .content ol { margin: 0.5rem 0 1rem 1.5rem; }
.content li { margin-bottom: 0.3rem; }
.content blockquote { border-left: 4px solid #e94560; padding: 0.5rem 1rem; margin: 1rem 0; background: #faf5f5; border-radius: 0 4px 4px 0; }
.content a { color: #e94560; text-decoration: underline; text-underline-offset: 2px; }
.content a:hover { color: #d13350; }
.content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }

/* Article footer / disclosure */
.content .affiliate-disclosure, .affiliate-disclosure { font-size: 0.8rem; color: #888; border-top: 1px solid #eee; margin-top: 2rem; padding-top: 1rem; }

/* Pagination */
.pagination { display: flex; justify-content: space-between; margin-top: 2rem; }
.btn { display: inline-block; padding: 0.5rem 1.2rem; background: #1a1a2e; color: #fff; text-decoration: none; border-radius: 6px; font-size: 0.9rem; }
.btn:hover { background: #e94560; }

/* Product table */
.product-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.product-table th { background: #1a1a2e; color: #fff; padding: 0.6rem; text-align: left; }
.product-table td { padding: 0.6rem; border-bottom: 1px solid #eee; }
.product-table tr:nth-child(even) { background: #f8f9fa; }

/* Product block */
.product-block { background: #f8f9fa; border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0; border-left: 4px solid #e94560; }
.product-block h3 { margin-top: 0; }
.product-block .price { font-weight: 700; color: #e94560; }

/* Affiliate products section */
.affiliate-products { margin: 2.5rem 0; padding: 1.5rem; background: #f0f4ff; border-radius: 12px; }
.affiliate-products h2 { font-size: 1.4rem; margin-bottom: 0.5rem; color: #1a1a2e; }
.affiliate-products .disclosure { font-size: 0.8rem; color: #888; margin-bottom: 1.2rem; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.product-card { background: #fff; border-radius: 10px; padding: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.06); display: flex; flex-direction: column; }
.product-card h3 { font-size: 0.95rem; margin-bottom: 0.4rem; line-height: 1.3; }
.product-card h3 a { color: #1a1a2e; text-decoration: none; }
.product-card h3 a:hover { color: #e94560; }
.product-card .product-image { width: 100%; height: 140px; object-fit: contain; margin-bottom: 0.5rem; background: #f8f8f8; border-radius: 6px; }
.product-card .product-desc { font-size: 0.82rem; color: #555; flex: 1; margin-bottom: 0.5rem; }
.product-card .product-price { font-weight: 700; color: #e94560; font-size: 1.1rem; margin-bottom: 0.5rem; }
.buy-button { display: block; text-align: center; background: #ff9900; color: #fff; padding: 0.5rem; border-radius: 6px; text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.buy-button:hover { background: #e88a00; }

/* Footer */
body > footer { text-align: center; padding: 2rem 0; color: #888; font-size: 0.85rem; }
footer a { color: #e94560; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 600px) {
  body > header .container, body > nav { flex-direction: column; text-align: center; }
  body > nav > a { margin-bottom: 0.5rem; }
  body > nav .nav-links a { margin: 0 0.5rem; }
  article header h1 { font-size: 1.5rem; }
  .post { padding: 1.2rem; }
  main { padding: 2rem 16px; }
  body > nav { padding: 1.2rem 16px; }
}
