*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
button:disabled { cursor: not-allowed; opacity: 0.5; }

input, select, textarea {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
}

table {
  border-collapse: collapse;
  width: 100%;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

/* `hidden` 属性は UA スタイル (display:none) なので、クラスで display を
   指定している要素には **負ける。** .stats-grid { display: grid } のような
   指定があると hidden を付けても場所を取り続ける (実際にそうなった)。 */
[hidden] { display: none !important; }

/* スクロールバー (控えめ) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 6px;
  border: 2px solid var(--color-bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #9ca3af; background-clip: padding-box; }
