/* ビリヤード 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* 台は縦向き（横:縦 = 1270.6:2261.2）。スマホでも台と「突く」まで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 470px, calc((100svh - 262px) * 0.5619)); min-width: min(100%, 250px);
  aspect-ratio: 1270.6 / 2261.2; height: auto; border-radius: var(--radius); background: #3B2A22; /* 木のふちの色（ダークでも同じ） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair;
}
#cv.placing { cursor: grab; }
#cv.waiting { cursor: default; }
@media (min-width: 700px) {
  #cv { width: min(100%, 470px, calc((100svh - 270px) * 0.5619)); }
}
.board-wrap .callout { top: 38%; max-width: 86%; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.play-main { justify-content: center; }

/* 突く操作の列 */
#shotbar { max-width: 470px; margin: 8px auto 0; }
.shot-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.power { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 220px; font-weight: 700; }
.power .plabel { white-space: nowrap; }
.power output { min-width: 2.2em; text-align: right; font-variant-numeric: tabular-nums; }
#power { flex: 1; height: 44px; accent-color: var(--accent); cursor: pointer; }
.aimbtn { min-width: 48px; display: inline-flex; align-items: center; justify-content: center; }
.shoot, #fast { min-width: 96px; font-weight: 700; }
.spin { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 2px 10px 2px 4px; min-height: 48px; color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.spin:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.spin-ball { fill: #F2EFE6; stroke: #5B616B; stroke-width: 1.5; }
.spin-mid { stroke: #B9B4A8; stroke-width: 1; stroke-dasharray: 2 2; }
.spin-dot { fill: #B23A3A; }
#spin-label { min-width: 3.2em; text-align: left; }
:root:lang(en) #spin-label { white-space: nowrap; } /* 英語の「Big follow」を1行に */
.pushopt { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-size: 15px; }
.pushopt input { width: 20px; height: 20px; accent-color: var(--accent); }

/* 手番のバー */
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.hud .pl { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 2px solid transparent; }
.hud .pl.on { border-color: var(--accent); background: var(--accent-soft); }
.hud .sc { font-weight: 700; }
.hud .sub { color: var(--ink-sub); font-size: 14px; }
.hud .warn { color: var(--warn); font-weight: 700; font-size: 14px; }
.hud .balls { display: inline-flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.stage svg.mb { display: inline-block; vertical-align: middle; flex: none; }
.mb.dim { opacity: .28; }
.hud .grp { font-size: 14px; font-weight: 400; color: var(--ink-sub); }

.pause-box, .ask-box {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 5; width: min(88%, 340px);
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 20px; text-align: center;
}
.pause-title, .ask-title { font-weight: 700; font-size: 1.15rem; margin: 0 0 8px; }
.ask-note { margin: 0 0 4px; font-size: 15px; }
.ask-box .controls { justify-content: center; }

.result-box { z-index: 6; inset: 10% 5% 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 .win { color: var(--ok); }
.result-box .lose { color: var(--ng); }
@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 6% 3% auto; padding: 14px; }
  .result-box h2 { font-size: 1.3rem; }
  .turnbar { margin-bottom: 6px; }
  .controls { margin-top: 8px; }
  .power { min-width: 0; width: 100%; }
  .shot-row { gap: 6px; }
  .shoot { min-width: 80px; }
}
.hud .next { color: var(--ink); font-size: 1rem; }
/* スマホ幅では残りの球の印を小さく（手番の行が3段に折り返して上のバーが高くならないように。No.93） */
@media (max-width: 400px) { .hud .balls .mb { width: 16px !important; height: 16px !important; } }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 3; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.25; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.25; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
/* 上のバーの高さ ここまで */
