/*
Theme Name: X-SMART Blog
Description: ブログ型アフィリエイトサイト共通のオリジナルテーマ(英会話 X-SMART ほか)。案件(アフィリエイトリンク)の一元管理・比較表・ランキング・広告バナー・目次・PR 表記つき。サイトごとの設定は site-config.php。
Version: 0.6.9
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: xsmart-blog
*/

:root {
	--accent: #2563eb;
	--accent-dark: #1e40af;
	--accent-soft: #eff6ff;
	--cta: #f97316;
	--cta-hover: #ea580c;
	--text: #1f2937;
	--muted: #6b7280;
	--line: #e5e7eb;
	--bg: #f6f7f9;
	--surface: #fff;
	--good: #16a34a;
	--good-soft: #f0fdf4;
	--bad: #dc2626;
	--bad-soft: #fef2f2;
	--warn: #d97706;
	--warn-soft: #fffbeb;
	--radius: 10px;
	--shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 14px rgba(15, 23, 42, .05);
	--font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, input { font: inherit; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 820px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 8px 12px; background: #000; color: #fff; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- ヘッダー ---------- */
.header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.3; letter-spacing: .02em; }
.logo a { color: var(--text); text-decoration: none; }
.logo img { max-height: 48px; width: auto; }
.header__tagline { margin: 0; color: var(--muted); font-size: .8rem; flex: 1; }
.header__menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 10px; font-size: .8rem; cursor: pointer; }
.header__menu-btn span, .header__menu-btn span::before { display: inline-block; width: 16px; height: 2px; background: var(--text); vertical-align: middle; margin-right: 6px; position: relative; }
.header__menu-btn span::before { content: ""; position: absolute; top: -5px; left: 0; box-shadow: 0 10px 0 var(--text); }

/* 検索欄は PC ではロゴの行の右、スマホでは開いたメニューの中 */
.header__search { margin-left: auto; width: 280px; flex-shrink: 0; }
.header__search .search-form input { background: var(--bg); }
.header__search .search-form button { background: var(--accent); }
.nav__search { display: none; }

