/* ============================================================
   ピタベン 子テーマ：サイト全体のデザイン
   方針：紺を基調に、アクセント1色（分野ごとに設定画面で変更）。
         装飾は控えめにし、相談者が「探しやすい」ことを優先。
   クラス名：テーマ側は pbt-、プラグイン側は pb- で始まります。
   ============================================================ */

/* ------------------------------------------------------------
   デザイントークン（全ページ共通）。色・文字・余白・角丸・影はここで変える。
   プラグイン側の --pb-* もここから上書きされるため、全ページで統一される。
   ------------------------------------------------------------ */
:root {
	/* 文字サイズ */
	--pbt-fs-xs: 12px;
	--pbt-fs-sm: 14px;
	--pbt-fs-base: 16.5px;
	--pbt-fs-md: 18px;
	--pbt-fs-lg: 20px;
	--pbt-fs-xl: 26px;
	--pbt-fs-2xl: 34px;
	/* 余白 */
	--pbt-space-1: 4px;
	--pbt-space-2: 8px;
	--pbt-space-3: 12px;
	--pbt-space-4: 16px;
	--pbt-space-5: 24px;
	--pbt-space-6: 32px;
	--pbt-space-7: 48px;
	--pbt-space-8: 72px;
	/* 角丸 */
	--pbt-radius-sm: 6px;
	--pbt-radius-md: 8px;
	--pbt-radius: 10px;
	--pbt-radius-lg: 14px;
	--pbt-radius-pill: 999px;
	/* 影 */
	--pbt-shadow-sm: 0 1px 2px rgba(12, 28, 54, .06);
	--pbt-shadow: 0 1px 2px rgba(12, 28, 54, .06), 0 4px 16px rgba(12, 28, 54, .06);
	--pbt-shadow-lg: 0 12px 32px rgba(12, 28, 54, .16);
	/* プラグインの部品にも同じ値を使う */
	--pb-radius: var(--pbt-radius);
	--pb-radius-sm: var(--pbt-radius-sm);
	--pb-shadow: var(--pbt-shadow);
}

:root {
	--pb-navy: #13294b;
	--pb-navy-deep: #0c1c36;
	--pb-accent: #c2410c;
	--pbt-ink: #1c2530;
	--pbt-muted: #5a6573;
	--pbt-line: #dbe1e8;
	--pbt-soft: #f3f5f8;
	--pbt-wide: 1120px;
	--pbt-gutter: 20px;
	--pbt-header-h: 68px;
}

html { scroll-padding-top: calc(var(--pbt-header-h) + 12px); }
body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
	font-feature-settings: "palt" 0;
	overflow-wrap: anywhere;
	line-break: strict;
}
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; margin-block-end: 0; }
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }

:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--pb-accent); outline-offset: 2px; }

.pbt-skip {
	position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--pbt-radius-sm);
	background: var(--pb-navy); color: #fff; text-decoration: none;
}
.pbt-skip:focus { top: 8px; }

