/* =========================================================
  base.css
  遅延せずに読み込む共通ベースCSS
  ※ box-sizing / body margin / img の最低限はhead内インライン想定
========================================================= */

/* ---------------------------------------------
  html / body 基本設定
--------------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
}
body {
  min-width: 320px;
}

/* ---------------------------------------------
  テキスト要素の余白リセット
--------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* ---------------------------------------------
  リスト
--------------------------------------------- */
ul,
ol {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

/* ---------------------------------------------
  メディア要素
--------------------------------------------- */
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

video {
  height: auto;
}

/* ---------------------------------------------
  リンク
--------------------------------------------- */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* ---------------------------------------------
  ボタン・フォーム
--------------------------------------------- */
button,
input,
textarea,
select {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
}

button,
select {
  cursor: pointer;
}

button {
  appearance: none;
}

input,
textarea,
select {
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;
}

/* ---------------------------------------------
  table
--------------------------------------------- */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

/* ---------------------------------------------
  iframe / embed
--------------------------------------------- */
iframe {
  display: block;
  max-width: 100%;
  border: 0;
}

/* ---------------------------------------------
  その他HTML要素
--------------------------------------------- */
address {
  font-style: normal;
}

summary {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ---------------------------------------------
  固定ヘッダーがある場合のアンカー位置調整
--------------------------------------------- */
:target {
  scroll-margin-top: var(--header-height, 80px);
}

/* ---------------------------------------------
  画像の共通補助
--------------------------------------------- */
.c-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------------------------------------------
  アクセシビリティ用
--------------------------------------------- */
.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

/* ---------------------------------------------
  motion軽減設定
--------------------------------------------- */
@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;
  }
}