@charset "UTF-8";

/* =========================================
   1. 記事ページラッパー (トップと完全統一：680px)
========================================= */
body {
  background-color: #f7f5ee;
}

.article-page-wrapper {
  max-width: 680px;
  margin: 0 auto 60px;
  background: #ffffff;
  border: 1px solid #eee8dd;
  border-top: none; /* ヘッダー上端を画面最上部に密着 */
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 680px) {
  .article-page-wrapper {
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
}

.article-page-wrapper .site-header {
  border-bottom: 1px solid #f0ece3;
}

/* =========================================
   2. 記事メインエリア & パンくず
========================================= */
.article-main-body {
  padding: 20px 16px 16px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .article-main-body {
    padding: 28px 32px 32px;
  }
}

/* パンくずリスト */
.breadcrumb {
  margin-bottom: 24px;
  font-size: 11.5px;
  color: #888;
  line-height: 1.5;
}

.breadcrumb ol {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 4px 6px;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  list-style: none !important;
  font-size: 11.5px;
  color: #666;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 6px;
  color: #ccc;
  font-size: 10px;
}

.breadcrumb a {
  color: #666;
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.breadcrumb a:hover {
  opacity: 0.75;
}

.breadcrumb li span {
  color: #8e65be;
  font-weight: bold;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================
   3. 記事ヘッダー
========================================= */
.article-header {
  margin-bottom: 32px;
}

.category-badge {
  display: inline-block;
  color: #8e65be;
  border: 1px solid #8e65be;
  background: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.article-title {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.45;
  color: #222;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 24px;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #888;
  margin-bottom: 24px;
}

.eyecatch-wrapper,
.article-main-img {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1200 / 630;
  margin-bottom: 36px;
  border: 1px solid #eee8dd;
}

.eyecatch-wrapper img,
.article-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================
   4. 記事本文ベース & 見出し
========================================= */
.article-content {
  font-size: 15px;
  color: #222;
  line-height: 1.85;
  letter-spacing: 0.03em;
}

.article-content p {
  margin-bottom: 24px;
}

.article-content img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
  border-radius: 6px;
}

.article-content hr {
  border: none;
  border-top: 1px dashed #e2ddd3;
  margin: 40px 0;
}

.article-content h2 {
  font-size: 19px;
  font-weight: bold;
  color: #222;
  padding: 6px 0 6px 14px;
  margin: 48px 0 24px;
  background: #faf8f2;
  border: 1px solid #eee8dd;
  border-left: 4px solid #c2a6e1;
  border-radius: 0 4px 4px 0;
}

@media (min-width: 768px) {
  .article-content h2 {
    font-size: 21px;
  }
}

.article-content h3 {
  font-size: 16px;
  font-weight: bold;
  color: #236092;
  border-bottom: 1px solid #e2ddd3;
  padding-bottom: 8px;
  margin: 36px 0 20px;
}

/* =========================================
   5. リスト・装飾要素
========================================= */
.article-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  color: #555;
  background: #f5f5f7;
  border: 1px solid #e5e5e8;
  border-left: 4px solid #b0b0b8;
  border-radius: 4px;
  font-size: 14px;
  position: relative;
}

.article-content blockquote::before {
  content: "“";
  font-family: Georgia, serif;
  font-size: 32px;
  color: #c0c0c8;
  line-height: 1;
  position: absolute;
  top: 6px;
  right: 12px;
  pointer-events: none;
}

.marker-line {
  background: linear-gradient(transparent 60%, #e2d5f7 60%);
  font-weight: bold;
}

.article-content ul,
.article-content ol {
  margin-bottom: 24px;
  padding-left: 20px;
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.step-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 24px 0;
  counter-reset: step-counter;
}

.step-list li {
  position: relative;
  padding: 14px 0 14px 36px;
  border-bottom: 1px dotted #e2ddd3;
  font-size: 15px;
  font-weight: bold;
  color: #333;
}

.step-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 14px;
  width: 24px;
  height: 24px;
  background: #8e65be;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.check-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 0 24px 0;
}

.check-list li,
.check-text {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.check-list li::before,
.check-text::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #8e65be;
  font-weight: bold;
  font-size: 16px;
}

/* =========================================
   6. 各種コンポーネント
========================================= */
.article-summary-box {
  position: relative;
  margin: 36px 0 28px;
  padding: 24px 18px 12px;
  border: 2px solid #b393dd;
  background-color: #fff;
  border-radius: 8px;
}

.summary-title {
  position: absolute;
  top: -14px;
  left: 16px;
  background-color: #8e65be;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 2px 14px;
  line-height: 1.5;
  border-radius: 4px;
}

.summary-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.summary-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  border-bottom: 1px dashed #e0e0e0;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  line-height: 1.6;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  width: 6px;
  height: 6px;
  background-color: #8e65be;
  border-radius: 50%;
}

.article-toc {
  background-color: #faf8f2;
  border: 1px solid #eee8dd;
  padding: 16px 20px;
  border-radius: 8px;
  margin: 32px 0;
}

.toc-title {
  font-size: 15px;
  font-weight: bold;
  color: #236092;
  cursor: pointer;
  list-style: none;
  margin-bottom: 8px;
  padding: 0;
}

.toc-title::-webkit-details-marker {
  display: none;
}

.toc-title::before {
  content: "▶";
  display: inline-block;
  font-size: 11px;
  margin-right: 8px;
  transition: transform 0.25s ease;
  color: #c2a6e1;
}

details[open].article-toc .toc-title::before {
  transform: rotate(90deg);
}

.toc-list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.toc-list li {
  border-bottom: 1px solid #eee8dd;
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  color: #444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: #236092;
}

/* 補足・ポイントボックス（.color-box） */
.color-box {
  background-color: #f8f5fc;
  border: 1px solid #e2d5f7;
  border-radius: 8px;
  color: #333;
  padding: 20px 22px;
  margin: 32px 0;
  box-shadow: 0 2px 8px rgba(142, 101, 190, 0.04);
}

.color-box p:last-child {
  margin-bottom: 0 !important;
}

/* 吹き出し（speech-balloon） */
.speech-balloon {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 28px 0;
}

.balloon-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 56px;
}

