/* 設計ノート：ロゴの青（#4870C8）を濃くした「青図面」と方眼、寸法線、型番ラベル */
:root {
  --ink: #161b26;
  --sub: #5d6575;
  --paper: #f6f5f0;
  --white: #fff;
  --line: #dcdfe6;
  --blue: #4870c8;
  --navy: #14285a;
  --navy-2: #1b3473;
  --grid-on-navy: rgba(255, 255, 255, .07);
  --grid-on-paper: rgba(72, 112, 200, .08);
  --tape: rgba(245, 214, 120, .78);
  --orange: #ff7a1a;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --head: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --w: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.95 var(--sans); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); }
h1, h2, h3, h4, h5 { font-family: var(--head); font-weight: 900; line-height: 1.45; letter-spacing: .01em; }
.mono { font: 500 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(20px, calc((100% - var(--w)) / 2)); background: rgba(246, 245, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 900 20px/1.1 var(--head); letter-spacing: .06em; }
.site-logo img { width: 40px; height: 40px; border-radius: 8px; }
.site-logo small { display: block; font: 500 11px/1.4 var(--sans); color: var(--sub); letter-spacing: 0; margin-top: 2px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 12px; border-radius: 4px; }
.site-nav a:hover, .site-nav a[aria-current] { background: var(--navy); color: #fff; }
@media (max-width: 560px) { .site-logo small { display: none; } .site-nav a { padding: 6px 8px; } }

/* ---- hero（青図面） ---- */
.hero { color: #fff; background-color: var(--navy); background-image: linear-gradient(var(--grid-on-navy) 1px, transparent 1px), linear-gradient(90deg, var(--grid-on-navy) 1px, transparent 1px); background-size: 24px 24px; }
.hero__inner { max-width: var(--w); margin: 0 auto; padding: 72px 20px 80px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero .mono { color: #9fb6ee; margin: 0 0 18px; }
.hero h1 { font-size: clamp(36px, 5.6vw, 64px); line-height: 1.22; margin: 0 0 24px; letter-spacing: .02em; }
.hero__text > p:last-child { color: #c9d6f5; max-width: 30em; margin: 0; }
.hero__photo { position: relative; display: block; background: #fff; padding: 10px 10px 44px; color: var(--ink); text-decoration: none; transform: rotate(1.5deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.hero__photo::before { content: ""; position: absolute; z-index: 1; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px; background: var(--tape); transform: rotate(-4deg); }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.dim { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; align-items: center; gap: 10px; color: var(--navy-2); white-space: nowrap; }
.dim i { flex: 1; height: 1px; background: var(--navy-2); position: relative; }
.dim i::before { content: ""; position: absolute; top: -5px; width: 1px; height: 11px; background: var(--navy-2); }
.dim i:first-child::before { left: 0; }
.dim i:last-child::before { right: 0; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 48px 20px 56px; } .hero__photo { transform: rotate(1deg); } }

/* ---- セクション共通 ---- */
.plan, .list, .related { max-width: var(--w); margin: 0 auto; padding: 64px 20px 0; }
.list { padding-bottom: 72px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.sec-head .mono { color: var(--blue); margin: 0; white-space: nowrap; }
.sec-head h1, .sec-head h2 { margin: 0; font-size: 24px; }

/* ---- PROJECT MAP（部屋＝図面の区画） ---- */
.plan__rooms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 2px solid var(--navy); background: var(--white); }
.plan__rooms li { border-right: 1px solid var(--navy); }
.plan__rooms li:last-child { border-right: 0; }
.plan__rooms a, .plan__next { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 20px 18px; text-decoration: none; color: var(--ink); background-image: linear-gradient(var(--grid-on-paper) 1px, transparent 1px), linear-gradient(90deg, var(--grid-on-paper) 1px, transparent 1px); background-size: 16px 16px; }
.plan__rooms a:hover { background-color: var(--navy); color: #fff; }
.plan__rooms a:hover .mono { color: #9fb6ee; }
.plan__rooms .mono { color: var(--blue); font-size: 11px; }
.plan__rooms b { font: 900 22px/1.3 var(--head); }
.plan__next { color: var(--sub); }
.plan__next b { color: var(--sub); font-weight: 700; }
@media (max-width: 640px) { .plan__rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plan__rooms li { border-bottom: 1px solid var(--navy); } .plan__rooms li:nth-child(2n) { border-right: 0; } .plan__rooms b { font-size: 18px; } .plan__rooms a, .plan__next { padding: 14px; } }

/* ---- 記事カード ---- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.card { display: flex; flex-direction: column; gap: 14px; }
.card__img { display: block; overflow: hidden; background: var(--white); }
.card__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s; }
.card__img img.is-logo { object-fit: contain; padding: 24px; }
.card:hover .card__img img { transform: scale(1.03); }
.card .mono { display: flex; justify-content: space-between; gap: 8px; margin: 0; color: var(--blue); font-size: 11px; }
.card .mono span { color: var(--sub); }
.card__title { margin: 0; font-size: 18px; line-height: 1.55; font-weight: 700; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card__excerpt { margin: 0; color: var(--sub); font-size: 15px; line-height: 1.85; }
.card--feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.card--feature .card__body { display: flex; flex-direction: column; gap: 14px; }
.card--feature .card__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .card--feature { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
@media (max-width: 560px) { .cards { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 56px 0 0; }
.pager a, .pager span { padding: 8px 14px; border: 1px solid var(--ink); text-decoration: none; color: var(--ink); }
.pager span, .pager a:hover { background: var(--ink); color: #fff; }

/* ---- 記事ページ ---- */
.post__head { max-width: 860px; margin: 0 auto; padding: 56px 20px 32px; }
.post__head > .mono { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--blue); margin: 0 0 14px; }
.post__head > .mono span { color: var(--sub); }
.post__title { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.4; margin: 0 0 20px; }
.post__cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--ink); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; line-height: 1.6; }
.chip span { font: 500 11px var(--mono); color: var(--sub); }
.chip:hover { background: var(--ink); color: #fff; }
.chip:hover span { color: #c9d0dc; }
.tag { font-size: 13px; color: var(--sub); text-decoration: none; padding: 4px 4px; }
.post__eyecatch { max-width: 1040px; margin: 0 auto 8px; padding: 0 20px; position: relative; }
.post__eyecatch::before { content: ""; position: absolute; z-index: 1; top: -12px; left: 60px; width: 120px; height: 26px; background: var(--tape); transform: rotate(-3deg); }
.post__eyecatch img { width: 100%; max-height: 640px; object-fit: cover; }
.post__wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 0; }
.pr { font-size: 12px; color: var(--sub); border-left: 3px solid var(--line); padding: 2px 12px; margin: 0 0 28px; }
.post__body { font-size: 17px; line-height: 2; counter-reset: h2; }
.post__body p { margin: 0 0 1.15em; }
.post__body h2 { counter-increment: h2; font-size: 24px; margin: 2.6em 0 1em; padding-top: 16px; border-top: 2px solid var(--ink); scroll-margin-top: 80px; }
.post__body h2::before { content: counter(h2, decimal-leading-zero); display: block; font: 500 12px/1 var(--mono); letter-spacing: .1em; color: var(--blue); margin-bottom: 10px; }
.post__body h3 { font-size: 19px; margin: 2em 0 .8em; padding-left: 12px; border-left: 4px solid var(--blue); }
.post__body h4, .post__body h5 { font-size: 17px; margin: 1.6em 0 .6em; }
.post__body figure { margin: 1.6em 0; }
.post__body figcaption { font: 500 12px var(--mono); color: var(--sub); text-align: center; margin-top: 8px; }
.post__body ul, .post__body ol { margin: 0 0 1.3em; padding: 16px 20px 16px 40px; background: var(--white); border: 1px solid var(--line); }
.post__body mark { background: linear-gradient(transparent 58%, rgba(255, 122, 26, .28) 58%); color: inherit; font-weight: 700; }
.post__body .right { text-align: right; }
.post__body .center { text-align: center; }
.post__body .table { overflow-x: auto; margin: 1.6em 0; }
.post__body table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--white); }
.post__body th, .post__body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.post__body th { background: var(--navy); color: #fff; font-weight: 700; }
.post__body .embed { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; }
.post__body .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post__body .buy { text-align: center; margin: 1em 0 1.8em; }
.btn { display: inline-block; background: var(--orange); color: #fff; font: 700 15px var(--head); text-decoration: none; padding: 13px 44px; border-radius: 4px; }
.btn:hover { background: #e9650a; }
.linkcard { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; margin: 1.4em 0; padding: 12px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.linkcard:hover { border-color: var(--ink); }
.linkcard img { width: 132px; aspect-ratio: 3 / 2; object-fit: cover; }
.linkcard small { display: block; color: var(--blue); font-size: 11px; }
.linkcard b { display: block; font: 700 15px/1.55 var(--head); }
@media (max-width: 480px) { .linkcard { grid-template-columns: 96px minmax(0, 1fr); } .linkcard img { width: 96px; } }
.product { display: grid; gap: 4px; justify-items: center; margin: 1.4em 0 1.8em; padding: 20px; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--ink); text-align: center; }
.product__name { font: 700 16px var(--head); margin: 0 !important; }
.product__note { font-size: 12px; color: var(--sub); margin: 0 !important; }
.product .btn { margin-top: 10px; padding: 10px 36px; font-size: 14px; }
.btn--amazon { background: #ff9900; }
.btn--amazon:hover { background: #e68a00; }
.btn--rakuten { background: #bf0000; }
.btn--rakuten:hover { background: #a30000; }

/* 目次・シリーズ */
.toc, .series { margin: 2em 0; padding: 22px 24px; background: var(--white); border: 2px solid var(--ink); }
.toc > .mono, .series > .mono { margin: 0 0 12px; color: var(--blue); }
.toc ol, .series ol { list-style: none; margin: 0; padding: 0; background: none !important; border: 0 !important; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 14px; padding: 6px 0; border-top: 1px dashed var(--line); line-height: 1.6; font-size: 15px; }
.toc li::before { content: counter(toc, decimal-leading-zero); font: 500 12px/1.9 var(--mono); color: var(--blue); }
.toc li:first-child, .series li:first-child { border-top: 0; }
.toc a, .series a { color: var(--ink); text-decoration: none; }
.toc a:hover, .series a:hover { text-decoration: underline; text-underline-offset: 3px; }
.series { background-color: var(--navy); color: #fff; border-color: var(--navy); background-image: linear-gradient(var(--grid-on-navy) 1px, transparent 1px), linear-gradient(90deg, var(--grid-on-navy) 1px, transparent 1px); background-size: 20px 20px; }
.series > .mono { color: #9fb6ee; }
.series li { display: flex; gap: 14px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 15px; line-height: 1.6; }
.series li .mono { color: #9fb6ee; font-size: 11px; flex: none; line-height: 2.1; }
.series a { color: #dbe4fa; }
.series li[aria-current] b { color: #fff; }
.series li[aria-current] .mono { color: var(--orange); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 48px 0 0; }
.share span { color: var(--sub); margin-right: 6px; }
.share a { border: 1px solid var(--ink); padding: 6px 12px; text-decoration: none; color: var(--ink); }
.share a:hover { background: var(--ink); color: #fff; }
.post__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; }
.post__pager a { text-decoration: none; color: var(--ink); line-height: 1.6; font-weight: 700; }
.post__pager a:last-child { text-align: right; }
.post__pager small { display: block; color: var(--blue); margin-bottom: 4px; }
.related { padding-bottom: 80px; }

/* 固定ページ・サイトマップ・404 */
.post.page { max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.sitemap ul { background: none !important; border: 0 !important; padding: 0 0 0 1.2em; }
.sitemap li { margin: 4px 0; }

/* ---- footer（青図面） ---- */
.site-footer { color: #c9d6f5; font-size: 14px; background-color: var(--navy); background-image: linear-gradient(var(--grid-on-navy) 1px, transparent 1px), linear-gradient(90deg, var(--grid-on-navy) 1px, transparent 1px); background-size: 24px 24px; }
.site-footer__inner { max-width: var(--w); margin: 0 auto; padding: 56px 20px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; }
.site-footer .mono { color: #9fb6ee; margin: 0 0 14px; }
.site-footer a { color: #fff; }
.about img { border-radius: 10px; margin-bottom: 12px; }
.about p { line-height: 1.9; }
.about b { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer .chip { border-color: rgba(255, 255, 255, .35); color: #fff; }
.site-footer .chip span { color: #9fb6ee; }
.site-footer .chip:hover { background: #fff; color: var(--navy); }
.site-footer__bottom { max-width: var(--w); margin: 0 auto; padding: 18px 20px 28px; display: flex; flex-wrap: wrap; gap: 20px; border-top: 1px solid rgba(255, 255, 255, .15); }
.site-footer__bottom a { color: #c9d6f5; text-decoration: none; }
.site-footer__bottom span { margin-left: auto; color: #9fb6ee; }
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
