/* ============================================================
   書籍LP 共通スタイル（/books/ai-learning/ ・ /books/ai-output/）
   旧 tanren.jp（ferret One）の書籍LPを vibemaker.jp に移したもの。
   見た目は VIBE MAKER デザインガイド（2026-10-27 改訂：
   面を黒で塗らない・赤は #c5171e の1色だけ）に合わせる。
   色はすべてこの :root の変数ブロックだけで決める。
   暗色テーマは持たない。
   ============================================================ */
:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #ebeae6;
  --surface-3: #e2e0d9;
  --line: #d8d6d0;
  --line-strong: #8f8b83;
  --text: #090a0d;
  --text-2: #4f5057;
  --text-muted: #666870;
  --ink: #090a0d;
  --text-inv: #ffffff;
  --brand: #c5171e;
  --brand-weak: rgba(197, 23, 30, .10);
  --positive: #1d4ed8;
  --marker: #fde047;
  --grid-line: rgba(0, 0, 0, .045);
  --nav-bg: rgba(244, 243, 239, .92);
  --tag-bg: rgba(255, 255, 255, .94);
  --shadow-pop: 8px 8px 0 var(--ink);
  --shadow-sm: 4px 4px 0 var(--ink);
  --paper-shadow: 4px 4px 0 rgba(9, 10, 13, .08);
  --max: 1180px;
  --narrow: 860px;
  --font: Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.wrap { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.wrapNarrow { width: min(var(--narrow), calc(100% - 32px)); margin-inline: auto; }

/* ---------- ナビ ---------- */
.bkNav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-strong);
}
.bkNav .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.bkBrand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.bkBrand i {
  width: 40px; height: 18px; background: currentColor;
  -webkit-mask: url(/brand/vm-mark.png) center / contain no-repeat;
  mask: url(/brand/vm-mark.png) center / contain no-repeat;
}
.bkBrand span { color: var(--text-muted); font-weight: 700; }
.bkNav nav { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 700; }
.bkNav nav a { text-decoration: none; }
.bkNav nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bkNav .navBuy { background: var(--ink); color: var(--text-inv); padding: 8px 14px; font-size: 13px; font-weight: 800; }
.bkNav .navBuy:hover { text-decoration: none; }
.bkBrand, .bkNav nav a { white-space: nowrap; }
@media (max-width: 720px) { .bkNav .navHide { display: none; } }
@media (max-width: 420px) { .bkBrand span { display: none; } }

