/* 180bps サイト共通スタイル（ダークテーマのみ）
 * トップページと読みもの・規約ページで共有する。ゲーム本体は sontaku-reversi/css/style.css。
 */
:root {
  --bg: #10161c;
  --bg-2: #182129;
  --border: #2a3742;
  --text: #eef3f2;
  --muted: #9fb0ac;
  --accent: #ffd166;
  --felt: #1f7a4d;
  --felt-line: rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}

/* 日本語の下に添える英語 */
.en {
  display: block;
  color: var(--muted);
  font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  font-size: .9em;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: .04em;
}
header p { margin: 8px 0 0; }

h2 {
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}
h2 .en { display: inline; margin-left: .6em; font-size: .85em; }

/* ===== トップページのカード ===== */
.games, .articles { list-style: none; margin: 0; padding: 0; }
.game + .game { margin-top: 16px; }
.articles li + li { margin-top: 12px; }

.game a, .articles a {
  display: block;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s;
}
.game a:hover, .game a:focus-visible,
.articles a:hover, .articles a:focus-visible { border-color: var(--accent); }

.game h3, .articles h3 {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 1.3rem;
}
.articles h3 { font-size: 1.05rem; margin-bottom: 6px; }
.game h3 .en { display: inline; margin-left: .5em; font-size: .7em; }

.game p, .articles p { margin: 0 0 12px; }
.game p:last-of-type, .articles p:last-of-type { margin-bottom: 0; }
.articles p { color: var(--muted); font-size: .9rem; }

.game .note { font-size: .85rem; }

.play {
  display: inline-block;
  margin-top: 16px;
  color: var(--accent);
  font-weight: bold;
}

/* ===== 読みもの・規約ページ ===== */
.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-head .logo {
  color: var(--text);
  font-weight: bold;
  font-size: 1.2rem;
  letter-spacing: .04em;
  text-decoration: none;
}
.site-head nav a { margin-left: 14px; font-size: .9rem; }
.site-head nav a:first-child { margin-left: 0; }

.crumbs {
  margin: 24px 0 0;
  font-size: .8rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }

article h1 {
  margin: 8px 0 8px;
  font-size: 1.7rem;
  line-height: 1.4;
}
article .meta { margin: 0 0 32px; color: var(--muted); font-size: .85rem; }
article h2 { margin-top: 48px; }
article h3 { margin: 32px 0 8px; font-size: 1.05rem; color: var(--accent); }
article p, article li { overflow-wrap: anywhere; }
article ul, article ol { padding-left: 1.4em; }
article li + li { margin-top: 4px; }

.lead { font-size: 1.05rem; }

.box {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.box p:first-child { margin-top: 0; }
.box p:last-child { margin-bottom: 0; }

.cta {
  display: inline-block;
  margin: 8px 0;
  padding: 10px 20px;
  background: var(--accent);
  color: #1b1b1b;
  font-weight: bold;
  border-radius: 999px;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .9rem;
}
th, td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
th { background: var(--bg-2); white-space: nowrap; }
.table-scroll { overflow-x: auto; }

code {
  padding: 1px 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .9em;
}

/* 図（diagram.js が data-board から盤面を描く） */
figure { margin: 24px 0; text-align: center; }
figcaption { margin-top: 8px; color: var(--muted); font-size: .85rem; }
.figs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; }
.figs figure { margin: 16px 0; }

.mini-board {
  display: inline-grid;
  grid-template-columns: repeat(8, 1fr);
  width: min(100%, 248px);
  aspect-ratio: 1;
  padding: 4px;
  background: #6b4a2c;
  border-radius: 6px;
}
.mini-board span {
  position: relative;
  background: var(--felt);
  border: 1px solid var(--felt-line);
}
.mini-board span.b::after, .mini-board span.w::after,
.mini-board span.m::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
}
.mini-board span.b::after { background: #111; }
.mini-board span.w::after { background: #f2f2f2; }
/* 着手可能マス・注目マス */
.mini-board span.m::after { inset: 36%; background: var(--accent); }
.mini-board span.hl { background: #2f9c64; box-shadow: inset 0 0 0 2px var(--accent); }

footer {
  margin-top: 64px;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
footer nav { margin-bottom: 8px; }
footer nav a { color: var(--muted); margin: 0 8px; white-space: nowrap; }
