/* ラクするAI手帖 — 2026-11-11 デザイン刷新（モバイル優先・システムフォントで軽く） */
:root {
  --ink: #132a32;
  --text: #24343a;
  --muted: #5f6f74;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --line: #e4e1d8;
  --accent: #0c7668;
  --accent-2: #2bb3a0;
  --accent-soft: #e3f2ef;
  --gold: #f0c46c;
  --gold-soft: #fff4dc;
  --pr: #8a5a00;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(19, 42, 50, .06), 0 8px 24px rgba(19, 42, 50, .07);
  --max: 1120px;
  --narrow: 760px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef4f3; --text: #d9e2e1; --muted: #9aaaa9; --bg: #0f1719; --surface: #172225; --line: #26353a;
    --accent: #3cc2ad; --accent-soft: #163a36; --gold-soft: #3a2f17; --pr: #f0c46c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
*, *::before, *::after { 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(--font); line-height: 1.85; font-size: 16px; }
img, svg { max-width: 100%; height: auto; display: block; }
.post img[width="1"][height="1"] { display: inline; }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: var(--narrow); }
.section { margin-top: 48px; }
.sec-title { font-size: 1.3rem; color: var(--ink); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.sec-title::before { content: ""; width: 6px; height: 1.2em; border-radius: 3px; background: linear-gradient(var(--accent), var(--gold)); }

/* ヘッダー */
header.site { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; min-height: 44px; font-size: 1.05rem; letter-spacing: .02em; }
.gnav { display: flex; gap: 4px; overflow-x: auto; margin-left: auto; scrollbar-width: none; }
.gnav::-webkit-scrollbar { display: none; }
.gnav a { white-space: nowrap; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; }
.gnav a:hover, .gnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 720px) {
  .head-row { padding-top: 8px; gap: 4px; }
  .gnav { margin: 0 -16px; padding: 0 12px 4px; width: calc(100% + 32px); }
}

/* ヒーロー */
.hero { background: radial-gradient(1200px 400px at 80% 0%, var(--accent-soft), transparent 70%), var(--surface); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.eyebrow { display: inline-block; margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(1.9rem, 6.4vw, 3rem); line-height: 1.35; color: var(--ink); margin: 0 0 16px; letter-spacing: .01em; }
.hl { background: linear-gradient(transparent 62%, var(--gold) 62%); padding: 0 .1em; }
.hero-lead { color: var(--muted); margin: 0 0 24px; max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; padding: 10px 20px; }
.hero-art { width: 100%; max-width: 440px; margin: 0 auto; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.1fr .9fr; padding-top: 64px; padding-bottom: 64px; } }

/* カテゴリ */
.cats { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.cat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 16px 16px; border-radius: var(--radius); color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: var(--shadow); overflow: hidden; min-height: 168px; transition: transform .15s; }
.cat:hover { transform: translateY(-2px); }
.cat-icon { opacity: .95; margin-bottom: 6px; }
.cat-name { font-weight: 800; font-size: 1.08rem; }
.cat-lead { font-size: .8rem; line-height: 1.55; }
.cat-count { margin-top: auto; padding-top: 8px; font-size: .75rem; font-weight: 700; }

/* カード */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 860px) { .grid.feature { grid-template-columns: 1.4fr 1fr; } .grid.feature .large { grid-row: span 2; } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); }
.card > a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.thumb { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--accent-soft); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.02rem; line-height: 1.55; color: var(--ink); margin: 8px 0 6px; }
.card.large h3 { font-size: 1.25rem; }
.excerpt { font-size: .86rem; color: var(--muted); margin: 0 0 10px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin: auto 0 0; font-size: .76rem; color: var(--muted); }
.chip { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, transparent); padding: 2px 10px; border-radius: 999px; margin-right: 6px; }
.chip:not(.pr) { color: var(--ink); }
.chip.pr { --c: var(--pr); }
.empty { color: var(--muted); background: var(--surface); padding: 24px; border-radius: var(--radius); }

/* 約束 */
.promise { background: var(--surface); border-radius: var(--radius); padding: 24px 20px; border: 1px solid var(--line); }
.promise h2 { margin: 0 0 12px; font-size: 1.15rem; color: var(--ink); }
.promise ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 860px) { .promise ul { grid-template-columns: repeat(3, 1fr); } }
.promise li { font-size: .88rem; color: var(--muted); padding-left: 30px; position: relative; }
.promise li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; display: grid; place-items: center; font-weight: 800; }
.promise b { display: block; color: var(--ink); font-size: .95rem; }