/* ---------- ヘッダー ---------- */
.pbt-header { background: #fff; border-bottom: 1px solid var(--pbt-line); }
.pbt-header__inner {
	display: flex; align-items: center; gap: 24px; max-width: var(--pbt-wide); min-height: var(--pbt-header-h);
	margin: 0 auto; padding: 0 var(--pbt-gutter);
}
.pbt-logo {
	display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--pb-navy);
	text-decoration: none; line-height: 1; white-space: nowrap;
}
.pbt-logo__mark {
	position: relative; width: 26px; height: 26px; border-radius: 7px 7px 7px 2px; background: var(--pb-navy); flex: none;
}
.pbt-logo__mark::after {
	content: ""; position: absolute; right: 5px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--pb-accent);
}
.pbt-logo__brand { font-size: 24px; font-weight: 700; letter-spacing: .06em; }
.pbt-logo__field {
	padding: 5px 9px 6px; border-radius: 4px; background: var(--pb-accent); color: #fff;
	font-size: 14px; font-weight: 700; letter-spacing: .08em;
}
.pbt-nav { margin-left: auto; }
.pbt-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pbt-nav a {
	display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: var(--pbt-radius-sm);
	color: var(--pbt-ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.pbt-nav a .pb-icon { color: var(--pb-navy); }
.pbt-nav a:hover { background: var(--pbt-soft); color: var(--pb-navy); }
.pbt-menu-toggle { display: none; }

@media (max-width: 860px) {
	:root { --pbt-header-h: 60px; }
	.pbt-header__inner { gap: 12px; padding: 0 12px 0 16px; }
	.pbt-logo__brand { font-size: 21px; }
	.pbt-logo__field { font-size: 13px; padding: 4px 7px 5px; }
	.pbt-menu-toggle {
		display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
		margin-left: auto; min-width: 48px; min-height: 48px; padding: 2px 6px; border: 0; border-radius: var(--pbt-radius-sm);
		background: transparent; color: var(--pb-navy); font: inherit; cursor: pointer;
	}
	.pbt-menu-toggle__label { font-size: 10px; line-height: 1; font-weight: 700; }
	.pbt-menu-toggle__close { display: none; }
	.pbt-menu-toggle[aria-expanded="true"] .pbt-menu-toggle__open { display: none; }
	.pbt-menu-toggle[aria-expanded="true"] .pbt-menu-toggle__close { display: block; }
	.pbt-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: #fff;
		border-bottom: 1px solid var(--pbt-line); box-shadow: var(--pbt-shadow-lg);
	}
	.pbt-nav.is-open { display: block; }
	.pbt-header { position: relative; }
	.pbt-nav ul { flex-direction: column; gap: 0; padding: 8px 12px 16px; }
	.pbt-nav li + li { border-top: 1px solid var(--pbt-line); }
	.pbt-nav a { min-height: 56px; padding: 0 8px; font-size: 16px; }
}
.no-js .pbt-nav { display: block; position: static; }

/* ---------- ファーストビュー ---------- */
.pbt-hero {
	position: relative; overflow: hidden; background: var(--pb-navy); color: #fff;
	isolation: isolate;
}
.pbt-hero__bg { position: absolute; inset: 0; z-index: -1; }
.pbt-hero__bg svg { width: 100%; height: 100%; display: block; }
.pbt-hero__inner {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
	max-width: var(--pbt-wide); margin: 0 auto; padding: var(--pbt-space-8) var(--pbt-gutter) 112px;
}
.pbt-hero__text { max-width: 660px; }
.pbt-hero__eyebrow {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, .35); border-radius: var(--pbt-radius-pill); font-size: 14px; font-weight: 500; letter-spacing: .06em;
}
.pbt-hero__pulse { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--pb-accent); }
.pbt-hero__pulse::after {
	content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--pb-accent);
	animation: pbt-pulse 1.8s ease-out infinite;
}
@keyframes pbt-pulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.pbt-hero__title {
	margin: 0; color: #fff; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); line-height: 1.32;
	font-weight: 700; letter-spacing: .04em;
}
.pbt-hero__sub { margin: 22px 0 0; max-width: 34em; font-size: 16.5px; line-height: 1.85; color: rgba(255, 255, 255, .86); }
.pbt-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.pbt-hero__chips a {
	display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px 8px 14px;
	border-radius: var(--pbt-radius-md); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28);
	color: #fff; text-decoration: none; font-size: 16px; font-weight: 700;
}
.pbt-hero__chips a .pb-icon { color: var(--pb-accent); }
.pbt-hero__chips a:hover { background: rgba(255, 255, 255, .18); }
.pbt-hero__stat {
	display: flex; flex-direction: column; align-items: flex-start; flex: none; padding: 18px 22px;
	border-left: 3px solid var(--pb-accent); background: rgba(12, 28, 54, .55); line-height: 1.2;
}
.pbt-hero__stat-label { font-size: 13px; color: rgba(255, 255, 255, .8); }
.pbt-hero__stat-num { margin-top: 6px; font-size: 44px; font-weight: 700; font-feature-settings: "tnum"; letter-spacing: .02em; }
.pbt-hero__stat-unit { font-size: 13px; color: rgba(255, 255, 255, .8); }

.pbt-search-wrap { position: relative; z-index: 3; max-width: var(--pbt-wide); margin: -64px auto 0 !important; padding: 0 var(--pbt-gutter); }

/* ---------- トップのセクション ---------- */
.pbt-front { padding-bottom: 0; }
.pbt-section { padding: var(--pbt-space-8) var(--pbt-gutter); margin: 0 !important; }
.pbt-section > * { max-width: var(--pbt-wide); margin-left: auto !important; margin-right: auto !important; }
.pbt-section--soft { background: var(--pbt-soft); }
.pbt-section--howto { padding-top: 64px; }
.pbt-section--last { padding-top: 24px; }
.pbt-section__title {
	position: relative; margin-top: 0 !important; margin-bottom: 28px !important; padding-top: 18px;
	font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem) !important; color: var(--pb-navy);
}
.pbt-section__title::before {
	content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 4px; border-radius: 2px; background: var(--pb-accent);
}
.pbt-section .pb-regions { margin-top: 0; }

