/* くらしのワット帖 — 「方眼ノート × あかり」 */
:root {
  --paper: #fbf8f1;
  --paper-2: #f3eee3;
  --card: #ffffff;
  --ink: #1d2733;
  --ink-2: #4a5563;
  --ink-3: #7b8592;
  --line: #e4ddcf;
  --grid: rgba(29, 39, 51, 0.045);
  --amber: #e9a21b;
  --amber-deep: #b97a06;
  --amber-soft: #fdf1d6;
  --navy: #22406a;
  --green: #2f7d5b;
  --green-soft: #e5f3ec;
  --red: #b5452f;
  --red-soft: #fbe9e4;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(29, 39, 51, .06), 0 4px 14px rgba(29, 39, 51, .05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
}
a { color: var(--navy); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }

/* header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: .06em; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--amber);
  -webkit-mask: none;
  position: relative; flex: none;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.12);
}
.logo-mark::after {
  content: ""; position: absolute; inset: 5px 8px;
  background: var(--ink);
  clip-path: polygon(60% 0, 10% 58%, 45% 58%, 35% 100%, 90% 38%, 55% 38%);
}
.gnav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.gnav a { white-space: nowrap; text-decoration: none; color: var(--ink-2); font-size: 14px; padding: 6px 10px; border-radius: 6px; }
.gnav a:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 640px) {
  .header-inner { gap: 4px; padding-top: 10px; }
  .gnav { margin: 0 -16px; padding: 0 12px 6px; width: calc(100% + 32px); }
}

/* hero */
.hero { padding: 56px 0 40px; }
.hero-kicker { margin: 0; font-size: 13px; font-weight: 700; color: var(--amber-deep); letter-spacing: .2em; }
.hero-title { margin: 8px 0 12px; font-size: clamp(28px, 5vw, 44px); line-height: 1.4; letter-spacing: .04em; }
.hero-title { background: linear-gradient(transparent 68%, var(--amber-soft) 68%); display: inline; }
.hero-lead { margin: 16px 0 0; color: var(--ink-2); max-width: 40em; }

/* sections */
section { margin: 40px 0; }
.sec-title { font-size: 18px; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; letter-spacing: .08em; }
.sec-title::before { content: ""; width: 14px; height: 4px; background: var(--amber); border-radius: 2px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s; }
.cat-tile:hover { border-color: var(--amber); }
.cat-name { font-weight: 700; }
.cat-desc { font-size: 13px; line-height: 1.7; color: var(--ink-2); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--amber); }
.card-link { display: flex; flex-direction: column; height: 100%; padding: 18px 20px; color: inherit; text-decoration: none; }
.card-title { margin: 8px 0 6px; font-size: 17px; line-height: 1.6; }
.card-desc { margin: 0 0 12px; font-size: 14px; line-height: 1.75; color: var(--ink-2); flex: 1; }
.card time { font-size: 12px; color: var(--ink-3); }
.tag { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 9px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-deep); text-decoration: none; letter-spacing: .04em; }
.empty { color: var(--ink-3); }

/* breadcrumb */
.crumbs { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; color: var(--ink-3); }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { color: var(--ink-3); }
.crumbs li[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 24em; }

.cat-head { margin: 24px 0 28px; }
.cat-head h1 { margin: 0 0 6px; font-size: 28px; }
.cat-head p { margin: 0; color: var(--ink-2); }