/* 記事ヘッダー */
.post-hero, .page-head { background: linear-gradient(135deg, var(--c1, #0b5e53), var(--c2, #1e7d70)); color: #fff; padding: 28px 0 88px; }
.page-head { padding-bottom: 28px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.crumbs { margin: 0 0 10px; font-size: .8rem; }
.crumbs a { color: #fff; }
.post-hero h1 { font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.45; margin: 0 0 12px; }
.post-hero .cat-lead { margin: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: .82rem; }
.post-meta span::before { content: "● "; font-size: .6em; vertical-align: middle; opacity: .7; }
.post { margin-top: -64px; }
.post-eyecatch { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1200 / 630; }

/* PR 表記（見えるが邪魔しない） */
.pr-notice { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; padding: 10px 14px; background: var(--gold-soft); color: var(--pr); border-radius: 10px; font-size: .8rem; line-height: 1.6; }
.pr-label { flex: none; font-weight: 800; font-size: .72rem; border: 1.5px solid currentColor; border-radius: 6px; padding: 0 6px; margin-top: 2px; }

/* 目次 */
.toc { margin: 24px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.toc-title { margin: 0 0 6px; font-weight: 800; color: var(--ink); font-size: .92rem; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: .9rem; line-height: 1.9; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* 本文 */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.32rem; line-height: 1.5; color: var(--ink); margin: 2.4em 0 .8em; padding: 12px 16px; background: var(--accent-soft); border-left: 6px solid var(--accent); border-radius: 0 10px 10px 0; scroll-margin-top: 120px; }
.prose h3 { font-size: 1.1rem; color: var(--ink); margin: 1.8em 0 .6em; padding-bottom: 6px; border-bottom: 2px solid var(--line); scroll-margin-top: 120px; }
.prose h3::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.prose p { margin: 1em 0; }
.prose li { margin: .3em 0; }
.prose strong { background: linear-gradient(transparent 65%, color-mix(in srgb, var(--gold) 55%, transparent) 65%); }
.prose blockquote { margin: 1.6em 0; padding: 14px 18px 14px 50px; background: var(--gold-soft); border-radius: 12px; position: relative; color: var(--text); }
.prose blockquote::before { content: "!"; position: absolute; left: 16px; top: 16px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #132a32; font-weight: 900; font-size: .85rem; display: grid; place-items: center; }
.prose blockquote p { margin: .3em 0; }
.prose code { background: var(--accent-soft); padding: .1em .4em; border-radius: 4px; font-size: .9em; }
.prose pre { background: #132a32; color: #e8f1ef; padding: 16px; border-radius: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-size: .86rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .88rem; line-height: 1.6; }
.table-wrap th { background: #132a32; color: #fff; text-align: left; padding: 10px 12px; min-width: 10em; }
.table-wrap td { min-width: 10em; padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table-wrap tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.table-wrap td:first-child, .table-wrap th:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; min-width: 0; }
.table-wrap th:first-child { color: #fff; }

/* 出典・運営者・関連 */
.sources { margin-top: 40px; font-size: .84rem; color: var(--muted); }
.sources h2 { font-size: 1rem; color: var(--ink); margin: 0 0 6px; }
.sources ul { padding-left: 1.2em; margin: 0; }
.author { display: flex; gap: 16px; align-items: flex-start; margin: 40px 0 0; padding: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .88rem; }
.author svg { flex: none; }
.author p { margin: 0 0 6px; }
.author-name { font-weight: 800; color: var(--ink); font-size: 1.05rem; }
.author-name span { font-weight: 600; font-size: .75rem; color: var(--muted); margin-left: 8px; }
.author a { font-weight: 700; text-decoration: none; font-size: .85rem; }
.related { margin: 56px 0 0; }
.card.small h3 { font-size: .95rem; }
.card.small .excerpt { display: none; }

.contact-button a { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }

/* フッター */
footer.site { margin-top: 72px; background: #132a32; color: #c9d6d4; padding: 40px 0 24px; font-size: .85rem; }
footer.site .logo { color: #fff; }
.foot-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.5fr 1fr; } .foot-note { grid-column: 1 / -1; } }
.foot-lead { margin: 10px 0 0; line-height: 1.7; }
.foot-nav { display: flex; flex-direction: column; gap: 0; }
.foot-nav a { color: #fff; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-note { margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .75rem; color: #9fb1ae; line-height: 1.7; }
.chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; } .chips .chip { margin: 0; }

/* 2026-11-11 Codex デザインレビューの反映 */
@media (prefers-color-scheme: dark) {
  .btn:not(.ghost), .contact-button a { color: #132a32; }
  .hl { background: linear-gradient(transparent 62%, var(--gold-soft) 62%); }
  .prose strong { background: linear-gradient(transparent 65%, var(--gold-soft) 65%); }
}
.toc a, .sources a, .author a, .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.toc a, .sources a { display: flex; }
.toc ol, .sources ul { line-height: 1.5; }
.gnav a { min-width: 44px; flex-shrink: 0; justify-content: center; }
.gnav a[aria-current="location"] { background: var(--accent-soft); color: var(--accent); }
.table-wrap tbody th[scope="row"] { text-align: left; padding: 10px 12px; font-weight: 700; color: var(--ink); white-space: nowrap; border-top: 1px solid var(--line); vertical-align: top; }
.table-wrap tbody tr:nth-child(even) th[scope="row"] { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#latest { scroll-margin-top: 120px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-200%); padding: 10px 16px; background: var(--surface); color: var(--text); border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { transform: none; }
#main { scroll-margin-top: 120px; }
#main:focus { outline: none; }
.crumbs a { min-width: 44px; justify-content: center; }

/* 見出しの語のかたまりを途中で折り返さない（中間幅で「る。」が孤立しないように） */
.nb { display: inline-block; white-space: nowrap; }
.hero h1 { word-break: keep-all; overflow-wrap: anywhere; }
