/* カーリング 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* 左が大きな画面（ハウスのまわり・投げたストーンを追う）、右の細い帯がシート全体。
   スマホでも画面と「投げる」まで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 470px, calc((100svh - 262px) * 0.739)); min-width: min(100%, 250px);
  aspect-ratio: 739 / 1000; height: auto; border-radius: var(--radius); background: #3E4A52; /* シートのまわりの色（ダークでも同じ） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair;
}
#cv.waiting { cursor: default; }
#cv.rolling { cursor: pointer; }
.board-wrap .callout { top: 66%; max-width: 80%; }
.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: 240px; font-weight: 700; }
.power .plabel { white-space: nowrap; }
.power output { min-width: 9.5em; font-weight: 400; font-size: 15px; line-height: 1.3; }
#power { flex: 1; height: 44px; accent-color: var(--accent); cursor: pointer; min-width: 100px; }
.aimbtn { min-width: 48px; display: inline-flex; align-items: center; justify-content: center; }
.throw { min-width: 104px; font-weight: 700; }
.turnbtn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 2px 12px 2px 6px; min-height: 48px; color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.turnbtn:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }
.turnbtn:disabled { opacity: .45; cursor: default; }
.tb-stone { fill: #9A9EA3; stroke: #5B616B; stroke-width: 1.5; }
.tb-arrow { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.tb-head { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
#turn-label { min-width: 3.2em; text-align: left; }
.sweep { min-width: 190px; min-height: 52px; font-weight: 700; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sweep small { font-weight: 400; font-size: 14px; }
.sweep.on { outline: 3px solid var(--ok); outline-offset: 2px; }
#fast { min-width: 96px; }

/* 手番のバー */
.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 .now { font-size: 14px; font-weight: 700; }
.hud .left { display: inline-flex; gap: 1px; align-items: center; }
.stage svg.ms { display: inline-block; vertical-align: middle; flex: none; width: auto; }
.hud .ham { font-size: 13px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; color: var(--ink-sub); }

/* スコアボード */
.scoreboard { margin: 12px auto 0; max-width: 560px; overflow-x: auto; }
.scoreboard table { border-collapse: collapse; margin: 0 auto; font-variant-numeric: tabular-nums; font-size: 15px; }
.scoreboard th, .scoreboard td { border: 1px solid var(--line); padding: 2px 7px; text-align: center; min-width: 28px; }
.scoreboard th { font-weight: 400; color: var(--ink-sub); font-size: 14px; }
.scoreboard td.name { text-align: left; font-weight: 700; white-space: nowrap; }
.scoreboard td.tot { font-weight: 700; }
.scoreboard .cur { background: var(--accent-soft); }
.scoreboard .hm { font-size: 11px; color: var(--ink-sub); vertical-align: super; }

.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; }

.result-box { z-index: 6; inset: 8% 4% auto; }
.result-box .big { margin: 0 0 8px; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-box .scoreboard { margin: 0 0 8px; }
.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: 4% 2% auto; padding: 12px; }
  .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; }
  .throw { min-width: 84px; }
  .turnbtn { padding-right: 8px; }
}

/* 英語のページだけ（index.en.html）: 回転のボタンの文字が縮まないように、長い知らせは折り返す */
:root:lang(en) .turnbtn, :root:lang(en) #turn-label { flex-shrink: 0; }
:root:lang(en) .board-wrap .callout { white-space: normal; text-align: center; border-radius: 28px; width: max-content; }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.75; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2.75; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
:root:lang(en) .turnbar { --tb-msg-lines: 4; --tb-st-lines: 2.75; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 4; --tb-st-lines: 2.75; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 1.25; } }
/* 上のバーの高さ ここまで */
