@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

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

  body {
    min-height: 100vh;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

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

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

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

  ul, ol {
    list-style: none;
  }

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

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
}

@layer base {
  body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    font-size: var(--fs-md);
    line-height: var(--lh-md);
  }

  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--c-text);
  }

  h1 { font-size: var(--fs-2xl); line-height: var(--lh-2xl); }
  h2 { font-size: var(--fs-xl); line-height: var(--lh-xl); }
  h3 { font-size: var(--fs-lg); line-height: var(--lh-lg); }

  p, li, dd {
    color: var(--c-text);
  }

  small {
    font-size: var(--fs-xs);
    line-height: var(--lh-xs);
    color: var(--c-text-3);
  }

  code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
  }

  /* アクセシビリティ・フォーカスリング */
  :focus-visible {
    outline: 2px solid var(--c-focus);
    outline-offset: 2px;
  }

  /* 数字等幅 */
  .tabular, [data-tabular], table {
    font-variant-numeric: tabular-nums;
  }

  /* 動きの軽減 */
  @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;
    }
  }

  /* スクロールバーのスタイル（過度な装飾は避ける） */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background: var(--c-line-strong);
    border-radius: var(--r-full);
  }
}