.balloon-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #e5e5e7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.balloon-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.balloon-name {
  font-size: 11px;
  font-weight: bold;
  color: #666;
  margin-top: 5px;
  text-align: center;
}

.balloon-content {
  position: relative;
  background-color: #ffffff;
  border: 1.5px solid #b393dd;
  color: #333;
  padding: 14px 18px;
  border-radius: 10px;
  flex-grow: 1;
  font-size: 14.5px;
  line-height: 1.65;
  box-shadow: 0 2px 8px rgba(179, 147, 221, 0.08);
}

.balloon-content p:last-child {
  margin-bottom: 0 !important;
}

.balloon-content::before,
.balloon-content::after {
  content: "";
  position: absolute;
  top: 18px;
  border: solid transparent;
  height: 0;
  width: 0;
  pointer-events: none;
}

.balloon-content::before {
  left: -9px;
  border-color: rgba(179, 147, 221, 0);
  border-right-color: #b393dd;
  border-width: 7px 9px 7px 0;
}

.balloon-content::after {
  left: -7px;
  border-color: rgba(255, 255, 255, 0);
  border-right-color: #ffffff;
  border-width: 6px 8px 6px 0;
  margin-top: 1px;
}

.qa-block {
  background-color: #faf8f2;
  border: 1px solid #eee8dd;
  border-radius: 8px;
  padding: 20px;
  margin: 32px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.qa-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #eee8dd;
}

.qa-badge-q,
.qa-badge-a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.qa-badge-q {
  background-color: #8e65be;
}
.qa-badge-a {
  background-color: #236092;
}

.qa-title {
  font-size: 15px;
  font-weight: bold;
  color: #333;
  line-height: 1.5;
  padding-top: 2px;
}

.qa-answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 14px;
}

.qa-content {
  flex: 1;
  font-size: 14.5px;
  color: #333;
  line-height: 1.7;
}

.author-profile {
  background: #f9f9fa;
  border: 1px solid #e9e9eb;
  border-radius: 8px;
  padding: 20px;
  margin-top: 56px;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.author-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}

.author-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-label {
  font-size: 11px;
  color: #888;
}

.author-name {
  font-size: 15px;
  font-weight: bold;
  margin: 0;
}

.author-body {
  font-size: 13.5px;
  color: #444;
  line-height: 1.75;
}

.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

/* =========================================
   7. 要約ボックス・自動目次 (TOC)
========================================= */
.article-lead-box {
  position: relative;
  background-color: #fcfbfa;
  border: 1px solid #e9e2d5;
  border-left: 4px solid #8e65be;
  border-radius: 6px;
  padding: 20px 18px 16px;
  margin: 24px 0 28px;
}

.lead-box-header {
  font-size: 13px;
  font-weight: bold;
  color: #8e65be;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.lead-box-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: #333;
  margin: 0 !important;
}

.auto-toc-container {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 16px 12px;
  margin: 24px 0 32px;
}

