/* ホームラン競争 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* 画面は 4:5。スマホでも「振る」ボタンまで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 480px, calc((100svh - 250px) * 0.8)); min-width: min(100%, 260px);
  aspect-ratio: 4 / 5; height: auto; border-radius: var(--radius); background: #CFE3EE; /* 空の色（ダークでも明るいまま） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#cv.aiming { cursor: crosshair; }
.board-wrap .callout { top: 12%; }
.play-main { justify-content: center; }
.btn.swing { min-width: 180px; min-height: 52px; font-size: 19px; touch-action: none; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }

/* 手番のバー */
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-variant-numeric: tabular-nums; }
.hud .who { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.hud .who i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid var(--ink); }
.hud b { font-size: 1.15rem; }
.hud .quota-ok { color: var(--ok); font-weight: 700; }

/* 10スイングの記録（◎ホームラン ○ヒット系 △ファウル ×空振り・凡打） */
.swing-log { list-style: none; margin: 0 auto 8px; padding: 0; display: flex; justify-content: center; gap: 6px; min-height: 30px; flex-wrap: wrap; }
.swing-log:empty { display: none; }
.swing-log li { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--ink-sub); background: var(--surface); }
.swing-log li.hr { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.swing-log li.hit { border-color: var(--ok); color: var(--ok); }
.swing-log li.out { color: var(--ng); border-color: var(--line-strong); }
.swing-log li.now { border-style: dashed; border-color: var(--accent); }

.pause-box {
  position: absolute; left: 50%; top: 45%; 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: 8% 6% 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); }
.result-box .new { color: var(--ok); font-size: 14px; margin-left: 4px; }
@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 4% 3% auto; padding: 14px; }
  .result-box h2 { font-size: 1.3rem; }
  .hud { gap: 2px 10px; font-size: .95rem; }
  .turnbar { margin-bottom: 6px; }
  .controls { margin-top: 8px; }
  .swing-log { gap: 4px; }
  .swing-log li { width: 26px; height: 26px; font-size: 13px; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 2.25; --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: 1; --tb-st-lines: 1; } }
: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; } }
/* 上のバーの高さ ここまで */
