/*
Theme Name: Hadou Guide（キングダム覇道 攻略テーマ）
Description: キングダム覇道の攻略サイト用テーマ。武将データベース（絞り込み・並べ替え）、おすすめ編成、ティアリスト、広告枠、SEO設定、初期ページ自動作成を備えています。
Version: 1.4.1
Requires at least: 6.4
Requires PHP: 8.0
Author: Site Owner
Text Domain: hadou
License: GPL-2.0-or-later
*/

/* ===== トークン ===== */
:root {
	--bg: #f4f6f4;          /* 石灰：青みのある白 */
	--surface: #ffffff;
	--ink: #1f2328;         /* 墨 */
	--ink-soft: #545b62;
	--line: #d5dad5;
	--verdigris: #2f5d57;   /* 青銅の錆色：見出し・リンク */
	--verdigris-deep: #1f403c;
	--bronze: #9a7032;      /* 青銅：天賦900 */
	--seal: #b3261e;        /* 朱印：天賦・最上位評価のみ */
	--tier-s: #b3261e;
	--tier-a: #9a7032;
	--tier-b: #2f5d57;
	--tier-c: #6b7178;
	--radius-s: 3px;
	--radius-m: 8px;
	--wrap: 1120px;
	--read: 42rem;
	--ff-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
	--ff-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

/* ===== 基本 ===== */
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--ff-body);
	font-size: 16px;
	line-height: 1.8;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--verdigris); text-underline-offset: 3px; }
a:hover { color: var(--verdigris-deep); }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 2px; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
	background: var(--surface); padding: 8px 12px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 700; line-height: 1.4; letter-spacing: .02em; }

