:root {
  --acg-deep-blue: #0B3D6E;
  --acg-teal: #0E7C86;
  --acg-teal-light: #14A3AF;
  --acg-ivory: #FAFAF5;
  --acg-ivory-warm: #F5F3EE;
  --acg-white: #FFFFFF;
  --acg-gray-50: #F8F9FA;
  --acg-gray-100: #F1F3F5;
  --acg-gray-200: #E9ECEF;
  --acg-gray-300: #DEE2E6;
  --acg-gray-400: #ADB5BD;
  --acg-gray-600: #6C757D;
  --acg-gray-700: #495057;
  --acg-gray-800: #343A40;
  --acg-gray-900: #212529;
  --acg-shadow-sm: 0 1px 3px rgba(11,61,110,0.06);
  --acg-shadow-md: 0 4px 16px rgba(11,61,110,0.08);
  --acg-shadow-lg: 0 8px 32px rgba(11,61,110,0.10);
  --acg-radius-sm: 8px;
  --acg-radius-md: 12px;
  --acg-radius-lg: 16px;
  --acg-transition: 200ms ease;
  --acg-max-width: 1200px;
  --acg-content-width: 780px;
}

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

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

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--acg-gray-800);
  background: var(--acg-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Noto Serif KR", "Pretendard Variable", serif;
  font-weight: 700;
  color: var(--acg-gray-900);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

/* Hide parent theme defaults */
.wp-site-blocks > header,
.wp-site-blocks > footer,
.wp-block-template-part,
body > .wp-site-blocks > .has-global-padding {
  display: none !important;
}

/* ACG Header */
.acg-header {
  background: var(--acg-white);
  border-bottom: 1px solid var(--acg-gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.96);
}
.acg-header-inner {
  max-width: var(--acg-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.acg-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--acg-deep-blue);
}
.acg-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.acg-logo-text {
  font-family: "Noto Serif KR", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--acg-deep-blue);
  letter-spacing: -0.02em;
}
.acg-nav { display: flex; gap: 4px; align-items: center; }
.acg-nav a {
  text-decoration: none;
  color: var(--acg-gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--acg-radius-sm);
  transition: all var(--acg-transition);
}
.acg-nav a:hover {
  color: var(--acg-deep-blue);
  background: var(--acg-gray-50);
}
.acg-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.acg-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--acg-gray-800);
  margin: 5px 0;
  transition: var(--acg-transition);
  border-radius: 1px;
}

/* Hero */
.acg-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--acg-deep-blue) 0%, #0a4f8a 50%, var(--acg-teal) 100%);
}
.acg-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.acg-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.acg-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11,61,110,0.82) 0%, rgba(14,124,134,0.65) 100%);
  z-index: 2;
}
.acg-hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--acg-max-width);
  margin: 0 auto;
  padding: 80px 24px;
  color: var(--acg-white);
}
.acg-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--acg-white);
  margin-bottom: 20px;
  line-height: 1.25;
}
.acg-hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.88);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 32px;
}
.acg-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.acg-hero-badge svg { width: 16px; height: 16px; }

/* Sections */
.acg-section {
  max-width: var(--acg-max-width);
  margin: 0 auto;
  padding: 80px 24px;
}
.acg-section-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--acg-gray-900);
}
.acg-section-sub {
  font-size: 1rem;
  color: var(--acg-gray-600);
  margin-bottom: 48px;
  line-height: 1.6;
}
.acg-section-line {
  width: 40px;
  height: 3px;
  background: var(--acg-teal);
  border-radius: 2px;
  margin-bottom: 16px;
}

/* Cards grid */
.acg-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.acg-card {
  background: var(--acg-white);
  border-radius: var(--acg-radius-md);
  overflow: hidden;
  box-shadow: var(--acg-shadow-sm);
  border: 1px solid var(--acg-gray-200);
  transition: all var(--acg-transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.acg-card:hover {
  box-shadow: var(--acg-shadow-md);
  transform: translateY(-2px);
  border-color: var(--acg-teal);
}
.acg-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.acg-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.acg-card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--acg-teal);
  background: rgba(14,124,134,0.08);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  width: fit-content;
}
.acg-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 10px;
  color: var(--acg-gray-900);
}
.acg-card-excerpt {
  font-size: 0.88rem;
  color: var(--acg-gray-600);
  line-height: 1.65;
  flex: 1;
}
.acg-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--acg-gray-100);
}
.acg-card-date {
  font-size: 0.8rem;
  color: var(--acg-gray-400);
}
.acg-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--acg-gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--acg-transition);
}
.acg-card:hover .acg-card-arrow {
  background: var(--acg-teal);
}
.acg-card:hover .acg-card-arrow svg path {
  stroke: white;
}

