/* === FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+Antique:wght@400;500;700&family=Zen+Maru+Gothic:wght@400;500;700;900&display=swap');

/* === TOKENS === */
:root {
  --primary:        #7CB342;
  --primary-dark:   #558B2F;
  --primary-light:  #F5FBEA;
  --accent:         #F6C90E;
  --accent-dark:    #D4A80C;
  --bg:             #FDFEF0;
  --surface:        #F5FBEA;
  --text:           #1E2A1A;
  --text-muted:     #4A5740;
  --border:         #C8D5B0;
  --white:          #FFFFFF;
  --cta-bg:         #FFFBE6;
  --cta-border:     #F6C90E;
  --shadow-card:    0 2px 12px rgba(124,179,66,0.10);
  --shadow-hover:   0 6px 24px rgba(124,179,66,0.18);
  --radius-card:    20px;
  --radius-btn:     100px;
  --radius-tag:     100px;
  --radius-section: 40px;
  --font-head:      'Zen Maru Gothic', sans-serif;
  --font-body:      'Zen Kaku Gothic Antique', sans-serif;
  --content-w:      780px;
  --layout-w:       1100px;
  --transition:     0.2s ease;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.03em;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5em; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 254, 240, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: var(--layout-w);
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--primary-dark);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; opacity: 0.8; }
.header-nav { display: flex; gap: 24px; align-items: center; }
.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--primary); text-decoration: none; }

/* === BREADCRUMB === */
.breadcrumb {
  padding: 12px 24px;
  max-width: var(--layout-w);
  margin: 0 auto;
}
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb-item { font-size: 0.8rem; color: var(--text-muted); }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; margin-right: 4px; }
.breadcrumb-item:last-child { color: var(--text); font-weight: 500; }

/* === PAGE LAYOUT === */
.page-wrap {
  max-width: var(--layout-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.article-wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 32px 0 80px;
}

/* === CATEGORY HERO === */
.cat-hero {
  background: var(--surface);
  border-radius: var(--radius-section);
  padding: 48px 40px;
  margin: 24px 0 40px;
  text-align: center;
}
.cat-hero-tag {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-tag);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.cat-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 900;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 12px;
}
.cat-hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* === ARTICLE LIST === */
.article-list-wrap { display: flex; flex-direction: column; gap: 16px; }
.article-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: var(--text);
}
.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-card-body { flex: 1; min-width: 0; }
.article-card-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--radius-tag);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.article-card h2 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}
.article-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}
.article-card-badge {
  flex-shrink: 0;
  background: var(--cta-bg);
  border: 2px solid var(--cta-border);
  border-radius: 14px;
  padding: 10px 14px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  line-height: 1.4;
}

/* === ARTICLE HEADER === */
.article-header { margin-bottom: 32px; }
.article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: var(--radius-tag);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.article-header h1 {
  font-family: var(--font-head);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 900;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.article-author {
  font-weight: 600;
  color: var(--text-muted);
}
.article-author::before {
  content: "✎ ";
  font-style: normal;
}
.article-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 24px;
  display: inline-block;
}

/* === TABLE OF CONTENTS === */
.article-toc {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 40px;
}
.article-toc-title {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.article-toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc-counter;
}
.article-toc li {
  counter-increment: toc-counter;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
}
.article-toc li::before {
  content: counter(toc-counter);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.article-toc a { color: var(--text); }
.article-toc a:hover { color: var(--primary); text-decoration: none; }

/* === ARTICLE BODY === */
.article-body { line-height: 1.85; }
.article-body h2 {
  font-family: var(--font-head);
  font-size: clamp(17px, 2.5vw, 21px);
  font-weight: 700;
  color: var(--text);
  margin: 48px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.5;
}
.article-body h3 {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 32px 0 12px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.article-body p { margin-bottom: 1.2em; }
.article-body ul, .article-body ol {
  margin-bottom: 1.2em;
  padding-left: 1.6em;
}
.article-body li { margin-bottom: 0.4em; }
.article-body strong { font-weight: 700; color: var(--text); }
.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--cta-bg);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.875rem;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--border);
}
.article-body th {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
}
.article-body td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-body tr:nth-child(even) td { background: var(--surface); }
.article-body tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
.table-wrap table { margin: 0; }
.table-note { font-size: 0.8rem; color: var(--text-muted); margin-top: -12px; margin-bottom: 24px; line-height: 1.6; }
.article-note {
  background: var(--surface);
  border-left: 4px solid var(--border);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === CTA BOX === */
.cta-box {
  background: var(--cta-bg);
  border: 2px solid var(--cta-border);
  border-radius: var(--radius-card);
  padding: 28px 28px;
  margin: 40px 0;
  text-align: center;
}
.cta-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.cta-text {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.6;
}
.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
}
.cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}
.cta-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* === RELATED ARTICLES === */
.article-related { margin-top: 64px; padding-top: 40px; border-top: 2px solid var(--border); }
.article-related-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.related-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: block;
}
.related-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.related-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-tag);
  display: inline-block;
  margin-bottom: 8px;
}
.related-card h3 {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  border-bottom: none;
  margin: 0;
  padding: 0;
}

/* === FOOTER === */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 40px 24px;
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--layout-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 20px;
  line-height: 1.7;
  max-width: 680px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }

/* === RESPONSIVE: 768px === */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .page-wrap { padding: 0 16px 60px; }
  .article-wrap { padding: 24px 0 60px; }
  .cat-hero { padding: 36px 24px; border-radius: 24px; }
  .article-card { flex-direction: column; gap: 12px; padding: 20px; }
  .article-card-badge { align-self: flex-start; }
  .related-grid { grid-template-columns: 1fr; }
  .article-toc { padding: 18px 20px; }
  .cta-box { padding: 22px 18px; }
  .article-body h2 { margin-top: 36px; }
  .breadcrumb { padding: 10px 16px; }
}

/* === RESPONSIVE: 480px === */
@media (max-width: 480px) {
  body { font-size: 0.9375rem; }
  .article-header h1 { font-size: 20px; }
  .article-body h2 { font-size: 17px; }
  .article-body h3 { font-size: 15px; }
  .cat-hero h1 { font-size: 20px; }
  .article-body table { font-size: 0.8rem; }
  .cta-btn { width: 100%; }
  .site-footer { padding: 32px 16px; }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}