/* ---------- 共通部品 ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand);
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--brand); }
.em { color: var(--brand); }
.mark { background: linear-gradient(transparent 62%, var(--marker) 62%); font-weight: 700; }
.lede { border-left: 3px solid var(--brand); padding-left: 16px; font-size: 17px; font-weight: 700; line-height: 1.9; }
.muted { color: var(--text-muted); }
.small { font-size: 12.5px; line-height: 1.7; }

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-width: 240px; padding: 15px 20px;
  background: var(--brand); color: var(--text-inv);
  font-size: 14px; font-weight: 800; text-decoration: none;
  border: 2px solid var(--ink); box-shadow: var(--shadow-pop);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.btn.white { background: var(--surface); color: var(--brand); }
.btnNote { margin-top: 14px; font-size: 12.5px; color: var(--text-muted); }

.sec { padding: 96px 0; border-top: 1px solid var(--line-strong); }
.sec.sunk { background: var(--surface-2); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.secHead { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--text); margin-bottom: 36px; }
.secHead .no { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: var(--brand); }
.secHead h2 { font-size: clamp(24px, 2.7vw, 34px); font-weight: 800; letter-spacing: -.02em; line-height: 1.35; }
.secHead .label { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em; color: var(--text-muted); text-transform: uppercase; white-space: nowrap; }
.bigCopy { font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.05em; line-height: 1.3; margin-bottom: 20px; }
.secIntro { max-width: 760px; color: var(--text-2); }
@media (max-width: 720px) {
  .sec { padding: 72px 0; }
  .secHead { flex-wrap: wrap; }
  .secHead .label { margin-left: 0; width: 100%; }
}

/* 区画の格子：上と左に線、各セルの右と下に線 */
.grid { display: grid; border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); background: var(--surface); }
.grid > * { border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 26px 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.cellNo { font-family: var(--font-mono); font-size: 12px; font-weight: 800; color: var(--brand); letter-spacing: .1em; }
.grid h3 { font-size: 17px; font-weight: 800; line-height: 1.6; margin: 6px 0 8px; }
.grid p { font-size: 14px; color: var(--text-2); margin: 0; }

.figure { border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--paper-shadow); }
.figure img { width: 100%; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; overflow: hidden; padding: 72px 0 88px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: var(--brand);
  filter: blur(80px); opacity: .13; pointer-events: none;
}
.hero::before { width: 500px; height: 500px; right: -140px; top: -120px; }
.hero--coverBlue { --cover-blue: #6cb8e2; }
.hero--coverBlue::before { background: var(--cover-blue); opacity: .3; }
.hero::after { width: 300px; height: 300px; left: -80px; bottom: -120px; }
.heroGrid {
  position: relative; display: grid; grid-template-columns: 1.08fr .92fr; column-gap: 48px; row-gap: 0; align-items: center;
  grid-template-areas: "head cover" "body cover";
}
.heroHead { grid-area: head; align-self: end; min-width: 0; }
.heroBody { grid-area: body; align-self: start; min-width: 0; }
.heroPre { font-weight: 800; font-size: 16px; margin: 18px 0 8px; }
.hero h1 { font-size: clamp(40px, 5.4vw, 80px); font-weight: 900; letter-spacing: -.065em; line-height: 1.12; margin: 6px 0 24px; }
.heroBody > :first-child { margin-top: 0; }
.hero h1 small { display: block; font-size: .42em; letter-spacing: -.03em; line-height: 1.4; margin-bottom: 8px; }
.heroCover { grid-area: cover; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.heroCover img { max-height: 560px; width: auto; max-width: 100%; height: auto; border: 1px solid var(--line-strong); box-shadow: 8px 8px 0 var(--ink); }
.tagHud {
  position: static; margin: 22px 0 0; align-self: stretch;
  background: var(--tag-bg); border-left: 3px solid var(--brand);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; padding: 8px 12px; line-height: 1.6;
}
.tagHud b { display: block; color: var(--brand); }
.heroFacts { list-style: none; padding: 0; margin: 24px 0 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.heroFacts li { background: var(--surface); border: 1px solid var(--ink); padding: 4px 12px; font-size: 13px; font-weight: 800; }
.heroActions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
/* PC幅：ヒーローの要素がすべて1画面に収まるよう、高さに合わせて縮める */
@media (min-width: 861px) {
  .hero { padding: clamp(16px, 3.6vh, 64px) 0 clamp(20px, 4vh, 72px); }
  .heroGrid { column-gap: clamp(24px, 4vw, 48px); }
  .hero h1 { font-size: clamp(34px, min(5vw, 6.4vh), 80px); margin-bottom: clamp(10px, 2.2vh, 24px); }
  .heroPre { margin: clamp(8px, 1.8vh, 18px) 0 clamp(4px, .8vh, 8px); }
  .heroFacts { margin: clamp(10px, 2.2vh, 24px) 0 clamp(12px, 2.6vh, 30px); }
  .heroCover img { max-height: calc(100vh - 66px - clamp(16px, 3.6vh, 64px) - clamp(20px, 4vh, 72px) - 96px); min-height: 280px; }
  .tagHud { margin-top: clamp(10px, 2vh, 22px); }
}
@media (max-width: 860px) {
  /* 書影は常に見出しの右。本文は書影の下に回り込ませず、全幅で下に置く */
  .hero { padding: 48px 0 64px; }
  .heroGrid { grid-template-columns: minmax(0, 1fr) clamp(104px, 34vw, 260px); column-gap: 16px; grid-template-areas: "head cover" "body body"; }
  .heroHead { align-self: center; }
  .hero h1 { font-size: clamp(24px, 7.8vw, 60px); margin-bottom: 8px; }
  .heroPre { font-size: clamp(12px, 3.4vw, 16px); }
  .heroBody { margin-top: 24px; }
  .heroCover { align-self: center; gap: 10px; }
  .heroCover img { max-height: none; box-shadow: 5px 5px 0 var(--ink); }
  .tagHud { margin: 0; font-size: 10px; padding: 6px 8px; letter-spacing: .04em; }
}
@media (max-width: 480px) { .tagHud { display: none; } }
@media (max-width: 360px) { .hero h1 { font-size: 6.8vw; } }

/* ページ内目次 */
.toc { border-bottom: 1px solid var(--line-strong); background: var(--surface); }
.toc ol { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; }
.toc li { flex: 1 1 auto; border-right: 1px solid var(--line); }
.toc li:last-child { border-right: 0; }
.toc a { display: block; padding: 14px 12px; text-align: center; text-decoration: none; font-size: 13px; font-weight: 800; }
.toc a span { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--brand); letter-spacing: .12em; }
.toc a:hover { background: var(--surface-2); }
@media (max-width: 640px) { .toc li { flex: 1 1 33%; border-bottom: 1px solid var(--line); } }

/* ---------- 方法（番号つき） ---------- */
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 40px 0; border-bottom: 1px solid var(--line); }
.method:last-child { border-bottom: 0; }
.method .num { font-family: var(--font-mono); font-size: 44px; font-weight: 800; color: var(--brand); line-height: 1; }
.method h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 14px; line-height: 1.5; }
.method p { color: var(--text-2); }
@media (max-width: 760px) { .method { grid-template-columns: 1fr; gap: 20px; } }

