:root {
  --bg-primary: #2d5a27;
  --bg-primary-dark: #1a3d17;
  --bg-primary-light: #4a8c3f;
  --bg-accent: #e8c35a;
  --bg-accent-dark: #c9a63a;
  --bg-neutral-50: #fafbf8;
  --bg-neutral-100: #f0f4ed;
  --bg-neutral-200: #e2e8de;
  --bg-neutral-600: #6b7c65;
  --bg-neutral-800: #2d3a28;
  --bg-neutral-900: #1a2116;
  --bg-white: #ffffff;
  --bg-radius-sm: 8px;
  --bg-radius-md: 12px;
  --bg-radius-lg: 16px;
  --bg-radius-xl: 24px;
  --bg-shadow-sm: 0 2px 8px rgba(45,90,39,0.08);
  --bg-shadow-md: 0 4px 20px rgba(45,90,39,0.12);
  --bg-shadow-lg: 0 8px 40px rgba(45,90,39,0.16);
  --bg-transition: 200ms cubic-bezier(0.4,0,0.2,1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--bg-neutral-800);
  background: var(--bg-neutral-50);
  line-height: 1.7;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* ── WordPress defaults override ── */
.wp-site-blocks { padding: 0 !important; max-width: 100% !important; }
.has-global-padding { padding: 0 !important; }
.wp-block-template-part, .wp-block-group { max-width: 100% !important; }
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { max-width: 100% !important; }
.wp-block-post-content { max-width: 100% !important; }

/* Hide WP default header/footer from parent theme */
header.wp-block-template-part,
footer.wp-block-template-part,
.wp-block-template-part[data-slug="header"],
.wp-block-template-part[data-slug="footer"] { display: none !important; }

/* ── Site Header ── */
.bg-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-neutral-200);
  padding: 0 24px;
}
.bg-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.bg-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.bg-logo img { width: 40px; height: 40px; border-radius: var(--bg-radius-sm); }
.bg-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--bg-primary); letter-spacing: -0.02em; }

.bg-nav { display: flex; gap: 8px; list-style: none; }
.bg-nav a {
  display: block; padding: 8px 16px; border-radius: var(--bg-radius-sm);
  color: var(--bg-neutral-800); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: background var(--bg-transition), color var(--bg-transition);
}
.bg-nav a:hover { background: var(--bg-neutral-100); color: var(--bg-primary); }

.bg-mobile-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.bg-mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--bg-neutral-800); margin: 6px 0; transition: var(--bg-transition); border-radius: 2px; }

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; color: var(--bg-primary); margin: 48px 0 20px; padding-bottom: 12px; border-bottom: 2px solid var(--bg-neutral-200); }
h3 { font-size: 1.2rem; color: var(--bg-neutral-800); margin: 32px 0 16px; }
p { margin-bottom: 16px; line-height: 1.8; }

/* ── Article Styles ── */
.entry-content, .post-content, article .wp-block-post-content {
  max-width: 760px; margin: 0 auto; padding: 60px 24px 80px;
  font-size: 1.05rem; line-height: 1.8;
}
.entry-content img, .post-content img { max-width: 100%; height: auto; border-radius: var(--bg-radius-md); }
.entry-content table, .post-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0; border-radius: var(--bg-radius-md);
  overflow: hidden; box-shadow: var(--bg-shadow-sm); font-size: 0.95rem;
}
.entry-content th, .post-content th { background: var(--bg-primary); color: #fff; }
.entry-content td, .post-content td, .entry-content th, .post-content th { padding: 12px 16px; text-align: left; }
.entry-content tr:nth-child(even), .post-content tr:nth-child(even) { background: var(--bg-neutral-100); }
.entry-content blockquote, .post-content blockquote {
  border-left: 4px solid var(--bg-primary); background: var(--bg-neutral-100);
  padding: 20px 24px; margin: 28px 0; border-radius: 0 var(--bg-radius-md) var(--bg-radius-md) 0;
  font-style: italic; color: #555;
}
.entry-content ul, .entry-content ol { padding-left: 24px; margin: 16px 0; }
.entry-content li { margin-bottom: 8px; line-height: 1.7; }

.article-summary { box-shadow: var(--bg-shadow-sm); }

/* ── Post Cards ── */
.bg-card {
  background: var(--bg-white); border-radius: var(--bg-radius-lg);
  box-shadow: var(--bg-shadow-sm); overflow: hidden;
  transition: transform var(--bg-transition), box-shadow var(--bg-transition);
}
.bg-card:hover { transform: translateY(-4px); box-shadow: var(--bg-shadow-md); }
.bg-card-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.bg-card-body { padding: 24px; }
.bg-card-title {
  font-size: 1.1rem; font-weight: 700; color: var(--bg-neutral-800);
  margin-bottom: 8px; line-height: 1.4;
}
.bg-card-title a { color: inherit; text-decoration: none; }
.bg-card-title a:hover { color: var(--bg-primary); }
.bg-card-excerpt { font-size: 0.9rem; color: var(--bg-neutral-600); line-height: 1.6; }
.bg-card-meta { font-size: 0.8rem; color: var(--bg-neutral-600); margin-top: 12px; }

/* ── Footer ── */
.bg-footer {
  background: var(--bg-neutral-900); color: rgba(255,255,255,0.7);
  padding: 60px 24px 40px;
}
.bg-footer-inner { max-width: 1200px; margin: 0 auto; }
.bg-footer-top { display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; flex-wrap: wrap; }
.bg-footer-brand { max-width: 400px; }
.bg-footer-brand h3 { color: #fff; font-size: 1.2rem; margin-bottom: 12px; }
.bg-footer-brand p { font-size: 0.9rem; line-height: 1.6; }
.bg-footer-links h4 { color: #fff; font-size: 0.95rem; margin-bottom: 12px; }
.bg-footer-links ul { list-style: none; }
.bg-footer-links a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.9rem; line-height: 2; transition: color var(--bg-transition); }
.bg-footer-links a:hover { color: #fff; }
.bg-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  font-size: 0.8rem; color: rgba(255,255,255,0.4);
}
.bg-footer-legal { font-size: 0.78rem; color: rgba(255,255,255,0.35); margin-top: 16px; line-height: 1.6; }

/* ── Buttons ── */
.bg-btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--bg-radius-sm);
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: all var(--bg-transition); cursor: pointer; border: none;
}
.bg-btn-primary { background: var(--bg-primary); color: #fff; }
.bg-btn-primary:hover { background: var(--bg-primary-dark); transform: translateY(-1px); }
.bg-btn-outline { background: transparent; color: var(--bg-primary); border: 2px solid var(--bg-primary); }
.bg-btn-outline:hover { background: var(--bg-primary); color: #fff; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .bg-header-inner { height: 60px; }
  .bg-logo-text { font-size: 0.95rem; }
  .bg-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; background: #fff;
    flex-direction: column; padding: 16px; box-shadow: var(--bg-shadow-lg); border-top: 1px solid var(--bg-neutral-200); }
  .bg-nav.active { display: flex; }
  .bg-mobile-toggle { display: block; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  .entry-content, .post-content { padding: 40px 16px 60px; font-size: 1rem; }
  .bg-footer-top { flex-direction: column; gap: 24px; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .bg-card-body { padding: 16px; }
}

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.bg-animate { animation: fadeInUp 0.6s ease-out both; }

/* ── Focus ── */
a:focus-visible, button:focus-visible { outline: 3px solid var(--bg-primary); outline-offset: 2px; border-radius: 4px; }

/* ── Legal notices ── */
.legal-notice { font-size: 0.85em !important; }
.ai-notice { font-size: 0.85em !important; }
