/* ボウリング 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* レーンの画面は縦長（2:3）。スマホでも、画面と投げる操作まで1画面に入るよう、高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 440px, calc((100svh - 330px) * 0.6667)); min-width: min(100%, 250px);
  aspect-ratio: 2 / 3; height: auto; border-radius: var(--radius); background: #1D2127; /* レーンのまわりの色（ダークでも同じ） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#cv.dragx { cursor: ew-resize; }
#cv.tapgo { cursor: pointer; }
.board-wrap .callout { top: 40%; max-width: 90%; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.play-main { justify-content: center; }

/* 投げる操作 */
#throwbar { max-width: 440px; margin: 8px auto 0; }
.steps { display: flex; justify-content: center; gap: 6px; font-size: 15px; }
.steps span { padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-sub); }
.steps span.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.steps span.done { color: var(--ink); }
.throw-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.throw-row .arrow { min-width: 64px; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
.throw-row .go { flex: 1; max-width: 220px; min-height: 52px; font-size: 19px; }
.throw-row.small { justify-content: space-between; }
.curve {
  flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.curve:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.curve:disabled { opacity: .45; cursor: not-allowed; border-style: dashed; }
.curve b { min-width: 1.4em; text-align: left; }
.curve-label { color: var(--ink-sub); }

/* スコア表 */
.sheet-wrap { max-width: 640px; margin: 10px auto 0; overflow-x: auto; }
.sheet { display: grid; grid-template-columns: minmax(40px, auto) repeat(9, minmax(24px, 1fr)) minmax(36px, 1.4fr) minmax(36px, 1.2fr); min-width: 330px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; font-variant-numeric: tabular-nums; background: var(--surface); }
.sheet > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; min-width: 0; }
.sheet .hd { font-size: 12px; color: var(--ink-sub); background: var(--bg); line-height: 1.6; }
.sheet .nm { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 2px; white-space: nowrap; overflow: hidden; }
.sheet .fr { display: grid; grid-template-rows: auto auto; }
.sheet .bx { display: flex; justify-content: flex-end; }
.sheet .bx span { flex: 1; font-size: 13px; line-height: 20px; min-height: 20px; border-left: 1px solid var(--line); }
.sheet .bx span:first-child { border-left: 0; }
.sheet .fr:not(.f10) .bx span:first-child { flex: 1; }
.sheet .bx span.sp { position: relative; }
.sheet .bx span.sp::after { content: ""; position: absolute; left: 50%; top: 50%; width: 17px; height: 17px; transform: translate(-50%, -50%); border: 1.5px solid var(--ng); border-radius: 50%; }
.sheet .bx span.mk { font-weight: 700; }
.sheet .tt { font-size: 14px; line-height: 22px; min-height: 22px; font-weight: 700; }
.sheet .sum { font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.sheet .cur { background: var(--accent-soft); }
.sheet .row-on { box-shadow: inset 3px 0 0 var(--accent); }
.sheet > div:nth-child(12n) { border-right: 0; }

.pause-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 { font-weight: 700; font-size: 1.15rem; margin: 0 0 8px; }

/* 手番のバー */
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.hud .who { display: inline-flex; align-items: center; gap: 4px; }
.hud .sub { color: var(--ink-sub); font-size: 15px; font-weight: 400; }
.hud .pt { font-weight: 700; }

.result-box { z-index: 6; inset: 8% 5% auto; }
.result-box ol { display: block; margin: 0 auto 8px; max-width: 280px; }
.result-box li { justify-content: space-between; font-variant-numeric: tabular-nums; }
.result-box li b { font-size: 1.2rem; }
.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); }
.result-box .big { margin: 0 0 8px; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 5% 3% auto; padding: 14px; }
  .result-box h2 { font-size: 1.3rem; }
  .turnbar { margin-bottom: 6px; }
  .controls { margin-top: 8px; }
  .throw-row { margin-top: 6px; }
}
/* 上のバーの高さを一定に（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: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