.auto-toc-header {
  border-bottom: 1px solid #f0f0f2;
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.auto-toc-title {
  font-size: 14.5px;
  font-weight: bold;
  color: #222;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auto-toc-title::before {
  content: "≡";
  color: #8e65be;
  font-size: 17px;
}

.auto-toc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-group {
  background: transparent;
  border: none;
  padding: 0;
}

.toc-h2-item {
  line-height: 1.4;
}

.toc-h2-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  font-weight: bold;
  color: #111827;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.toc-h2-link::before {
  content: "›";
  color: #8e65be;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.toc-h2-link:hover {
  color: #8e65be;
  transform: translateX(2px);
}

.toc-h3-list {
  list-style: none !important;
  padding: 2px 12px !important;
  margin: 6px 0 0 0 !important;
  background-color: #f4f5f7;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.toc-h3-item {
  margin: 0;
  border-bottom: 1px dashed #d1d5db;
}

.toc-h3-item:last-child {
  border-bottom: none;
}

.toc-h3-link {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding: 5px 0;
  font-size: 13px;
  color: #4b5563;
  text-decoration: none;
  line-height: 1.45;
  transition: all 0.15s ease;
  cursor: pointer;
}

.toc-h3-link::before {
  content: "・";
  color: #8e65be;
  font-weight: bold;
  flex-shrink: 0;
}

.toc-h3-link:hover {
  color: #8e65be;
  text-decoration: underline;
}

/* =========================================
   8. 視覚的 著者・監修者カード
========================================= */
.author-profile-card {
  background: #f9f9fa;
  border: 1px solid #e9e9eb;
  border-radius: 12px;
  padding: 24px 22px;
  margin: 40px 0 20px;
}

@media (min-width: 768px) {
  .author-profile-card {
    margin: 48px 0 28px;
  }
}

.author-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e5e7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-card-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.author-card-label {
  font-size: 11px;
  color: #888888;
  display: block;
  margin-bottom: 4px;
}

.article-content .author-profile-card h3.author-card-name,
.author-card-name {
  font-size: 17px !important;
  font-weight: bold !important;
  color: #C2A6E1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  line-height: 1.3 !important;
}

.author-card-body p {
  font-size: 13.5px;
  color: #444444;
  line-height: 1.7;
  margin: 0 !important;
}

.author-card-disclaimer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e3;
}

.disclaimer-title {
  font-size: 11px;
  font-weight: bold;
  color: #888888;
  margin: 0 0 4px !important;
}

.disclaimer-text {
  font-size: 11.5px;
  color: #777777;
  line-height: 1.6;
  margin: 0 !important;
}

/* =========================================
   9. 関連記事セクション（完全専用・シンプルスタイル）
========================================= */
.related-articles-section {
  margin: 16px 0 8px;
  padding-top: 16px;
  border-top: 1px dashed #e2ddd3;
}

@media (min-width: 768px) {
  .related-articles-section {
    margin: 28px 0 20px;
    padding-top: 24px;
  }
}

/* ★ 関連記事専用見出し：背景色・全周枠線を完全に打ち消し、左端の紫ラインのみを適用 */
.article-content .related-articles-section h2.related-section-title,
.related-section-title {
  font-size: 18px !important;
  font-weight: bold !important;
  color: #222 !important;
  margin: 0 0 16px 0 !important;       /* 上マージンを完全除去し破線と直結 */
  padding: 2px 0 2px 10px !important;   /* 内側パディングをタイト化 */
  background: none !important;          /* 背景色を完全排除（透明） */
  background-color: transparent !important;
  border: none !important;              /* 全周枠線を完全排除 */
  border-left: 4px solid #8e65be !important; /* 左端の紫ラインのみ残す */
  border-radius: 0 !important;
  line-height: 1.3 !important;
}

.related-article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
}

@media (min-width: 560px) {
  .related-article-grid {
    gap: 20px 16px;
  }
}

.related-card {
  background: #faf8f2;
  border: 1px solid #eee8dd;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.related-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: #eee;
}

.related-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-card-thumb img {
  transform: scale(1.04);
}

.related-card-body {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

@media (min-width: 560px) {
  .related-card-body {
    padding: 14px 12px;
  }
}

.related-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #888;
  margin-bottom: 6px;
}

@media (min-width: 560px) {
  .related-card-meta {
    font-size: 11px;
    margin-bottom: 8px;
  }
}

.related-card-cat {
  color: #8e65be;
  font-weight: bold;
}

.article-content .related-card h3.related-card-title,
.related-card-title {
  font-size: 12.5px !important;
  font-weight: bold !important;
  line-height: 1.45 !important;
  color: #222 !important;
  margin: 0 0 4px 0 !important;
  padding: 0 !important;
  border-bottom: none !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

@media (min-width: 560px) {
  .article-content .related-card h3.related-card-title,
  .related-card-title {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
}