.pbt-howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.pbt-howto__item {
	position: relative; padding: 24px 24px 22px; border: 1px solid var(--pbt-line); border-radius: var(--pbt-radius); background: #fff;
}
.pbt-howto__item:not(:last-child)::after {
	content: ""; position: absolute; right: -12px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
	border-top: 2px solid #9fb0c6; border-right: 2px solid #9fb0c6; transform: rotate(45deg);
}
.pbt-howto__num { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--pb-accent); }
.pbt-howto__icon {
	display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 10px 0 8px;
	border-radius: 50%; background: var(--pbt-soft); color: var(--pb-navy);
}
.pbt-howto__title { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--pb-navy); }
.pbt-howto__text { margin: 0; font-size: 15px; line-height: 1.75; color: #3a4553; }
.pbt-howto__note { margin: 16px 0 0 !important; font-size: 13px; color: var(--pbt-muted); }

.pbt-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pbt-columns__item a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.pbt-columns__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--pbt-radius-md); background: var(--pbt-soft); }
.pbt-columns__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pbt-columns__noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #9fb0c6; }
.pbt-columns__meta { display: flex; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--pbt-muted); }
.pbt-columns__meta span { color: var(--pb-navy); font-weight: 500; }
.pbt-columns__title { margin-top: 4px; font-size: 16.5px; font-weight: 700; line-height: 1.6; color: var(--pb-navy); }
.pbt-columns__item a:hover .pbt-columns__title { text-decoration: underline; }
.pbt-columns__item a:hover img { transform: scale(1.03); }
.pbt-more { margin: 24px 0 0 !important; text-align: right; }
.pbt-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; color: var(--pb-navy); text-decoration: none; }
.pbt-more a:hover { text-decoration: underline; }

.pbt-offices-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px;
	border-radius: var(--pbt-radius-lg); background: var(--pb-navy-deep, #0c1c36); color: #fff;
}
.pbt-offices-cta p { margin: 0; }
.pbt-offices-cta__label { font-size: 13px; letter-spacing: .1em; color: rgba(255, 255, 255, .7); }
.pbt-offices-cta__title { font-size: 17px; font-weight: 700; line-height: 1.6; }
.pbt-offices-cta__btn {
	display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 52px; padding: 0 24px;
	border-radius: var(--pbt-radius-sm); background: #fff; color: var(--pb-navy); font-weight: 700; text-decoration: none;
}
.pbt-offices-cta__btn:hover { background: var(--pbt-soft); }

/* ---------- 記事・固定ページ ---------- */
.pbt-main { padding: 0 var(--pbt-gutter) 80px; }
.pbt-main > .pb-block--breadcrumb { margin-top: 0; }
.pbt-article__head { margin-top: 12px !important; }
.pbt-article__title { margin-top: 12px !important; margin-bottom: 0 !important; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem) !important; line-height: 1.5 !important; }
.pbt-article__meta { gap: 12px; margin-top: 12px !important; font-size: 14px; color: var(--pbt-muted); }
.pbt-article__meta .wp-block-post-terms a {
	display: inline-block; padding: 1px 10px; border-radius: 4px; background: var(--pbt-soft); color: var(--pb-navy);
	font-size: 13px; text-decoration: none;
}
.pbt-article__eyecatch img { border-radius: var(--pbt-radius); }
.pbt-article__search { margin-top: 56px !important; }