/* 3つの効果・カード */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line-strong); }
.card img { width: 100%; border-bottom: 1px solid var(--line-strong); }
.card .cardBody { padding: 20px 22px 24px; }
.card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; line-height: 1.5; }
.card p { font-size: 14px; color: var(--text-2); margin: 0; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* 書籍の構成（部） */
.parts { display: grid; gap: 24px; }
.part { display: grid; grid-template-columns: 200px 1fr; background: var(--surface); border: 1px solid var(--ink); }
.part.featured { box-shadow: var(--shadow-sm); }
.partHead { padding: 24px; border-right: 1px solid var(--line-strong); }
.partHead .cellNo { display: block; margin-bottom: 6px; }
.partHead h3 { font-size: 20px; font-weight: 800; line-height: 1.45; }
.partHead .chip { display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line-strong); padding: 2px 8px; color: var(--text-2); }
.partBody { padding: 24px 28px; }
.partBody h4 { font-size: 17px; font-weight: 800; margin-bottom: 8px; line-height: 1.6; }
.partBody p { color: var(--text-2); font-size: 14.5px; }
.partBody ul { margin: 10px 0 14px; padding-left: 1.2em; font-size: 14px; }
.partBody .for { font-size: 13px; border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }
.partBody .then { font-weight: 800; margin: 0; }
@media (max-width: 720px) {
  .part { grid-template-columns: 1fr; }
  .partHead { border-right: 0; border-bottom: 1px solid var(--line-strong); }
}

/* 推薦者 */
.voices { display: grid; gap: 28px; }
.voice { display: grid; grid-template-columns: 260px 1fr; align-items: start; background: var(--surface); border: 1px solid var(--line-strong); }
/* 推薦文を開いて右の列が伸びても、写真は 16:9 のまま上に留める */
.voice > img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); filter: saturate(.92); }
.voiceBody { min-width: 0; }
.voiceBody { padding: 24px 28px; }
.voiceBody .who { font-size: 18px; font-weight: 800; }
.voiceBody .role { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; margin: 4px 0 12px; }
.voiceBody blockquote { margin: 0 0 12px; font-size: 17px; font-weight: 800; line-height: 1.6; border-left: 3px solid var(--brand); padding-left: 14px; }
.voiceGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.voiceGrid .voice { grid-template-columns: 1fr; }
.voiceGrid .voice > img { aspect-ratio: 4 / 5; height: auto; border-right: 0; border-bottom: 1px solid var(--line-strong); object-position: top; }
/* 縦並びのときは写真を小さく（正方形・左寄せ）して、文章を主役にする */
@media (max-width: 900px) {
  .voiceGrid { grid-template-columns: 1fr 1fr; }
  .voiceGrid .voice > img { width: 128px; height: 128px; aspect-ratio: 1 / 1; margin: 20px 0 0 28px; border: 1px solid var(--line-strong); object-position: top; }
}
@media (max-width: 720px) {
  .voice { grid-template-columns: 1fr; }
  .voice > img { width: 128px; height: 128px; aspect-ratio: 1 / 1; margin: 20px 0 0 28px; border: 1px solid var(--line-strong); object-position: top; }
  .voiceGrid { grid-template-columns: 1fr; }
}

