/* 2025 Opinionated Base (Standalone) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --accent: hsl(220 85% 55%);
  --radius: 12px;
}

html {
  line-height: 1.5;
  font-size: 62.5%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  hanging-punctuation: first allow-end;
  text-wrap: pretty;
}

body {
  margin: 0;
  min-block-size: 100dvb; /* 100vhのモバイル安全版 */
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 余白リセット */
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
  margin-block: 0;
}
:where(ul[role="list"], ol[role="list"]) {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* メディア要素 */
:where(img, picture, video, canvas, svg) {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

/* フォーム素性 */
:where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
  border: none;
}
:where(button, [type="button"], [type="submit"]) {
  cursor: pointer;
}
:where(input, textarea, select) {
  outline: none;
  accent-color: var(--accent);
}
:where(textarea) {
  resize: vertical;
}
:where(input[type="search"]) {
  -webkit-appearance: none;
  appearance: none;
}

/* フォーカスリング */
:where(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* アンカー */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}
a:where(:hover) {
  text-decoration-thickness: 0.12em;
}

/* テーブル */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
th,
td {
  padding: 0;
  text-align: start;
}

/* コード */
code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
}

/* 見出し */
:where(h1, h2, h3, h4, h5, h6) {
  font-weight: 600;
}
:where(h1, h2, h3) {
  text-wrap: balance;
}
:where(h1, h2, h3, h4, h5, h6) + :where(*):not(:where(h1, h2, h3, h4, h5, h6)) {
  margin-block-start: 0.5em;
}
:where(p, ul, ol, dl, blockquote)
  + :where(*):not(:where(p, ul, ol, dl, blockquote)) {
  margin-block-start: 1rem;
}

p,
figure {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
/* 動きの配慮 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
