/* =======================================
   Reset CSS (2024+ モダン版 + iPhone対応)
   ======================================= */

/* 全体設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* HTML5要素をブロック化 */
article, aside, details, figcaption, figure,
footer, header, hgroup, main, nav, section {
  display: block;
}

/* body 初期化 */
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fff;
  color: #000;

  /* iPhoneの文字サイズ自動調整をオフ */
  -webkit-text-size-adjust: 100%;
}

/* リスト */
ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* リンク */
a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent; /* iOSでリンクタップ時のハイライトを無効化 */
}

/* 画像・メディア */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none; /* iOSで画像をドラッグ防止 */
}

/* フォーム要素 */
input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none; /* iOSの独自UIを削除 */
  border-radius: 0;         /* iOSの角丸を削除 */
}

button {
  cursor: pointer;
  background: none;
}

textarea {
  resize: vertical; /* iOSで強制的に伸縮されるのを制御 */
}

/* iOS Safari特有の入力UI削除 */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

/* テーブル */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* 見出しの余白リセット */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* strong, b の強調は維持 */
strong, b {
  font-weight: bold;
}

/* 引用 */
blockquote, q {
  quotes: none;
}

blockquote::before,
blockquote::after,
q::before,
q::after {
  content: '';
  content: none;
}

/* iOS Safariのスクロール挙動改善 */
html, body {
  height: 100%;
  -webkit-overflow-scrolling: touch; /* 慣性スクロール */
}
