@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
/* ========== 共通トークン ========== */
:root {
  --fcl-radius: 12px;
  --fcl-gap: 10px;
  --fcl-border: #e6e8ec;
  --fcl-bg: #ffffff;
  --fcl-shadow: 0 6px 20px rgba(16, 24, 40, 0.08);
  --fcl-text: #111827;
  --fcl-sub: #6b7280;
  --fcl-amazon: #ff9900;
  --fcl-rakuten: #bf0000;
  --fcl-yahoo: #6001d2;
  --fcl-accent: #1d4ed8;
}

/* ========= テキストリンク ========= */
.afflink {
  color: var(--fcl-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.afflink:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ========= 注意書き ========= */
.affnotice {
  background: #fff7e6;
  border-left: 4px solid #ff9900;
  padding: 10px 12px;
  color: #7c5a00;
  border-radius: 6px;
  font-size: 0.95rem;
  margin: 1em 0;
}

/* ========= 汎用3ボタン（affbox内） ========= */
.affbox {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fcl-gap);
  background: var(--fcl-bg);
  border: 1px solid var(--fcl-border);
  border-radius: var(--fcl-radius);
  padding: 12px;
  box-shadow: var(--fcl-shadow);
}
.affbtn {
  flex: 1 1 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.06s ease, opacity 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.affbtn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
.affbtn.amazon {
  background: var(--fcl-amazon);
}
.affbtn.rakuten {
  background: var(--fcl-rakuten);
}
.affbtn.yahoo {
  background: var(--fcl-yahoo);
}

/* ========= affcard（商品名＋価格） ========= */
.affcard {
  background: var(--fcl-bg);
  border: 1px solid var(--fcl-border);
  border-radius: var(--fcl-radius);
  padding: 16px;
  box-shadow: var(--fcl-shadow);
  margin: 1.2em 0;
}
.affcard-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--fcl-text);
  margin-bottom: 0.25rem;
}
.affcard-price {
  color: var(--fcl-sub);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

/* ========= productbox（画像/説明付き） ========= */
.productbox {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  background: var(--fcl-bg);
  border: 1px solid var(--fcl-border);
  border-radius: var(--fcl-radius);
  padding: 14px;
  box-shadow: var(--fcl-shadow);
  margin: 1.2em 0;
}
.productbox .pb-img img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--fcl-border);
}
.productbox .pb-title {
  font-weight: 800;
  color: var(--fcl-text);
  margin-bottom: 4px;
}
.productbox .pb-price {
  color: var(--fcl-sub);
  font-size: 0.92rem;
  margin: 2px 0 10px;
}
.productbox .pb-desc {
  color: #374151;
  font-size: 0.95rem;
  margin-top: 6px;
}
.productbox .affbox {
  border: none;
  box-shadow: none;
  padding: 0;
}
.productbox:not(:has(.pb-img img)) {
  grid-template-columns: 1fr;
} /* 画像なし→1カラム */

/* ========= afflinkpair（縦並びテキスト） ========= */
.afflink-pair {
  margin: 8px 0 14px;
}
.afflink-pair a {
  display: block;
  padding: 6px 0;
  line-height: 1.5;
  font-weight: 700;
  color: var(--fcl-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}
.afflink-pair a + a {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #e5e7eb;
}
.afflink-pair a:hover {
  opacity: 0.85;
}
.afflink-pair a:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 4px;
}
.afflink-pair a::after {
  content: "↗";
  margin-left: 0.25em;
  font-size: 0.9em;
  color: #6b7280;
}

/* ========= productcompare / compareitem ========= */
.product-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.compare-item {
  background: #fff;
  border: 1px solid var(--fcl-border);
  border-radius: var(--fcl-radius);
  padding: 14px;
  box-shadow: var(--fcl-shadow);
}
.compare-name {
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--fcl-text);
}
.compare-links {
  display: flex;
  gap: var(--fcl-gap);
  flex-wrap: wrap;
}

