/* 合体パズル 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* 入れ物は 2:3。スマホでも上のバーから「落とす」まで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 440px, calc((100svh - 250px) * 2 / 3)); min-width: min(100%, 240px);
  aspect-ratio: 2 / 3; height: auto; border-radius: var(--radius); background: #FBFAF6; /* 地は紙の色（ダークでも明るいまま） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer;
}
@media (min-width: 700px) {
  #cv { width: min(100%, 440px, calc((100svh - 270px) * 2 / 3)); min-width: min(100%, 300px); }
}
.board-wrap .callout { top: 38%; }
.play-main { justify-content: center; }
.btn.drop { min-width: 132px; min-height: 52px; font-size: 19px; }
.btn.move { min-width: 56px; min-height: 52px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; }
.btn.move svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.btn.move, .btn.drop { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* 手番のバー: むずかしさ・得点・自己ベスト・次のボール */
.hud { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-variant-numeric: tabular-nums; }
.hud .lv { font-weight: 700; }
.hud .score b { font-size: 1.15em; }
.hud .best { color: var(--ink-sub); }
.hud .next { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.hud .next-ball { width: 28px; height: 28px; }

/* ボールの順番の帯 */
.chain { display: flex; justify-content: center; align-items: center; gap: 2px; margin: 8px auto 0; max-width: 440px; }
.chain .ch { flex: 0 1 36px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid transparent; opacity: .45; }
.chain .ch canvas { width: 100%; height: 100%; }
.chain .ch.drop, .chain .ch.made { opacity: 1; }
.chain .ch.top { border-color: var(--accent); }

/* 一時停止 */
.pause-box {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 5;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 28px; text-align: center;
}
.pause-title { font-weight: 700; font-size: 1.2rem; margin: 0 0 10px; }

.result-box { z-index: 6; inset: 12% 8% auto; }
.result-box .big { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-box dl { display: grid; grid-template-columns: auto auto; gap: 2px 16px; justify-content: center; margin: 0 0 8px; }
.result-box dt { color: var(--ink-sub); text-align: right; }
.result-box dd { margin: 0; text-align: left; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-box .new { color: var(--ok); font-weight: 700; }
@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 8% 3% auto; padding: 16px; }
  .result-box h2 { font-size: 1.3rem; }
  .hud { gap: 2px 10px; font-size: .95rem; }
  .turnbar { margin-bottom: 6px; }
  .controls { margin-top: 8px; }
  .btn.drop { min-width: 110px; }
  .linkbtn { display: none; } /* 狭い画面では「ルール」を省く（解説はすぐ下） */
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 1; --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; } }
/* 上のバーの高さ ここまで */
