/* 1. より直感的なボックスサイジングモデル */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. デフォルトマージンを削除（dialogは除く） */
*:not(dialog) {
  margin: 0;
  padding: 0;
}

/* 3. キーワードアニメーションを有効化（height: auto などのトランジション） */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  /* 4. アクセシブルな行の高さ */
  line-height: 1.5;
  /* 5. テキストレンダリングの改善 */
  -webkit-font-smoothing: antialiased;
}

/* 6. メディア要素のデフォルト改善 */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. フォームコントロールにフォントを継承 */
input, button, textarea, select {
  font: inherit;
}

/* 8. テキストのはみ出しを防ぐ */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. 行末の折り返し改善 */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* 10. ルートのスタッキングコンテキストを作成 */
#root, #__next {
  isolation: isolate;
}