/* 囲碁固有の見た目（共通は ../common/base.css） */
#board { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.board-wrap { max-width: 640px; }

/* 盤の上の帯: 2人の名札（石・名前・取った石）。手番の人を濃く */
.score-tag .tag-bg { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.score-tag .tag-name { font: 700 21px var(--font); fill: var(--ink); }
.score-tag .tag-sub { font: 700 16px var(--font); fill: var(--ink-sub); }
.score-tag.on .tag-bg { fill: var(--surface); stroke: var(--accent); stroke-width: 5; }

/* 手番の人の色を盤のふちに（黒＝墨色／白＝白） */
.turn-frame { fill: none; stroke-width: 7; opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.turn-frame.c0 { stroke: #1F2328; opacity: .85; }
.turn-frame.c1 { stroke: #FBF8F0; opacity: .95; }
.status .stone-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 2px solid var(--ink-sub); }
.status .stone-dot.c0 { background: #1F2328; }
.status .stone-dot.c1 { background: #F3F0E8; }

/* 石 */
.stone { pointer-events: none; transition: opacity var(--dur); }
.stone.ghost { opacity: .55; }
.stone.dead { opacity: .42; }

/* 印: アタリ・コウ・ヒント・キーボードの枠・直前の手・CPUが打つ所・打つ前の確認・地・死に石 */
.mark, .atari, .atari-lib, .ko, .terr, .dead-x { pointer-events: none; }
.atari { fill: none; stroke: #C8453B; stroke-width: 3.5; stroke-dasharray: 7 4; }
.atari-lib { fill: rgba(255, 248, 234, .75); stroke: #C8453B; stroke-width: 3.5; }
.ko { fill: none; stroke: #2F5D8A; stroke-width: 3.5; }
.terr.c0 { fill: #1F2328; stroke: #FFF8EA; stroke-width: 1.5; }
.terr.c1 { fill: #FBF8F0; stroke: #3A3226; stroke-width: 1.5; }
.dead-x { stroke: #C8453B; stroke-width: 4.5; stroke-linecap: round; fill: none; }
.mark.hint { fill: none; stroke: #2F6DB5; stroke-width: 4.5; stroke-dasharray: 8 5; animation: hint 1.2s ease-in-out infinite; }
@keyframes hint { 50% { opacity: .45; } }
.mark.cursor { fill: none; stroke: var(--warn); stroke-width: 3.5; stroke-dasharray: 6 4; }
.mark.cpu { fill: rgba(255, 248, 234, .5); stroke: #2F5D8A; stroke-width: 4; }
.mark.pick { fill: none; stroke: #2F5D8A; stroke-width: 4; }
.last { fill: #C8453B; stroke: #FFF8EA; stroke-width: 2; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mark.hint { animation: none; } }
.hit { fill: transparent; cursor: pointer; }
#fx, #over { pointer-events: none; }

.board-wrap .callout { padding: 6px 18px; font-size: clamp(16px, 3.8vw, 22px); } /* 位置は game.js が石の少ない段を選ぶ */
.stage { padding: 12px; }
#place { min-width: 150px; }
#resign.armed { border-color: var(--ng); color: var(--ng); }
.tally-line { margin: 8px 0 0; font-size: 15px; color: var(--ink-sub); line-height: 1.6; }
@media (max-width: 560px) {
  .stage { margin-left: -8px; margin-right: -8px; } /* 盤だけ左右に広げる（ページの余白は共通の16px） */
  .stage { padding: 6px; }
  .score-tag .tag-name { font-size: 24px; }
  .score-tag .tag-sub { font-size: 19px; }
}

.result-box .score { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; }
.result-box { inset: 10% 6% auto; padding: 16px 20px; }
.result-box h2 { font-size: 1.4rem; margin-bottom: 6px; }
.tally { border-collapse: collapse; margin: 0 0 8px; font-size: 15px; }
.tally th, .tally td { padding: 3px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.tally td b { font-size: 16px; }
.advice { color: var(--accent); font-weight: 700; }
@media (max-width: 520px) { .result-box { inset: 6% 0 auto; } .result-box .controls .btn { padding: 0 12px; } }

.howto img { display: block; width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
.howto figcaption { text-align: center; }

/* 盤の座標（設定でオン。英語圏の表記 A–T・1–19） */
.coords text { font: 700 16px var(--font); fill: rgba(40, 28, 16, .88); text-anchor: middle; pointer-events: none; }
/* 英語の数えの表は見出しが長いので、スマホ幅ではすき間を詰める */
@media (max-width: 520px) { html:lang(en) .tally th, html:lang(en) .tally td { padding: 3px 5px; } }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 3; --tb-st-lines: 3; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 3; --tb-st-lines: 3; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