/* メニューは 1 行で横幅いっぱいに均等に並べる(入りきらない幅では横にスクロール) */
.nav { background: var(--accent); }
.nav__inner { display: flex; align-items: center; }
.nav__list { display: flex; flex-wrap: nowrap; justify-content: space-between; list-style: none; margin: 0; padding: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav__list::-webkit-scrollbar { display: none; }
.nav__list li { flex: 0 0 auto; }
.nav__list a { display: block; padding: 12px 14px; color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.nav__list a:hover, .nav__list .current-menu-item a { background: rgba(255, 255, 255, .15); }

.search-form { display: flex; }
.search-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; padding: 6px 10px; background: #fff; font-size: .9rem; }
.search-form button { border: 0; border-radius: 0 8px 8px 0; background: var(--accent-dark); color: #fff; padding: 6px 12px; cursor: pointer; font-size: .85rem; }

@media (max-width: 767px) {
	.header__inner { min-height: 56px; }
	.logo { font-size: 1.15rem; }
	.header__tagline { display: none; }
	.header__menu-btn { display: block; }
	.nav { display: none; }
	.nav.is-open { display: block; }
	.nav__inner { flex-direction: column; align-items: stretch; padding-bottom: 12px; }
	.nav__list { flex-direction: column; }
	.nav__list a { border-bottom: 1px solid rgba(255, 255, 255, .15); }
	.header__search { display: none; }
	.nav__search { display: block; padding: 12px 0 0; }
	.nav__list { overflow: visible; }
	.nav__list a { white-space: normal; }
}
/* タブレット・狭い PC: 1 行に入らないので 4 列でそろえて並べる */
@media (min-width: 768px) and (max-width: 1099px) {
	.header__tagline { display: none; }
	.nav__list { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
	.nav__list a { padding: 9px 8px; font-size: .85rem; text-align: center; }
}

/* ---------- PR 表記・パンくず ---------- */
.pr-notice { margin: 12px 0 0; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: .8rem; line-height: 1.6; }
/* TOP はパンくずが無く、すぐ下が大見出しの帯なので下にも余白を取る */
.home .wrap > .pr-notice { margin-bottom: 12px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 12px 0 0; padding: 0; font-size: .8rem; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin: 0 .5em; }
.breadcrumb a { color: var(--muted); }

/* ---------- レイアウト ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 20px; margin-bottom: 40px; }
@media (min-width: 1024px) {
	.layout { grid-template-columns: minmax(0, 1fr) 300px; }
	.sidebar__sticky { position: sticky; top: 16px; }
}
.wrap--narrow > main { margin: 20px 0 40px; }

.section-title { margin: 0 0 16px; padding-left: 12px; border-left: 5px solid var(--accent); font-size: 1.25rem; line-height: 1.4; }
.front-section { margin: 36px 0; }
.more { text-align: right; margin: 12px 0 0; font-size: .9rem; }
.more a::after { content: " ›"; }
.empty { padding: 24px; background: var(--surface); border-radius: var(--radius); }

/* ---------- TOP ---------- */
.hero { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%); color: #fff; padding: 48px 0; }
.hero__title { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.4; }
.hero__text { margin: 12px 0 0; max-width: 720px; opacity: .95; }
.hero__text { word-break: auto-phrase; }
@media (min-width: 768px) { .hero__text .sentence { display: inline-block; } }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.hero .xb-btn { background: #fff; color: var(--accent-dark) !important; border: 2px solid #fff; }
.hero .xb-btn--ghost { background: transparent; color: #fff !important; border-color: rgba(255, 255, 255, .8); }
.hero .xb-btn:hover { background: var(--accent-soft); }
.hero .xb-btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.front-entry { margin-top: 24px; }

/* ---------- 記事カード ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cards--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card__link { display: block; color: var(--text); text-decoration: none; height: 100%; }
.card__link:hover { color: var(--text); }
.card__img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.card__img--none { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--accent-soft), #fff); color: var(--accent); font-weight: 700; font-size: .95rem; }
.card__body { padding: 12px 14px 14px; }
.card__title { margin: 0; font-size: 1rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 0; color: var(--muted); font-size: .75rem; }
.card__cat { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.cards--pickup .card { outline: 2px solid var(--accent-soft); }

.list-header { margin-bottom: 20px; }
.list-header__title { margin: 0; font-size: 1.5rem; line-height: 1.4; }
.list-header__desc { margin-top: 8px; color: var(--muted); font-size: .9rem; }
.list-header__count { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }

.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 32px 0; }
.pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-align: center; text-decoration: none; color: var(--text); font-size: .9rem; }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- 記事 ---------- */
.post { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 32px 32px; }
.post .pr-notice { margin: 0 0 16px; }
.post__title { margin: 0; font-size: clamp(1.4rem, 3.2vw, 1.9rem); line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 12px 0 0; color: var(--muted); font-size: .8rem; }
.post-cat { padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; }
.post-cat:hover { color: #fff; background: var(--accent-dark); }
.post__thumb { margin: 20px 0 0; }
.post__thumb img { width: 100%; border-radius: 8px; }
.post__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; font-size: .85rem; }
.post__tags a { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); text-decoration: none; }
@media (max-width: 767px) {
	.post { padding: 18px 16px 24px; border-radius: 0; margin: 0 -16px; box-shadow: none; }
}

/* 本文 */
.entry { margin-top: 24px; font-size: 1.02rem; }
.entry > *:first-child { margin-top: 0; }
.entry p { margin: 0 0 1.4em; }
.entry h2 { margin: 2.6em 0 1em; padding: .55em .8em; background: var(--accent); color: #fff; border-radius: 6px; font-size: 1.35rem; line-height: 1.45; }
.entry h3 { margin: 2.2em 0 .9em; padding: .2em 0 .2em .7em; border-left: 5px solid var(--accent); border-bottom: 1px solid var(--line); font-size: 1.18rem; line-height: 1.5; }
.entry h4 { margin: 1.8em 0 .8em; font-size: 1.05rem; color: var(--accent-dark); }
.entry h4::before { content: "■ "; }
.entry ul, .entry ol { margin: 0 0 1.4em; padding-left: 1.5em; }
.entry li { margin: .3em 0; }
.entry strong { background: linear-gradient(transparent 62%, #fde68a 62%); }
.entry blockquote { margin: 0 0 1.4em; padding: 12px 16px; border-left: 4px solid var(--line); background: var(--bg); color: #4b5563; }
.entry figure { margin: 0 0 1.4em; }
.entry figcaption { color: var(--muted); font-size: .8rem; text-align: center; }
.entry img { border-radius: 6px; }
.entry hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.6; }
.entry th, .entry td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.entry thead th, .entry th[scope="row"] { background: var(--accent-soft); }
.xb-table, .entry .wp-block-table { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.xb-table--wide table, .xb-compare table { min-width: 600px; }
.entry table { word-break: auto-phrase; }
/* スマホ: 表の文字を少し小さく。横に長い表は 1 列目(サービス名)を固定し、横にスクロールできることを示す */
@media (max-width: 599px) {
	.entry table { font-size: .82rem; }
	.entry th, .entry td { padding: 7px 8px; }
	.xb-table--fit th:first-child, .xb-table--fit td:first-child { width: 32%; }
	.xb-table--wide::before, .xb-compare::before { content: "← 横にスクロールできます →"; position: sticky; left: 0; display: block; margin-bottom: 4px; color: var(--muted); font-size: .72rem; text-align: center; }
	.xb-table--wide table, .xb-compare table { border-collapse: separate; border-spacing: 0; }
	.xb-table--wide th, .xb-table--wide td, .xb-compare th, .xb-compare td { border-width: 0 1px 1px 0; }
	.xb-table--wide tr > :first-child, .xb-compare tr > :first-child { position: sticky; left: 0; z-index: 1; min-width: 6.5em; max-width: 7.5em; border-left-width: 1px; background: var(--surface); box-shadow: 2px 0 4px rgba(15, 23, 42, .08); }
	.xb-table--wide thead tr > :first-child { background: var(--accent-soft); }
	.xb-compare thead tr > :first-child { background: var(--accent); }
	.xb-table--wide tr:first-child > *, .xb-compare tr:first-child > * { border-top-width: 1px; }
}

/* 目次 */
.toc { margin: 0 0 2em; padding: 16px 20px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); font-size: .92rem; }
.toc__title { margin: 0 0 8px !important; font-weight: 700; }
.toc__list, .toc__list ol { margin: 0 !important; padding-left: 1.4em !important; }
.toc__list ol { list-style: disc; font-size: .88rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc--side { display: none; margin-bottom: 20px; background: var(--surface); max-height: calc(100vh - 40px); overflow-y: auto; font-size: .85rem; }
.toc--side .toc__list ol { display: none; }
.toc--side a.is-current { color: var(--accent); font-weight: 700; }
@media (min-width: 1024px) { .toc--side { display: block; } }

/* ---------- 記事の部品(inc/parts.php) ---------- */
.xb-box { margin: 0 0 1.6em; padding: 0 18px 4px; border: 2px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.xb-box__title { display: inline-block; margin: -1px 0 12px -20px !important; padding: 4px 14px; border-radius: var(--radius) 0 var(--radius) 0; background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; }
.xb-box__body > *:last-child { margin-bottom: 1em; }
.xb-box--summary { background: var(--accent-soft); }
.xb-box--check { border-color: var(--good); }
.xb-box--check .xb-box__title { background: var(--good); }
.xb-box--check ul { list-style: none; padding-left: .2em; }
.xb-box--check li::before { content: "✓ "; color: var(--good); font-weight: 700; }
.xb-box--memo { border-color: #9ca3af; background: #fafafa; }
.xb-box--memo .xb-box__title { background: #6b7280; }
.xb-box--warn { border-color: var(--warn); background: var(--warn-soft); }
.xb-box--warn .xb-box__title { background: var(--warn); }
.xb-box--good { border-color: var(--good); background: var(--good-soft); }
.xb-box--good .xb-box__title { background: var(--good); }
.xb-box--bad { border-color: var(--bad); background: var(--bad-soft); }
.xb-box--bad .xb-box__title { background: var(--bad); }

.xb-btn-wrap { text-align: center; }
.xb-btn { display: inline-block; padding: 12px 28px; border-radius: 999px; background: var(--accent); color: #fff !important; font-weight: 700; text-decoration: none; transition: background .15s; }
.xb-btn:hover { background: var(--accent-dark); }

.xb-faq { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.xb-faq__q { padding: 12px 40px 12px 16px; font-weight: 700; cursor: pointer; list-style: none; position: relative; }
.xb-faq__q::-webkit-details-marker { display: none; }
.xb-faq__q::before { content: "Q. "; color: var(--accent); }
.xb-faq__q::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.2rem; color: var(--muted); }
.xb-faq[open] .xb-faq__q::after { content: "−"; }
.xb-faq__a { padding: 0 16px 4px 16px; border-top: 1px dashed var(--line); }
.xb-faq__a::before { content: "A."; display: block; margin-top: 10px; color: var(--cta); font-weight: 700; }

.xb-steps ol { list-style: none; counter-reset: step; padding-left: 0; }
.xb-steps li { counter-increment: step; position: relative; margin: 0 0 14px; padding: 12px 16px 12px 64px; background: var(--bg); border-radius: 8px; }
.xb-steps li::before { content: "STEP\A" counter(step); white-space: pre; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 40px; text-align: center; color: var(--accent); font-size: .7rem; font-weight: 800; line-height: 1.2; }

/* ---------- 案件(inc/offers.php) ---------- */
.xb-aff-link { font-weight: 700; }
.xb-pixel { position: absolute; width: 1px !important; height: 1px !important; border: 0 !important; opacity: 0; }
.xb-cta-btn { display: inline-block; min-width: 260px; max-width: 100%; padding: 14px 28px; border-radius: 999px; background: var(--cta); color: #fff !important; font-weight: 800; text-align: center; text-decoration: none; box-shadow: 0 4px 0 var(--cta-hover); transition: transform .1s, box-shadow .1s; }
.xb-cta-btn::after { content: " ›"; }
.xb-cta-btn, .xb-btn { word-break: auto-phrase; text-wrap: balance; }
@media (max-width: 599px) {
	.xb-cta-btn { display: block; min-width: 0; width: 100%; padding: 13px 16px; border-radius: 14px; font-size: .95rem; line-height: 1.5; }
	.xb-compare .xb-cta-btn { display: inline-block; width: auto; border-radius: 999px; }
}
.xb-cta-btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--cta-hover); }
.xb-offer-btn-wrap { text-align: center; margin: 1.6em 0; }

.xb-offer { position: relative; margin: 0 0 2em; padding: 18px 20px 22px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.xb-offer__head { display: flex; align-items: center; gap: 12px; }
.xb-offer__name { flex: 1; margin: 0 !important; font-size: 1.2rem; font-weight: 800; line-height: 1.4; }
.xb-offer__pr { padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: .7rem; }
.xb-offer__rank { flex: none; display: flex; align-items: baseline; justify-content: center; width: 52px; height: 52px; padding-top: 8px; border-radius: 50%; background: #94a3b8; color: #fff; font-size: 1.4rem; font-weight: 800; line-height: 1; }
.xb-offer__rank small { font-size: .7rem; }
.xb-offer--rank1 { border-color: #eab308; }
.xb-offer--rank1 .xb-offer__rank { background: linear-gradient(135deg, #facc15, #ca8a04); }
.xb-offer--rank2 .xb-offer__rank { background: linear-gradient(135deg, #cbd5e1, #64748b); }
.xb-offer--rank3 .xb-offer__rank { background: linear-gradient(135deg, #f59e0b, #9a3412); }
.xb-offer__catch { margin: 10px 0 0 !important; color: var(--accent-dark); font-weight: 700; }
.xb-offer__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
@media (min-width: 640px) { .xb-offer__main:has(.xb-offer__banner, .xb-offer__thumb) { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.xb-offer__banner, .xb-offer__thumb { display: block; text-align: center; }
.xb-offer__banner img, .xb-offer__thumb img { border-radius: 6px; }
.xb-offer__rating { margin: 0 0 6px !important; font-size: .9rem; }
.xb-offer__features { list-style: none; margin: 0 0 10px !important; padding: 0 !important; font-size: .92rem; }
.xb-offer__features li { position: relative; padding-left: 1.4em; }
.xb-offer__features li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.xb-offer__spec { margin: 0; font-size: .88rem; }
.xb-offer__spec div { display: flex; gap: 8px; padding: 4px 0; border-top: 1px dashed var(--line); }
.xb-offer__spec dt { flex: none; width: 5em; color: var(--muted); }
.xb-offer__spec dd { margin: 0; font-weight: 700; }
.xb-offer__pros { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 14px; font-size: .88rem; }
@media (min-width: 640px) { .xb-offer__pros { grid-template-columns: 1fr 1fr; } }
.xb-offer__good, .xb-offer__bad { list-style: none; margin: 0 !important; padding: 10px 12px !important; border-radius: 8px; }
.xb-offer__good { background: var(--good-soft); }
.xb-offer__bad { background: var(--bad-soft); }
.xb-offer__good li::before { content: "◯ "; color: var(--good); font-weight: 700; }
.xb-offer__bad li::before { content: "△ "; color: var(--bad); font-weight: 700; }
.xb-offer__text { margin: 14px 0 0 !important; font-size: .92rem; }
.xb-offer__action { margin: 18px 0 0 !important; text-align: center; }

.xb-stars { position: relative; display: inline-block; color: #e5e7eb; letter-spacing: .05em; vertical-align: -1px; }
.xb-stars__fg { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #f59e0b; }
.xb-stars__num { margin-left: 4px; font-weight: 800; color: #b45309; }

.xb-compare table { font-size: .85rem; }
.xb-compare th[scope="col"] { background: var(--accent); color: #fff; text-align: center; }
.xb-compare td { text-align: center; }
.xb-compare .xb-cta-btn { min-width: 0; padding: 8px 12px; font-size: .8rem; box-shadow: none; }

/* ---------- 広告バナー(inc/ads.php) ---------- */
.xb-ads { margin: 20px 0; text-align: center; }
.xb-ad { margin: 0 auto 12px; }
.xb-ad__label { display: block; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.xb-ad__body { display: inline-block; max-width: 100%; overflow: hidden; }
@media (max-width: 599px) { .xb-ad--pc { display: none; } }
@media (min-width: 600px) { .xb-ad--sp { display: none; } }

/* ---------- シェア・書いた人・関連記事 ---------- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; }
.share__label { width: 100%; color: var(--muted); font-size: .8rem; }
.share__btn { flex: 1 1 auto; padding: 8px 12px; border: 0; border-radius: 6px; color: #fff; background: #374151; font-size: .8rem; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.share__btn:hover { color: #fff; opacity: .9; }
.share__btn--x { background: #000; }
.share__btn--facebook { background: #1877f2; }
.share__btn--line { background: #06c755; }
.share__btn--hatena { background: #00a4de; }
.author-box { margin: 32px 0 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.author-box__head { margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.author-box__body { display: flex; gap: 14px; align-items: flex-start; }
.author-box__img { flex: none; border-radius: 50%; }
.author-box__name { margin: 0; font-weight: 800; }
.author-box__text { margin: 4px 0 0; font-size: .88rem; }
.author-box__body p:last-child { margin-bottom: 0; font-size: .85rem; }
.author-box__policy { margin: 10px 0 0; font-size: .8rem; }
.related { margin-top: 36px; }

/* ---------- サイドバー ---------- */
.sidebar .widget { margin: 0 0 24px; padding: 16px 18px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); font-size: .9rem; }
.widget__title { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-size: 1rem; }
.widget ul { margin: 0; padding: 0; list-style: none; }
.widget li { padding: 6px 0; border-bottom: 1px dashed var(--line); line-height: 1.5; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--text); text-decoration: none; }
.widget a:hover { color: var(--accent); }
.sidebar .xb-ads { margin-top: 0; }
/* ブロックのウィジェット(WordPress の初期のウィジェットなど) */
.widget h2.wp-block-heading, .widget .wp-block-search__label { display: block; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); font-size: 1rem; font-weight: 700; }
.wp-block-search__inside-wrapper { display: flex; }
.wp-block-search__input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px 0 0 8px; padding: 6px 10px; }
.wp-block-search__button { margin: 0; border: 0; border-radius: 0 8px 8px 0; background: var(--accent-dark); color: #fff; padding: 6px 12px; white-space: nowrap; cursor: pointer; }
.entry p:empty { display: none; }

/* ---------- フッター ---------- */
.footer { margin-top: 40px; padding: 32px 0 24px; background: #111827; color: #d1d5db; font-size: .85rem; }
.footer a { color: #e5e7eb; }
.footer__widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer__widgets .widget__title { border-color: #374151; color: #fff; }
.footer__name { margin: 0; font-size: 1.1rem; font-weight: 800; }
.footer__name a { text-decoration: none; }
.footer__text { margin: 6px 0 0; color: #9ca3af; }
.footer__menu { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 16px 0 0; padding: 0; }
.footer__pr { margin: 16px 0 0; color: #9ca3af; font-size: .75rem; }
.footer__copy { margin: 12px 0 0; color: #6b7280; font-size: .75rem; }

.notfound .search-form { max-width: 480px; margin: 20px 0; }

/* ---------- TOP: 大見出しのリンク(hero_links)・案内(front_cta) ---------- */
.hero__links-title { margin: 28px 0 10px; font-weight: 700; font-size: .95rem; opacity: .95; }
.hero__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .hero__links { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } }
.hero__links a { display: block; height: 100%; padding: 12px 14px; border-radius: 10px; background: #fff; color: var(--accent-dark); text-decoration: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); transition: transform .15s; }
.hero__links a:hover { transform: translateY(-2px); color: var(--accent-dark); }
.hero__links strong { display: block; font-size: .98rem; }
.hero__links strong::after { content: " ›"; }
.hero__links span { display: block; margin-top: 2px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.front-cta { display: grid; grid-template-columns: 1fr auto; gap: 4px 20px; align-items: center; margin: 24px 0 0; padding: 20px 24px; border: 2px solid var(--cta); border-radius: var(--radius); background: #fff7ed; color: var(--text); text-decoration: none; }
.front-cta:hover { color: var(--text); background: #ffedd5; }
.front-cta__label { grid-column: 1; color: var(--cta-hover); font-size: .8rem; font-weight: 700; }
.front-cta__title { grid-column: 1; font-size: 1.2rem; line-height: 1.4; }
.front-cta__text { grid-column: 1; color: var(--muted); font-size: .88rem; }
.front-cta__btn { grid-column: 2; grid-row: 1 / span 3; padding: 12px 22px; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 800; white-space: nowrap; }
@media (max-width: 599px) {
	.front-cta { grid-template-columns: 1fr; }
	.front-cta__btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* ---------- おすすめ診断 [xb_finder](inc/finder.php) ---------- */
.xb-finder__q { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.xb-finder__q legend { padding: 0 6px; font-weight: 800; font-size: 1.02rem; }
.xb-finder__num { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: .85rem; }
.xb-finder__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.xb-finder__opt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); cursor: pointer; font-size: .92rem; }
.xb-finder__opt[hidden] { display: none; }
.xb-finder__opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; }
.xb-finder__opt input { accent-color: var(--accent); }
.xb-finder__submit { text-align: center; }
.xb-finder__submit .xb-btn { border: 0; cursor: pointer; font-size: 1rem; padding: 14px 36px; }
.xb-finder__result { margin-top: 32px; scroll-margin-top: 16px; }
.xb-finder__title { margin: 0 0 16px !important; }
.xb-finder__reason { margin: 0 0 6px !important; font-weight: 700; color: var(--accent-dark); }
.xb-finder__more { margin: -1.2em 0 2em !important; text-align: right; font-size: .9rem; }
.xb-finder__note { color: var(--muted); font-size: .85rem; }
.xb-finder__again { text-align: center; }
.xb-finder__retry { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 8px 18px; cursor: pointer; }

/* ---------- 右下の案内ボタン(float_cta) ---------- */
.float-cta { position: fixed; right: 16px; bottom: 16px; z-index: 60; }
.float-cta[hidden] { display: none; }
.float-cta__link { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 999px; background: var(--cta); color: #fff !important; text-decoration: none; box-shadow: 0 6px 18px rgba(234, 88, 12, .35); animation: float-cta-hop 4s ease-in-out infinite; }
.float-cta__link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(249, 115, 22, .55); animation: float-cta-ring 2.4s ease-out infinite; }
.float-cta__link:hover { background: var(--cta-hover); }
.float-cta__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--cta-hover); }
.float-cta__body { display: grid; line-height: 1.3; }
.float-cta__label { font-size: .98rem; }
.float-cta__text { font-size: .75rem; opacity: .95; }
.float-cta__close { position: absolute; top: -8px; right: -6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: #374151; color: #fff; font-size: 14px; line-height: 24px; cursor: pointer; }
@keyframes float-cta-hop {
	0%, 72%, 100% { transform: translateY(0); }
	78% { transform: translateY(-10px); }
	84% { transform: translateY(0); }
	89% { transform: translateY(-5px); }
	94% { transform: translateY(0); }
}
@keyframes float-cta-ring {
	0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .55); }
	70%, 100% { box-shadow: 0 0 0 14px rgba(249, 115, 22, 0); }
}
@media (max-width: 599px) {
	.float-cta { right: 12px; bottom: 12px; }
	.float-cta__link { padding: 8px 14px 8px 8px; }
	.float-cta__icon { width: 38px; height: 38px; }
	.float-cta__text { font-size: .72rem; }
	/* ページの一番下(フッター)がボタンに隠れないように */
	body:has(.float-cta:not([hidden])) .footer { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
	.float-cta__link, .float-cta__link::before { animation: none; }
}
@media print { .float-cta { display: none; } }
