/**
 * リセットと HTML 要素の基本スタイル（クラスは書かない）
 */

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

	* {
		margin: 0;
	}

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

	img,
	picture,
	video,
	canvas,
	svg,
	iframe {
		display: block;
		max-width: 100%;
	}

	img,
	video {
		height: auto;
	}

	iframe {
		border: 0;
	}

	input,
	button,
	textarea,
	select {
		font: inherit;
		color: inherit;
	}

	button {
		cursor: pointer;
	}

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

	table {
		border-collapse: collapse;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		font-size: inherit;
		font-weight: inherit;
		overflow-wrap: break-word;
	}

	address {
		font-style: normal;
	}
}

@layer base {
	html {
		scroll-behavior: smooth;
		scroll-padding-top: calc(var(--header-height) + var(--space-4));
	}

	@media (prefers-reduced-motion: reduce) {
		html {
			scroll-behavior: auto;
		}
	}

	body {
		min-height: 100svh;
		display: flex;
		flex-direction: column;
		background: var(--color-bg);
		color: var(--color-text);
		font-family: var(--font-sans);
		font-size: var(--fs-base);
		line-height: var(--leading);
		letter-spacing: var(--tracking);
		font-feature-settings: "palt";
		-webkit-font-smoothing: antialiased;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		line-height: var(--leading-tight);
		text-wrap: balance;
	}

	p {
		text-wrap: pretty;
	}

	a {
		color: inherit;
		text-decoration: none;
		transition: opacity var(--duration), color var(--duration);
	}

	:focus-visible {
		outline: 2px solid var(--color-primary);
		outline-offset: 2px;
	}

	input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]),
	textarea,
	select {
		width: 100%;
		padding: var(--space-3) var(--space-4);
		border: 1px solid var(--color-border);
		border-radius: var(--radius);
		background: var(--color-bg);
	}

	textarea {
		min-height: 10em;
		resize: vertical;
	}

	::placeholder {
		color: var(--color-text-muted);
		opacity: 0.6;
	}
}
