/* 1) box-sizing を統一 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2) 余白のリセット */
html,
body,
h1, h2, h3, h4, h5, h6,
p,
ul, ol,
li,
dl, dt, dd,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

/* 3) ベース設定 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 4) リストの見た目をリセット */
ul,
ol {
  list-style: none;
}

/* 5) 画像・動画などを扱いやすく */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* 6) リンクのデフォルト装飾を整理 */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 7) フォーム要素を親のフォントに揃える */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ボタンの見た目を素直に（必要に応じて style.css でデザイン） */
button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* テキストエリアの暴れ防止 */
textarea {
  resize: vertical;
}

/* 8) 見出しの太字やサイズは style.css で設計する前提 */
h1, h2, h3, h4, h5, h6 {
  font: inherit;
}

/* 9) 斜体を戻す（em/i の意図が無い場合のズレ防止） */
em,
i {
  font-style: normal;
}

/* 10) hr のブラウザ差を軽減 */
hr {
  border: 0;
  border-top: 1px solid currentColor;
  opacity: 0.2;
}

/* 11) テーブルの隙間・差を軽減 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

th {
  font-weight: inherit;
  text-align: left;
}

/* 12) 引用のブラウザ差を軽減 */
blockquote,
q {
  quotes: none;
}

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

/* 13) アクセシビリティ：動きを減らす設定の尊重 */
@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;
  }
}
