/*
 * ブラウザごとの表示の差をそろえる土台（normalize）
 *
 * 見出しや段落の余白はブラウザの標準のまま残す。
 * 記事の本文はエディターで書いた HTML がそのまま出るので、余白を 0 にすると詰まって読みにくくなる。
 */

/* 幅・高さに padding と border を含める（ショップ側の src/scss/main.scss と同じ前提） */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%; /* iPhone を横向きにしたとき文字が勝手に大きくならないようにする */
	text-size-adjust: 100%;
	tab-size: 4;
}

body {
	margin: 0;
}

/* 画像・動画が画面からはみ出さないようにする（記事に貼った大きな画像向け） */
img,
video,
svg {
	max-width: 100%;
	height: auto;
}

img,
video {
	vertical-align: middle; /* 画像の下にできる数 px のすき間をなくす */
}

/* 太字・小さい文字・上付き/下付きの差をそろえる */
b,
strong {
	font-weight: bolder;
}

small {
	font-size: 80%;
}

sub,
sup {
	position: relative;
	font-size: 75%;
	line-height: 0;
	vertical-align: baseline;
}

sub {
	bottom: -0.25em;
}

sup {
	top: -0.5em;
}

abbr[title] {
	text-decoration: underline dotted;
}

hr {
	height: 0;
	color: inherit;
	border-top-width: 1px;
}

/* コードは等幅フォントにして、ブラウザが勝手に小さくしないようにする */
code,
kbd,
samp,
pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 1em;
}

pre {
	overflow: auto;
}

table {
	border-collapse: collapse;
	border-color: currentcolor;
}

/* フォームの部品は周りと同じフォントにする（ブラウザの標準だと小さく別のフォントになる） */
button,
input,
optgroup,
select,
textarea {
	margin: 0;
	font: inherit;
	color: inherit;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
	-webkit-appearance: button;
	cursor: pointer;
}

[type="search"] {
	-webkit-appearance: textfield;
	outline-offset: -2px;
}

::-webkit-search-decoration {
	-webkit-appearance: none;
}

::-webkit-file-upload-button {
	-webkit-appearance: button;
	font: inherit;
}

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
	height: auto;
}

textarea {
	resize: vertical;
}

legend {
	padding: 0;
}

summary {
	display: list-item;
}
