/* バブルシューター 固有の見た目（共通は ../common/base.css）
   生成りの紙の盤に、平らな色の玉（色ごとに中の印がちがう）。天井は斜線の入った板、終わりの線は赤い点線 */
[hidden] { display: none !important; }
:root { --bb-paper: #F9F7F1; --bb-grid: #ECE7DB; --bb-slab: #D9D2C2; --bb-slab-line: #B9B09C; --bb-base: #E4DED0; --bb-ink: #3A3F47; --bb-sub: #5B616B; --bb-guide: #2F5D8A; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bb-paper: #E9E6DD; --bb-grid: #D6D0C2; --bb-slab: #C9C1AE; --bb-slab-line: #9C927C; --bb-base: #D5CEBE; } }
:root[data-theme="dark"] { --bb-paper: #E9E6DD; --bb-grid: #D6D0C2; --bb-slab: #C9C1AE; --bb-slab-line: #9C927C; --bb-base: #D5CEBE; }

.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; gap: 4px 14px; margin: 6px 0 4px; font-size: 15px; line-height: 1.4; }
.hud span { white-space: nowrap; }
.hud b { font-variant-numeric: tabular-nums; }
.hud .press { color: var(--warn); font-weight: 700; }
.hud .press.near { color: var(--ng); }

.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: crosshair; }
.board-box .callout { top: 38%; font-size: 22px; white-space: nowrap; }

/* 操作のボタン */
.pad { display: grid; grid-template-columns: repeat(4, minmax(44px, 88px)); gap: 8px; justify-content: center; margin-top: 10px; touch-action: none; }
.pad-btn {
  appearance: none; height: 50px; border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; padding: 0 6px;
  font: inherit; font-size: 15px; font-weight: 700;
}
.pad-btn svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pad-btn span { white-space: nowrap; }
.pad-btn.fire { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.pad-btn:active, .pad-btn.on { transform: translateY(1px); background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.pad-btn:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.pad-btn:disabled { opacity: .45; border-style: dashed; cursor: default; }

/* 手番のバー */
.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; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .hud { font-size: 14px; gap: 2px 10px; margin: 4px 0 2px; }
  .pad { gap: 6px; grid-template-columns: repeat(4, minmax(44px, 1fr)); margin-top: 8px; }
  .pad-btn { height: 46px; font-size: 14px; flex-direction: column; gap: 0; line-height: 1.1; }
  .pad-btn svg { width: 20px; height: 20px; }
  .board-box .callout { font-size: 18px; }
}
/* 上の数の欄の高さを一定に（No.93。スマホ幅では2段に折り返す） */
@media (max-width: 640px) { .hud { min-height: calc(2.8em + 4px); } }
@media (min-width: 641px) { .hud { min-height: 1.4em; } }
/* 上のバーの高さを一定に（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; } }
/* 上のバーの高さ ここまで */