details.more { border-top: 1px solid var(--line); margin-top: 8px; }
details.more summary { cursor: pointer; list-style: none; padding: 10px 0; font-size: 13px; font-weight: 800; display: flex; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; color: var(--brand); font-family: var(--font-mono); font-size: 16px; }
details.more[open] summary::after { content: "−"; }
details.more .full { font-size: 14px; color: var(--text-2); line-height: 1.95; }

/* 推薦（大）：伊藤羊一氏 */
.feature { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.feature > img { border: 1px solid var(--line-strong); box-shadow: var(--paper-shadow); }
.feature h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.feature .role { font-size: 13px; color: var(--text-2); }
.feature .msgTitle { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; line-height: 1.5; margin: 22px 0 12px; }
@media (max-width: 760px) { .feature { grid-template-columns: 1fr; } .feature > img { max-width: 280px; } }

/* 著者 */
.author { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.author > img { border: 1px solid var(--line-strong); box-shadow: var(--paper-shadow); }
.author h3 { font-size: 28px; font-weight: 900; letter-spacing: -.04em; }
.author .en { font-family: var(--font-mono); font-size: 12px; letter-spacing: .15em; color: var(--text-muted); text-transform: uppercase; }
.author .role { font-size: 13px; color: var(--text-2); margin: 8px 0 20px; }
.author h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--brand); margin: 26px 0 8px; }
.author ul { margin: 0; padding-left: 1.2em; }
.quote { background: var(--surface); border: 1px solid var(--line-strong); border-left: 3px solid var(--brand); padding: 16px 20px; font-weight: 700; margin-top: 12px; }
@media (max-width: 760px) { .author { grid-template-columns: 1fr; } .author > img { max-width: 280px; } }

/* 数字の帯 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); border-left: 1px solid var(--line-strong); background: var(--surface); margin: 28px 0 40px; }
.stats div { border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 20px 22px; }
.stats b { display: block; font-family: var(--font-mono); font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stats b small { font-size: 14px; margin-left: 4px; font-family: var(--font); }
.stats span { font-size: 12.5px; color: var(--text-2); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } }

/* FAQ */
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { cursor: pointer; list-style: none; display: flex; gap: 14px; padding: 20px 4px; font-size: 16px; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; font-family: var(--font-mono); color: var(--brand); }
.faq summary::after { content: "+"; margin-left: auto; color: var(--brand); font-family: var(--font-mono); font-size: 20px; line-height: 1.2; }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 4px 22px 30px; color: var(--text-2); }

/* 表（講座のカリキュラム） */
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table thead th { font-family: var(--font-mono); font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--text-muted); border-bottom: 2px solid var(--text); }
.table td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.top td { font-weight: 800; background: var(--surface-2); }
.table tr.sub td:first-child { padding-left: 32px; }

.box { background: var(--surface); border: 2px solid var(--ink); box-shadow: var(--shadow-pop); padding: 28px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- 赤い帯（最終CTA） ---------- */
.redBand { background: var(--brand); color: var(--text-inv); padding: 96px 0; text-align: center; }
.redBand .kicker { color: var(--text-inv); }
.redBand .kicker::before { background: var(--text-inv); }
.redBand h2 { font-size: clamp(28px, 4vw, 54px); font-weight: 900; letter-spacing: -.05em; line-height: 1.25; margin: 18px 0 16px; }
.redBand p { font-size: 16px; }
.redBand .btn { margin-top: 18px; }
.redBand .btnNote { color: var(--text-inv); }

/* ---------- フッター ---------- */
.bkFoot { border-top: 2px solid var(--ink); padding: 40px 0 56px; font-size: 13px; color: var(--text-2); }
.bkFoot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; }
.bkFoot a { font-weight: 800; color: var(--text); }
.bkFoot .copy { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
