/* ============================================================
   01. 記事ヘッダー
============================================================ */

.article-header {
  text-align: left;
  margin: 1.6rem 0;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.8rem 0;
  color: var(--color-text);
}

.article-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.2rem;
}

.article-meta time {
  display: inline-block;
  margin-right: 1rem;
}

/* アイキャッチ + イントロ */

.article_intro {
  display: block;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-top: 0.8rem;
}

.article-header+img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   02. ビジュアル横並び（PC）
============================================================ */

@media (min-width: 900px) {
  .article-visual-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin: 2rem 0;
  }

  .article-visual-block img {
    width: 48%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 10px;
  }

  .article-visual-block .article_intro {
    width: 48%;
    margin-top: 0;
    font-size: 1.1rem;
    line-height: 1.9;
  }

  .article-visual-block:not(:has(img)) .article_intro {
    width: 100%;
  }
}

/* ============================================================
   03. 目次
============================================================ */

.toc {
  margin: 1.4rem 0 2rem;
  padding: 1.1rem 1rem 0.9rem;
  background: #fbfcfd;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.toc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding-left: 0;
  border-left: none;
  color: var(--color-text);
}

.toc ul {
  list-style: none;
  margin: 0;
  padding-left: 0.2rem;
  border-left: none;
}

.toc li {
  margin: 0.15rem 0;
  padding-left: 0;
  line-height: 1.6;
}

.toc a {
  display: block;
  color: #374151;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.toc a:hover {
  color: var(--color-bland);
  background: rgba(0, 0, 0, 0.035);
}

.toc ul ul {
  padding-left: 0.8rem;
  margin-top: 0.15rem;
}

.toc ul ul a {
  font-size: 0.94rem;
  opacity: 0.9;
}

.toc a.active {
  color: var(--color-bland);
  font-weight: 600;
  background: var(--color-bland-soft);
}

/* 折りたたみ初期 */
#toc-list.collapsed {
  max-height: 12em;
  overflow: hidden;
  position: relative;
}

/* 下部フェードアウト */
#toc-list.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4.8em;
  background: linear-gradient(to bottom, rgba(251,252,253,0), #fbfcfd);
  pointer-events: none;
}

#toc-list:not(.collapsed)::after {
  display: none;
}

.toc-expand-btn {
  display: block;
  margin: 0.55rem auto 0;
  font-size: 0.9rem;
  background: none;
  border: none;
  color: var(--color-bland);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.toc-expand-btn:hover {
  background: var(--color-bland-soft);
}

/* ============================================================
   04. 記事本文 基本
============================================================ */

#article-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text);
  padding-bottom: 20px;
}

#article-content p {
  margin-bottom: 1.1rem;
}

#article-content strong {
  font-weight: 700;
  color: inherit;
  background: linear-gradient(transparent 68%, var(--color-bland-soft2) 0);
}

/* ============================================================
   見出し
============================================================ */

#article-content h2 {
  font-size: 1.45rem;
  margin: 2.8rem 0 1.2rem;
  padding: 0.82rem 1rem 0.78rem;
  background: linear-gradient(to right, var(--color-bland-soft) 0%, #f3faf7 100%);
  border: 1px solid #e6ebf1;
  border-left: 5px solid var(--color-bland);
  border-radius: 12px;
  line-height: 1.45;
  font-weight: 700;
  box-shadow: none;
}

#article-content h3 {
  font-size: 1.18rem;
  margin: 2rem 0 0.9rem;
  padding: 0.68rem 0.88rem;
  background: #f4faf8;
  border: 1px solid #e9eef3;
  border-left: 4px solid var(--color-bland);
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.5;
}

#article-content h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.55rem;
  font-weight: 700;
  color: #374151;
}

/* 強調（h4相当） */
.em-strong {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.55rem;
  font-weight: 700;
  color: #374151;
}

/* ============================================================
   リンク
============================================================ */

#article-content a:not(:has(img)):not(.shop-btn) {
  color: var(--color-bland);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  transition: border-color 0.15s ease, color 0.15s ease;
}

#article-content a:not(:has(img)):not(.shop-btn):hover {
  border-bottom-color: var(--color-bland);
}

/* ============================================================
   画像
============================================================ */

#article-content img:not(.card-image-reference) {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.8rem auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

@media (min-width: 900px) {
  #article-content img:not(.card-image-reference) {
    max-width: 720px;
    max-height: 70vh;
  }
}

/* ============================================================
   テーブル
============================================================ */

table:not(:has(img)) {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

th:not(:has(img)),
td:not(:has(img)) {
  border: 1px solid #e5e7eb;
  padding: 11px 12px;
}

th:not(:has(img)) {
  background-color: #f8fafc;
  font-weight: 700;
  text-align: center;
}

td:not(:has(img)) {
  text-align: center;
}

tr:nth-child(even):not(:has(img)) {
  background-color: #fcfcfc;
}

/* ==========================================================
   リスト
========================================================== */

#article-content ul,
#article-content ol {
  margin: 1rem 0 1.2rem;
  padding-left: 1.6rem;
}

#article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

#article-content ul {
  list-style: disc;
}

#article-content ul li::marker,
#article-content ol li::marker {
  color: var(--color-bland);
  font-size: 0.88em;
  opacity: 0.85;
}

#article-content li ul,
#article-content li ol {
  margin-top: 0.3rem;
}