/* post */
.post { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px clamp(18px, 5vw, 48px) 40px; margin: 16px 0 32px; box-shadow: var(--shadow); }
.post-head h1 { font-size: clamp(23px, 4vw, 30px); line-height: 1.55; margin: 12px 0 8px; letter-spacing: .03em; }
.meta { margin: 0; font-size: 13px; color: var(--ink-3); display: flex; gap: 14px; flex-wrap: wrap; }
.pr-note { margin: 18px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); background: var(--paper-2); border-radius: 6px; padding: 8px 12px; }
.post-body { margin-top: 24px; }
.post-body p { margin: 0 0 1.4em; }
.post-body h2 { font-size: 22px; line-height: 1.55; margin: 2.6em 0 1em; padding: 12px 16px; background: var(--paper-2); border-left: 5px solid var(--amber); border-radius: 4px; scroll-margin-top: 80px; }
.post-body h3 { font-size: 18px; margin: 2em 0 .8em; padding-bottom: 6px; border-bottom: 2px dotted var(--line); scroll-margin-top: 80px; }
.post-body h4 { font-size: 16px; margin: 1.6em 0 .6em; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.post-body li { margin: .3em 0; }
.post-body li::marker { color: var(--amber-deep); }
.post-body strong { font-weight: 700; }
.post-body mark { background: linear-gradient(transparent 60%, var(--amber-soft) 60%); color: inherit; font-weight: 700; }
.post-body blockquote { margin: 0 0 1.6em; padding: 14px 18px; border-left: 5px solid var(--amber); border-radius: 0 8px 8px 0; background: var(--amber-soft); color: var(--ink); font-weight: 700; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body hr { border: 0; border-top: 1px dashed var(--line); margin: 2.4em 0; }
.post-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: var(--paper-2); padding: 2px 5px; border-radius: 4px; }
.post-body pre { background: var(--paper-2); padding: 14px; border-radius: 8px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }

/* toc */
.toc { margin: 1.6em 0 2em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.toc summary { cursor: pointer; font-weight: 700; padding: 12px 18px; letter-spacing: .1em; }
.toc ol { margin: 0; padding: 0 18px 16px 2.4em; font-size: 15px; line-height: 1.8; }
.toc ol > li { margin: 4px 0; }
.toc ol > li::marker { color: var(--amber-deep); font-weight: 700; }
.toc ul { margin: 2px 0 6px; padding-left: 1.1em; list-style: none; font-size: 13.5px; line-height: 1.75; }
.toc ul li::before { content: ""; display: inline-block; width: 6px; height: 2px; background: var(--ink-3); vertical-align: middle; margin-right: 8px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--navy); text-decoration: underline; }

/* table */
.table-wrap { overflow-x: auto; margin: 0 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; line-height: 1.6; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table-wrap thead th { background: var(--ink); color: var(--paper); font-weight: 700; white-space: nowrap; }
.table-wrap tbody th { background: var(--paper-2); white-space: nowrap; font-weight: 700; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }

/* boxes */
.box { margin: 0 0 1.6em; padding: 16px 20px 2px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); }
.box-title { font-weight: 700; margin: 0 0 .6em !important; display: flex; align-items: center; gap: 8px; }
.box-title::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-3); flex: none; }
.box-point { background: var(--amber-soft); border-color: transparent; }
.box-point .box-title::before { background: var(--amber); }
.box-merit { background: var(--green-soft); border-color: transparent; }
.box-merit .box-title { color: var(--green); }
.box-merit .box-title::before { background: var(--green); }
.box-demerit, .box-warning { background: var(--red-soft); border-color: transparent; }
.box-demerit .box-title, .box-warning .box-title { color: var(--red); }
.box-demerit .box-title::before, .box-warning .box-title::before { background: var(--red); }
.box ul { margin-bottom: 1em; }

