/* =========================================================
   base.css
   文字・リンク・フォーカス等の共通ルール。
   通常の更新では変更しません。
========================================================= */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.82;
  letter-spacing: var(--tracking-body);
  color: var(--ink);
  background: #ffffff;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: var(--tracking-heading);
  line-height: 1.38;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover { text-decoration-thickness: 2px; }

::selection {
  background: var(--cyan);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 9999;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--ink);
  border: 2px solid var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Long labels / URLs should never create horizontal scrolling. */
main,
.site-header,
.site-footer {
  overflow-wrap: anywhere;
}

[id] {
  scroll-margin-top: 16px;
}
