/* =====================================================================
   ゴリラ受験ブログ 共通スタイル  (style.css)
   ---------------------------------------------------------------------
   方針：無彩色ベース ＋ ネイビー1アクセント / 絵文字・多色づかいなし
   本文幅：720px / スマホ・PC両対応
   本番では public/style.css に置き、各記事から <link> で読み込む想定。
   （詳しい使い方は同フォルダの README.md を参照）
   ===================================================================== */

/* ---- カラー・基本変数 -------------------------------------------- */
:root {
  --accent:      #2c3e50;   /* ネイビー：本文側の主アクセント色 */
  --accent-dark: #1c2a36;   /* ボタンhoverなど */
  --accent-app:  #2f7d6b;   /* 関連アプリ枠だけに使う色違いアクセント（ティール） */

  /* オリジナル教材カードの配色（index.htmlの独自教材カードから移植） */
  --mat-red:       #c0392b;   /* 帯バー・ラベル・箇条書きマーカー */
  --mat-red-tint:  #fff0ee;   /* ヘッダー帯の薄い赤味背景 */
  --mat-red-line:  #f0c0b8;   /* 枠・帯下の罫線 */
  --mat-teal:      #2cb696;   /* CTAボタン */
  --mat-teal-dark: #27a488;   /* ボタンhover */

  /* アフィリエイト記事への誘導カードの配色（教材より控えめなアンバー1色） */
  --aff:       #b06f24;       /* バー・ラベル・ボタン */
  --aff-tint:  #fbf2e6;       /* ヘッダー帯の薄い色味 */
  --aff-line:  #ecd8b8;       /* 枠・罫線 */
  --aff-dark:  #946018;       /* ボタンhover */
  --ink:         #1a1a1a;   /* 本文の文字色 */
  --ink-sub:     #555;      /* 補足・キャプション */
  --line:        #e5e5e5;   /* 罫線・枠線 */
  --bg-soft:     #f7f7f7;   /* 薄いグレー背景 */
  --marker:      #fff3a0;   /* ハイライトの蛍光色（控えめな黄） */
  --warn:        #b5341f;   /* 注意ボックスの差し色（彩度低め） */
  --maxw:        720px;     /* 本文の最大幅 */
}

/* ---- リセットと土台 ---------------------------------------------- */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  /* 上下の固定バーに隠れないよう、本文に余白を確保 */
  padding-top: 50px;     /* 上部固定ヘッダーの高さ分 */
  padding-bottom: 62px;  /* 下部固定タブナビの高さ分 */
  background: #fff;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial,
               "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic",
               "Meiryo", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  word-wrap: break-word;
}

/* 本文コンテナ。720px・中央寄せ・左右の最低余白 */
article {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 0;
}

/* ---- 見出し ------------------------------------------------------ */
h1 {
  font-size: 1.6em;
  line-height: 1.45;
  margin: 0 0 0.8em;
  font-weight: 700;
}

h2 {
  font-size: 1.3em;
  line-height: 1.5;
  font-weight: 700;
  margin: 2.6em 0 1em;
  padding: 0.1em 0 0.1em 0.7em;
  border-left: 4px solid var(--accent);
  scroll-margin-top: 64px;          /* 目次から飛んだ時、固定ヘッダーに隠れない余白 */
}

h3 {
  font-size: 1.12em;
  font-weight: 700;
  margin: 1.8em 0 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
}

/* ---- 段落・テキスト装飾 ------------------------------------------ */
p { margin: 1em 0; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { opacity: 0.75; }

strong { font-weight: 700; }

/* 蛍光ペン風ハイライト。<span class="marker"> で使う */
.marker,
.highlight {
  font-weight: 700;
  background: linear-gradient(transparent 60%, var(--marker) 60%);
}

ul, ol { padding-left: 1.4em; }
li { margin: 0.4em 0; }

img { max-width: 100%; height: auto; }

/* =====================================================================
   共通パーツ
   ===================================================================== */

/* ---- ゴリラのひと言 ---------------------------------------------- */
.gorilla-voice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 30px 0;
  padding: 16px 18px;
  background: var(--bg-soft);
  border-radius: 8px;
}
.gorilla-voice img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.gorilla-voice .label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.78em;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-sub);
}
.gorilla-voice .body {
  font-size: 0.95em;
  line-height: 1.7;
}