/* Symptom entry cards */
.acg-symptom-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.acg-symptom-card {
  background: var(--acg-white);
  border: 1px solid var(--acg-gray-200);
  border-radius: var(--acg-radius-md);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: all var(--acg-transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acg-symptom-card:hover {
  border-color: var(--acg-teal);
  box-shadow: var(--acg-shadow-md);
  transform: translateY(-2px);
}
.acg-symptom-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--acg-radius-sm);
  background: linear-gradient(135deg, var(--acg-deep-blue), var(--acg-teal));
  display: flex;
  align-items: center;
  justify-content: center;
}
.acg-symptom-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  fill: none;
  stroke-width: 1.8;
}
.acg-symptom-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--acg-gray-900);
}
.acg-symptom-desc {
  font-size: 0.85rem;
  color: var(--acg-gray-600);
  line-height: 1.6;
}

/* Carousel */
.acg-carousel-wrap {
  background: var(--acg-white);
  padding: 80px 0;
  border-top: 1px solid var(--acg-gray-100);
  border-bottom: 1px solid var(--acg-gray-100);
}
.acg-carousel-inner {
  max-width: var(--acg-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.acg-carousel {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.acg-carousel::-webkit-scrollbar { display: none; }
.acg-carousel-item {
  flex: 0 0 320px;
  scroll-snap-align: start;
  border-radius: var(--acg-radius-md);
  overflow: hidden;
  position: relative;
}
.acg-carousel-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 400ms ease;
}
.acg-carousel-item:hover img {
  transform: scale(1.03);
}
.acg-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Infographic */
.acg-infographic {
  background: var(--acg-white);
  border: 1px solid var(--acg-gray-200);
  border-radius: var(--acg-radius-lg);
  padding: 48px 40px;
  max-width: 640px;
  margin: 48px auto;
}
.acg-infographic-title {
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--acg-deep-blue);
}
.acg-flow-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  position: relative;
}
.acg-flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 60px;
  bottom: -2px;
  width: 2px;
  background: var(--acg-gray-200);
}
.acg-flow-num {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--acg-deep-blue), var(--acg-teal));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 1;
}
.acg-flow-text h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--acg-gray-900);
}
.acg-flow-text p {
  font-size: 0.88rem;
  color: var(--acg-gray-600);
  line-height: 1.55;
}

