/* ============================================
   Modern Reset CSS 2024
   Copyright (c) sou design
   ============================================ */

/* ------------------------------------------
   1. ボックスモデルの統一
   ------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ------------------------------------------
     2. ブロック要素のマージン・パディングリセット
     ------------------------------------------ */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dt,
dd {
  margin: 0;
  padding: 0;
  /* 実務知見：予期せぬpaddingを徹底排除 */
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

/* ------------------------------------------
     3. リストのリセット
     ------------------------------------------ */
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
  padding: 0;
}

/* 定義リスト系の完全リセット */
dl {
  margin: 0;
}

dt {
  font-weight: inherit;
  /* デフォルトのboldを解除 */
}

dd {
  margin: 0;
  /* ブラウザの左マージンを解除 */
}

/* ------------------------------------------
     4. ルート・ボディの基本設定
     ------------------------------------------ */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 日本語句読点の美しい処理 */

  /* レイアウトシフト防止（モダン + フォールバック） */
  scrollbar-gutter: stable;
  /* モダンブラウザ対応 */
  overflow-y: scroll;
  /* レガシーブラウザ対応 */

  /* モバイルUX最適化 */
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  /* モバイルアドレスバー対応 */
  text-justify: inter-ideograph;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "游ゴシック体", "Yu Gothic", "メイリオ", Meiryo,
    Roboto, "Helvetica Neue", Arial, sans-serif;
}


/* ------------------------------------------
     5. a要素の設定（現在の設計を完全継承）
     ------------------------------------------ */
a,
a:hover {
  font: inherit;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* マウスクリック時のアウトライン抑制 */
a:focus {
  outline: none;
}

/* キーボードフォーカス時はブラウザ標準を復元 */
a:focus-visible {
  outline: revert;
}

/* クラスなしリンクの可読性向上 */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* ------------------------------------------
     6. メディア要素の設定
     ------------------------------------------ */
img,
picture,
video,
canvas {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
  border: 0;
  vertical-align: bottom;
  font-style: italic;
  /* altテキストの視認性向上 */
}

svg {
  vertical-align: bottom;
}

/* ------------------------------------------
     7. フォーム要素の設定
     ------------------------------------------ */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: inherit;
  appearance: none;
  -webkit-appearance: none;
}

button:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

form {
  margin: 0;
  padding: 0;
}

/* ------------------------------------------
     8. テーブルの設定
     ------------------------------------------ */
table {
  border: 0;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

th,
td {
  padding: 0;
  text-align: left;
  vertical-align: top;
}

caption {
  text-align: left;
  padding: 0;
}

/* ------------------------------------------
     9. その他
     ------------------------------------------ */
hr {
  border: none;
  border-top: 1px solid currentColor;
  margin: 0;
}

blockquote,
q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* ------------------------------------------
     10. アクセシビリティ配慮
     ------------------------------------------ */
@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;
  }
}