:root {
  --bg: #f7fbf8;
  --paper: #ffffff;
  --ink: #1d2a24;
  --muted: #65736c;
  --line: #dfe8e2;
  --accent: #2fa36b;
  --accent-soft: #e8f6ee;
  --shadow: 0 18px 50px rgba(31, 59, 45, 0.10);
  --radius: 28px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(47, 163, 107, 0.13), transparent 34rem),
    var(--bg);
  line-height: 1.85;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

.site-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  box-shadow: 0 10px 22px rgba(47, 163, 107, 0.22);
}

.brand-text { letter-spacing: 0.03em; }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.hero {
  padding: 84px 0 64px;
}

.eyebrow,
.post-number {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.section { padding: 20px 0; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading h2 { margin-bottom: 0; font-size: 1.7rem; }
.section-heading p { margin-bottom: 0; color: var(--muted); }

.post-card {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow);
}

.post-card-image img {
  width: 100%;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  aspect-ratio: 4 / 5;
  object-fit: contain;
}

.post-card h3 {
  margin-bottom: 12px;
  font-size: clamp(1.26rem, 1.5vw, 1.5rem);
  line-height: 1.25;
}

.post-card-body p:not(.post-number) { color: var(--muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #276749;
  font-size: 0.88rem;
  font-weight: 700;
}

.post-layout { max-width: 860px; }

.breadcrumb {
  display: flex;
  gap: 9px;
  margin: 42px 0 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.post {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.9);
  box-shadow: var(--shadow);
}

.post-header { margin-bottom: 28px; }

.post-header h1 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 6vw, 1.92rem);
  line-height: 1.14;
  letter-spacing: -0.05em;
}

.post-subtitle { color: var(--muted); font-size: 1.08rem; }

.main-visual {
  margin: 0 0 42px;
}

.main-visual img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.memo {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: #fbfdfc;
  border: 1px solid var(--line);
}

.memo.soft { background: var(--accent-soft); }
.memo h2 { margin-bottom: 12px; font-size: 1.35rem; }
.memo p:last-child { margin-bottom: 0; }

.post-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr) auto minmax(0, 1fr);
  grid-template-areas: "previous previous-separator archive next-separator next";
  gap: 10px;
  align-items: center;
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.post-nav-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  min-height: 2.2em;
}

.post-nav-previous {
  grid-area: previous;
  justify-content: flex-end;
  text-align: right;
}

.post-nav-archive {
  grid-area: archive;
  justify-content: center;
  text-align: center;
}

.post-nav-next {
  grid-area: next;
  justify-content: flex-start;
}

.post-nav-separator:nth-child(2) { grid-area: previous-separator; }
.post-nav-separator:nth-child(4) { grid-area: next-separator; }

.post-nav .is-disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px 36px;
  color: var(--muted);
  font-size: 0.9rem;
}

.sp-only { display: none; }

@media (max-width: 760px) {
  .sp-only { display: block; }
  .hero { padding-top: 58px; }
  .section-heading { display: block; }
  .section-heading h2 { margin-bottom: 6px; }
  .post-card { grid-template-columns: 1fr; padding: 18px; }
  .post { padding: 18px; }
  .memo { padding: 20px; }
  .post-nav {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "previous next"
      "archive archive";
    gap: 8px 16px;
  }

  .post-nav-separator { display: none; }
  .post-nav-previous { justify-content: flex-start; text-align: left; }
  .post-nav-next { justify-content: flex-end; text-align: right; }
}
