/* 落ちもの連鎖パズル 固有の見た目（共通は ../common/base.css）
   生成りの紙の盤に、平らな色の玉（色ごとに中の印がちがう。顔は描かない）。石は灰色の角の丸い四角 */
[hidden] { display: none !important; }
:root { --paper: #F9F7F1; --paper-grid: #E6E1D5; --paper-top: #EFEBE1; --paper-edge: #CFC9BA; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #E9E6DD; --paper-grid: #D3CEC1; --paper-top: #DCD8CC; --paper-edge: #8D8878; } }
:root[data-theme="dark"] { --paper: #E9E6DD; --paper-grid: #D3CEC1; --paper-top: #DCD8CC; --paper-edge: #8D8878; }

.stage { position: relative; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }

/* 盤（左）と、つぎ・得点・CPUの盤（右） */
.play-area { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; justify-content: center; align-items: start; margin-top: 8px; }
.well-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.well-box { position: relative; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.well-box canvas { display: block; border-radius: var(--radius); }
#well { cursor: pointer; }
.side-col { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 220px; }
.side-box { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 8px; }
.side-label { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink-sub); line-height: 1.3; }
#next { display: block; margin: 0 auto; }
#cpu-well { display: block; margin: 0 auto; border-radius: 4px; }
.stats { font-size: 14px; line-height: 1.45; }
.stats dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; row-gap: 2px; }
.stats dt { color: var(--ink-sub); font-weight: 700; white-space: nowrap; }
.stats dd { margin: 0; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; }
.stats dd.big { font-size: 18px; }
/* 横の列がせまいとき（スマホ・英語）は、見出しと値を2段にする */
@container (max-width: 150px) { .stats dl { grid-template-columns: minmax(0, 1fr); } .stats dt { white-space: normal; } }

/* 相手から来る石 */
.incoming { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ng); padding: 2px 8px; border: 1.5px dashed var(--ng); border-radius: 999px; background: var(--surface); line-height: 1.4; }
.incoming.empty { visibility: hidden; }
.incoming.mini { font-size: 14px; padding: 0 6px; margin-bottom: 4px; justify-content: center; }
.inc-icon { width: 14px; height: 14px; border-radius: 4px; background: #8D8878; border: 2px solid #5E5A4F; flex: none; }

/* 一時停止 */
.paused { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(247, 246, 242, .82); border-radius: var(--radius); }
.paused p { margin: 0; font-weight: 700; font-size: 18px; color: #1F2328; }

/* 盤の上の知らせ（連鎖の数など）。玉に重ならないよう上のほうに出す */
.well-box .callout { top: 10%; font-size: 22px; white-space: nowrap; }

/* 操作のボタン（タッチでもマウスでも） */
.pad { display: grid; grid-template-columns: repeat(6, minmax(44px, 64px)); gap: 8px; justify-content: center; margin-top: 10px; touch-action: none; }
.pad-btn {
  appearance: none; height: 52px; border-radius: var(--radius); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; padding: 0;
}
.pad-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pad-btn:active, .pad-btn.on { transform: translateY(1px); background: var(--accent-soft); border-color: var(--accent); }
.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; }
.goal { white-space: nowrap; font-size: 15px; }
.goal b { color: var(--warn); }
.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-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; }
  .play-area { gap: 8px; }
  .side-col { gap: 6px; }
  .side-box { padding: 4px 6px; }
  .pad { gap: 6px; grid-template-columns: repeat(6, minmax(44px, 1fr)); }
  .pad-btn { height: 50px; }
  .well-box .callout { font-size: 18px; }
}
/* 上のバーの高さを一定に（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; } }
/* 上のバーの高さ ここまで */