/* ========= CTA付きボックス ========= */
.cta-affbox {
  background: #eaf6ff;
  border: 2px solid #b3e0ff;
  border-radius: 10px;
  padding: 1.5em;
  margin: 2em 0;
  text-align: center;
}
.cta-title {
  color: #0094cc;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.5em;
}
.cta-text {
  font-size: 1rem;
  margin-bottom: 1em;
  color: #0f172a;
}
.cta-affbox .affbox {
  border: none;
  box-shadow: none;
  padding: 0;
  justify-content: center;
}
.cta-affbox .affnote {
  font-size: 0.8rem;
  color: #555;
  margin-top: 10px;
}

/* ===== CTAブロック（煽り文 + ボタン群 + 補足 + 背景） ===== */
.fcl-cta-block {
  margin: 18px 0;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  margin: 1.5em auto;
  max-width: 600px;
}
.fcl-cta-block .fcl-aff-lead {
  /* 前置き：煽り/背中押し */
  font-weight: 700;
  margin: 0 0 8px;
}
.fcl-cta-block .fcl-aff-note {
  /* 後置き：補足/注意 */
  font-size: 0.9rem;
  color: var(--fcl-muted, #6b7280);
  margin: 10px 0 0;
}

/* テーマ */
.fcl-cta-subtle {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.fcl-cta-emphasized {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.25);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.fcl-cta-plain {
  background: transparent;
  border: none;
  padding-left: 0;
  padding-right: 0;
}

/* “青の強めボタン”用（variant="primary"やclass="fcl-cta"で付与） */
.fcl-cta a,
a.fcl-cta {
  background: #2563eb !important;
  color: #fff !important;
  border-radius: var(--fcl-radius);
  padding: 10px;
}

a.fcl-cta.bg-orange {
  background: #ff7f23 !important;
}

a.fcl-cta.bg-green {
  background: #22c55e !important;
}

/* ダークモード微調整 */
@media (prefers-color-scheme: dark) {
  .fcl-cta-subtle {
    background: #0b1220;
    border-color: #334155;
  }
  .fcl-cta-emphasized {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.4);
  }
}

.campaign-timer {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #ffecec;
  color: #b91c1c; /* 落ち着いた赤 */
  font-weight: 700;
  font-size: 0.95rem;
}

.countdown-center {
  display: block;
  text-align: center;
  margin: 0 auto;
  max-width: 600px;
}

@media (prefers-color-scheme: dark) {
  .campaign-timer {
    background: #2a1111;
    color: #fca5a5;
  }
}

/* -----------------------------
   吹き出し会話UI
----------------------------- */
.speech-left,
.speech-right {
  display: flex;
  align-items: flex-start;
  margin: 1.5em 0;
}
.speech-left {
  flex-direction: row;
}
.speech-right {
  flex-direction: row-reverse;
}
.speech-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 86px;
  margin: 0 0.75em;
}
.speech-icon::before {
  content: "";
  display: block;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #ccc;
}
.speech-icon.mochibel::before {
  background-image: url("https://file.freecraftlog.com/images/avatar/mochibel.webp");
}
.speech-icon.ryohei::before {
  background-image: url("https://file.freecraftlog.com/images/avatar/ryohei.webp");
}
.speech-icon.reverse::before {
  transform: scaleX(-1);
}
.speech-name {
  font-size: 0.8rem;
  margin-top: 0.3em;
  color: #666;
  text-align: center;
}
.speech-bubble {
  background: #ffffff;
  border-radius: 12px;
  padding: 0.8em 1em;
  max-width: 75%;
  font-size: 0.95rem;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}
.speech-bubble::before {
  content: "";
  position: absolute;
  top: 1.2em;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}
.speech-left .speech-bubble::before {
  left: -20px;
  border-right-color: #ffffff;
}
.speech-right .speech-bubble::before {
  right: -20px;
  border-left-color: #ffffff;
}

/* -----------------------------
   テーブルスタイル
----------------------------- */
.fcl-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.fcl-table th,
.fcl-table td {
  border: 1px solid #ccc;
  padding: 0.5em;
  text-align: left;
}
.fcl-table th {
  color: #fff;
}

