/* --------------------------------
   リセットCSS（日本語コメント付き）
   実務で使いやすい最適構成
-------------------------------- */

/* すべての要素のマージン・パディング・ボーダー・フォント設定を初期化 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5要素をブロック要素として表示（古いブラウザ対応） */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

/* ベースの設定（背景・文字色・フォント滑らかに） */
body {
  line-height: 1.5;
  background: #fff;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* リストマーカーを非表示 */
ol,
ul {
  list-style: none;
}

/* 引用符のスタイルを削除 */
blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: "";
}

/* テーブルのセルの隙間をなくす */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* 枠線を削除（画像やフィールドセットなど） */
fieldset,
img {
  border: 0;
}

/* imgのリサイズやずれ防止 */
img {
  width: 100%;
  height: auto;
  vertical-align: bottom;
}

/* SVGをブロックとして表示（インラインずれ防止） */
svg {
  display: block;
}

/* 表内の文字配置を左寄せに統一 */
caption,
th {
  text-align: left;
  font-weight: normal;
}

/* 見出しタグの初期スタイルをリセット */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: normal;
}

/* 上付き・下付き文字の位置を調整 */
sup {
  vertical-align: text-top;
}

sub {
  vertical-align: text-bottom;
}

/* フォントスタイルや太さをリセット */
address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
  font-style: normal;
  font-weight: normal;
}

/* リンクのスタイル初期化（色継承・下線なし） */
a {
  text-decoration: none;
  color: inherit;
}

/* フォーム要素の初期スタイル統一 */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: 16px;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  border: none;
  background-color: transparent;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

/* textareaを縦方向のみリサイズ可能に */
textarea {
  resize: vertical;
  display: block;
}

/* ボタンはポインター表示、余白は0に */
button {
  cursor: pointer;
  padding: 0;
}

/* legendのカラー設定 */
legend {
  color: inherit;
}

/* mainタグを明示的にブロック要素に */
main {
  display: block;
}

/* すべての要素にbox-sizing: border-boxを適用 */
*,
*::before,
*::after {
  box-sizing: border-box;
}
