/*
Theme Name: MORI MORI CART Guide
Theme URI: https://cart.morimori-cart.trade/guide/
Author: MORI MORI LAB
Description: MORI MORI CARTの読み物・SEO記事用軽量テーマ。
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: morimori-guide
*/

:root {
  --mm-green: #176b45;
  --mm-deep: #10472d;
  --mm-ink: #1e352b;
  --mm-muted: #5d7569;
  --mm-line: #d8e5dd;
  --mm-paper: #fffdfa;
  --mm-cream: #fcfbf7;
  --mm-yellow: #d9ad35;
  --mm-yellow-soft: #fff5cf;
  font: 16px/1.9 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  color: var(--mm-ink);
  background: var(--mm-cream);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--mm-ink);
  background-color: var(--mm-cream);
  background-image:
    radial-gradient(circle at 16px 16px, rgba(23,107,69,.035) 1.2px, transparent 1.3px),
    radial-gradient(circle at 48px 48px, rgba(217,173,53,.035) 1.2px, transparent 1.3px);
  background-size: 64px 64px;
}
img { max-width: 100%; height: auto; }
a { color: var(--mm-deep); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--mm-yellow);
  outline-offset: 3px;
}
.screen-reader-text, .skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 1000; padding: 8px 12px; background: #fff; }

.site-header {
  background: rgba(252,251,247,.96);
  border-bottom: 1px solid var(--mm-line);
}
.site-header__inner {
  width: min(1080px, calc(100% - 40px));
  margin: auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding { min-width: 0; }
.site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mm-deep);
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: .015em;
  text-decoration: none;
}
.site-title::before {
  content: "";
  width: 18px;
  height: 14px;
  border: 2px solid var(--mm-green);
  border-top: 0;
  border-radius: 1px 1px 3px 3px;
  box-shadow: 3px 4px 0 -2px var(--mm-yellow);
  transform: skew(-5deg);
}
.site-description { margin: 2px 0 0 28px; color: var(--mm-muted); font-size: .78rem; }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: .88rem; font-weight: 750; }
.header-actions a { white-space: nowrap; }
.header-button {
  padding: 7px 13px;
  color: #fff;
  background: var(--mm-green);
  border-radius: 7px;
  text-decoration: none;
  box-shadow: 0 2px 0 #0d3b25;
}