/* ---- 目次 -------------------------------------------------------- */
.toc {
  margin: 28px 0;
  padding: 18px 20px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.toc .toc-title {
  margin: 0 0 10px;
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-sub);
}
.toc ol {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.92em;
  line-height: 1.9;
}
.toc li { margin: 0.2em 0; }
.toc a { text-decoration: none; color: var(--ink); }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* ---- 関連記事カード（クリック誘導つき） -------------------------- */
.related-card {
  position: relative;
  display: block;
  margin: 26px 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  /* 平常時から軽く浮かせて、灰色背景なしでも枠の境界を分かりやすく */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
              transform 0.15s ease;
}
.related-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  opacity: 1;
}
.related-card .tag {
  position: absolute;
  top: -10px;
  left: 14px;
  padding: 2px 9px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68em;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 3px;
}
.related-card .rc-title {
  font-size: 0.98em;
  font-weight: 700;
  line-height: 1.45;
  margin: 4px 0 8px;
}
.related-card .rc-desc {
  font-size: 0.82em;
  line-height: 1.6;
  color: var(--ink-sub);
  border-left: 2px solid var(--line);
  padding-left: 10px;
  margin-bottom: 12px;
}
.related-card .rc-action {
  font-size: 0.8em;
  font-weight: 700;
  text-align: right;
  color: var(--accent);
}
.related-card:hover .rc-action { text-decoration: underline; }

/* --- 関連アプリ枠：related-card の色違い版（class="related-card app"） --- */
.related-card.app:hover { border-color: var(--accent-app); }
.related-card.app .tag      { background: var(--accent-app); }
.related-card.app .rc-action { color: var(--accent-app); }

/* --- オリジナル教材カード・省略版（関連記事と同サイズ／class="related-card material"） ---
   大型の .material-card を、関連記事とまったく同じ枠サイズに圧縮した特別枠。
   赤タグ＋ティールの小さな実ボタンで“ちょっと特別”を出す。 */