/* product box */
.pbox { position: relative; display: flex; gap: 20px; margin: 0 0 1.8em; padding: 20px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); }
.pbox-pr { position: absolute; top: 8px; right: 10px; margin: 0 !important; font-size: 10px; color: var(--ink-3); letter-spacing: .1em; }
.pbox-img { flex: 0 0 140px; display: flex; align-items: center; justify-content: center; }
.pbox-img img { max-height: 140px; object-fit: contain; }
.pbox-body { flex: 1; min-width: 0; }
.pbox-name { font-weight: 700; font-size: 17px; line-height: 1.5; margin: 0 0 2px !important; }
.pbox-maker { font-size: 13px; color: var(--ink-3); margin: 0 0 8px !important; }
.pbox-specs { list-style: none; padding: 0 !important; margin: 0 0 8px !important; display: flex; flex-wrap: wrap; gap: 6px; }
.pbox-specs li { font-size: 12px; background: var(--paper-2); padding: 2px 8px; border-radius: 4px; margin: 0 !important; }
.pbox-note { font-size: 14px; color: var(--ink-2); margin: 0 0 12px !important; line-height: 1.7; }
.pbox-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pbtn { display: inline-block; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 700; text-decoration: none; color: #fff; line-height: 1.3; transition: filter .15s; }
.pbtn:hover { filter: brightness(1.08); }
.pbtn.amazon { background: #e8930c; }
.pbtn.rakuten { background: #bf0000; }
.pbtn.yahoo { background: #ff0033; }
.pbtn.official { background: var(--navy); }
@media (max-width: 560px) {
  .pbox { flex-direction: column; gap: 12px; }
  .pbox-img { flex-basis: auto; }
  .pbtn { flex: 1 1 100%; text-align: center; }
}

/* related */
.related { margin-bottom: 48px; }

/* 404 */
.notfound { padding: 80px 16px; text-align: center; }

/* footer */
.site-footer { margin-top: 64px; padding: 36px 0 28px; background: var(--ink); color: var(--paper); }
.site-footer a { color: var(--paper); }
.footer-name { margin: 0; font-weight: 700; letter-spacing: .08em; }
.footer-tag { margin: 0 0 16px; font-size: 13px; opacity: .7; }
.fnav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.copy { margin: 20px 0 0; font-size: 12px; opacity: .6; }

/* --- illustrations --- */
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; }
.hero-title { display: inline; }
.hero-figure svg { display: block; width: 100%; height: auto; }
@media (max-width: 820px) {
  .hero { padding-top: 36px; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-figure { max-width: 460px; }
}

.card-link { padding: 0; }
.card-thumb { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.card-thumb svg { display: block; width: 100%; height: auto; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 20px 18px; }
.card-title { margin-top: 0; }

.post-eyecatch { margin: 20px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-eyecatch svg { display: block; width: 100%; height: auto; }
.hero-inner .hero-title { font-size: clamp(28px, 3.4vw, 42px); }
.hero-inner .hero-title { display: block; background: none; }
.hero-title span { display: inline-block; background: linear-gradient(transparent 68%, var(--amber-soft) 68%); }
.pbox-a8 { position: relative; }
.pbox-a8 a { display: block; }
.pbox-a8 a img { display: block; width: 140px !important; height: 140px !important; max-width: 100%; object-fit: contain; }
/* 計測用の見えない画像は大きさを持たせない */
.pbox-a8 img:not(a img) { position: absolute !important; width: 1px !important; height: 1px !important; }
@media (max-width: 560px) { .pbox-a8 a img { width: 180px !important; height: 180px !important; margin: 0 auto; } }
/* 広告ブロックなどで画像が読み込まれないときは、空の枠を出さない */
.pbox-a8:not(:has(a img)) { display: none; }
/* 2列の表はスマホでも横スクロールさせない */
.table-wrap table:not(:has(th:nth-child(3))) { min-width: 0; }

/* --- はじめての方へ --- */
.guide { margin-top: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.step { display: flex; gap: 14px; padding: 18px 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--amber); color: var(--ink); font-weight: 800; display: grid; place-items: center; font-size: 16px; }
.step-body { min-width: 0; }
.step-title { margin: 2px 0 6px; font-size: 17px; line-height: 1.5; }
.step-text { margin: 0 0 12px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.step-links { display: flex; flex-wrap: wrap; gap: 8px; }
.step-link { font-weight: 700; font-size: 14px; }
.step-after { margin: 12px 0 0; font-size: 14px; }
.chip { display: inline-block; padding: 7px 12px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-deep); font-weight: 800; font-size: 14px; line-height: 1.2; text-decoration: none; border: 1px solid transparent; }
.chip:hover { border-color: var(--amber); }
.chip:focus-visible, .step-link:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.chip-plain { background: var(--card); color: var(--ink); font-weight: 700; border-color: var(--line); }
.purposes { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.purposes-label { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.purposes-links { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

/* トップページのセクション間の余白 */
.home > section { margin: 72px 0; }
.home > section:first-child { margin-top: 16px; }
.home .sec-title { margin-bottom: 20px; }
@media (max-width: 640px) { .home > section { margin: 56px 0; } }

.cat-intro { margin-top: 14px; max-width: 46em; color: var(--ink-2); font-size: 15px; line-height: 1.9; }
.cat-intro p { margin: 0; }

/* 運営者ボックス */
.owner-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 40px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.owner-mark { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--amber) url('/favicon.svg') center / 26px no-repeat; }
.owner-name { margin: 0 0 4px; font-weight: 700; font-size: 15px; }
.owner-text { margin: 0; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
.owner-text a { margin-left: 4px; white-space: nowrap; }

/* 見やすさの改善 */
.wrap.narrow { max-width: 800px; }
.table-hint { display: none; margin: 0 0 6px; font-size: 12px; color: var(--ink-3); text-align: right; }
.table-hint::after { content: " →"; }
.table-wrap.is-wide th[scope="row"] { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.table-wrap.is-wide table { min-width: 640px; }
@media (max-width: 860px) { .table-hint { display: block; } }
.table-wrap tbody tr:nth-child(even) td { background: #fcfbf8; }
.table-wrap.is-wide thead th { white-space: normal; }
@media (min-width: 861px) {
  .table-wrap.is-wide { margin-left: -28px; margin-right: -28px; }
  .table-wrap.is-wide table { min-width: 0; font-size: 13.5px; }
  .table-wrap.is-wide th, .table-wrap.is-wide td { padding: 10px 10px; }
}
.table-wrap.is-wide thead th:first-child { position: sticky; left: 0; z-index: 2; }

/* よい点・気になる点の後の購入ボタン */
.cta { margin: 0 0 2em; padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.cta-label { margin: 0 !important; font-size: 14px; font-weight: 700; color: var(--ink-2); }
@media (max-width: 560px) { .cta { flex-direction: column; align-items: stretch; } .cta .pbtn { text-align: center; } }

/* 比較記事:1機種ぶんのまとまり */
.post-body .model { margin: 0 0 32px; padding: 4px 22px 2px; border: 1px solid var(--line); border-left: 5px solid var(--amber); border-radius: 12px; background: var(--paper); }
.post-body .model > h3 { margin-top: 18px; padding-bottom: 10px; font-size: 19px; border-bottom: 1px solid var(--line); }
.post-body .model .box { background-color: #fff; }
.post-body .model .box-merit { background: var(--green-soft); }
.post-body .model .box-demerit { background: var(--red-soft); }
.post-body .model .pbox { margin-bottom: 20px; }
@media (max-width: 560px) { .post-body .model { padding: 2px 14px 0; margin-left: -6px; margin-right: -6px; } }
/* 機種の枠は章の見出しより控えめに:白地に細い枠線だけ */
.post-body .model { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.post-body .model > h3 { font-size: 18px; border-bottom: 1px dashed var(--line); }
.post-body .model .box-note, .post-body .model .box:not(.box-merit):not(.box-demerit):not(.box-point):not(.box-warning) { background: var(--paper); }