/* ===== ヘッダー ===== */
.site-header { background: var(--ink); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.site-title { margin: 0; font-family: var(--ff-display); font-size: 1.25rem; font-weight: 800; }
.site-title a { color: #fff; text-decoration: none; }
.site-header .unofficial { font-size: .75rem; color: #b9c0c6; }
.nav-toggle {
	margin-left: auto; background: none; border: 1px solid #5b636b; color: #fff;
	border-radius: var(--radius-s); padding: 6px 12px; font: inherit; font-size: .875rem; cursor: pointer;
}
.primary-nav { width: 100%; display: none; }
.primary-nav.is-open { display: block; }
.primary-nav ul { list-style: none; margin: 0; padding: 0 0 12px; }
.primary-nav a { display: block; padding: 10px 0; color: #fff; text-decoration: none; border-top: 1px solid #353b41; }
@media (min-width: 860px) {
	.nav-toggle { display: none; }
	.primary-nav { display: block; width: auto; margin-left: auto; }
	.primary-nav ul { display: flex; gap: 4px; padding: 0; }
	.primary-nav a { border: 0; padding: 8px 12px; border-radius: var(--radius-s); }
	.primary-nav a:hover, .primary-nav .current-menu-item > a { background: #353b41; }
}

/* ===== パンくず ===== */
.breadcrumbs { font-size: .8125rem; color: var(--ink-soft); padding-top: 12px; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li + li::before { content: "›"; margin: 0 .5em; color: var(--line); }
.breadcrumbs a { color: var(--ink-soft); }

/* ===== レイアウト ===== */
.site-main { padding: 16px 0 48px; }
.home .site-main { padding-top: 0; }
.layout { display: grid; gap: 32px; }
@media (min-width: 1000px) { .layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 300px; } }
.content-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 16px; }
@media (min-width: 640px) { .content-box { padding: 32px; } }

/* ===== 記事本文 ===== */
.entry-title { font-size: 1.625rem; margin: 0 0 8px; }
.entry-meta { font-size: .8125rem; color: var(--ink-soft); margin-bottom: 24px; }
.entry-content { max-width: var(--read); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 {
	font-size: 1.375rem; margin-top: 2.4em; padding: 10px 14px;
	background: var(--verdigris); color: #fff; border-radius: var(--radius-s);
}
.entry-content h3 { font-size: 1.15rem; margin-top: 2em; padding-left: 12px; border-left: 4px solid var(--verdigris); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.entry-content th { background: #eef1ee; }
.entry-content .table-scroll { overflow-x: auto; }
.entry-content blockquote { margin-left: 0; padding: 12px 16px; border-left: 4px solid var(--line); color: var(--ink-soft); }
.note-box { border: 1px solid var(--bronze); background: #fbf8f2; border-radius: var(--radius-s); padding: 12px 16px; font-size: .9375rem; }
.updated-note { font-size: .8125rem; color: var(--ink-soft); }

/* ===== 朱印（天賦） ===== */
.seal {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
	border: 2px solid var(--seal); color: var(--seal); border-radius: 4px;
	font-family: var(--ff-display); font-weight: 800; line-height: 1;
	padding: 6px 5px; transform: rotate(-3deg); background: #fff;
}
.seal .seal-label { font-size: .625rem; letter-spacing: .1em; margin-bottom: 3px; }
.seal .seal-value { font-size: 1.05rem; }
.seal.is-lg { padding: 10px 8px; border-width: 3px; }
.seal.is-lg .seal-label { font-size: .8rem; }
.seal.is-lg .seal-value { font-size: 1.6rem; }
.seal.is-900 { background: var(--seal); color: #fff; }
.seal-inline {
	display: inline-block; border: 1.5px solid var(--seal); color: var(--seal); border-radius: 3px;
	font-family: var(--ff-display); font-weight: 800; font-size: .8125rem; padding: 0 5px; line-height: 1.6;
}
.seal-inline.is-900 { background: var(--seal); color: #fff; }

/* ===== 評価バッジ ===== */
.tier { display: inline-block; min-width: 2.2em; text-align: center; font-weight: 700; color: #fff; border-radius: var(--radius-s); padding: 0 6px; font-size: .875rem; }
.tier-SS, .tier-S { background: var(--tier-s); }
.tier-A { background: var(--tier-a); }
.tier-B { background: var(--tier-b); }
.tier-C { background: var(--tier-c); }
.tier-none { background: #9aa0a6; }

/* ===== トップ：検索ヒーロー ===== */
.hero { background: var(--ink); color: #fff; padding: 40px 0 44px; }
.hero h1 { font-size: clamp(1.75rem, 6vw, 3rem); margin: 0 0 8px; font-weight: 800; }
.hero p { margin: 0 0 24px; color: #c9cfd4; }
.hero-search { display: flex; gap: 8px; max-width: 560px; }
.hero-search input {
	flex: 1; min-width: 0; font: inherit; font-size: 1.0625rem; padding: 12px 14px;
	border: 0; border-radius: var(--radius-s);
}
.hero-search button {
	font: inherit; font-weight: 700; padding: 0 18px; border: 0; border-radius: var(--radius-s);
	background: var(--bronze); color: #fff; cursor: pointer;
}
.hero-quick { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-quick a { color: #fff; border: 1px solid #5b636b; border-radius: 999px; padding: 4px 14px; font-size: .875rem; text-decoration: none; }
.hero-quick a:hover { background: #353b41; }

.front-section { margin-top: 40px; }
.front-section > h2 { font-size: 1.375rem; margin: 0 0 16px; display: flex; align-items: baseline; gap: 12px; }
.front-section > h2 a { font-family: var(--ff-body); font-size: .875rem; font-weight: 400; margin-left: auto; }

/* ===== ティアリスト ===== */
.tier-list { display: grid; gap: 8px; }
.tier-row { display: grid; grid-template-columns: 56px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.tier-row-head { display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--ff-display); font-weight: 800; font-size: 1.5rem; }
.tier-row-head.tier-SS, .tier-row-head.tier-S { background: var(--tier-s); }
.tier-row-head.tier-A { background: var(--tier-a); }
.tier-row-head.tier-B { background: var(--tier-b); }
.tier-row-head.tier-C { background: var(--tier-c); }
.tier-row-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.busho-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-size: .9375rem; background: #fafbfa; }
.busho-chip img { width: 32px; height: 32px; object-fit: cover; border-radius: 2px; }
.busho-chip:hover { border-color: var(--verdigris); }

/* ===== 記事リスト ===== */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.post-list li + li { border-top: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px; text-decoration: none; color: var(--ink); }
.post-list .thumb { aspect-ratio: 16 / 10; background: #e3e7e3; border-radius: var(--radius-s); overflow: hidden; }
.post-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list .title { font-weight: 700; line-height: 1.5; }
.post-list time { display: block; font-size: .75rem; color: var(--ink-soft); }
.post-list a:hover .title { color: var(--verdigris); text-decoration: underline; }

.guide-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.guide-steps li { counter-increment: step; }
.guide-steps a { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 700; }
.guide-steps a::before { content: counter(step); flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--verdigris); color: #fff; font-size: .875rem; }

/* ===== 武将一覧（絞り込み） ===== */
.filter-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; margin-bottom: 16px; }
.filter-panel input[type="search"] { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.filter-group { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-group .label { font-size: .8125rem; color: var(--ink-soft); width: 100%; }
@media (min-width: 640px) { .filter-group .label { width: 4.5em; } }
.chip-btn { font: inherit; font-size: .875rem; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--verdigris); border-color: var(--verdigris); color: #fff; }
.filter-count { font-size: .875rem; color: var(--ink-soft); margin: 0 0 8px; }
.busho-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow-x: auto; }
.busho-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.busho-table th, .busho-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.busho-table th { background: #eef1ee; font-size: .8125rem; position: sticky; top: 0; }
.busho-table th button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; font-weight: 700; }
.busho-table th button[data-dir="asc"]::after { content: " ▲"; }
.busho-table th button[data-dir="desc"]::after { content: " ▼"; }
.busho-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.busho-table .name-cell a { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.busho-table .name-cell img { width: 36px; height: 36px; object-fit: cover; border-radius: 2px; }
.busho-table tr[hidden] { display: none; }
@media (max-width: 639px) { .busho-table .col-stat { display: none; } }
.empty-state { padding: 24px; text-align: center; color: var(--ink-soft); }

/* ===== 武将個別 ===== */
.busho-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.busho-head .portrait { width: 112px; aspect-ratio: 3 / 4; background: #e3e7e3; border-radius: var(--radius-s); overflow: hidden; position: relative; }
.busho-head .portrait img { width: 100%; height: 100%; object-fit: cover; }
.busho-head .portrait .seal { position: absolute; right: -6px; bottom: -6px; }
.busho-head .reading { font-size: .875rem; color: var(--ink-soft); margin: 0; }
.busho-head .entry-title { margin: 0 0 8px; }
.busho-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9375rem; margin: 0; padding: 0; list-style: none; }
.busho-facts .k { color: var(--ink-soft); font-size: .8125rem; margin-right: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; }
.stat-grid div { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.stat-grid dt { font-size: .8125rem; color: var(--ink-soft); }
.stat-grid dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pros-cons { display: grid; gap: 12px; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-cons section { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px; }
.pros-cons h3 { margin: 0 0 8px !important; border: 0 !important; padding: 0 !important; font-size: 1rem !important; }
.pros-cons ol, .pros-cons ul { margin: 0; padding-left: 1.3em; }
.pros-cons .pros h3 { color: var(--verdigris); }
.pros-cons .cons h3 { color: var(--seal); }
.pros-cons .fix { display: block; font-size: .875rem; color: var(--ink-soft); }
.senpo { border-left: 4px solid var(--bronze); background: #fbf8f2; padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.senpo strong { font-family: var(--ff-display); font-size: 1.1rem; }

/* ===== 編成 ===== */
.formation { display: grid; gap: 8px; }
@media (min-width: 640px) { .formation { grid-template-columns: repeat(3, 1fr); } }
.formation .slot { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px; background: #fafbfa; }
.formation .slot-role { font-size: .8125rem; color: var(--ink-soft); }
.formation .slot.is-main { border-color: var(--seal); border-width: 2px; }
.formation .slot a { font-weight: 700; font-size: 1.0625rem; }
.formation-meta { font-size: .9375rem; }

/* ===== 広告 ===== */
.ad-slot { margin: 24px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot .ad-label { display: block; font-size: .6875rem; color: var(--ink-soft); margin-bottom: 4px; }

/* ===== サイドバー ===== */
.sidebar .widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; margin-bottom: 16px; }
.sidebar .widget-title { font-size: 1rem; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--verdigris); }
.sidebar ul { margin: 0; padding-left: 1.2em; }

/* ===== ページ送り・フッター ===== */
.pagination { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); text-decoration: none; }
.pagination .current { background: var(--verdigris); color: #fff; border-color: var(--verdigris); }
.site-footer { background: var(--ink); color: #c9cfd4; font-size: .8125rem; padding: 32px 0; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.site-footer .rights { line-height: 1.7; }

/* ===== コメント・フォーム ===== */
.comments-area { margin-top: 32px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border-bottom: 1px solid var(--line); padding: 12px 0; }
input[type="text"], input[type="email"], textarea { font: inherit; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.button, input[type="submit"], button[type="submit"] { font: inherit; font-weight: 700; background: var(--verdigris); color: #fff; border: 0; border-radius: var(--radius-s); padding: 10px 20px; cursor: pointer; }
.form-msg { padding: 10px 14px; border-radius: var(--radius-s); background: #e6f0ee; }
.form-msg.is-error { background: #f8e7e6; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== WordPress標準の検索ブロック（サイドバー） ===== */
.wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.wp-block-search__input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.wp-block-search__button { white-space: nowrap; flex: 0 0 auto; padding: 8px 14px; margin: 0; }
.sidebar .wp-block-heading { font-size: 1rem; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--verdigris); }

/* =====================================================================
   古代中国風スキン（漆黒・朱・青銅・竹簡）
   色や模様はここだけで定義しているので、この区切り以降を消せば元のデザインに戻ります。
   ===================================================================== */
:root {
	--bg: #e8dfca;            /* 絹布：くすんだ生成り */
	--surface: #f8f3e7;       /* 竹簡の白 */
	--ink: #231c17;           /* 墨 */
	--ink-soft: #5e5247;
	--line: #cbbd9d;          /* 竹の継ぎ目 */
	--lacquer: #1c1512;       /* 秦の漆黒 */
	--lacquer-2: #2b201a;
	--verdigris: #8e2a1e;     /* 見出し・リンク：朱を少し沈めた色 */
	--verdigris-deep: #6a1d14;
	--seal: #b3261e;          /* 朱印 */
	--bronze: #b08a3e;        /* 青銅の金 */
	--bronze-deep: #7d5f26;
	--tier-s: #b3261e;
	--tier-a: #b08a3e;
	--tier-b: #3f5a4c;        /* 青銅の緑青 */
	--tier-c: #6b5f55;
	--ff-brush: "Yuji Syuku", "Shippori Mincho B1", serif;
	/* 雷紋（回紋）の帯 */
	--fret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cg fill='none' stroke='%23b08a3e' stroke-width='1.6'%3E%3Cpath d='M1 13V1h11v9H5V5h3'/%3E%3Cpath d='M15 1v12h11V4h-7v5h3'/%3E%3C/g%3E%3C/svg%3E");
	/* 竹簡の縦じま */
	--slips: repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 22px, rgba(60,40,20,.10) 22px 23px, rgba(255,255,255,.18) 23px 24px);
}

body {
	background-color: var(--bg);
	background-image:
		radial-gradient(ellipse at 50% -10%, rgba(255,255,255,.35), transparent 60%),
		repeating-linear-gradient(0deg, rgba(90,60,30,.035) 0 1px, transparent 1px 3px);
}
a { color: var(--verdigris); }
a:hover { color: var(--verdigris-deep); }
:focus-visible { outline-color: var(--seal); }

/* ---- ヘッダー：漆黒＋雷紋の帯 ---- */
.site-header { background: var(--lacquer); position: relative; padding-bottom: 14px; }
.site-header::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
	background: var(--lacquer) var(--fret) repeat-x center / auto 14px;
	border-top: 1px solid var(--bronze-deep);
}
.site-title { font-family: var(--ff-brush); font-weight: 400; font-size: 1.5rem; letter-spacing: .06em; }
.site-title a { color: #f3e7c9; }
.site-header .unofficial { color: var(--bronze); border: 1px solid var(--bronze-deep); padding: 0 6px; border-radius: 2px; }
.nav-toggle { border-color: var(--bronze-deep); color: #f3e7c9; }
.primary-nav a { color: #eadcb8; font-family: var(--ff-display); }
.primary-nav a { border-top-color: #3a2c22; }
@media (min-width: 860px) {
	.primary-nav a:hover, .primary-nav .current-menu-item > a { background: transparent; color: #fff; box-shadow: inset 0 -2px 0 var(--seal); }
}

/* ---- トップの見出し：竹簡を並べた漆黒の板 ---- */
.hero {
	background: var(--slips), linear-gradient(180deg, var(--lacquer-2), var(--lacquer));
	position: relative; overflow: hidden; padding: 48px 0 56px;
}
.hero::before {
	/* 大きな「覇」の透かし */
	content: "覇"; position: absolute; right: -0.05em; top: 50%; transform: translateY(-50%);
	font-family: var(--ff-brush); font-size: clamp(10rem, 34vw, 22rem); line-height: 1;
	color: rgba(179, 38, 30, .16); pointer-events: none;
}
.hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
	background: var(--fret) repeat-x center / auto 14px; opacity: .9;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-family: var(--ff-brush); font-weight: 400; color: #f6ead0; letter-spacing: .08em; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.hero p { color: #d8c8a6; }
.hero-search input { background: #f8f3e7; border: 1px solid var(--bronze); }
.hero-search button, .hero-search button[type="submit"] { background: var(--seal); border: 1px solid #d0493d; }
.hero-quick a { border-color: var(--bronze-deep); color: #eadcb8; }
.hero-quick a:hover { background: rgba(176,138,62,.18); }

/* ---- 本文の箱：竹簡の紙 ---- */
.content-box, .filter-panel, .busho-table-wrap, .post-list, .sidebar .widget, .tier-row, .guide-steps a {
	background-color: var(--surface);
	border-color: var(--line);
	box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 0 rgba(60,40,20,.08);
}
.content-box { border-top: 3px solid var(--lacquer); }

/* 見出し：漆塗りの札＋朱の小印 */
.entry-title, .front-section > h2 { color: var(--lacquer); }
.front-section > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); position: relative; }
.front-section > h2::before {
	content: ""; display: inline-block; width: .7em; height: .7em; background: var(--seal);
	transform: rotate(45deg); margin-right: .1em; flex: 0 0 auto; align-self: center;
}
.entry-content h2 {
	background: var(--lacquer); color: #f3e7c9; border-radius: 0;
	border-left: 6px solid var(--seal); position: relative; padding-bottom: 16px;
}
.entry-content h2::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
	background: var(--fret) repeat-x left center / auto 6px; opacity: .8;
}
.entry-content h3 { border-left-color: var(--seal); }
.entry-content th { background: #ece2cb; }
.note-box { background: #f6ecd6; border-color: var(--bronze); }

/* ---- 評価・ランキング：青銅と朱 ---- */
.tier-row-head { font-family: var(--ff-brush); font-weight: 400; font-size: 1.7rem; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.tier-row-head.tier-A { background: linear-gradient(160deg, #c8a457, var(--bronze-deep)); }
.tier-row-head.tier-SS, .tier-row-head.tier-S { background: linear-gradient(160deg, #c8382c, #7e1a12); }
.busho-chip { background: #fbf7ec; border-color: var(--line); }
.busho-chip:hover { border-color: var(--seal); }
.seal { background: #fbf7ec; }
.seal.is-900 { background: var(--seal); color: #fff6e6; border-color: #7e1a12; }

/* ---- 表 ---- */
.busho-table th { background: var(--lacquer); color: #eadcb8; }
.busho-table th button { color: #eadcb8; }
.busho-table tbody tr:nth-child(even) { background: rgba(176,138,62,.06); }
.busho-table tbody tr:hover { background: rgba(179,38,30,.06); }
.chip-btn { background: #fbf7ec; border-color: var(--line); }
.chip-btn[aria-pressed="true"] { background: var(--seal); border-color: var(--seal); color: #fff; }

/* ---- 初心者ガイドの番号：朱の丸印 ---- */
.guide-steps a::before { background: var(--seal); font-family: var(--ff-display); }

/* ---- ボタン ---- */
.button, input[type="submit"], button[type="submit"], .wp-block-search__button {
	background: var(--seal); color: #fff6e6; border: 1px solid #7e1a12;
}
.button:hover, input[type="submit"]:hover, button[type="submit"]:hover { background: #8e1f17; }

/* ---- 武将ページ ---- */
.busho-head .portrait { border: 2px solid var(--bronze); background: #d9ccb0; }
.stat-grid div { background: #fbf7ec; border-color: var(--line); }
.senpo { background: #f6ecd6; border-left-color: var(--seal); }
.pros-cons section { background: #fbf7ec; }
.pros-cons .pros h3 { color: var(--tier-b); }
.formation .slot { background: #fbf7ec; }

/* ---- サイドバー見出し ---- */
.sidebar .widget-title, .sidebar .wp-block-heading { border-bottom-color: var(--seal); font-family: var(--ff-display); }

/* ---- フッター：漆黒＋雷紋 ---- */
.site-footer { background: var(--lacquer); color: #bfae8c; position: relative; padding-top: 46px; }
.site-footer::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px;
	background: var(--fret) repeat-x center / auto 14px; border-bottom: 1px solid var(--bronze-deep);
}
.site-footer a { color: #f3e7c9; }

.pagination .current { background: var(--seal); border-color: var(--seal); }
/* ナビは本文書体でコンパクトに（明朝だと横幅が足りず2段になるため） */
.primary-nav a { font-family: var(--ff-body); font-weight: 700; letter-spacing: .02em; }
@media (min-width: 860px) {
	.site-header .wrap { flex-wrap: nowrap; }
	.primary-nav a { padding: 8px 10px; font-size: .9375rem; white-space: nowrap; }
}
@media (min-width: 860px) and (max-width: 1080px) {
	.site-header .unofficial { display: none; }
	.primary-nav a { padding: 8px 7px; font-size: .875rem; }
}

/* ---- 個性タグ・基本データ表・戦法の系統 ---- */
.busho-basic th { width: 9em; white-space: nowrap; }
.kosei-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kosei-tag { display: inline-block; padding: 1px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fbf7ec; font-size: .875rem; text-decoration: none; color: var(--ink); }
.kosei-tag:hover { border-color: var(--seal); color: var(--seal); }
.senpo-meta { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; }
.senpo-meta span { color: var(--ink-soft); margin-right: 4px; }

/* ---- 武将の顔画像・ゲーム画面 ---- */
.busho-head { grid-template-columns: clamp(120px, 30vw, 210px) 1fr; gap: 20px; }
.busho-head .portrait { width: 100%; aspect-ratio: 13 / 14; border: 3px solid var(--bronze); box-shadow: 0 0 0 1px var(--lacquer), 0 6px 14px rgba(40,20,10,.25); }
.busho-head .portrait img { object-position: 50% 20%; }
.busho-head .portrait .seal { right: -8px; bottom: -8px; }
.busho-gallery { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .busho-gallery { grid-template-columns: 1fr 1fr; } }
.busho-gallery figure { margin: 0; background: var(--lacquer); border: 1px solid var(--bronze-deep); padding: 4px 4px 0; border-radius: 3px; }
.busho-gallery img { display: block; width: 100%; height: auto; border-radius: 2px; }
.busho-gallery figcaption { color: #eadcb8; font-size: .8125rem; padding: 6px 4px 8px; font-family: var(--ff-display); }
.busho-table .name-cell img, .busho-chip img { object-position: 50% 15%; }
.busho-table .name-cell img { border: 1px solid var(--bronze); }

/* =========================================================
 * イベントカレンダー（1.4.0）
 * ======================================================= */
.ev-intro { font-size: .9375rem; color: var(--ink-soft); margin: 0 0 6px; }
.ev-updated { font-size: .8125rem; color: var(--ink-soft); margin: 0 0 16px; }
.ev-filters { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); margin: 0 0 20px; display: grid; gap: 8px; }
.ev-filters .filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-filters .label { font-weight: 700; font-size: .8125rem; min-width: 5em; color: var(--ink-soft); }
.ev-filter-help { margin: 0; font-size: .75rem; color: var(--ink-soft); }

.ev-section { margin: 0 0 28px; }
.ev-section-title {
	display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding: 8px 12px;
	font-family: var(--ff-display); font-size: 1.2rem; color: #f3e7c9; background: var(--lacquer);
	border-left: 6px solid var(--seal);
}
.ev-section.is-upcoming .ev-section-title { border-left-color: var(--bronze); }
.ev-section.is-ended .ev-section-title { border-left-color: #6b5f55; background: #3a302a; }
.ev-count { font-family: var(--ff-body); font-size: .75rem; font-weight: 400; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.15); }
.ev-section-lead { margin: 0 0 8px; font-size: .8125rem; color: var(--ink-soft); }

.ev-list { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.ev-list::before { content: ""; position: absolute; left: 31px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.ev-item { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 0; }
.ev-item { border-top: 1px dashed var(--line); }
.ev-list { clip-path: inset(1px 0 0 0); } /* 先頭の区切り線を隠す（絞り込みで先頭が変わっても崩れない） */
.ev-date {
	position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: flex; flex-direction: column;
	align-items: center; justify-content: center; background: #fbf7ec; border: 2px solid var(--bronze); line-height: 1.1;
}
.ev-md { font-family: var(--ff-display); font-weight: 800; font-size: .95rem; }
.ev-wd { font-size: .6875rem; color: var(--ink-soft); }
.ev-item.is-ongoing .ev-date { border-color: var(--seal); background: var(--seal); color: #fff6e6; }
.ev-item.is-ongoing .ev-wd { color: #f3d9c9; }
.ev-item.is-ended { opacity: .82; }
.ev-item.is-ended .ev-date { border-color: #b5a991; }
.ev-head { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-bottom: 2px; }
.ev-badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: var(--radius-s); color: #fff; background: #6b5f55; }
.ev-badge small { font-weight: 400; font-size: .6875rem; }
.ev-badge.is-ongoing { background: var(--seal); }
.ev-badge.is-upcoming { background: var(--bronze-deep, #7d5f26); }
.ev-badge.is-tbd { background: transparent; color: var(--bronze-deep, #7d5f26); border: 1px dashed var(--bronze); }
.ev-place, .ev-tag { font-size: .75rem; padding: 0 6px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--ink-soft); background: #fbf7ec; }
.ev-item.place-out .ev-place { border-color: #3f5a4c; color: #3f5a4c; }
.ev-title { display: block; font-weight: 700; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); text-decoration: none; }
.ev-title:hover { color: var(--verdigris); text-decoration: underline; }
.ev-period { font-size: .875rem; font-variant-numeric: tabular-nums; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .8125rem; color: var(--ink-soft); }
.ev-note { color: var(--verdigris-deep); }
.ev-excerpt { margin: 4px 0 0; font-size: .875rem; line-height: 1.7; }
.ev-item[hidden], .ev-month[hidden] { display: none; }

.ev-month { border: 1px solid var(--line); border-radius: var(--radius-m); margin: 0 0 8px; background: rgba(255,255,255,.35); }
.ev-month > summary { cursor: pointer; padding: 8px 12px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.ev-month > summary .ev-count { background: var(--line); color: var(--ink); }
.ev-month .ev-list { padding: 0 12px 4px 16px; }
.ev-month .ev-list::before { left: 43px; }

/* トップ・サイドの小さい一覧 */
.ev-compact { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.ev-compact li + li { border-top: 1px solid var(--line); }
.ev-compact a { display: grid; gap: 2px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.ev-compact .ev-badge { justify-self: start; }
.ev-compact .t { font-weight: 700; line-height: 1.5; }
.ev-compact .p { font-size: .75rem; color: var(--ink-soft); }
.ev-compact a:hover .t { color: var(--verdigris); text-decoration: underline; }
.sidebar .ev-compact { border: 0; background: transparent; }
.sidebar .ev-compact a { padding: 8px 0; }
.widget-more { margin: 8px 0 0; font-size: .8125rem; text-align: right; }

/* 個別ページ */
.ev-single-badge { margin: 0 0 4px; }
.ev-lead { font-size: 1rem; margin: 0 0 16px; }
.ev-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .9375rem; }
.ev-table th, .ev-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.ev-table th { background: #ece2cb; width: 7em; white-space: nowrap; }
.ev-reward { margin: 0; padding-left: 1.2em; }
.ev-h2 { font-family: var(--ff-display); font-size: 1.15rem; margin: 24px 0 8px; padding-bottom: 4px; border-bottom: 2px solid var(--lacquer); }
.ev-sources { margin: 0; padding-left: 1.2em; font-size: .875rem; word-break: break-all; }
.ev-caution { font-size: .75rem; color: var(--ink-soft); margin: 16px 0; padding: 8px 10px; background: #f6ecd6; border-left: 3px solid var(--bronze); }
.ev-list.is-compact .ev-excerpt { display: none; }
.ev-back { text-align: center; margin: 24px 0 0; }

@media (max-width: 600px) {
	.ev-item { grid-template-columns: 46px 1fr; gap: 10px; }
	.ev-date { width: 46px; height: 46px; }
	.ev-md { font-size: .8125rem; }
	.ev-list::before { left: 26px; }
	.ev-month .ev-list::before { left: 38px; }
	.ev-filters .label { min-width: 100%; }
}
.ev-filters .filter-group { margin: 0; }