/* ============================================================
   05. 引用
============================================================ */

#article-content blockquote {
  margin: 1.7rem 0;
  padding: 0.35rem 0 0.35rem 1rem;
  background: transparent;
  border-radius: 0;
  border-left: 3px solid #d1d5db;
  color: #4b5563;
  font-style: normal;
  position: relative;
}

#article-content blockquote::before {
  display: none;
}

#article-content blockquote p {
  margin: 0.45rem 0;
}

#article-content blockquote a {
  word-break: break-word;
}
/* ============================================================
   06. 情報カード（note / point / caution）
============================================================ */

.note,
.point,
.caution {
  margin: 1.6rem 0;
  padding: 0.95rem 1rem 0.95rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.8;
  border: 1px solid #eceff3;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  background: #fcfcfd;
}

.note p,
.point p,
.caution p {
  margin: 0.5rem 0;
}

.note::before,
.point::before,
.caution::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* NOTE */
.note {
  background: #fcfcfd;
}

.note::before {
  content: "NOTE";
  color: #6b7280;
  background: #f3f4f6;
}

.note::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #c7cdd4;
}

/* POINT */
.point {
  background: #fbfffe;
}

.point::before {
  content: "POINT";
  color: #0f766e;
  background: #ecfdf5;
}

.point::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #0f766e;
}

/* CAUTION */
.caution {
  background: #fffefb;
}

.caution::before {
  content: "CAUTION";
  color: #b45309;
  background: #fff7ed;
}

.caution::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #d97706;
}
/* ============================================================
   07. コード
============================================================ */

#article-content pre {
  background: #272822;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

#article-content code {
  background: #f5f5f5;
  color: #c7254e;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

/* ============================================================
   08. 著者情報
============================================================ */

.author-box {
  display: flex;
  gap: 16px;
  align-items: flex-start;

  padding: 1.3rem;
  margin: 2.5rem 0;

  background: var(--color-bland-pale);
  border-radius: 10px;
  border: 1px solid #e6ecea;
}

/* アイコン */
.author-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* 情報 */

.author-info h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  color: var(--color-bland);
}

.author-name {
  font-weight: 600;
  margin: 0.2rem 0 0.4rem;
}

.author-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.author-link {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-bland);
  text-decoration: none;
  font-weight: 500;
}

.author-link:hover {
  text-decoration: underline;
}

/* ============================================================
   09. シェアUI
============================================================ */

.share {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.share-label {
  font-size: 0.85rem;
  color: #888;
}

.share-list {
  display: flex;
  gap: 8px;
}

/* ボタン */

.share-item {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: 20px;
  border: 1px solid #e3e3e3;
  background: transparent;
  text-decoration: none;
  color: #444;
  cursor: pointer;
  transition: all 0.18s ease;
}

.share-item:hover {
  border-color: #bbb;
}

.share-item[href*="twitter"]:hover {
  background: #f5f8ff;
  border-color: #000;
  color: #000;
}

.share-item[href*="line.me"]:hover {
  background: #f2fff5;
  border-color: #06c755;
  color: #06c755;
}

.share-item[type="button"],
.share-item:not([href]) {
  background: #fafafa;
}

.share-item[type="button"]:hover,
.share-item:not([href]):hover {
  background: #f0f0f0;
}

/* トースト */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   10. レスポンシブ
============================================================ */

@media (max-width: 768px) {
  #article-content h2 {
    font-size: 1.3rem;
  }

  #article-content h3 {
    font-size: 1.15rem;
  }
}

/* ============================================================
   11. モーションヴィジェット
============================================================ */

/* ===== 広告エリア全体 ===== */
.ad-section {
  margin: 40px 0;
  text-align: center;
}

/* ===== 広告ラベル ===== */
.ad-notice {
  display: inline-block;
  font-size: 12px;
  color: #777;
  border: 1px solid #ddd;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #fafafa;
}

/* ===== 初期：スマホだけ表示 ===== */
.widget-pc-tablet {
  display: none;
}

.widget-sp {
  display: block;
}

/* ===== 768px以上 → PC・タブレット表示 ===== */
@media (min-width: 768px) {
  .widget-pc-tablet {
    display: block;
  }

  .widget-sp {
    display: none;
  }
}
/** 商品リンク */
.shop-card {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  padding: 20px;
  background: #ffffff;
  margin: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  max-width: 460px;
}

/* 画像 */
.shop-card-image {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* タイトル */
.shop-card-title {
  font-weight: bold;
  margin: 10px 0 12px;
  text-align: center;
}

/* ボタンエリア */
.shop-card-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ボタン */
.shop-btn {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ボタン色 */
.shop-btn.rakuten {
  background: #bf0000;
  color: #fff;
  padding-left: 40px;
  padding-right: 40px;
}

.shop-btn.yahoo {
  background: #ff0033;
  color: #fff;
    padding-left: 40px;
  padding-right: 40px;
}

/* ホバー */
.shop-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* PC / タブレット */
@media (min-width: 640px) {
  .shop-card {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 640px;
  }

  .shop-btn {
    font-size: 15px;
    padding: 14px;
  }
}

.shop-search-card {
  padding: 16px;
  margin: 24px auto;
  max-width: 460px;
}

.shop-search-title {
  font-weight: bold;
}

.shop-search-buttons {
  gap: 10px;
  justify-content: center;
}