/* legacy — 旧テーマ由来クラスの互換レイヤ（SPEC §H-3 / §C-7-6）
   ---------------------------------------------------------------
   ここに置くのは「保存済みコンテンツを壊さないためだけ」のスタイルである。
   新テーマの設計としてこれらのクラス名を使ってはならない。
   将来まとめて削除できるよう、他のCSSと混ぜない。 */

/* .entry-content は legacy compatibility として維持する（C-14）。
   本文中のインライン style や旧 class がこのセレクタを前提にしうるため。
   内部設計には使わない。 */
.entry-content > * + * { margin-top: var(--sp-4); }

/* table（C-15）
   固定幅 table（楽天アフィリエイト 2投稿・504px）がはみ出さないようにする。 */
.entry-content table { max-width: 100%; }
.entry-content > table,
.entry-content .wp-block-table { overflow-x: auto; display: block; }

/* core/html のインライン style 229投稿 / iframe 16 / パスワードフォーム16 */
.entry-content iframe,
.entry-content embed,
.entry-content object { max-width: 100%; }

/* 旧テーマ独自ボタン .btn（C-17）。
   新テーマの設計には採用せず、保存済み本文のためだけに最低限の見た目を与える。 */
.entry-content .btn {
  display: inline-block;
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  text-decoration: none;
}

/* q_button(150/141) / bt_blue(132/131) = 282投稿 / tcd-pb-widget 系16投稿。
   定義元 avalon_tcd040 が inactive のため現在も無スタイルであり、移行で悪化しない。
   優先度 LOW。ここでは「はみ出さない」ことだけを保証する。 */
.entry-content .q_button,
.entry-content .bt_blue,
.entry-content [class*="tcd-pb-widget"] { max-width: 100%; }

/* .entry-content 内の form（C-35）。
   サイト内で唯一の <form> は page 8310 の PayPal 購入ボタン。最低限の整形のみ。 */
.entry-content form { max-width: 100%; }

/* ==========================================================================
   ショートコード shim の互換 CSS（2026-08-31 追加）

   plugins/ena-compat が出力する [cta_btn] / [voice] のマークアップは
   旧テーマ jstork の実出力をそのまま再現している。
   その見た目を成立させるための定義を、原典から必要分だけ移す。

   原典（証跡: evidence/wordpress/jstork-legacy-css-source_20260831-022311.txt）
     jstork/style.css                L1310-1338  .btn-wrap 基本
     jstork/library/css/shortcode.css L361-382   .btn-wrap.big / .lightning
     jstork/library/css/shortcode.css L522-645   .voice 系

   🔴 [cta_btn] は /sts/ ほか3ページの予約導線（R-063 CRITICAL）。
      これが無いと「Web予約へ」がリンクだけの素の見た目になる。
   🔴 これらは互換層であり、新テーマの設計には採用しない（SPEC §H-3）。
      将来 legacy.css ごと削除できる状態を保つ。
   ========================================================================== */

/* --- 旧テーマのクリアフィックス。shim の出力が .cf を含むため必要 --- */
.entry-content .cf::after {
	content: "";
	display: table;
	clear: both;
}

/* --- [cta_btn] / [btn]: ボタン --- */
.entry-content .btn-wrap {
	margin: 1.5em 0 2em;
}

.entry-content .btn-wrap.aligncenter {
	text-align: center;
}

.entry-content .btn-wrap a {
	display: inline-block;
	text-decoration: none;
	padding: 1em 2em;
	background: #4993af;
	border: 1px solid #4993af;
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.05);
	box-shadow: 0 3px 5px #e9e9e9;
	color: #fff;
}

.entry-content .btn-wrap a:hover {
	background: #e69b9b;
	color: #fff;
	transform: translate3d(0, 3px, 1px);
	box-shadow: none;
}

/* でかいボタン */
.entry-content .btn-wrap.big a {
	font-size: 1.1em;
	padding: 1.1em 2em;
	width: 420px;
	max-width: 90%;
}

