/* ==========================================================================
   基本の文字組み（要素セレクタのみ。部品のスタイルは components.css に置く）
   値はすべて tokens.css の変数を経由する。
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-jp);
	font-size: var(--fs-16);
	font-weight: var(--weight-regular);
	line-height: var(--lh-16);
	-webkit-font-smoothing: antialiased;
	overflow-wrap: anywhere;
	word-break: normal;
	line-break: strict;
}

/* 見出しはゴシック（2026-11-04 本人：すべての見出しをゴシックに。2026-11-08 名前もゴシックに。明朝は Hero のコピーだけ） */
h1,
h2,
h3,
h4 {
	margin: 0;
	font-family: var(--font-jp);
	font-weight: var(--weight-medium);
	word-break: keep-all; /* 文節の区切り（<wbr>。kento_phrase_units）でだけ改行 */
}

h1 {
	font-size: var(--fs-32);
	line-height: var(--lh-32);
}

h2 {
	font-size: var(--fs-24);
	line-height: var(--lh-24);
}

h3 {
	font-size: var(--fs-20);
	line-height: var(--lh-20);
}

h4 {
	font-size: var(--fs-18);
	line-height: var(--lh-18);
}

@media (min-width: 1024px) {
	h1 {
		font-size: var(--fs-40);
		line-height: var(--lh-40);
	}

	h2 {
		font-size: var(--fs-32);
		line-height: var(--lh-32);
	}
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
	margin: 0;
}

ul,
ol {
	padding: 0;
	list-style: none;
}

a {
	color: var(--color-accent);
	text-decoration-thickness: var(--line-width);
	text-underline-offset: 0.2em;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

table {
	border-collapse: collapse;
}

:focus-visible {
	outline: var(--focus-width) solid var(--color-accent);
	outline-offset: var(--focus-width);
}

/* 読み上げ専用（WordPress標準のクラス名） */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* 見出しは、2行になるときに行の長さをそろえる（2026-10-22 本人指摘：「もらう」だけの行）。対応していないブラウザでは通常の折り返し。
   段落は通常の折り返し（スマホでは行末をそろえる。components.css）。最後の行が数文字になるのは template-tags.php の
   kento_keep_tail で、不自然な位置での改行は原稿の {{ }}（kento_phrase_units）で個別に止める */
h1,
h2,
h3 {
	text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 1ms !important;
		scroll-behavior: auto !important;
	}
}