/* -----------------------------
   アフィリエイト注意書き
----------------------------- */
.affiliate-notice {
  background-color: #f9f9f9;
  border-left: 5px solid #0073aa;
  padding: 0 10px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: bold;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* -----------------------------
   アフィリエイト強調ボックス
----------------------------- */
.fcl-affiliate-box {
  background: linear-gradient(145deg, #e0f3ff, #ffffff);
  border: 2px solid #0073aa;
  border-radius: 10px;
  padding: 20px 16px;
  margin: 32px 0;
  box-shadow: 0 4px 8px rgba(0, 115, 170, 0.1);
  text-align: center;
}

.fcl-affiliate-title {
  font-size: 0.9rem;
  color: #0073aa;
  font-weight: bold;
  margin-bottom: 6px;
}

.fcl-affiliate-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #222;
  margin-bottom: 16px;
  line-height: 1.6;
}

.fcl-affiliate-btn {
  display: inline-block;
  background-color: #0073aa;
  color: #fff;
  padding: 0.6em 1.4em;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease;
}

.fcl-affiliate-box a.fcl-affiliate-btn {
  color: #fff;
}

.fcl-affiliate-btn:hover {
  background-color: #005f8d;
}

/* -----------------------------
   目次ブロック全体
----------------------------- */
.toc {
  max-width: 600px;
  margin: 24px auto;
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* タイトルのレイアウト整え直し */
.toc .toc-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 番号付きリスト */
.toc ol {
  padding-left: 1.4em;
  margin: 0;
}

/* リストアイテム */
.toc ol li {
  margin-bottom: 6px;
}

/* リンクの見た目 */
.toc ol li a {
  color: #0073aa;
  text-decoration: none;
}
.toc ol li a:hover {
  text-decoration: underline;
}
/* リンク */
.toc ol li {
  margin-bottom: 6px;
}
.toc ol li a {
  color: #0073aa;
  text-decoration: none;
}
.toc ol li a:hover {
  text-decoration: underline;
}

/* -----------------------------
   本文の読みやすさ向上
----------------------------- */
body {
  font-size: 17px;
  line-height: 1.8;
  color: #222;
  background-color: #fff;
}
.entry-content,
.entry-contents {
  line-height: 1.8;
  font-size: 1rem;
  color: #222;
}
.entry-content code,
.entry-contents code {
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95em;
  color: #c7254e;
}
.entry-content h2,
.entry-contents h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid #eee;
  margin-top: 2em;
  margin-bottom: 1em;
}
.entry-content h3,
.entry-contents h3 {
  font-size: 1.4rem;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
}
.entry-content h4,
.entry-contents h4 {
  font-size: 1.2rem;
  margin-top: 1em;
  margin-bottom: 0.5em;
}
.entry-content a,
.entry-contents a {
  color: #0073aa;
  text-decoration: underline;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px) {
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px) {
  body {
    font-size: 18px;
    padding: 0 12px;
  }
  .entry-content h2,
  .entry-contents h2 {
    font-size: 1.5rem;
  }
  .entry-content h3,
  .entry-contents h3 {
    font-size: 1.3rem;
  }
  .entry-content h4,
  .entry-contents h4 {
    font-size: 1.1rem;
  }
  .speech-icon {
    width: 64px;
    margin: 0 0.5em;
  }
  .speech-icon::before {
    width: 64px;
    height: 64px;
  }
  .speech-name {
    font-size: 0.75rem;
  }
  .speech-bubble {
    font-size: 1.05rem;
    max-width: 90%;
  }

  .toc {
    padding: 12px;
    font-size: 16px;
  }

  .toc .toc-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .toc ol li a {
    font-size: 15px;
  }
}

/*480px以下*/
@media screen and (max-width: 480px) {
  .affbox {
    padding: 10px;
    gap: 8px;
  }
  .affbtn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  .productbox {
    grid-template-columns: 72px 1fr;
  }
  .productbox .pb-img img {
    width: 72px;
    height: 72px;
  }
}
