/* ==========================================================================
   記事ページ（ブログ）共通スタイル
   ========================================================================== */

:root {
  --c-text: #1d1d1f;
  --c-article-bg: #f1f4f7;
  --c-kiso-bg: #fff3e6;
  --c-kiso-border: #f1d2ae;
  --c-kiso-accent: #b56f2c;
  --c-funaki-bg: #f0f6ec;
  --c-funaki-border: #cedfc5;
  --c-funaki-accent: #58764c;
}

.section--article-bg { background: var(--c-article-bg); }

.breadcrumb {
  background: var(--c-article-bg);
  border-bottom: 1px solid var(--c-border-soft);
  padding: 14px 0;
  overflow-x: auto;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--c-text-soft);
  white-space: nowrap;
}
.breadcrumb a { color: var(--c-text-soft); }
.breadcrumb a:hover { color: var(--c-navy); }
.breadcrumb li[aria-current] { color: var(--c-navy); font-weight: 700; }
.breadcrumb svg { width: 12px; height: 12px; flex-shrink: 0; }

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 24px;
}

/* ---- article header ---- */
.article-header { margin-bottom: 28px; }
.article-cat-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  color: var(--cat-color, var(--c-navy));
  background: var(--cat-bg, var(--c-article-bg));
  margin-bottom: 14px;
}
.article-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-navy);
  line-height: 1.6;
}
.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--c-border-soft);
}
.article-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--c-text-soft);
}
.article-date svg { width: 15px; height: 15px; }

/* ---- placeholders (thumbnail / in-body images) ---- */
.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: var(--c-article-bg);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-m);
  color: var(--c-text-soft);
  font-size: 0.85rem;
  padding: 32px 20px;
}
.media-placeholder svg { width: 30px; height: 30px; opacity: 0.5; }
.article-cover {
  aspect-ratio: 16 / 9;
  margin-bottom: 32px;
  border-radius: 10px;
  overflow: hidden;
}
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.section-image { aspect-ratio: 16 / 9; margin: 20px 0; }
.section-image small { display: block; margin-top: 2px; font-size: 0.76rem; color: var(--c-text-soft); opacity: 0.85; }
.section-image img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-m); display: block; }

/* ---- emphasis (per blog style guide「強調表現のルール」: 黒太字＝一般強調／黄色マーカー＝結論・要点／赤文字＝注意喚起) ---- */
.article-body mark {
  background: linear-gradient(to bottom, transparent 60%, #fff6a3 60%);
  color: var(--c-text);
  font-weight: 400;
  padding: 0 2px;
}
.article-body strong.alert {
  color: #c62828;
  font-weight: 700;
}

/* ---- prose ---- */
.article-body { font-size: 0.86rem; line-height: 1.95; color: var(--c-text); }
.article-body > p { margin-bottom: 22px; }
.article-lead { font-size: 0.95rem; }
.article-note {
  font-size: 0.82rem;
  color: var(--c-text-soft);
  border-left: 3px solid var(--c-gold);
  padding-left: 14px;
  margin-bottom: 28px;
}

/* ---- table of contents ---- */
.toc-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--c-article-bg);
  border-radius: var(--radius-l);
  padding: 28px 26px;
  margin-bottom: 40px;
}
.toc-box__title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-navy);
  text-align: center;
  margin-bottom: 14px;
}
.toc-box__list { flex: 1; counter-reset: toc; list-style: none; margin: 0; padding: 0; }
.toc-box__list li { counter-increment: toc; margin-bottom: 10px; }
.toc-box__list li:last-child { margin-bottom: 0; }
.toc-box__list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-text);
}
.toc-box__list a:hover { color: var(--c-navy); }
.toc-box__list a::before {
  content: counter(toc) ".";
  flex-shrink: 0;
  color: var(--c-text);
  font-weight: 700;
  font-family: var(--font-serif);
}
.toc-box__icon { flex-shrink: 0; color: var(--c-gold); display: none; }
.toc-box__icon svg { width: 64px; height: 64px; }

