/* =========================================
   WRAP (最小定義・グローバル未定義時のフォールバック)
   ========================================= */
.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 44px);
}

/* =========================================
   SECTION
   ========================================= */
.section { padding-block: clamp(48px, 7vw, 84px); }

/* =========================================
   ARTICLE (single.php メタ・タイトル・カバー)
   ========================================= */
.article { max-width: 820px; margin-inline: auto; min-width: 0; }

.article__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.article__cat {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  border-radius: var(--pill);
  padding: 4px 13px;
  background: var(--cor);
}
.article__cat[data-cat="お知らせ"] { background: var(--mag); }
.article__cat[data-cat="出展情報"] { background: var(--cyn); }
.article__cat[data-cat="レポート"] { background: var(--grn); }

.article__date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .05em;
  font-variant-numeric: tabular-nums;
}

.article__title {
  font-family: var(--jp);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: .02em;
  text-wrap: balance;
  color: var(--ink);
}

.article__cover {
  margin: 26px 0 34px;
  border-radius: var(--r-l);
  overflow: hidden;
  box-shadow: var(--sh-m);
  aspect-ratio: 16 / 8.5;
}
.article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* =========================================
   RICHTEXT (the_content 出力・DOM構造不変・CSSのみ)
   ========================================= */
.richtext {
  font-family: var(--jp);
  font-size: 15px;
  line-height: 2.05;
  color: var(--ink);
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.richtext > * + * { margin-top: 1.3em; }

.richtext table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.richtext h2 {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: .02em;
  line-height: 1.5;
  margin-top: 1.8em;
  padding-left: 14px;
  border-left: 4px solid;
  border-image: var(--grad) 1;
}

.richtext h3 {
  font-weight: 800;
  font-size: 18px;
  margin-top: 1.6em;
  color: var(--ink);
}

.richtext h4 {
  font-weight: 700;
  font-size: 16px;
  margin-top: 1.4em;
  color: var(--ink);
}

.richtext p { color: var(--ink); }
.richtext strong { font-weight: 700; }

.richtext a {
  color: var(--mag);
  text-underline-offset: 3px;
  text-decoration: underline;
  transition: color .2s var(--ease);
}
.richtext a:hover { color: var(--cyn); }

.richtext ul, .richtext ol { padding-left: 1.4em; max-width: 100%; }
.richtext li { margin-top: .5em; overflow-wrap: break-word; }
.richtext ul li::marker { color: var(--mag); }
.richtext ol li::marker { color: var(--mag); font-family: var(--mono); font-weight: 700; }

.richtext blockquote {
  border-left: 3px solid var(--cyn);
  background: var(--soft);
  border-radius: 0 var(--r-s) var(--r-s) 0;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 14px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.richtext pre {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-s);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
}

.richtext code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--soft);
  padding: 2px 6px;
  border-radius: 6px;
}

.richtext pre code { background: none; padding: 0; }

.richtext figure { margin-top: 1.6em; }
.richtext figure img { border-radius: var(--r-m); width: 100%; height: auto; }
.richtext img { border-radius: var(--r-m); max-width: 100%; height: auto; }

.richtext figcaption {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
  letter-spacing: .06em;
}

/* =========================================
   ARTICLE BACK
   ========================================= */
.article__back { margin-top: 44px; text-align: center; }

/* =========================================
   RESPONSIVE - TABLET
   ========================================= */
@media screen and (max-width: 840px) {
  .article { max-width: 100%; }
}

/* =========================================
   RESPONSIVE - MOBILE
   ========================================= */
@media screen and (max-width: 540px) {
  .richtext h2 { font-size: 18px; }
  .richtext h3 { font-size: 16px; }
  .richtext h4 { font-size: 15px; }
  .article__cover { aspect-ratio: 4 / 3; }
}
