/**
 * Modern CSS Reset
 * 参考: Josh Comeau / Andy Bell の考え方をベースにした最小構成のリセット。
 * ブラウザ間の見た目の差異を消し、theme.json のトークンをそのまま活かせる土台を作る。
 */

/* Box sizing はすべて border-box に統一 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* デフォルトの余白を除去 */
* {
  margin: 0;
}

html {
  /* スムーズスクロール（ユーザーがアニメーション低減設定の場合は除く） */
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--wp--preset--font-family--body, "YuMincho", "Yu Mincho", serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 見出し・段落は long-form のテキストが折り返しやすいように */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* フォーカスリングは消さず、視認性の高い形で残す（アクセシビリティ対応） */
:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary, #cd9ed7);
  outline-offset: 2px;
}

/* WordPress管理バーとの重なり対策（スムーススクロール時のアンカー位置ずれ防止） */
:target {
  scroll-margin-top: 100px;
}