.journal-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--mm-line);
  background: #f3f8f5;
}
.journal-hero::before, .journal-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.journal-hero::before {
  width: 260px;
  height: 190px;
  right: max(4vw, 20px);
  top: 22px;
  border-radius: 48% 52% 58% 42%;
  background: #e1eee5;
  transform: rotate(7deg);
}
.journal-hero::after {
  width: 150px;
  height: 100px;
  right: max(13vw, 80px);
  bottom: -28px;
  border-radius: 52% 48% 45% 55%;
  background: #f8e9b7;
  transform: rotate(-8deg);
}
.journal-hero__inner {
  position: relative;
  z-index: 1;
  width: min(880px, calc(100% - 40px));
  margin: auto;
  padding: 58px 0 52px;
}
.journal-kicker {
  margin: 0 0 7px;
  color: var(--mm-green);
  font-size: .9rem;
  font-weight: 850;
  letter-spacing: .08em;
}
.journal-hero h1 {
  width: fit-content;
  max-width: 20ch;
  margin: 0;
  color: #123526;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.28;
  letter-spacing: -.035em;
}
.journal-hero h1::after {
  content: "";
  display: block;
  width: min(180px, 42%);
  height: 4px;
  margin-top: 10px;
  background: var(--mm-yellow);
  border-radius: 50%;
  transform: rotate(-1.5deg);
}
.journal-lead { max-width: 44rem; margin: 18px 0 0; color: #425e50; font-size: 1.06rem; }

.site-main { width: min(880px, calc(100% - 40px)); margin: auto; padding: 42px 0 80px; }
.breadcrumbs { margin: 0 0 30px; color: #6a8176; font-size: .82rem; }
.breadcrumbs a { color: #587366; }

.post-list { display: grid; gap: 0; border-top: 1px solid var(--mm-line); }
.post-card { padding: 32px 0; border-bottom: 1px solid var(--mm-line); }
.post-card__meta, .entry-meta { color: #6a8176; font-size: .82rem; }
.post-card h2 { margin: 6px 0 8px; font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.45; }
.post-card h2 a { color: #163d2c; text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--mm-yellow); }
.post-card p { margin: 0; color: #456052; }
.post-card__more { display: inline-block; margin-top: 12px; font-weight: 800; }

.article-header { margin-bottom: 34px; }
.article-header h1 {
  margin: 5px 0 12px;
  color: #123526;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.3;
  letter-spacing: -.035em;
}
.article-header h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  margin-top: 13px;
  background: var(--mm-yellow);
  transform: rotate(-2deg);
}
.entry-thumbnail { margin: 0 0 38px; }
.entry-thumbnail img { display: block; width: 100%; border: 1px solid var(--mm-line); border-radius: 10px; }
.entry-content { font-size: 1.02rem; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.45em; }
.entry-content h2 {
  margin: 2.4em 0 .8em;
  padding-bottom: .35em;
  color: #133727;
  font-size: clamp(1.55rem, 3.5vw, 2.05rem);
  line-height: 1.45;
  border-bottom: 1px solid var(--mm-line);
}
.entry-content h2::before { content: ""; display: inline-block; width: 24px; height: 3px; margin: 0 .45em .2em 0; background: var(--mm-yellow); }
.entry-content h3 { margin: 2em 0 .65em; color: #17442f; font-size: 1.28rem; line-height: 1.5; }
.entry-content h4 { margin: 1.7em 0 .5em; color: #295541; }
.entry-content strong { color: #153d2c; }
.entry-content mark { padding: 0 .16em; color: inherit; background: var(--mm-yellow-soft); }
.entry-content blockquote {
  margin: 2em 0;
  padding: 12px 0 12px 22px;
  color: var(--mm-deep);
  font-size: 1.2rem;
  font-weight: 800;
  border-left: 5px solid var(--mm-yellow);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { margin: 0 0 1.6em; padding-left: 1.5em; }
.entry-content li { margin-bottom: .45em; }
.entry-content .has-background, .entry-content .wp-block-group.has-background {
  padding: 20px 22px;
  border-radius: 8px;
}
.entry-content .is-style-mm-note, .mm-note {
  margin: 2em 0;
  padding: 18px 20px;
  background: var(--mm-yellow-soft);
  border-left: 5px solid var(--mm-yellow);
  border-radius: 0 8px 8px 0;
}
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { color: #687f73; font-size: .8rem; text-align: center; }
.entry-content img { border-radius: 8px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.8em 0; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--mm-line); text-align: left; }
.entry-content th { background: #eef6f1; }
.entry-content code { padding: .15em .35em; background: #edf3ef; border-radius: 4px; }
.entry-content pre { overflow: auto; padding: 18px; background: #18352a; color: #eef8f2; border-radius: 8px; }
.entry-content pre code { padding: 0; background: transparent; }
.wp-block-button__link {
  padding: 11px 20px;
  color: #fff;
  background: var(--mm-green);
  border-radius: 7px;
  box-shadow: 0 3px 0 #0d3b25;
}

.post-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--mm-line); }
.post-taxonomy { color: var(--mm-muted); font-size: .88rem; }

.article-discovery { margin-top: 52px; }
.discovery-section { margin-top: 42px; }
.discovery-section > h2 { margin: 0 0 18px; color: var(--mm-deep); font-size: 1.45rem; }
.discovery-section > h2::after { content: ""; display: block; width: 38px; margin-top: 6px; border-top: 3px solid var(--mm-yellow); transform: rotate(-2deg); }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.related-card { overflow: hidden; background: #fff; border: 1px solid var(--mm-line); border-radius: 11px; box-shadow: 0 3px 12px rgba(16,71,45,.05); }
.related-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--mm-yellow-soft); }
.related-card__thumbnail { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.discovery-placeholder { display: grid; place-items: center; color: #82681d; background: var(--mm-yellow-soft); font-size: .8rem; font-weight: 900; letter-spacing: .12em; }
.related-card__body { padding: 16px 18px 18px; }
.discovery-category { margin: 0 0 5px; color: var(--mm-green); font-size: .78rem; font-weight: 800; }
.related-card h3 { margin: 0; font-size: 1rem; line-height: 1.55; }
.related-card h3 a { color: var(--mm-deep); text-decoration: none; }
.related-card__excerpt { margin: 9px 0 0; color: var(--mm-muted); font-size: .82rem; line-height: 1.65; }
.same-category { padding: 24px 26px; background: var(--mm-paper); border: 1px solid var(--mm-line); border-radius: 10px; }
.same-category ul { display: grid; gap: 8px; margin: 0 0 14px; padding-left: 1.25em; }
.same-category li::marker { color: var(--mm-yellow); }
.category-more { font-size: .9rem; font-weight: 800; }
.article-neighbors__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.neighbor-card { display: grid; grid-template-columns: 112px 1fr; gap: 15px; min-height: 96px; padding: 10px; color: var(--mm-deep); text-decoration: none; background: #fff; border: 1px solid var(--mm-line); border-radius: 10px; }
.neighbor-card__thumbnail { display: block; width: 112px; height: 82px; object-fit: cover; border-radius: 6px; }
.neighbor-card > span { align-self: center; min-width: 0; }
.neighbor-card small { display: block; margin-bottom: 4px; color: var(--mm-muted); font-size: .72rem; }
.neighbor-card strong { display: block; line-height: 1.5; }
.category-directory { padding-top: 28px; border-top: 1px solid var(--mm-line); }
.category-directory ul { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.category-directory a { font-weight: 700; }
.category-directory span { color: var(--mm-muted); font-size: .78rem; }

.guide-cta {
  position: relative;
  overflow: hidden;
  margin-top: 54px;
  padding: 40px 28px;
  text-align: center;
  color: #fff;
  background: var(--mm-green);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16,71,45,.2);
}
.guide-cta::before { content: ""; position: absolute; top: 20px; left: 24px; width: 58px; border-top: 2px dashed #efd06f; transform: rotate(-7deg); }
.guide-cta h2 { margin: 0 0 7px; color: #fff; font-size: 1.65rem; }
.guide-cta p { margin: 0 0 20px; color: #dceee4; }
.guide-cta a { display: inline-block; padding: 10px 22px; color: var(--mm-deep); background: #fff; border-radius: 7px; font-weight: 850; text-decoration: none; box-shadow: 0 3px 0 #c7ddd1; }

.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { display: inline-grid; min-width: 38px; min-height: 38px; place-items: center; padding: 4px 10px; border: 1px solid var(--mm-line); border-radius: 6px; background: #fff; }
.page-numbers.current { color: #fff; background: var(--mm-green); border-color: var(--mm-green); }
.empty-state { padding: 34px; background: var(--mm-paper); border: 1px solid var(--mm-line); border-radius: 10px; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field { width: 100%; padding: 10px 12px; border: 1px solid #aac3b5; border-radius: 6px; font: inherit; }
.search-submit { padding: 10px 16px; color: #fff; background: var(--mm-green); border: 0; border-radius: 6px; font: inherit; font-weight: 800; }

.site-footer { border-top: 1px solid var(--mm-line); background: #f6faf7; }
.site-footer__inner { width: min(1080px, calc(100% - 40px)); margin: auto; padding: 36px 0 48px; color: #60776c; font-size: .86rem; }
.footer-brand { color: #1b4431; font-size: 1rem; font-weight: 900; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 9px; }
.footer-links a { color: #476758; }

@media (max-width: 680px) {
  .site-header__inner { width: min(100% - 28px, 1080px); min-height: 68px; gap: 12px; }
  .site-description { display: none; }
  .header-actions { gap: 8px; font-size: .78rem; }
  .header-actions .hide-mobile { display: none; }
  .header-button { padding: 6px 9px; }
  .journal-hero__inner, .site-main { width: min(100% - 32px, 880px); }
  .journal-hero__inner { padding: 44px 0 40px; }
  .journal-hero::before { right: -100px; opacity: .75; }
  .journal-hero::after { right: 0; opacity: .7; }
  .site-main { padding-top: 32px; }
  .related-grid, .article-neighbors__grid { grid-template-columns: 1fr; }
  .neighbor-card { grid-template-columns: 92px 1fr; }
  .neighbor-card__thumbnail { width: 92px; height: 72px; }
  .guide-cta { padding: 36px 20px; }
  .site-footer__inner { width: min(100% - 32px, 1080px); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