.related-card.material:hover {
  border-color: var(--mat-red);
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.14);
}
.related-card.material .tag { background: var(--mat-red); }
.related-card.material .rc-action {
  margin-top: 12px;
  padding: 9px;
  background: var(--mat-teal);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.related-card.material:hover .rc-action {
  background: var(--mat-teal-dark);
  text-decoration: none;
}

/* --- アフィリエイト記事への誘導・省略版（class="related-card affiliate"） ---
   教材の省略版と同じ形のアンバー1色版。教材よりやや控えめ。 */
.related-card.affiliate:hover {
  border-color: var(--aff);
  box-shadow: 0 6px 18px rgba(176, 111, 36, 0.14);
}
.related-card.affiliate .tag { background: var(--aff); }
.related-card.affiliate .rc-action {
  margin-top: 12px;
  padding: 9px;
  background: var(--aff);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.related-card.affiliate:hover .rc-action {
  background: var(--aff-dark);
  text-decoration: none;
}

/* ---- オリジナル教材カード（収益用・特別枠／class="material-card"） ---
   index.html の「独自教材」カードに寄せた作り。
   白地＋薄い色味のヘッダー帯＋細い縦バー＋落ち着いたラベル＋大きな実ボタン。
   特別感は“色を盛る”のではなく枠・帯・ボタンの構造で出す。 */
.material-card {
  display: block;
  margin: 32px 0;
  background: #fff;
  border: 1.5px solid var(--mat-red-line);
  border-radius: 10px;
  overflow: hidden;                 /* ヘッダー帯の角を丸める */
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.material-card:hover {
  border-color: var(--mat-red);
  box-shadow: 0 10px 26px rgba(192, 57, 43, 0.16);
  transform: translateY(-2px);
  opacity: 1;
}
/* 上部の帯：薄い赤味＋細い赤の縦バー＋赤ラベル（index流） */
.material-card .mc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: var(--mat-red-tint);
  border-bottom: 1px solid var(--mat-red-line);
}
.material-card .mc-bar {
  flex-shrink: 0;
  width: 4px;
  height: 15px;
  background: var(--mat-red);
  border-radius: 2px;
}
.material-card .mc-kicker {
  color: var(--mat-red);
  font-size: 0.82em;
  font-weight: 900;          /* index の見出しに合わせて極太 */
  letter-spacing: 0.02em;
}
/* 本文側は白地＋黒文字で読みやすく */
.material-card .mc-inner { padding: 20px 20px 18px; }
.material-card .mc-title {
  margin-bottom: 8px;
  font-size: 1.16em;
  font-weight: 900;          /* index の教材タイトルに合わせて極太 */
  line-height: 1.38;
  color: #111;
}
.material-card .mc-meta {
  margin-bottom: 13px;
  font-size: 0.76em;
  line-height: 1.6;
  color: var(--ink-sub);
}
.material-card .mc-desc {
  margin-bottom: 15px;
  font-size: 0.88em;
  line-height: 1.75;
  color: #444;
}
.material-card .mc-points {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-size: 0.86em;
  line-height: 1.9;
  color: #444;
}
.material-card .mc-points li { position: relative; padding-left: 16px; }
.material-card .mc-points li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--mat-red);
  font-weight: 700;
}
.material-card .mc-btn {
  display: block;
  padding: 14px;
  text-align: center;
  background: var(--mat-teal);
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.material-card:hover .mc-btn { background: var(--mat-teal-dark); }
.material-card .mc-note {
  display: block;
  margin-top: 11px;
  text-align: center;
  font-size: 0.74em;
  color: var(--ink-sub);
}

/* --- アフィリエイト記事への誘導・大型（class="material-card affiliate"） ---
   教材カード（赤＋ティール）の色違い。アンバー1色でやや控えめに。 */
.material-card.affiliate { border-color: var(--aff-line); }
.material-card.affiliate:hover {
  border-color: var(--aff);
  box-shadow: 0 10px 26px rgba(176, 111, 36, 0.16);
}
.material-card.affiliate .mc-head {
  background: var(--aff-tint);
  border-bottom-color: var(--aff-line);
}
.material-card.affiliate .mc-bar { background: var(--aff); }
.material-card.affiliate .mc-kicker { color: var(--aff); }
.material-card.affiliate .mc-points li::before { color: var(--aff); }
.material-card.affiliate .mc-btn { background: var(--aff); }
.material-card.affiliate:hover .mc-btn { background: var(--aff-dark); }

/* ---- 強調ボックス各種（多色をやめ、差し色＋無彩色で統一） -------- */
.note,  .point-box {            /* ポイント・補足 */
  margin: 22px 0;
  padding: 16px 18px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.warn,  .danger-box {           /* 注意・警告 */
  margin: 22px 0;
  padding: 16px 18px;
  background: #fbf4f2;
  border-left: 4px solid var(--warn);
  border-radius: 0 6px 6px 0;
}
.summary,  .summary-box {       /* まとめ */
  margin: 28px 0;
  padding: 18px 20px;
  background: #f4f7fa;
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
}
.note > :first-child,
.warn > :first-child,
.summary > :first-child,
.point-box > :first-child,
.danger-box > :first-child,
.summary-box > :first-child { margin-top: 0; }
.note > :last-child,
.warn > :last-child,
.summary > :last-child,
.point-box > :last-child,
.danger-box > :last-child,
.summary-box > :last-child { margin-bottom: 0; }

/* ---- 2カラム比較（vs） ------------------------------------------- */
.vs-grid {
  display: flex;
  gap: 16px;
  margin: 22px 0;
  flex-wrap: wrap;
}
.vs-item {
  flex: 1;
  min-width: 240px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

/* ---- 表組み（記事内 table の共通様式） --------------------------- */
.table-wrap { overflow-x: auto; margin: 22px 0; }   /* スマホで横スクロール */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 0.92em;
}
.table-wrap table { margin: 0; }
article th,
article td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
article th { background: var(--bg-soft); font-weight: 700; }
article tbody tr:nth-child(even) td { background: #fafafa; }

/* ---- 商品・アフィリエイトボックス -------------------------------- */
.product-box {
  margin: 30px 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}
.product-box .pb-title {
  margin: 0 0 16px;
  font-weight: 700;
  font-size: 1.05em;
  text-align: center;
}
.product-box .pb-link { text-align: center; margin-bottom: 16px; }
.product-box ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.9em;
  line-height: 1.9;
}

/* =====================================================================
   フッター周り
   ===================================================================== */

/* ---- トップへ戻る（記事末のCTAボタン） --------------------------- */
.back-home {
  max-width: var(--maxw);
  margin: 44px auto 0;
  padding: 22px 20px;
  text-align: center;
  border-top: 1px solid var(--line);
}
.back-home .bh-lead {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--ink-sub);
  font-size: 0.95em;
}
.btn-home {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.btn-home:hover { background: var(--accent-dark); opacity: 1; }

/* ---- 上部固定ヘッダー（アイコン＋ブログ名） ---------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  /* 関連記事タグと同じダーク背景＋白文字。境界を分かりやすく */
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.site-header a {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff;
}
.site-header img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.site-header .site-name {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

/* ---- 下部固定タブナビ（ホーム / プロフィール / 独自教材） --------- */
.tab-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  /* 本文との境界を、灰色背景に頼らず上向きの影で出す */
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.09);
}
.tab-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  border-right: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink-sub);
  font-size: 0.74em;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab-nav a:last-child { border-right: none; }
