/* 3つそろえパズル 固有の見た目（共通は ../common/base.css）
   生成りの紙の盤（うすい市松）に、平らな色の玉（色ごとに形がちがう）。石は灰色、板は斜線の入った木の色 */
[hidden] { display: none !important; }
:root { --m3-paper: #F9F7F1; --m3-paper2: #EFEADF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --m3-paper: #E9E6DD; --m3-paper2: #DCD6C9; } }
:root[data-theme="dark"] { --m3-paper: #E9E6DD; --m3-paper2: #DCD6C9; }

.stage { position: relative; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ステージの選択（番号の下に星） */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.stage-grid .choice { margin: 0; }
.stage-grid .choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 48px; padding: 2px 4px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stage-grid .choice span::after { content: attr(data-stars); font-size: 12px; letter-spacing: 1px; color: var(--warn); min-height: 14px; }

/* 盤の上の数（のこり手数・目標・点） */
.hud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px; margin: 6px 0 6px; font-size: 15px; line-height: 1.3; min-height: 40px; }
.hud-box { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.hud-box b { font-size: 20px; font-variant-numeric: tabular-nums; }
.hud-box.moves b { font-size: 24px; color: var(--accent); }
.hud-box.moves.near b { color: var(--ng); }
.hud-l { color: var(--ink-sub); font-size: 14px; }
.hud-u { font-size: 14px; }
.hud-goals { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.goal { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 4px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 700; font-variant-numeric: tabular-nums; }
.goal.done { border-color: var(--ok); color: var(--ok); }
.goal .gicon { display: block; flex: none; width: 22px; height: 22px; }
.goal.text { padding-left: 8px; }
.goal .chk { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: block; }

.board-wrap { display: flex; justify-content: center; }
.board-box { position: relative; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.board-box canvas { display: block; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.board-box .callout { top: 40%; font-size: 22px; white-space: nowrap; }

/* 手番のバー */
.status { flex-wrap: wrap; column-gap: 10px; row-gap: 0; }
.st-name { white-space: nowrap; }
.lv { display: inline-block; white-space: nowrap; font-size: 14px; font-weight: 700; padding: 0 8px; border-radius: 999px; border: 1.5px solid currentColor; color: var(--accent); vertical-align: middle; }
.message.ok { color: var(--ok); font-weight: 700; }
.message.ng { color: var(--ng); font-weight: 700; }

/* 結果 */
.result-box .big { font-variant-numeric: tabular-nums; }
.result-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0 2px; }
.result-stars svg { width: 40px; height: 40px; }
.result-stars .on { fill: #D9A21B; stroke: #8A6510; }
.result-stars .off { fill: none; stroke: var(--line-strong); }
.result-box dl { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 16px; row-gap: 2px; margin: 8px 0; }
.result-box dt { color: var(--ink-sub); }
.result-box dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

#tools { margin-top: 10px; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .hud { font-size: 14px; gap: 4px 8px; margin: 4px 0; }
  .hud-box b { font-size: 18px; }
  .hud-box.moves b { font-size: 22px; }
  .board-box .callout { font-size: 18px; }
  #tools { margin-top: 8px; }
}
/* 上のバーの高さを一定に（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: 2; --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: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
