/* はさみ将棋固有の見た目（共通は ../common/base.css） */
#board { user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.board-wrap { max-width: 600px; }

/* 上下の帯（駒台: 名前と取った駒） */
.strip { fill: var(--bg); stroke: var(--line); stroke-width: 2; }
.strip.on { stroke: var(--accent); stroke-width: 5; }
.strip-label { font: 700 19px var(--font); fill: var(--ink-sub); }
.name-tag rect { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.name-tag text { font: 700 24px var(--font); fill: var(--ink); }
.name-tag.on rect { fill: var(--ink); stroke: var(--ink); }
.name-tag.on text { fill: var(--surface); }

/* 手番の人の駒（歩＝墨色／と＝朱色）を、盤のふちの色で */
.turn-frame { fill: none; stroke-width: 7; opacity: 0; pointer-events: none; transition: opacity var(--dur); }
.turn-frame.fu { stroke: #1F2328; opacity: .8; }
.turn-frame.to { stroke: #C23A22; opacity: .9; }
.status .kind { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 5px; font-weight: 700; font-size: 16px; background: #E8C98F; border: 2px solid currentColor; flex: none; }
.status .kind.fu { color: #1F2328; }
.status .kind.to { color: #B0301C; }
/* 記号の駒のときの手番の印: 墨色の丸／朱色の丸に白い輪（駒と同じ） */
.status .kind.intl { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #22262B; box-shadow: 0 0 0 2px #E8C98F; }
.status .kind.intl.to { background: #BE3220; box-shadow: 0 0 0 2px #E8C98F, inset 0 0 0 5px #BE3220, inset 0 0 0 8.5px #FFF6E0; }

/* 駒 */
.piece { pointer-events: none; }
/* 回転は board.js が style.transform で持つ。持ち上げは translate で（transform を使うと回転が上書きされる）、回転のアニメーションはしない */
.piece { transition: filter var(--dur); }
.piece.lifted { filter: var(--shadow-lift); translate: 0 -3px; }
.piece.doomed { animation: shake .32s ease-in-out 2; }
@keyframes shake { 0%, 100% { translate: 0 0; } 25% { translate: -2px 0; } 75% { translate: 2px 0; } }
@media (prefers-reduced-motion: reduce) { .piece.doomed { animation: none; } }

/* 印: 動かせる駒・えらんだ駒・行き先・キーボードの枠・直前の手・CPUの手 */
.mark { fill: none; pointer-events: none; }
.mark.movable { stroke: var(--accent); stroke-width: 3.5; }
.mark.picked { stroke: var(--accent); stroke-width: 6; fill: var(--accent); fill-opacity: .18; }
.mark.target { fill: var(--accent); stroke: #FFF8EA; stroke-width: 2.5; }
.mark.cursor { stroke: var(--warn); stroke-width: 4; stroke-dasharray: 7 5; }
.mark.last-from { stroke: rgba(40, 28, 16, .45); stroke-width: 2.5; stroke-dasharray: 4 5; }
.mark.last-to { fill: rgba(255, 233, 168, .55); }
.mark.cpu, .mark.cpu-to { stroke: #FFF8EA; stroke-width: 6; }
.mark.cpu-to { stroke-dasharray: 8 6; }
:root[data-theme="dark"] .mark.movable, :root[data-theme="dark"] .mark.picked { stroke: #2F5D8A; }
:root[data-theme="dark"] .mark.target, :root[data-theme="dark"] .mark.picked { fill: #2F5D8A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark.movable, :root:not([data-theme="light"]) .mark.picked { stroke: #2F5D8A; }
  :root:not([data-theme="light"]) .mark.target, :root:not([data-theme="light"]) .mark.picked { fill: #2F5D8A; }
}
.hit { fill: transparent; cursor: pointer; }

/* 取る瞬間: はさんだ2枚（金色の枠）と、その間を結ぶ帯。囲みのときは盤の端（壁）も金色に。取られる駒は赤い輪 */
.clamp { fill: none; stroke: #B7791F; stroke-width: 5; }
.clamp-fill { fill: #FFE9A8; opacity: .9; }
.clamp-bar { stroke: #FFE9A8; stroke-width: 30; stroke-linecap: round; opacity: .9; }
.wall { stroke: #F2C94C; stroke-width: 12; stroke-linecap: round; }
.doomed { fill: none; stroke: var(--ng); stroke-width: 5; stroke-dasharray: 10 6; }
#fx, #fx-under { pointer-events: none; }

.board-wrap .callout { padding: 6px 18px; font-size: clamp(16px, 3.8vw, 22px); } /* 位置は game.js が空いた段を選ぶ */
.stage { padding: 12px; }
@media (max-width: 560px) {
  .stage { margin-left: -8px; margin-right: -8px; } /* 盤だけ左右に広げる（ページの余白は共通の16px。D1） */
  .stage { padding: 6px; }
  .strip-label { font-size: 25px; }
  .name-tag text { font-size: 28px; }
}

.result-box .score { font-size: 1.1rem; font-weight: 700; margin: 0 0 8px; }
.result-box { inset: 16% 8% auto; padding: 16px 20px; }
.result-box h2 { font-size: 1.4rem; margin-bottom: 6px; }
@media (max-width: 520px) { .result-box { inset: 12% 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; }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