.tab-nav a:hover,
.tab-nav a.active { color: var(--accent); background: var(--bg-soft); opacity: 1; }
.tab-nav .ico { width: 22px; height: 22px; }

/* ---- 特化型記事用：下部固定バー（class="cta-bar"） ----------------
   1商品・1教材だけを紹介する記事で、上の .tab-nav の“代わりに”使う固定バー。
   タブナビと同じ位置・同じ高さに固定し、中身は商品リンクのボタン1つだけ。
   （body の padding-bottom はタブナビと共用なので追加調整は不要） */
.cta-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 9px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.09);
}
.cta-bar a {
  display: block;
  width: 100%;
  max-width: 520px;
  padding: 13px;
  text-align: center;
  background: var(--mat-teal);          /* 既定は「購入・前進」のティール */
  color: #fff;
  font-size: 0.98em;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.cta-bar a:hover { background: var(--mat-teal-dark); opacity: 1; }
/* アフィリエイト商品の特化記事ではアンバーに（class="cta-bar affiliate"） */
.cta-bar.affiliate a { background: var(--aff); }
.cta-bar.affiliate a:hover { background: var(--aff-dark); }

/* ---- サイトフッター ---------------------------------------------- */
footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 32px;
  text-align: center;
  font-size: 0.85em;
}
footer a { color: var(--ink-sub); }

/* =====================================================================
   レスポンシブ調整（スマホ）
   ===================================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.8; }
  article { padding: 18px 16px 0; }
  h1 { font-size: 1.4em; }
  h2 { font-size: 1.2em; margin-top: 2.2em; }
  .vs-item { min-width: 100%; }   /* 1カラムで縦積みにして窮屈さを回避 */
  .back-home, footer { padding-left: 16px; padding-right: 16px; }
  .site-header .site-name { font-size: 1em; }
  .tab-nav a { font-size: 0.72em; }
}
