/* ========== Reset CSS (HTML5, Mobile-first, Cross-browser) ========== */

/* 1. 全要素の初期化 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  vertical-align: baseline;
}

/* 2. HTML5のセマンティック要素 */
article, aside, details, figcaption, figure,
footer, header, main, menu, nav, section, summary {
  display: block;
}

/* 3. テキスト系ブロック要素のリセット */
body, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
figure, hr, dl, dd {
  margin: 0;
  padding: 0;
}

/* 4. h1～h6 のサイズや太さの初期化（任意） */
h1, h2, h3, h4, h5, h6 {
  font-size: 100%;
  font-weight: normal;
}

/* 5. リスト系要素のスタイル除去 */
ul, ol {
  list-style: none;
}

/* 6. 引用符除去 */
blockquote, q {
  quotes: none;
}
blockquote::before, blockquote::after,
q::before, q::after {
  content: '';
}

/* 7. テーブルの初期化 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

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

/* 9. メディア（画像、動画） */
img, video, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 10. フォーム要素 */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
textarea {
  resize: vertical;
}

/* 11. strong, em の中立化（必要に応じて） */
strong, em {
  font-weight: normal;
  font-style: normal;
}

/* 12. code, pre の書体統一 */
code, pre {
  font-family: monospace, monospace;
}

/* 13. ルート要素 */
html, body {
  width: 100%;
  height: 100%;
  background: #fff;
  color: #000;
  line-height: 1.5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overscroll-behavior: none;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 14. モバイル向け最適化 */
a, button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
textarea {
  font-size: 16px; /* iOSズーム防止 */
}

/* 15. スクロールバー（任意） */
::-webkit-scrollbar {
  width: 0.5em;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0.25em;
}
