/* 土台。要素そのものの既定値だけを置く。
   部品の見た目は components.css、配置は layout.css。 */

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

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

/* hidden 属性を効かせる。ブラウザ既定の [hidden]{display:none} は
   詳細度が最低なので、こちらが .overlay{display:flex} などを書いた時点で
   負けて出っぱなしになる。表示・非表示は JS から hidden の付け外しだけで
   済ませたいので、ここで一度だけ強くしておく */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .02em;   /* 和文ゴシックは僅かに字間を空けると読みやすい */
  line-break: strict;      /* 行頭の「。」「、」を禁則で避ける */
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

/* 見出しは明朝。design 稿は h1・h2 とも 'Shippori Mincho' */
h1, h2, h3 { font-family: var(--font-serif); }

h1 {
  margin: 2px 0;
  text-align: center;
  font-weight: 700;
  font-size: var(--fs-h1);
  letter-spacing: .04em;
}

/* トップ brand ロックアップ —— ユーザー提示の源码どおり
   font Noto Sans JP / name 17px / h1 12px / 石 34·22px（色は tokens） */
.brand--home {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand-lock-ink);
  font-family: var(--font-sans);
}
.brand--home .brand__mark {
  width: 34px;
  height: 34px;
}
.brand--home .brand__mark::before,
.brand--home .brand__mark::after {
  width: 22px;
  height: 22px;
}
.brand--home .brand__mark::before {
  left: 0;
  top: 9px;
  background: var(--brand-lock-black);
}
.brand--home .brand__mark::after {
  right: 0;
  top: 3px;
  background: var(--brand-lock-white);
  border: 1px solid var(--brand-lock-white-edge);
}
.brand--home .brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* 副行を GomokuFree と同じ左端に */
  line-height: 1.25;
  gap: 0;
  text-align: left;
}
.brand--home .brand__name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--brand-lock-name-size);
  letter-spacing: 0;
  line-height: 1.25;
  color: var(--brand-lock-ink);
  text-align: left;
}
.brand--home .brand__h1 {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: var(--brand-lock-h1-size);
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.25;
  color: var(--brand-lock-h1);
  /* 全局 h1{text-align:center} を打ち消す */
  text-align: left;
}

/* h2 の前に立つ緑の棒は ::before ではなく span で持つ（components.css）。
   ::before だと読み上げの順序に入らない代わり、
   flex の gap が効かず位置合わせを margin でやることになる */
h2 {
  margin: 0 0 16px;
  font-size: var(--fs-h2);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 10px;
}

p { margin: 0; }

button { font-family: inherit; }

/* 既定の三角を消す。summary の中身は自前で組む */
details summary::-webkit-details-marker { display: none; }
details summary { list-style: none; }

/* 石が置かれるときの一瞬の拡大。design 稿の @keyframes をそのまま持つ */
@keyframes pop {
  from { transform: scale(.55); opacity: .3; }
  to   { transform: scale(1);   opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* 読み上げにだけ渡す文字。見出しの階層を保つために使う */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
