:root {
  --paper: #faf7f0;
  --grid: #ece6d8;
  --ink: #212730;
  --sub: #5c6470;
  --accent: #1f6f5c;
  --accent-soft: #e3efe9;
  --mark: #ffe26e;
  --line: #ded6c4;
  --card: #ffffff;
  --warn: #b5562b;
  --warn-soft: #fbeee6;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 6px 12px; z-index: 10; }

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

/* ---------- header ---------- */
header.site { padding: 18px 0 6px; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); font-weight: 700; font-size: 18px; }
.mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 18px; flex: none; }
nav.site { display: flex; gap: 6px 14px; font-size: 14px; flex-wrap: wrap; }
nav.site a { color: var(--sub); text-decoration: none; white-space: nowrap; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--accent); font-weight: 700; }

main { padding: 16px 0 56px; }

/* ---------- home ---------- */
.hero { padding: 28px 0 8px; }
.kicker { display: inline-block; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 14px; border-radius: 999px; text-decoration: none; }
a.kicker:hover { color: #fff; opacity: .9; }
h1 { font-size: clamp(26px, 5.6vw, 38px); line-height: 1.4; margin: 14px 0 12px; font-weight: 900; letter-spacing: 0.01em; }
.hl { background: linear-gradient(transparent 62%, var(--mark) 62%); color: var(--accent); }
.lead { font-size: 17px; color: var(--sub); margin: 0; }
h2.sec { font-size: 21px; margin: 44px 0 14px; padding-left: 12px; border-left: 6px solid var(--accent); line-height: 1.4; }
.list-h { margin-top: 8px; }
.empty { color: var(--sub); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card-post { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: 3px 4px 0 #e8e1d2; transition: transform .15s; }
.card-post:hover { transform: translateY(-2px); }
.card-post img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 2px solid var(--line); }
.card-post .cat { margin: 12px 14px 0; font-size: 12px; font-weight: 700; color: var(--accent); }
.card-post strong { margin: 2px 14px 6px; font-size: 16px; line-height: 1.55; }
.card-post time { margin: auto 14px 12px; font-size: 13px; color: var(--sub); }

.links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.links a { display: block; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 12px 16px; text-decoration: none; color: var(--ink); box-shadow: 3px 4px 0 #e8e1d2; }
.links a strong { display: block; color: var(--accent); }
.links a span { font-size: 13px; color: var(--sub); }

.note-card { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 16px 20px; box-shadow: 4px 5px 0 #e8e1d2; }
ul.check { padding-left: 0; list-style: none; margin: 0; }
ul.check li { padding-left: 26px; position: relative; margin: 6px 0; }
ul.check li::before { content: ""; position: absolute; left: 4px; top: 0.7em; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }

/* ---------- article ---------- */
.crumbs { font-size: 13px; color: var(--sub); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--sub); }
.post { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 24px clamp(16px, 4vw, 40px) 32px; margin-top: 12px; box-shadow: 4px 5px 0 #e8e1d2; }
.post-head h1 { margin-top: 12px; }
.pr-note { margin: 0 0 10px; font-size: 13px; color: var(--sub); border: 1px solid var(--line); border-radius: 6px; display: inline-block; padding: 1px 10px; }
.meta { color: var(--sub); font-size: 13px; display: flex; gap: 4px 14px; flex-wrap: wrap; margin: 0 0 16px; }
.eyecatch { display: block; width: 100%; border-radius: 12px; border: 2px solid var(--line); }

.points { background: var(--accent-soft); border-radius: 14px; padding: 14px 20px 10px; margin: 24px 0; }
.points h2 { font-size: 16px; margin: 0 0 4px; color: var(--accent); border: 0; padding: 0; }
.points ul { margin: 0; padding-left: 1.3em; }
.points li { margin: 4px 0; font-weight: 700; }

.short-box { display: flex; gap: 18px; align-items: center; border: 2px dashed var(--line); border-radius: 14px; padding: 14px; margin: 24px 0; }
.short-box p { margin: 0; font-size: 14px; color: var(--sub); }
.short-box p strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }
.short { flex: none; width: 150px; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #222; position: relative; }
.short button { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.short button:focus-visible { outline: 3px solid var(--mark); }
.short img { width: 100%; height: 100%; object-fit: cover; display: block; }
.short .play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(0,0,0,.62); }
.short .play::after { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.short iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 480px) {
  .short-box { flex-direction: column; text-align: left; align-items: stretch; }
  .short { width: min(260px, 100%); margin: 0 auto; }
}

.toc { border: 2px solid var(--line); border-radius: 14px; padding: 12px 20px; margin: 24px 0; }
.toc p { margin: 0 0 4px; font-weight: 700; }
.toc ul { margin: 0; padding-left: 1.2em; }
.toc li { margin: 2px 0; }

.body h2 { font-size: 21px; margin: 44px 0 14px; padding: 8px 14px; background: var(--accent-soft); border-left: 6px solid var(--accent); border-radius: 4px; line-height: 1.5; }
.body h3 { font-size: 17px; margin: 28px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.body p { margin: 14px 0; }
.body ul, .body ol { padding-left: 1.4em; }
.body li { margin: 5px 0; }
.body strong { background: linear-gradient(transparent 62%, var(--mark) 62%); }
.table-wrap { overflow-x: auto; margin: 18px 0; }
.body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.body td:first-child { min-width: 5.5em; font-weight: 700; }
.body th, .body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.body th { background: var(--accent-soft); }
@media (max-width: 480px) {
  .body table { font-size: 14px; line-height: 1.7; }
  .body th, .body td { padding: 6px 7px; }
}

.admonition { border-radius: 12px; padding: 12px 18px; margin: 20px 0; border: 2px solid var(--line); background: #fffdf6; }
.admonition-title { margin: 0 0 4px !important; font-weight: 900; }
.admonition p:last-child { margin-bottom: 0; }
.admonition.point { border-color: var(--accent); background: var(--accent-soft); }
.admonition.point .admonition-title { color: var(--accent); }
.admonition.caution { border-color: var(--warn); background: var(--warn-soft); }
.admonition.caution .admonition-title { color: var(--warn); }
.admonition.summary { border-color: var(--accent); background: #fff; }

.sources { margin-top: 36px; font-size: 14px; }
.sources h2 { font-size: 16px; margin: 0 0 6px; }
.sources ul { margin: 0; padding-left: 1.3em; }
.sources span { color: var(--sub); }
.disclaimer { margin-top: 20px; font-size: 13px; color: var(--sub); border-top: 1px dashed var(--line); padding-top: 12px; }
.author { display: flex; gap: 14px; margin-top: 20px; padding: 14px 16px; background: var(--paper); border-radius: 12px; font-size: 14px; }
.author p { margin: 0; }
.author .name { font-weight: 700; color: var(--accent); }

.related h2 { font-size: 19px; margin: 40px 0 14px; padding-left: 12px; border-left: 6px solid var(--accent); }

.page .body h2 { font-size: 18px; }

/* ---------- footer ---------- */
footer.site { border-top: 2px solid var(--line); padding: 24px 0 32px; font-size: 14px; color: var(--sub); background: var(--paper); }
footer.site .wrap { display: grid; gap: 12px; }
footer.site p { margin: 4px 0; }
footer.site .sns, footer.site nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
footer.site a { color: var(--sub); }
footer.site .brand { color: var(--accent); }
.copy { font-size: 12px; }

/* ---------- 2026/11 追加:時点・広告・自作の商品・道具 ---------- */
.asof { margin: -6px 0 14px; font-size: 13px; font-weight: 700; color: var(--warn); }
.cat-desc { color: var(--sub); margin: 4px 0 8px; }
ul.pick { margin: 0; padding-left: 1.3em; }
ul.pick li { margin: 6px 0; font-weight: 700; }

.offer { margin: 28px 0; padding: 16px 18px 18px; border: 2px solid var(--accent); border-radius: 16px; background: #fff; box-shadow: 4px 5px 0 #e8e1d2; }
.offer p { margin: 6px 0; }
.offer-label { font-size: 13px; color: var(--sub); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.offer-label span { font-size: 11px; border: 1px solid var(--sub); border-radius: 4px; padding: 0 6px; color: var(--sub); }
.offer-name { font-size: 18px; font-weight: 900; color: var(--ink); }
.offer-why { font-size: 15px; }
.offer-points { margin: 6px 0; padding-left: 1.3em; font-size: 15px; }
.offer-who, .offer-caution, .offer-note { font-size: 13px; color: var(--sub); }
.offer-btn { display: block; text-align: center; margin: 12px 0 4px; padding: 13px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 900; text-decoration: none; box-shadow: 0 3px 0 #164e41; }
.offer-btn:hover { filter: brightness(1.08); }

.product { margin: 24px 0; padding: 14px 18px; border: 2px dashed var(--accent); border-radius: 14px; background: var(--accent-soft); font-size: 15px; }
.product p { margin: 4px 0; }
.product-label { font-size: 12px; font-weight: 700; color: var(--accent); }
.product-name { font-weight: 900; }
.product-name span { margin-left: 8px; font-weight: 700; color: var(--sub); }

.history { margin-top: 20px; font-size: 13px; color: var(--sub); }
.history h2 { font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.history ul { margin: 0; padding-left: 1.3em; }
.author-links { display: flex; gap: 12px; margin-top: 4px !important; }

.next-read { display: block; margin: 24px 0 0; padding: 16px 20px; border-radius: 16px; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 4px 5px 0 #c9d9d2; }
.next-read span { display: block; font-size: 13px; opacity: .85; }
.next-read strong { font-size: 17px; line-height: 1.5; }

/* 計算・チェックリストなどの道具 */
.tool { margin: 24px 0; padding: 16px 18px; border: 2px solid var(--line); border-radius: 16px; background: #fffdf6; }
.tool-title { margin: 0 0 8px !important; font-weight: 900; font-size: 17px; color: var(--accent); }
.tool label { display: block; margin: 10px 0 4px; font-weight: 700; font-size: 15px; }
.tool select, .tool input[type=number] { font: inherit; font-size: 16px; padding: 8px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; width: 100%; max-width: 320px; }
.tool .result { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); }
.tool .result strong { font-size: 24px; color: var(--accent); background: none; }
.tool .small { font-size: 13px; color: var(--sub); margin: 6px 0 0; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { margin: 8px 0; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--accent); }
.checklist input:checked + span { color: var(--sub); text-decoration: line-through; }
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.status > div { border-radius: 14px; padding: 12px 16px; border: 2px solid var(--line); background: #fff; }
.status h3 { margin: 0 0 6px !important; padding: 0 !important; border: 0 !important; font-size: 16px !important; }
.status .done h3 { color: var(--accent); }
.status .yet h3 { color: var(--warn); }
.status ul { margin: 0; padding-left: 1.2em; font-size: 15px; }
@media (max-width: 560px) { .status { grid-template-columns: 1fr; } }
.jump { margin: 18px 0; }
.jump a { display: block; text-align: center; padding: 12px 16px; border-radius: 999px; border: 2px solid var(--accent); color: var(--accent); font-weight: 900; text-decoration: none; background: #fff; }
.jump a:hover { background: var(--accent-soft); }