/* ---- h2 sections ---- */
.article-body h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-navy);
  margin: 3.2rem 0 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--c-gold);
  scroll-margin-top: 90px;
}
.article-body h2:first-of-type { margin-top: 0; }
.article-body h2 .num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---- h3 / plain lists / inline links (legal & info pages) ---- */
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--c-navy);
  margin: 2.2rem 0 14px;
}
.article-body ul:not(.summary-list):not(.toc-box__list),
.article-body ol:not(.toc-box__list) {
  margin: 0 0 20px;
  padding-left: 1.4em;
}
.article-body ul:not(.summary-list):not(.toc-box__list) { list-style: disc; }
.article-body ol:not(.toc-box__list) { list-style: decimal; }
.article-body ul:not(.summary-list):not(.toc-box__list) li,
.article-body ol:not(.toc-box__list) li {
  margin-bottom: 8px;
  line-height: 1.9;
}
.article-body ul:not(.summary-list):not(.toc-box__list) ul,
.article-body ol:not(.toc-box__list) ul {
  margin-top: 8px;
}
.article-body a {
  color: var(--c-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover { color: var(--c-gold-dark, var(--c-gold)); }

/* ---- dialogue quote blocks (chat-style, per-speaker colors) ---- */
.dialogue {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}
.dialogue--funaki { flex-direction: row-reverse; }
.dialogue__person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 62px;
}
.dialogue__avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--c-border);
}
.dialogue__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; background: #fff; }
.dialogue__name { font-weight: 700; font-size: 0.7rem; color: var(--c-text-soft); text-align: center; line-height: 1.3; }
.dialogue--sanchu .dialogue__name { color: var(--c-kiso-accent); }
.dialogue--funaki .dialogue__name { color: var(--c-funaki-accent); }

.dialogue__bubble {
  position: relative;
  max-width: calc(100% - 84px);
  padding: 13px 16px;
  border-radius: 16px;
}
.dialogue--sanchu .dialogue__bubble {
  background: var(--c-kiso-bg);
  border: 1px solid var(--c-kiso-border);
  border-bottom-left-radius: 4px;
}
.dialogue--funaki .dialogue__bubble {
  background: var(--c-funaki-bg);
  border: 1px solid var(--c-funaki-border);
  border-bottom-right-radius: 4px;
}
.dialogue__bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 0; height: 0;
  border: 7px solid transparent;
}
.dialogue--sanchu .dialogue__bubble::after {
  left: -8px;
  border-bottom-color: var(--c-kiso-bg);
  border-left: 0;
}
.dialogue--funaki .dialogue__bubble::after {
  right: -8px;
  border-bottom-color: var(--c-funaki-bg);
  border-right: 0;
}
.dialogue__text { font-size: 0.9rem; color: var(--c-text); line-height: 1.85; margin: 0; }

/* ---- summary list ---- */
.article-body ul.summary-list { margin: 0 0 20px; padding-left: 0; }
.article-body ul.summary-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.94rem;
}
.article-body ul.summary-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-gold);
}

/* ---- video embed ---- */
.video-embed-wrap { margin: 28px 0; }
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-embed-caption { margin-top: 10px; font-size: 0.84rem; color: var(--c-text-soft); }

/* ---- info table (company profile / legal pages) ---- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
  font-size: 0.88rem;
}
.info-table th, .info-table td {
  text-align: left;
  padding: 16px 4px;
  border-bottom: 1px solid var(--c-border-soft);
  vertical-align: top;
  line-height: 1.8;
}
.info-table th {
  width: 34%;
  font-weight: 700;
  color: var(--c-navy);
  padding-right: 16px;
}

.article-disclaimer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border-soft);
  font-size: 0.78rem;
  color: var(--c-text-soft);
  line-height: 1.8;
}

/* ==========================================================================
   breakpoints
   ========================================================================== */
@media (min-width: 600px) {
  .article-title { font-size: 1.9rem; }
}

@media (min-width: 960px) {
  .toc-box__icon { display: block; }
  .article-title { font-size: 2.1rem; }
  .article-body { font-size: 0.94rem; }
  .article-lead { font-size: 1rem; }
  .article-body h2 { margin: 4.5rem 0 26px; }
}
