/* 独自ブロック：目次・相談の案内・相談フォーム・整理ツール */

/* 目次 */
.wp-block-gpte-article-toc { font-size: var(--wp--preset--font-size--small); line-height: 1.7; }
.wp-block-gpte-article-toc summary { font-weight: 700; cursor: pointer; min-height: 44px; display: list-item; padding-block: .5rem; }
.wp-block-gpte-article-toc ol { list-style: none; margin: .5rem 0 0; padding: 0; }
.wp-block-gpte-article-toc li { margin: 0; padding-block: .35rem; }
.wp-block-gpte-article-toc li.is-level-3 { padding-left: 1em; font-size: var(--wp--preset--font-size--x-small); }
.wp-block-gpte-article-toc a { color: inherit; text-decoration: none; }
.wp-block-gpte-article-toc a:hover { text-decoration: underline; text-underline-offset: .18em; }

/* 相談の案内 */
.wp-block-gpte-cta {
	box-sizing: border-box;
	display: grid;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
	padding: var(--wp--preset--spacing--50);
	border-top: 2px solid var(--wp--preset--color--ink);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
@media (min-width: 782px) {
	.wp-block-gpte-cta { grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--wp--preset--spacing--60); }
}
.gpte-cta__heading { margin: 0; color: inherit; font-size: var(--wp--preset--font-size--large); }
.gpte-cta__text { margin: .4rem 0 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.gpte-cta__action { margin: 0; }

/* スマホ下部の案内 */
.wp-block-gpte-mobile-cta {
	position: fixed;
	inset: auto 0 0 0;
	z-index: 90;
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .5rem 18px calc(.5rem + env(safe-area-inset-bottom));
	background: var(--wp--preset--color--card);
	border-top: 1px solid var(--wp--preset--color--line);
}
.wp-block-gpte-mobile-cta[hidden] { display: none; }
.wp-block-gpte-mobile-cta .wp-element-button { flex: 1; text-align: center; text-decoration: none; min-height: 44px; }
.gpte-mobile-cta__close {
	flex: none;
	width: 44px;
	height: 44px;
	border: 1px solid var(--wp--preset--color--line);
	background: transparent;
	color: var(--wp--preset--color--ink);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.wp-block-gpte-mobile-cta.is-preview { position: static; font-size: var(--wp--preset--font-size--x-small); }
@media (min-width: 782px) {
	.wp-block-gpte-mobile-cta { display: none; }
}

/* 相談の受付 */
/* 受付の表示：状態そのものを見出しにして、枠の中にまとめる（トップの相談の帯と同じ書体） */
.wp-block-gpte-consult-form { margin-top: var(--wp--preset--spacing--60); padding: var(--wp--preset--spacing--50); border-top: 3px solid var(--wp--preset--color--accent); background: var(--wp--preset--color--surface); }
.wp-block-gpte-consult-form .gpte-consult__status { margin: 0 0 .5rem; font-size: var(--wp--preset--font-size--large); line-height: 1.5; }
.wp-block-gpte-consult-form > p:last-child { margin-bottom: 0; }
.gpte-consult__handoff {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1rem;
	padding: .75rem 1rem;
	margin-bottom: 1rem;
	background: var(--wp--preset--color--surface);
	font-size: var(--wp--preset--font-size--small);
}
.gpte-consult__handoff[hidden] { display: none; }
.gpte-consult__handoff p { margin: 0; }
.gpte-consult__clear {
	min-height: 44px;
	background: none;
	border: 0;
	padding: 0;
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	font: inherit;
	cursor: pointer;
}
.gpte-consult__success h2:focus,
.gpte-consult__confirm h2:focus { outline: none; }
.gpte-consult__confirm[hidden],
.gpte-consult__success[hidden],
.gpte-consult__form[hidden] { display: none; }
.gpte-consult__confirm h2 { margin-top: 0; font-size: var(--wp--preset--font-size--large); }
.gpte-consult__confirm dl { display: grid; gap: .25rem 1.5rem; margin: 1rem 0; padding: 1rem 0; border-block: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }
.gpte-consult__confirm dt { font-weight: 600; }
.gpte-consult__confirm dd { margin: 0 0 .5rem; white-space: pre-wrap; }
@media (min-width: 600px) {
	.gpte-consult__confirm dl { grid-template-columns: 11rem minmax(0, 1fr); }
	.gpte-consult__confirm dd { margin-bottom: 0; }
}
.gpte-consult__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.gpte-consult__actions .wp-element-button,
.gpte-consult__check { min-height: 48px; border: 0; cursor: pointer; }
.gpte-consult__actions .wp-element-button:disabled,
.gpte-consult__check:disabled { opacity: .6; cursor: not-allowed; }
.wpcf7 input[type="submit"][hidden] { display: none; }
.gpte-consult__check { display: block; margin-top: 1rem; padding: .8rem 2rem; }
.wpcf7 .wpcf7-response-output { margin: 1rem 0 0; padding: .6rem .8rem; border-width: 1px; font-size: var(--wp--preset--font-size--small); }
.wpcf7 .gpte-form-field { margin-bottom: .5rem; }
/* エラー文の場所を先に確保する。表示と消去でレイアウトが動くと、次のクリックが空振りする。 */
.wpcf7 .wpcf7-form-control-wrap { position: relative; display: block; padding-bottom: 1.6rem; }
.wpcf7 .wpcf7-not-valid-tip {
	position: absolute;
	left: 0;
	bottom: .2rem;
	margin: 0;
	color: #b3261e;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	line-height: 1.4;
}
.wpcf7 label { display: block; font-weight: 600; font-size: var(--wp--preset--font-size--small); }
.wpcf7 .gpte-form-hint { font-weight: 400; color: var(--wp--preset--color--muted); }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin-top: .35rem;
	padding: .55rem .7rem;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 2px;
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: 1rem;
}
.wpcf7 .wpcf7-list-item { margin: 0 1.25rem 0 0; }
.wpcf7 .wpcf7-list-item label { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-weight: 400; }
.wpcf7 input[type="submit"] {
	min-height: 48px;
	padding: .8rem 2rem;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:disabled { opacity: .6; cursor: not-allowed; }
.wpcf7 .gpte-form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 整理ツール */
.gpte-tool, .gpte-tool *, .wpcf7, .wpcf7 * { box-sizing: border-box; }
.gpte-tool {
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--card);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 2px;
}
.gpte-tool__form[hidden] { display: none; }
.gpte-tool__noscript p { margin-top: 0; }
.gpte-field { margin: 0 0 1.25rem; padding: 0; border: 0; min-width: 0; }
.gpte-field > label:not(.gpte-check),
.gpte-field legend { display: block; padding: 0; margin-bottom: .35rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.gpte-field-row { display: grid; gap: 0 1.25rem; }
@media (min-width: 600px) {
	.gpte-field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gpte-input-unit { display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.gpte-tool input[type="number"],
.gpte-tool input[type="text"],
.gpte-tool select {
	width: 100%;
	min-width: 0;
	min-height: 48px;
	padding: .55rem .7rem;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 2px;
	background: var(--wp--preset--color--card);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: 1rem;
}
.gpte-choice-grid { display: grid; gap: .5rem; }
@media (min-width: 480px) {
	.gpte-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gpte-choice { display: block; cursor: pointer; }
.gpte-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gpte-choice span {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: .5rem .75rem;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.gpte-choice input:checked + span {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
}
.gpte-choice input:focus-visible + span { outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.gpte-compare-grid { display: grid; gap: 1.25rem; }
@media (min-width: 600px) {
	.gpte-compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.gpte-compare-grid input[type="text"] { margin-bottom: .5rem; }
.gpte-check { display: flex; align-items: flex-start; gap: .5rem; min-height: 44px; padding-block: .45rem; font-size: var(--wp--preset--font-size--small); line-height: 1.6; cursor: pointer; }
.gpte-check input { flex: none; width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--wp--preset--color--accent); }
.gpte-tool__submit { width: 100%; border: 0; cursor: pointer; min-height: 48px; }
.gpte-tool__note { margin: .75rem 0 0; font-size: var(--wp--preset--font-size--x-small); line-height: 1.8; color: var(--wp--preset--color--muted); }
.gpte-tool__output { display: block; white-space: pre-wrap; font-size: var(--wp--preset--font-size--small); line-height: 1.9; }
.gpte-tool__output:not(:empty) { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--wp--preset--color--surface); }
.gpte-tool__after[hidden] { display: none; }
.gpte-tool__after { margin-top: 1rem; display: grid; gap: 1rem; }
.gpte-tool__copy { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.gpte-tool__copy-button {
	min-height: 44px;
	padding: .4rem 1rem;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 2px;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	cursor: pointer;
}
.gpte-tool__copy-status { font-size: var(--wp--preset--font-size--x-small); }
.gpte-tool__status { margin: 0 0 .5rem; font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.gpte-tool__next .wp-element-button { display: inline-block; text-decoration: none; }
.gpte-handoff { margin-bottom: 1rem; }
.gpte-handoff summary { cursor: pointer; min-height: 44px; display: list-item; padding-block: .5rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }

/* スクリプトが使えない環境では、整理ツールのフォームを隠して説明だけを出す（入力内容をURLで送らないため） */
html:not(.gpte-js) .gpte-tool__form { display: none !important; }

/* 画面には出さず、読み上げだけに使う文字 */
.gpte-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 記事の共有 */
.gpte-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.gpte-share__label { margin: 0; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: .06em; }
.gpte-share__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.gpte-share__list li { margin: 0; }
.gpte-share__link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .35rem .95rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--ink);
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}
.gpte-share__link:hover { border-color: var(--wp--preset--color--ink); }
.gpte-share__link:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }
.gpte-share__status { flex-basis: 100%; margin: 0; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
/* リンクとボタンで高さと形をそろえる（ほかのリンクの指定に負けないよう詳細度を上げる） */
.gpte-share .gpte-share__list { align-items: center; }
.gpte-share .gpte-share__list .gpte-share__link { box-sizing: border-box; height: 44px; min-height: 0; min-width: 3.5rem; margin: 0; padding: 0 1rem; justify-content: center; line-height: 1; }
.gpte-share__status:empty { display: none; }

/* 読了の目安 */
.gpte-reading-time { margin: 0; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }

/* あわせて読みたい記事 */
.gpte-post-card { margin-block: var(--wp--preset--spacing--50); }
.gpte-post-card.is-empty { padding: 1rem; border: 1px dashed var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }
.gpte-post-card__label { margin: 0 0 .4rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: .08em; color: var(--wp--preset--color--accent); }
.gpte-post-card__link {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 1rem;
	align-items: center;
	padding: .9rem;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
	color: inherit;
	text-decoration: none;
}
.gpte-post-card__link:hover { border-color: var(--wp--preset--color--ink); }
.gpte-post-card__link:hover .gpte-post-card__title { text-decoration: underline; text-underline-offset: .2em; }
.gpte-post-card__image img, .gpte-post-card__noimage { display: block; width: 96px; height: 96px; object-fit: cover; }
.gpte-post-card__noimage { display: grid; place-items: center; padding: .25rem; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--muted); font-size: 10px; text-align: center; line-height: 1.4; }
.gpte-post-card__text { display: grid; gap: .2rem; min-width: 0; }
.gpte-post-card__term { font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); }
.gpte-post-card__title { font-weight: 700; line-height: 1.55; }
.gpte-post-card__excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--muted); line-height: 1.6; }
@media (max-width: 599px) {
	.gpte-post-card__link { grid-template-columns: 72px minmax(0, 1fr); gap: .75rem; }
	.gpte-post-card__image img, .gpte-post-card__noimage { width: 72px; height: 72px; }
	.gpte-post-card__excerpt { display: none; }
}

/* 更新の記録 */
.gpte-update-notes { padding-top: var(--wp--preset--spacing--40); border-top: 1px solid var(--wp--preset--color--line); }
.gpte-update-notes__title { margin: 0 0 .5rem; font-family: inherit; font-size: var(--wp--preset--font-size--small); font-weight: 700; letter-spacing: .06em; }
.gpte-update-notes__list { margin: 0; padding: 0; list-style: none; font-size: var(--wp--preset--font-size--small); }
.gpte-update-notes__list li { display: flex; flex-wrap: wrap; gap: 0 1rem; padding-block: .3rem; }
.gpte-update-notes__list time { flex: none; color: var(--wp--preset--color--muted); font-variant-numeric: tabular-nums; }

/* キーワードで絞り込む（分類の一覧） */
.gpte-tag-filter { margin-top: var(--wp--preset--spacing--40); }
.gpte-tag-filter.is-preview { padding: .75rem; border: 1px dashed var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }
.gpte-tag-filter__label { margin: 0 0 .5rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: .08em; color: var(--wp--preset--color--muted); }
.gpte-tag-filter__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.gpte-tag-filter__list li { margin: 0; }
.gpte-tag-filter__list a { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .95rem; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; background: var(--wp--preset--color--base); color: var(--wp--preset--color--ink); font-size: var(--wp--preset--font-size--small); text-decoration: none; }
.gpte-tag-filter__list a:hover { border-color: var(--wp--preset--color--ink); }
.gpte-tag-filter__list a[aria-current="page"] { border-color: var(--wp--preset--color--ink); background: var(--wp--preset--color--ink); color: var(--wp--preset--color--base); }

/* 「先頭に固定表示」した記事の目印（トップの主な欄だけ）。所有者が選んだ記事にだけ付く。 */
:is(.gpte-g-lead, .gpte-n-lead) li.gpte-pick .gpte-card-text::before,
.gpte-j-hero li.gpte-pick .gpte-j-slip::before {
	content: "編集部のおすすめ";
	display: inline-block;
	margin-bottom: .35rem;
	padding: .1rem .5rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.6;
}

/* 広告を含む記事の表示（PR） */
.gpte-pr-note { display: flex; gap: .65rem; align-items: flex-start; margin-block: 0 var(--wp--preset--spacing--40); padding: .65rem .9rem; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; background: var(--wp--preset--color--surface); font-size: var(--wp--preset--font-size--x-small); line-height: 1.7; }
.gpte-pr-note__badge { flex: none; padding: .05rem .55rem; border-radius: 4px; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--base); font-weight: 700; letter-spacing: .08em; }

/* 商品の紹介カード */
.gpte-product { margin-block: var(--wp--preset--spacing--50); padding: var(--wp--preset--spacing--40); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; background: var(--wp--preset--color--card); }
.gpte-product .wp-block-columns { gap: var(--wp--preset--spacing--40); margin: 0; }
.gpte-product figure { margin: 0; }
.gpte-product img { display: block; width: 100%; height: auto; border-radius: 10px; aspect-ratio: 1; object-fit: cover; }
.gpte-product__label { margin: 0 0 .2rem; color: var(--wp--preset--color--accent); font-size: var(--wp--preset--font-size--x-small); font-weight: 700; letter-spacing: .06em; }
.gpte-product h3 { margin: 0 0 .5rem; line-height: 1.5; }
.gpte-product p { margin: 0 0 .5rem; }
.gpte-product ul { margin: 0 0 .6rem; padding-left: 1.3em; }
.gpte-product__caution { padding: .5rem .75rem; border-radius: 8px; background: var(--wp--preset--color--surface); font-size: var(--wp--preset--font-size--small); }

/* 広告リンクのボタン */
.gpte-ad-link { margin-block: .75rem 0; }
.gpte-ad-link__button { display: inline-block; text-decoration: none; }
.gpte-ad-link__note { margin: .4rem 0 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }
.gpte-ad-link.is-empty { padding: .6rem .8rem; border: 1px dashed var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--x-small); }
.gpte-article-body .gpte-product h3 { margin-top: 0; padding: 0; border: 0; }
.gpte-article-body .gpte-product h3::before, .gpte-article-body .gpte-product h3::after { content: none; }