/* Footer */
.acg-footer {
  background: var(--acg-gray-900);
  color: var(--acg-gray-400);
  padding: 56px 24px 32px;
}
.acg-footer-inner {
  max-width: var(--acg-max-width);
  margin: 0 auto;
}
.acg-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}
.acg-footer-brand {
  font-family: "Noto Serif KR", serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--acg-white);
  margin-bottom: 12px;
}
.acg-footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 360px;
}
.acg-footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.acg-footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--acg-gray-300);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.acg-footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--acg-gray-400);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--acg-transition);
}
.acg-footer-col a:hover { color: var(--acg-white); }
.acg-footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.acg-footer-copy {
  font-size: 0.78rem;
  color: var(--acg-gray-600);
}
.acg-footer-notices {
  font-size: 0.78rem;
  color: var(--acg-gray-600);
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.acg-footer-legal {
  font-size: 0.76rem;
  color: var(--acg-gray-600);
  line-height: 1.65;
  margin-top: 12px;
  background: rgba(255,255,255,0.03);
  padding: 14px 18px;
  border-radius: var(--acg-radius-sm);
  border-left: 3px solid var(--acg-gray-700);
}

/* Single post styling */
.acg-single-wrap {
  max-width: var(--acg-content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.acg-single-wrap .entry-title,
.acg-single-wrap h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 24px;
  color: var(--acg-gray-900);
}
.acg-single-wrap .entry-content h2 {
  font-size: 1.35rem;
  color: var(--acg-deep-blue);
  margin: 48px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--acg-gray-100);
}
.acg-single-wrap .entry-content h3 {
  font-size: 1.15rem;
  color: var(--acg-gray-800);
  margin: 32px 0 14px;
}
.acg-single-wrap .entry-content p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: var(--acg-gray-700);
  word-break: keep-all;
}
.acg-single-wrap .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--acg-radius-md);
  margin: 24px 0;
  box-shadow: var(--acg-shadow-sm);
}
.acg-single-wrap .entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--acg-radius-sm);
  overflow: hidden;
  margin: 24px 0;
  font-size: 0.9rem;
  border: 1px solid var(--acg-gray-200);
}
.acg-single-wrap .entry-content table thead th {
  background: var(--acg-deep-blue);
  color: white;
  padding: 12px 16px;
  font-weight: 600;
  text-align: left;
}
.acg-single-wrap .entry-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--acg-gray-100);
  color: var(--acg-gray-700);
}
.acg-single-wrap .entry-content table tr:nth-child(even) td {
  background: var(--acg-gray-50);
}
.acg-single-wrap .entry-content ul, .acg-single-wrap .entry-content ol {
  margin: 16px 0 24px 24px;
  line-height: 1.8;
  color: var(--acg-gray-700);
}
.acg-single-wrap .entry-content li { margin-bottom: 6px; }
.acg-single-wrap .entry-content blockquote {
  border-left: 4px solid var(--acg-teal);
  background: var(--acg-gray-50);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--acg-radius-sm) var(--acg-radius-sm) 0;
  font-size: 0.95rem;
  color: var(--acg-gray-700);
}
.acg-single-wrap .featured-image {
  border-radius: var(--acg-radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
}
.acg-single-wrap .featured-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
.acg-single-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  font-size: 0.85rem;
  color: var(--acg-gray-400);
}
.acg-related-posts {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--acg-gray-200);
}
.acg-related-posts h3 {
  font-size: 1.25rem;
  margin-bottom: 24px;
}
.acg-toc {
  background: var(--acg-gray-50);
  border: 1px solid var(--acg-gray-200);
  border-radius: var(--acg-radius-md);
  padding: 24px 28px;
  margin: 0 0 40px;
}
.acg-toc-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--acg-deep-blue);
}
.acg-toc a {
  display: block;
  padding: 5px 0;
  text-decoration: none;
  color: var(--acg-gray-600);
  font-size: 0.88rem;
  transition: color var(--acg-transition);
}
.acg-toc a:hover { color: var(--acg-teal); }

.legal-notice { font-size: 0.85em !important; }
.ai-notice { font-size: 0.85em !important; }

/* Page styling */
.acg-page-wrap {
  max-width: var(--acg-content-width);
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.acg-page-wrap h1 {
  font-size: 1.8rem;
  margin-bottom: 32px;
}
.acg-page-wrap h2 {
  font-size: 1.3rem;
  margin: 32px 0 16px;
  color: var(--acg-deep-blue);
}
.acg-page-wrap p, .acg-page-wrap li {
  line-height: 1.75;
  color: var(--acg-gray-700);
  margin-bottom: 12px;
}

/* Scroll animation */
.acg-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.acg-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
  .acg-header-inner { height: 56px; }
  .acg-nav { display: none; position: fixed; top: 56px; left: 0; right: 0; bottom: 0; background: var(--acg-white); flex-direction: column; padding: 24px; gap: 0; z-index: 999; }
  .acg-nav.open { display: flex; }
  .acg-nav a { padding: 14px 0; font-size: 1rem; border-bottom: 1px solid var(--acg-gray-100); }
  .acg-mobile-toggle { display: block; }
  .acg-hero { min-height: 400px; }
  .acg-hero-content { padding: 48px 20px; }
  .acg-section { padding: 56px 20px; }
  .acg-cards { grid-template-columns: 1fr; }
  .acg-symptom-cards { grid-template-columns: 1fr 1fr; }
  .acg-carousel-item { flex: 0 0 280px; }
  .acg-footer-top { flex-direction: column; }
  .acg-infographic { padding: 32px 24px; }
  .acg-single-wrap { padding: 32px 20px 60px; }
}
@media (max-width: 480px) {
  .acg-symptom-cards { grid-template-columns: 1fr; }
  .acg-hero { min-height: 360px; }
}

/* WP overrides */
body.single .wp-site-blocks,
body.page .wp-site-blocks,
body.home .wp-site-blocks {
  padding: 0 !important;
  max-width: none !important;
}
.wp-block-post-content { max-width: none !important; padding: 0 !important; }
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
}
