:root {
  --primary-color: #3b7a57;
  --primary-light: #7bc4b3;
  --primary-dark: #27523a;
  --bg-color: #f8faf8;
  --surface-color: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --border-color: #e2e8e0;
  --link-color: #2e6945;
  --link-hover: #1f4a30;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  --max-width: 1080px;
  --content-width: 760px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.8;
  font-size: 16px;
  word-wrap: break-word;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.site-header {
  background: var(--surface-color);
  border-bottom: 2px solid var(--primary-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.site-nav a:hover {
  background: #edf5f0;
  color: var(--primary-dark);
  text-decoration: none;
}

/* Container & Layout */
.layout-container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

@media (max-width: 850px) {
  .layout-container {
    grid-template-columns: 1fr;
  }
}

.main-content {
  background: var(--surface-color);
  padding: 2.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .main-content {
    padding: 1.5rem 1rem;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

/* Article Styles */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 1.85rem;
  line-height: 1.4;
  color: #1a3324;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-category {
  background: #eaf4ed;
  color: var(--primary-dark);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-weight: 600;
}

.article-eyecatch {
  margin-bottom: 2rem;
  border-radius: 6px;
  overflow: hidden;
}

.article-body {
  font-size: 1rem;
}

.article-body h2 {
  font-size: 1.45rem;
  color: #1a3324;
  border-left: 6px solid var(--primary-color);
  background: #f2f8f4;
  padding: 0.6rem 1rem;
  margin: 2.5rem 0 1.2rem;
  border-radius: 0 4px 4px 0;
}

.article-body h3 {
  font-size: 1.25rem;
  color: #234230;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.4rem;
  margin: 2rem 0 1rem;
}

.article-body h4 {
  font-size: 1.1rem;
  color: #2b503a;
  margin: 1.5rem 0 0.8rem;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.4rem 1.8rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body blockquote {
  border-left: 4px solid var(--primary-light);
  background: #f4f8f5;
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  color: #44554a;
  font-style: italic;
  border-radius: 0 6px 6px 0;
}

/* Cocoon Boxes & Decorations */
.caption-box, .label-box, .block-box {
  border: 2px solid var(--primary-light);
  border-radius: 8px;
  margin: 1.8rem 0;
  background: #ffffff;
  overflow: hidden;
}

.caption-box-label, .label-box-label, .box-label {
  background: var(--primary-light);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 1rem;
  font-size: 0.95rem;
}

.caption-box-content, .label-box-content, .box-content {
  padding: 1.2rem;
}

.sticky-box, .blank-box {
  background: #f4f8f5;
  border: 1px dashed var(--primary-color);
  padding: 1.2rem;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* TOC (Table of Contents) */
.toc-container {
  background: #f9fbf9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
}

.toc-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}

.toc-list li {
  margin-bottom: 0.4rem;
}

.toc-list .toc-h2 {
  font-weight: 600;
}

.toc-list .toc-h3 {
  padding-left: 1.2rem;
  font-size: 0.92rem;
}

/* Product Card & Affiliate */
.product-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  margin: 2rem 0;
  display: flex;
  gap: 1.5rem;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

@media (max-width: 600px) {
  .product-card {
    flex-direction: column;
    align-items: center;
  }
}

.product-thumb {
  width: 140px;
  height: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  color: #1a3324;
}

.product-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-amazon {
  background: #ff9900;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none !important;
  display: inline-block;
}

.btn-rakuten {
  background: #bf0000;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none !important;
  display: inline-block;
}

.btn-yahoo {
  background: #ff0033;
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.9rem;
  text-decoration: none !important;
  display: inline-block;
}

.btn-amazon:hover, .btn-rakuten:hover, .btn-yahoo:hover {
  opacity: 0.85;
}

/* Sidebar */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background: var(--surface-color);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.author-box {
  text-align: center;
}

.author-thumb img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 0.8rem;
}

.author-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.author-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.category-list, .recent-posts-list {
  list-style: none;
}

.category-list li, .recent-posts-list li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border-color);
  font-size: 0.95rem;
}

.category-list li:last-child, .recent-posts-list li:last-child {
  border-bottom: none;
}

.category-list .post-count {
  float: right;
  background: #edf5f0;
  color: var(--primary-dark);
  font-size: 0.78rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
}

/* Article Cards (Index / Archive) */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.entry-card {
  display: flex;
  gap: 1.2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 550px) {
  .entry-card {
    flex-direction: column;
  }
}

.entry-card-thumb {
  width: 220px;
  height: 130px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #eaf2ed;
}

@media (max-width: 550px) {
  .entry-card-thumb {
    width: 100%;
    height: 180px;
  }
}

.entry-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}

.entry-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.entry-card-snippet {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.entry-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.entry-card:last-child {
  border-bottom: none;
  padding-bottom: 0.5rem;
}

/* Pagination */
.pagination-wrapper {
  margin: 2.5rem 0 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.pagination-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

a.page-numbers:hover {
  background: #eaf4ed;
  border-color: var(--primary-color);
  color: var(--primary-dark);
  text-decoration: none;
}

a.page-numbers:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

.page-numbers.current {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  cursor: default;
}

.page-numbers.dots {
  border: none;
  background: transparent;
  color: var(--text-muted);
  min-width: 28px;
  padding: 0 0.2rem;
}

.page-numbers.prev,
.page-numbers.next {
  padding: 0 1rem;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  background: #25382c;
  color: #e0eae2;
  padding: 2.5rem 1rem;
  margin-top: 4rem;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer a {
  color: #a3d9b8;
}

.footer-nav {
  margin-bottom: 1.5rem;
}

.footer-nav a {
  margin: 0 0.8rem;
}

.copyright {
  color: #9cb5a3;
}

/* Cocoon Blog Cards (Internal & External) */
a.blogcard-wrap {
  display: block;
  text-decoration: none !important;
  color: var(--text-main) !important;
  margin: 1.6rem 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.blogcard-wrap:hover {
  transform: translateY(-2px);
}

.blogcard {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  padding: 1.1rem 1.2rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: auto auto;
  gap: 0.6rem 1.2rem;
  align-items: start;
  position: relative;
}

a.blogcard-wrap:hover .blogcard {
  border-color: var(--primary-light);
  box-shadow: 0 4px 12px rgba(46, 105, 69, 0.08);
}

.blogcard-label {
  display: none;
}

.blogcard-thumbnail {
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  width: 160px;
  height: 95px;
  border-radius: 6px;
  overflow: hidden;
  background: #eaf2ed;
}

.blogcard-thumbnail img,
.blogcard-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blogcard-content {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.blogcard-title {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  color: #1a3324;
  margin-bottom: 0.35rem;
}

a.blogcard-wrap:hover .blogcard-title {
  color: var(--link-color);
  text-decoration: underline;
}

.blogcard-snippet {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blogcard-footer {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.blogcard-site {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blogcard-favicon img,
.blogcard-favicon-image {
  width: 16px;
  height: 16px;
  display: block;
}

@media (max-width: 550px) {
  .blogcard {
    grid-template-columns: 110px 1fr;
    gap: 0.5rem 0.85rem;
    padding: 0.9rem;
  }
  .blogcard-thumbnail {
    width: 110px;
    height: 75px;
  }
  .blogcard-title {
    font-size: 0.92rem;
  }
  .blogcard-snippet {
    display: none;
  }
}

/* WordPress Block Editor & Cocoon Utilities */
.wp-block-image {
  margin: 1.6rem 0;
}

.wp-block-image img {
  border-radius: 6px;
  margin: 0 auto;
}

.wp-element-caption,
.wp-block-image figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.wp-block-columns {
  display: flex;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.wp-block-column {
  flex: 1 1 260px;
  min-width: 0;
}

.tiled-gallery__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.tiled-gallery__item {
  margin: 0;
}

.tiled-gallery__item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.marker-under-blue {
  background: linear-gradient(transparent 65%, #cfe8fc 65%);
  font-weight: 600;
}

.bold {
  font-weight: 700;
}

/* Contact Form Styles */
.contact-form {
  background: #f9fbf9;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.8rem;
  margin: 1.5rem 0 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
  color: #1a3324;
}

.form-group .required-badge {
  background: #d9534f;
  color: #ffffff;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #cbd5cc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 122, 87, 0.15);
}

.btn-submit {
  background: var(--primary-color);
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.8rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

/* PR Disclosure Banner */
.pr-disclosure {
  background: #f4f7f4;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.84rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

/* Post Navigation (Prev / Next) */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .post-navigation {
    grid-template-columns: 1fr;
  }
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f9fbf9;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.post-nav-link:hover {
  border-color: var(--primary-color);
  background: #eef6f0;
}

.post-nav-link.next-post {
  text-align: right;
}

.post-nav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.post-nav-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a3324;
  line-height: 1.45;
}

/* Related Posts Section */
.related-posts-section {
  margin-top: 2.5rem;
  padding-top: 1.8rem;
  border-top: 2px solid var(--primary-light);
}

.related-posts-heading {
  font-size: 1.25rem;
  color: #1a3324;
  margin-bottom: 1.2rem;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

@media (max-width: 600px) {
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
}

.related-card {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  text-decoration: none !important;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.related-card-thumb {
  width: 96px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #eaf2ed;
}

.related-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.related-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1a3324;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}