.pbt-content { margin-top: 32px !important; font-size: 16.5px; line-height: 1.9; }
.pbt-content > * + * { margin-block-start: 1.4em; }
.pbt-content p { margin: 0 0 1.4em; }
.pbt-content h2 {
	margin: 2.6em 0 1em; padding: .65em .9em; border-left: 5px solid var(--pb-accent);
	background: var(--pbt-soft); border-radius: 0 6px 6px 0; font-size: 1.4rem; line-height: 1.55;
}
.pbt-content h3 {
	margin: 2.2em 0 .9em; padding-bottom: .45em; border-bottom: 2px solid var(--pbt-line);
	font-size: 1.2rem; line-height: 1.6; position: relative;
}
.pbt-content h3::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 3em; height: 2px; background: var(--pb-navy); }
.pbt-content h4 { margin: 2em 0 .8em; font-size: 1.05rem; }
.pbt-content ul:not([class]), .pbt-content ol:not([class]) { padding-left: 1.5em; }
.pbt-content li { margin: .3em 0; }
.pbt-content img { border-radius: var(--pbt-radius-sm); height: auto; }
.pbt-content table:not([class]) { width: 100%; border-collapse: collapse; }
.pbt-content table:not([class]) th, .pbt-content table:not([class]) td { padding: .7em 1em; border: 1px solid var(--pbt-line); }
.pbt-content blockquote { margin: 1.6em 0; padding: 1em 1.4em; border-left: 4px solid var(--pbt-line); background: #fafbfc; color: #3a4553; }
.pbt-content a { color: var(--pb-navy); }
.pbt-page .pbt-content h2:first-child { margin-top: 1em; }

/* ---------- 記事一覧 ---------- */
.pbt-archive .pbt-article__title { margin-bottom: 32px !important; }
.pbt-list__grid { gap: 24px !important; }
.pbt-list__item { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--pbt-line); border-radius: var(--pbt-radius); overflow: hidden; background: #fff; }
.pbt-list__thumb { margin: 0 !important; }
.pbt-list__thumb img { display: block; }
.pbt-list__body { padding: 16px 18px 18px; }
.pbt-list__body > * { margin-top: 0 !important; }
.pbt-list__title { margin-top: 4px !important; font-size: 17px !important; line-height: 1.6 !important; }
.pbt-list__title a { color: var(--pb-navy); text-decoration: none; }
.pbt-list__title a:hover { text-decoration: underline; }
.pbt-list__excerpt { margin-top: 8px !important; font-size: 14px; color: #3a4553; line-height: 1.75; }
.pbt-list__excerpt .wp-block-post-excerpt__more-text { display: none; }
.wp-block-query-pagination { margin-top: 40px !important; gap: 6px; }
.wp-block-query-pagination a, .wp-block-query-pagination .current {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--pbt-line); border-radius: var(--pbt-radius-sm); text-decoration: none;
}
.wp-block-query-pagination .current { background: var(--pb-navy); color: #fff; border-color: var(--pb-navy); }

/* ---------- フッター ---------- */
.pbt-footer { background: var(--pb-navy-deep, #0c1c36); color: rgba(255, 255, 255, .85); font-size: 14px; line-height: 1.8; }
.pbt-footer__inner {
	display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; max-width: var(--pbt-wide);
	margin: 0 auto; padding: 56px var(--pbt-gutter) 40px;
}
.pbt-footer .pbt-logo { color: #fff; margin-bottom: 14px; }
.pbt-footer .pbt-logo__mark { background: #fff; }
.pbt-footer__desc { margin: 0 0 12px; }
.pbt-footer__disclaimer { margin: 0; padding: 12px 14px; border-radius: var(--pbt-radius-sm); background: rgba(255, 255, 255, .06); font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.pbt-footer__title { margin: 0 0 10px; font-weight: 700; color: #fff; font-size: 14.5px; }
.pbt-footer__col ul { margin: 0; padding: 0; list-style: none; }
.pbt-footer__col a { display: inline-flex; align-items: center; min-height: 36px; color: rgba(255, 255, 255, .85); text-decoration: none; }
.pbt-footer__col a:hover { color: #fff; text-decoration: underline; }
.pbt-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.pbt-footer__bottom p { max-width: var(--pbt-wide); margin: 0 auto; padding: 16px var(--pbt-gutter); font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* 記事ページ：本文＋サイドバー */
.pbt-with-sidebar > * { max-width: var(--pbt-wide); margin-left: auto !important; margin-right: auto !important; }
.pbt-with-sidebar__grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; margin-top: 0 !important; }
.pbt-with-sidebar__grid > * { margin-top: 0 !important; }
.pbt-with-sidebar .pbt-article { min-width: 0; max-width: 780px; }
.pbt-with-sidebar .pb-block--sidebar { margin: 0 !important; }
@media (max-width: 1024px) {
	.pbt-with-sidebar__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.pbt-with-sidebar .pbt-article { max-width: none; }
}

/* プラグインの一覧・詳細ページはテーマの余白の中に収める */
.pb-main { min-height: 50vh; }

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 960px) {
	.pbt-footer__inner { grid-template-columns: 1fr 1fr; }
	.pbt-footer__about { grid-column: 1 / -1; }
	.pbt-columns { grid-template-columns: repeat(2, 1fr); }
	.pbt-list__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
	.pbt-hero__inner { flex-direction: column; align-items: flex-start; gap: 20px; padding: 44px 16px 96px; }
	.pbt-hero__eyebrow { font-size: 12.5px; margin-bottom: 16px; }
	.pbt-hero__title { font-size: 2rem; line-height: 1.38; }
	.pbt-hero__sub { margin-top: 16px; font-size: 15px; }
	.pbt-hero__chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 22px; }
	.pbt-hero__chips a { flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; width: 100%; padding: 8px 4px; font-size: 13px; text-align: center; }
	.pbt-hero__stat { flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 14px; }
	.pbt-hero__stat-num { font-size: 28px; margin: 0; }
	.pbt-hero__bg svg { opacity: .65; }
	.pbt-search-wrap { margin-top: -60px !important; padding: 0 12px; }
	.pbt-section { padding: 52px 16px; }
	.pbt-howto { grid-template-columns: 1fr; gap: 12px; }
	.pbt-howto__item { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; padding: 16px; }
	.pbt-howto__num { grid-column: 1 / -1; }
	.pbt-howto__icon { grid-row: span 2; margin: 6px 0 0; }
	.pbt-howto__item:not(:last-child)::after { display: none; }
	.pbt-columns { grid-template-columns: 1fr; gap: 24px; }
	.pbt-offices-cta { flex-direction: column; align-items: stretch; padding: 22px 20px; }
	.pbt-offices-cta__btn { justify-content: center; }
	.pbt-main { padding: 0 16px 64px; }
	.pbt-content { font-size: 16px; line-height: 1.85; }
	.pbt-content h2 { font-size: 1.22rem; padding: .6em .8em; }
	.pbt-content h3 { font-size: 1.1rem; }
	.pbt-list__grid { grid-template-columns: 1fr !important; }
	.pbt-footer__inner { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px 28px; }
	.pbt-footer__col a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.pbt-hero__pulse::after { animation: none; }
	.pbt-columns__thumb img { transition: none; }
}

/* ============================================================
   v2.0：ヘッダー（ロゴ・メニュー・検索・お気に入り）
   ============================================================ */
.pbt-header__inner { gap: 16px; }
.pbt-header__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pbt-logo { gap: 8px; }
.pbt-logo__mark { width: 30px; height: 30px; border-radius: 0; background: none; }
.pbt-logo__mark::after { display: none; }
.pbt-header__tagline { margin: 0; padding-left: 12px; border-left: 1px solid var(--pbt-line); font-size: 12px; color: var(--pbt-muted); line-height: 1.4; white-space: nowrap; }
.pbt-nav { margin-left: auto; }
.pbt-nav__search { display: none; }
.pbt-header__tools { display: flex; align-items: center; gap: 2px; }
.pbt-tool {
	position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
	min-width: 52px; min-height: 48px; padding: 2px 6px; border: 0; border-radius: var(--pbt-radius-md); background: none;
	color: var(--pb-navy); font: inherit; text-decoration: none; cursor: pointer;
}
.pbt-tool:hover { background: var(--pbt-soft); }
.pbt-tool__label { font-size: 10px; font-weight: 700; line-height: 1; }
.pbt-tool__badge {
	position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--pb-accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.pbt-tool__badge[hidden], .pbt-search[hidden], .pbt-totop[hidden] { display: none !important; }
.pbt-search { border-top: 1px solid var(--pbt-line); background: var(--pbt-soft); }
.pbt-search__form { display: flex; gap: 8px; max-width: var(--pbt-wide); margin: 0 auto; padding: 12px var(--pbt-gutter); }
.pbt-search__form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid #b9c5d3; border-radius: var(--pbt-radius-md); font: inherit; font-size: 16px; background: #fff; }
.pbt-search__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--pbt-radius-md); background: var(--pb-navy); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 1100px) {
	.pbt-header__tagline { display: none; }
}
@media (max-width: 960px) {
	.pbt-header__inner { gap: 4px; padding: 0 8px 0 16px; }
	.pbt-menu-toggle { margin-left: 0; }
	.pbt-tool--search { display: none; }
	.pbt-nav__search { display: flex; gap: 8px; padding: 0 12px 16px; }
	.pbt-nav__search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid #b9c5d3; border-radius: var(--pbt-radius-md); font: inherit; font-size: 16px; }
	.pbt-nav__search button { width: 52px; border: 0; border-radius: var(--pbt-radius-md); background: var(--pb-navy); color: #fff; display: flex; align-items: center; justify-content: center; }
	.pbt-header__tools { margin-left: auto; }
}
@media (max-width: 860px) {
	.pbt-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: #fff; border-bottom: 1px solid var(--pbt-line); box-shadow: var(--pbt-shadow-lg); }
	.pbt-nav.is-open { display: block; }
}
@media (min-width: 861px) and (max-width: 960px) {
	.pbt-nav a { padding: 0 8px; font-size: 14px; }
	.pbt-nav a .pb-icon { display: none; }
	.pbt-nav__search { display: none; }
}

/* ============================================================
   v2.0：フッター・右端タブ・上部へ戻る
   ============================================================ */
.pbt-footer__inner { grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; }
.pbt-footer .pbt-logo__mark rect { fill: #fff; }
.pbt-footer .pbt-logo__mark circle:first-of-type, .pbt-footer .pbt-logo__mark path { stroke: var(--pb-navy-deep, #0c1c36); }
.pbt-footer__offices { margin: 14px 0 0; }
.pbt-footer__offices a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--pbt-radius-md); color: #fff; font-weight: 700; text-decoration: none; }
.pbt-footer__offices a:hover { background: rgba(255,255,255,.08); }
.pbt-side-tab {
	position: fixed; right: 0; top: 50%; z-index: 40; transform: translateY(-50%);
	padding: 16px 10px; border-radius: var(--pbt-radius-md) 0 0 8px; background: var(--pb-navy); color: #fff;
	writing-mode: vertical-rl; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-decoration: none;
	box-shadow: -2px 4px 14px rgba(12, 28, 54, .2);
}
.pbt-side-tab:hover { background: var(--pb-accent); color: #fff; }
.pbt-totop {
	position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: 24px; z-index: 60; display: flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--pb-navy); border: 1px solid var(--pbt-line);
	box-shadow: 0 4px 14px rgba(12, 28, 54, .16);
}
.pbt-totop:hover { background: var(--pbt-soft); }
body.pb-view-office .pbt-totop, body.pb-portal .pbt-totop { bottom: 96px; }
@media (min-width: 901px) { body.pb-portal .pbt-totop { bottom: 24px; } }
@media (max-width: 1200px) { .pbt-footer__inner { grid-template-columns: 1fr 1fr 1fr; } .pbt-footer__about { grid-column: 1 / -1; } }
@media (max-width: 900px) { .pbt-side-tab { display: none; } }
@media (max-width: 720px) { .pbt-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pbt-footer__inner { grid-template-columns: 1fr; } }

/* ============================================================
   v2.0：トップページのセクション（プラグインのブロック）
   ============================================================ */
.pb-home-sec { padding: var(--pbt-space-8) var(--pbt-gutter); }
.pb-home-sec--soft { background: var(--pbt-soft); }
.pb-home-sec__inner { max-width: var(--pbt-wide); margin: 0 auto; }
.pb-home-sec__title {
	position: relative; margin: 0 0 12px; padding-top: 18px; color: var(--pb-navy);
	font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); line-height: 1.5; font-weight: 700;
}
.pb-home-sec__title::before { content: ""; position: absolute; top: 0; left: 0; width: 40px; height: 4px; border-radius: 2px; background: var(--pb-accent); }
.pb-home-sec__lead { margin: 0 0 24px; color: var(--pbt-muted); }
.pb-home-sec__title + .pb-block, .pb-home-sec__title + .pb-block--areas { margin-top: 24px; }
@media (max-width: 720px) { .pb-home-sec { padding: 52px 16px; } }

/* 全幅ページ（掲載案内） */
.pbt-wide { padding: 0 0 0; }
.pbt-wide > .pb-block--breadcrumb { max-width: var(--pbt-wide); margin: 0 auto !important; padding: 0 var(--pbt-gutter); }
.pbt-wide__content { margin-top: 0 !important; }
.pbt-wide__content > p:empty { display: none; }

/* 404 */
.pbt-404 .pb-home-sec { padding: var(--pbt-space-7) 0 0; }
.pbt-404__search { margin: var(--pbt-space-5) 0 !important; }
.pbt-404__search .wp-block-search__input { min-height: 48px; border-radius: var(--pbt-radius-md); font-size: 16px; }
.pbt-404__search .wp-block-search__button { min-height: 48px; border-radius: var(--pbt-radius-md); background: var(--pb-navy); color: #fff; }

/* 記事末・状況別ページの関連リンク */
.pb-post-links { margin-top: var(--pbt-space-7); }
.pb-post-links .pb-subnav__title { font-weight: 700; color: var(--pb-navy); }
