/* ==========================================================================
   reset.css — モダンリセット
   ----------------------------------------------------------------------------
   Andy Bell の "modern CSS reset" ベース + 当プロジェクト用調整。
   ブラウザデフォルトを揃え、以降の base.css / layout.css を予測可能にする。
   ========================================================================== */

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

/* Margin / padding を初期化 */
html,
body,
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
dl, dd, ol, ul,
figure, hr,
fieldset, legend {
  margin: 0;
  padding: 0;
}

/* リスト初期化(role="list" を明示した場合のみ装飾しない方針) */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* HTML / body */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-block-size: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  font-style: italic;          /* alt 表示時の見た目 */
  vertical-align: middle;
  background-repeat: no-repeat;
  background-size: cover;
}

/* フォーム要素のフォント継承 */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

/* テキストエリアのリサイズ方向 */
textarea:not([rows]) {
  min-block-size: 10em;
}

/* テーブル */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

/* hr */
hr {
  border: 0;
  block-size: 1px;
  inline-size: 100%;
}

/* skip-to-content 等のアクセシビリティリンクの初期スタイル(.sr-only と併用) */
:target {
  scroll-margin-block-start: 5rem;
}

/* モーション低減ユーザー向け */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
