*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* WebP配信のため <img> を <picture> で包んでいる。
   <picture> 自体はボックスを生成せず、<img> が元どおり親の直接の子として
   レイアウトされるようにする（flex/grid/絶対配置の指定を維持するため）。 */
picture {
  display: contents;
}

/* display:contents により <source> が親のフレックス/グリッド項目として
   数えられてしまうため、明示的にボックスを生成させない。 */
source {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}
