/*
  ==========================================================================
  Reset CSS
  ブラウザごとの初期スタイルの差異をなくすための、最低限のリセットです。
  ==========================================================================
*/

/* すべての要素でmargin/paddingの初期値をなくし、box-sizingを統一する */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* アンカーリンクでの移動を滑らかにする（reduced-motion環境では後述の記述で無効化） */
html {
  scroll-behavior: smooth;
}

/* 文字のにじみを抑え、行間を扱いやすい値にしておく */
body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeSpeed;
}

/* 見出しの文字サイズ・太さはブラウザ標準ではなくCSS側で管理するため、一旦継承させる */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* リストの黒丸・番号は、ナビゲーション等の用途に合わせてCSS側で個別に指定するため消しておく */
ul,
ol {
  list-style: none;
}

/* リンクの下線・文字色もCSS側で明示的に指定するため、ブラウザ標準を外しておく */
a {
  color: inherit;
  text-decoration: none;
}

/* 画像がコンテナ幅を超えないようにし、画像下のわずかな隙間（インライン要素特有の余白）をなくす */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* フォームやボタンの文字も、ページ全体のフォント指定を継承させる */
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ボタンの見た目（枠線・背景・カーソル）をブラウザ標準からリセットする */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* 今回テーブルは使用しないが、念のため罫線の隙間をなくしておく */
table {
  border-collapse: collapse;
}

/* アニメーションを抑えたい設定をしているユーザーには、動きを最小限にする */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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