/* 目立つボタン（[cta_btn] が使う） */
.entry-content .btn-wrap.lightning a {
	background: #c81c1c;
	border-color: #c81c1c;
	color: #fff;
	box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

.entry-content .btn-wrap.lightning a:hover {
	background: #ec7373;
	color: #fff;
}

/* --- [voice]: 吹き出し（1投稿7箇所 / R-064） --- */
.entry-content .voice {
	margin: 1em 0 1.3em;
	font-size: 0.95em;
}

.entry-content .voice .icon {
	width: 12%;
	text-align: center;
}

.entry-content .voice.l .icon { float: left; }
.entry-content .voice.r .icon { float: right; }

.entry-content .voice .icon img {
	border-radius: 50%;
	margin: 0;
	border: 4px solid #f5f5f5;
}

.entry-content .voice .icon .name,
.entry-content .voice .name {
	font-size: 0.65em;
	padding: 0.4em 0;
}

.entry-content .voice .voicecomment {
	border: 3px solid #eee;
	background-color: #fff;
	color: #444;
	padding: 2.5%;
	position: relative;
	width: 85%;
	border-radius: 5px;
}

.entry-content .voice.l .voicecomment { float: right; }
.entry-content .voice.r .voicecomment { float: left; }

.entry-content .voice.l .voicecomment::before {
	content: "";
	position: absolute;
	border-right: 8px solid #eee;
	border-bottom: 8px solid transparent;
	border-top: 8px solid transparent;
	top: 10px;
	left: -11px;
}

.entry-content .voice.l .voicecomment::after {
	content: "";
	position: absolute;
	border-right: 10px solid #fff;
	border-bottom: 8px solid transparent;
	border-top: 8px solid transparent;
	top: 10px;
	left: -7px;
}

.entry-content .voice.r .voicecomment::before {
	content: "";
	position: absolute;
	border-left: 8px solid #eee;
	border-bottom: 8px solid transparent;
	border-top: 8px solid transparent;
	top: 10px;
	right: -11px;
}

.entry-content .voice.r .voicecomment::after {
	content: "";
	position: absolute;
	border-left: 10px solid #fff;
	border-bottom: 8px solid transparent;
	border-top: 8px solid transparent;
	top: 10px;
	right: -7px;
}

.entry-content .voice .voicecomment p { margin-bottom: 1em; }
.entry-content .voice .voicecomment p:last-child { margin-bottom: 0; }

/* --- 青緑見出しカード内リンクの可読性修正（Visual QA / 2026-09-01・R-123） ---
 *
 * 【事象】
 *   `.entry-content h2` は jstork 由来の mu-plugin CSS
 *   （eva-home-jstork-min / eva-sts-jstork-min）が
 *     background: rgb(19,172,202) = #13ACCA（青緑）／ color: #fff
 *   の「カード」にしている。この CSS は **テーマ CSS より後に読み込まれる**ため、
 *   同ファイルのグローバル指定
 *     a       { color: rgb(27,180,211) }  = #1BB4D3
 *     a:hover { color: rgb(230,155,155) } = #E69B9B
 *   が ENA の a 色（--c-accent）を上書きしていた。
 *   結果、見出しカード内のリンクは
 *     通常 / visited / focus / active … #1BB4D3 on #13ACCA = 1.09:1（ほぼ判読不能）
 *     hover                          … #E69B9B on #13ACCA = 1.22:1
 *   となり、可読性バグになっていた。さらに同 CSS の `h2 a { text-decoration: none }`
 *   により下線も無く、色以外の手がかりが存在しなかった。
 *
 * 【方針】
 *   ・グローバルな `a` を奪い返さない（他ページの導線・CTA に影響させない）。
 *   ・青緑カードが実際に描画されるページ（front page = .home ／ /sts/ = .page-id-8483）
 *     の見出しカードだけにスコープする。
 *   ・`!important` は使わず **詳細度**で解決する。
 *       .home .entry-content h2 a          = (0,2,2)
 *       > mu-plugin の a (0,0,1) / a:hover (0,1,1) / h2 a (0,0,2)
 *   ・link / visited / hover / focus-visible / active の全状態で WCAG AA 4.5:1 以上。
 */
.home .entry-content h2 a,
.home .entry-content h2 a:link,
.home .entry-content h2 a:visited,
.page-id-8483 .entry-content h2 a,
.page-id-8483 .entry-content h2 a:link,
.page-id-8483 .entry-content h2 a:visited {
	/* #13ACCA 上で 5.23:1（AA 4.5 以上）。白の見出し文字とも明確に区別できる */
	color: #04303a;
}

.home .entry-content h2 a:hover,
.home .entry-content h2 a:active,
.page-id-8483 .entry-content h2 a:hover,
.page-id-8483 .entry-content h2 a:active {
	/* #13ACCA 上で 6.71:1。色以外の手がかりとして下線も出す */
	color: #02191d;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}

/* 既定の focus outline（--c-focus #1a5fb4）は青緑カード上で 2.33:1 と不足するため、
   このカード内だけ視認できる色へ差し替える（SPEC §J-2 の focus-visible 方針は維持） */
.home .entry-content h2 a:focus-visible,
.page-id-8483 .entry-content h2 a:focus-visible {
	color: #02191d;
	outline: 3px solid #02191d;
	outline-offset: 2px;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.18em;
}
