:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f4;
  --text: #202020;
  --text-soft: #565650;
  --muted: #9a9a92;
  --line: #ececea;
  --line-2: #e2e2df;
  --accent: #17b98a;
  --accent-ink: #0e8f6a;
  --heart: #ff5470;
  --radius: 12px;
  --wrap: 1040px;
  --read: 640px;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "Noto Sans JP", Meiryo, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans);
  line-height: 1.85; font-size: 16px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* header ---- note風 */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .bar { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; }
.brand .mark { font-size: 18px; letter-spacing: .01em; }
.brand .mark b { color: var(--accent); }
.brand .sub { font-size: 10px; color: var(--muted); font-weight: 700; letter-spacing: .16em; }
.nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; margin-left: 8px; }
.nav a { color: var(--text-soft); }
.nav a:hover { color: var(--accent); }
.spacer { flex: 1; }
.head-cta { font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #fff; transition: filter .15s; }
.head-cta:hover { filter: brightness(1.05); }

/* masthead (home) ---- 控えめ */
.masthead { padding: 40px 0 8px; }
.masthead .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--accent); }
.masthead h1 { font-size: clamp(24px, 3.4vw, 32px); margin: 10px 0 0; font-weight: 800; letter-spacing: -.01em; }
.masthead p { color: var(--text-soft); margin: 10px 0 0; font-size: 15px; max-width: 60ch; }

/* category pills */
.pills { display: flex; flex-wrap: wrap; gap: 9px; margin: 22px 0 0; }
.pill { font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--text-soft); transition: all .15s; }
.pill:hover, .pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* section */
.section { padding: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.section-head h2 { font-size: 19px; margin: 0; font-weight: 800; }
.section-head a.more { font-size: 13px; font-weight: 700; color: var(--accent); }

/* card grid ---- noteのカード */
.grid { display: grid; gap: 26px 22px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.09); transform: translateY(-3px); }
.card .thumb { aspect-ratio: 1.9/1; background: var(--bg-soft); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { font-size: 16px; line-height: 1.55; margin: 0; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card:hover h3 { color: var(--accent-ink); }
.card .foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }

/* author avatar (image) */
.avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--line); flex: none; display: block; }
.avatar.sm { width: 22px; height: 22px; }
.avatar.lg { width: 46px; height: 46px; }
.avatar.xl { width: 60px; height: 60px; }
.author { font-weight: 700; color: var(--text-soft); }
.handle { color: var(--muted); }

/* 記事下の著者プロフィール（note風） */
.profile { max-width: var(--read); margin: 42px auto 0; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; gap: 15px; align-items: flex-start; background: #fff; }
.profile .info { flex: 1; }
.profile .top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile .top .n { font-weight: 800; font-size: 15px; }
.profile .top .h { color: var(--muted); font-size: 13px; }
.profile .bio { color: var(--text-soft); font-size: 14px; line-height: 1.8; margin: 10px 0 0; }
.profile .follow { margin-top: 14px; display: inline-block; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); padding: 9px 22px; border-radius: 999px; }
.heart { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.heart svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* feature (latest, note-ish large card) */
.feature { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .2s; }
.feature:hover { box-shadow: 0 12px 30px rgba(0,0,0,.09); }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } }
.feature .thumb { aspect-ratio: 1.9/1; background: var(--bg-soft); overflow: hidden; }
.feature .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature .body { padding: 24px 24px 22px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.feature .tag { font-size: 12px; font-weight: 700; color: var(--accent); }
.feature h2 { font-size: clamp(19px, 2.6vw, 26px); line-height: 1.4; margin: 0; font-weight: 800; }
.feature .foot { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* article ---- note風リーディング */
.article { padding: 40px 0 0; }
.article .col { max-width: var(--read); margin: 0 auto; }
.article .kicker { font-size: 12px; font-weight: 700; color: var(--accent); }
.article h1 { font-size: clamp(24px, 4vw, 33px); line-height: 1.45; margin: 12px 0 0; font-weight: 800; letter-spacing: -.005em; }
.article .authorbar { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article .authorbar .who { display: flex; flex-direction: column; }
.article .authorbar .who .n { font-weight: 800; font-size: 14px; }
.article .authorbar .who .d { color: var(--muted); font-size: 12px; }
.article .authorbar .follow { margin-left: auto; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); padding: 8px 18px; border-radius: 999px; }
.article .lead-img { margin: 26px 0 0; border-radius: 12px; overflow: hidden; }
.prose { margin: 30px auto 0; font-size: 16px; }
.prose h2 { font-size: 21px; font-weight: 800; margin: 46px 0 14px; line-height: 1.5; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 34px 0 10px; }
.prose p { margin: 20px 0; }
.prose img { border-radius: 10px; margin: 26px auto; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 7px 0; }
.prose blockquote { margin: 24px 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--text-soft); }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line-2); padding: 10px 12px; text-align: left; }
.prose th { background: var(--bg-soft); }

/* スキ + CTA */
.like-row { max-width: var(--read); margin: 44px auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.like-btn { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--text-soft); font-weight: 700; font-size: 15px; padding: 12px 26px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.like-btn:hover { border-color: var(--heart); color: var(--heart); }
.like-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.like-row .hint { color: var(--muted); font-size: 12px; }

.cta { max-width: var(--read); margin: 30px auto 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 26px; text-align: center; }
.cta h3 { font-size: 18px; margin: 0 0 8px; font-weight: 800; }
.cta p { color: var(--text-soft); margin: 0 auto 16px; max-width: 42ch; font-size: 14px; }
.cta a { display: inline-block; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; padding: 12px 26px; border-radius: 999px; transition: filter .15s; }
.cta a:hover { filter: brightness(1.05); }

/* footer */
.site-foot { margin-top: 70px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.site-foot .inner { padding: 40px 0; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; }
.site-foot .brand .mark { font-size: 17px; }
.site-foot p { color: var(--muted); font-size: 13px; max-width: 30ch; margin: 12px 0 0; }
.site-foot .cols { display: flex; gap: 50px; flex-wrap: wrap; }
.site-foot h4 { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.site-foot a { display: block; font-size: 14px; color: var(--text-soft); margin: 7px 0; }
.site-foot a:hover { color: var(--accent); }
.copy { border-top: 1px solid var(--line); padding: 16px 0; font-size: 12px; color: var(--muted); }

/* 目次（note風） */
.toc { margin: 28px auto 0; max-width: var(--read); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: var(--bg-soft); }
.toc .toc-h { font-weight: 800; font-size: 13px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li { margin: 5px 0; font-size: 14px; }
.toc ul { list-style: circle; margin: 4px 0; padding-left: 1.2em; }
.toc ul li { margin: 3px 0; font-size: 13px; }
.toc a { color: var(--text-soft); }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* タグ */
.tags { max-width: var(--read); margin: 30px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { font-size: 12px; font-weight: 700; color: var(--text-soft); background: var(--bg-soft); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; }
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

/* 関連記事 */
.related-sec { padding-top: 10px; }
.related-sec h2 { font-size: 19px; font-weight: 800; margin: 0 0 20px; }

.page-head { padding: 40px 0 0; }
.page-head .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.page-head h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 8px 0 0; }
.page-head .lead { color: var(--muted); margin: 10px 0 0; font-size: 14px; }
