/* リセットと基本タイポグラフィ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-m);
  line-height: 1.8;
  color: var(--c-text);
  background: var(--c-bg);
}

h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 var(--space-3); }
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-l); }
p { margin: 0 0 var(--space-3); }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
img, svg { max-width: 100%; height: auto; }

a { color: var(--c-link); }
a:hover { text-decoration-thickness: 2px; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
}

input, select { font-family: inherit; font-size: inherit; }

code, .mono { font-family: var(--font-mono); font-size: 0.95em; }

table { border-collapse: collapse; width: 100%; margin-bottom: var(--space-4); }
th, td { border: 1px solid var(--c-border); padding: var(--space-2) var(--space-3); text-align: left; }
th { background: var(--c-surface-alt); }

/* フォーカスの可視化(仕様: フォーカス位置の表示) */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-surface);
  padding: var(--space-2) var(--space-3);
  z-index: 100;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* アニメーション停止(OS設定 or サイト内設定 body.reduce-motion) */
@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;
  }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
