/**
 * Modern CSS Reset 2026
 * 現代的でメンテナンスしやすい最新のリセットスタイル
 */

/* 1. ボックスモデルの統一 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* 2. デフォルトの余白を削除 */
* {
	margin: 0;
	padding: 0;
}

/* 3. HTML & Body の基本設定 */
html {
	/* 文字サイズの自動調整を抑制（iOS対策） */
	-webkit-text-size-adjust: 100%;
}

body {
	min-height: 100dvh;
	/* 動的ビューポート単位を使用 */
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeSpeed;
}

/* 4. メディア要素の振る舞い */
img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* 5. フォーム要素のフォント継承 */
input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
	background: transparent;
	border: none;
}

/* ボタンのクリック対象としての振る舞い */
button,
[role="button"] {
	cursor: pointer;
}

/* テキストエリアのリサイズ設定 */
textarea {
	resize: vertical;
}

/* 6. リストスタイルの解除 */
ul,
ol {
	list-style: none;
}

/* 7. タイポグラフィ */
h1,
h2,
h3,
h4,
h5,
h6 {
	text-wrap: balance;
	/* 見出しのバランス調整 */
}

p {
	text-wrap: pretty;
	/* テキストの泣き別れ防止 */
	overflow-wrap: break-word;
}

/* 8. リンクの基本設定 */
a {
	text-decoration: none;
	color: inherit;
}

/* 9. テーブルの最適化 */
table {
	border-collapse: collapse;
	border-spacing: 0;
	width: 100%;
}

/* 10. 視認性のためのアクセシビリティ */
/* 視覚的に隠すがスクリーンリーダーには読ませる */
.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* アニメーションを好まないユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
	html:focus-within {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}