/* ===========================================================
   reset.css — 最小限のリセット
   =========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 想定外の横はみ出しでページ全体が横スクロールしないようにする。
     clip は position:sticky を壊さないので hidden より安全。 */
  overflow-x: clip;
  /* スクロールバーの幅を常に確保しておく。ドロワーや marumado を開いたときに
     背面を overflow:hidden で固定するが、その瞬間にスクロールバーが消えて
     ページ全体が横にずれるのを防ぐため。 */
  scrollbar-gutter: stable;
  /* 固定ヘッダー分だけアンカー位置をずらす */
  scroll-padding-top: calc(var(--h-header) + var(--sp-lg));
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  margin: 0;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

address {
  font-style: normal;
}

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
