/*! Modern CSS Reset - FooDoo's
 *  対応ブラウザ: Chrome / Firefox / Safari / Edge（モダンブラウザ共通）
 *  IEおよびレガシーブラウザ向けハックは含まない
 */

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

/* 2. マージン・パディングリセット */
* {
  margin: 0;
  padding: 0;
}

/* 3. アクセシビリティ：動きの軽減設定に対応 */
@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;
  }
}

/* 4. HTML基本設定 */
html {
  -webkit-text-size-adjust: 100%; /* iOS Safariでフォントサイズが自動変更されるのを防ぐ */
  -webkit-tap-highlight-color: transparent; /* モバイルのタップハイライト除去 */
}

/* 5. ボディ */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* 6. 見出し（プロジェクト側で上書きするためinheritで初期化） */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

/* 7. テキストの折り返し */
p,
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 8. リスト */
ul,
ol {
  list-style: none;
}

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

/* 10. テキスト強調 */
b,
strong {
  font-weight: 700;
}

small {
  font-size: 0.875em;
}

/* 11. sub / sup */
sub,
sup {
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

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

img {
  height: auto;
  vertical-align: middle;
  font-style: italic; /* altテキストをやや装飾して視認しやすくする */
}

svg {
  fill: currentColor;
  overflow: hidden; /* SVGのはみ出しを防ぐ */
}

iframe {
  border: none;
}

/* 13. フォーム要素（フォントをページ設定から継承） */
input,
button,
textarea,
select,
optgroup {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
  overflow: auto;
  vertical-align: top;
}

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

/* 15. 区切り線 */
hr {
  border: none;
  border-top: 1px solid currentColor;
}

/* 16. フォーカス表示（キーボード操作のアクセシビリティ） */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* 17. 非表示要素 */
[hidden],
template {
  display: none;
}

/* 18. アクセシビリティ：無効状態 */
[aria-disabled="true"],
[disabled] {
  cursor: not-allowed;
}
