/* パターゴルフ 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: none; }
/* コースは縦向き（横:縦 = 360:600）。スマホでもコースと「打つ」まで1画面に入るよう、画面の高さに合わせて幅を決める */
#cv {
  display: block; margin: 0 auto; width: min(100%, 440px, calc((100svh - 250px) * 0.6)); min-width: min(100%, 250px);
  aspect-ratio: 360 / 600; height: auto; border-radius: var(--radius); background: #D9D3C5; /* コースのまわりの地面（ダークでも同じ） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: crosshair;
}
#cv.waiting { cursor: default; }
@media (min-width: 700px) {
  #cv { width: min(100%, 440px, calc((100svh - 262px) * 0.6)); }
}
.board-wrap .callout { top: 36%; max-width: 86%; }
.play-main { justify-content: center; }

/* 打つ操作の列 */
#shotbar { max-width: 440px; 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: 52px; display: inline-flex; align-items: center; justify-content: center; }
.shoot, #fast { min-width: 110px; font-weight: 700; }

/* 手番のバー */
.hud { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.hud .hole { font-weight: 700; }
.hud .sub { color: var(--ink-sub); font-size: 14px; font-weight: 400; }
.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 .mk { font-size: 14px; }
.hud .stroke { font-weight: 700; }

.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; }

/* スコアカード（ホールの終わり・いつでも見られる窓） */
.card-box {
  position: absolute; left: 50%; top: 6%; transform: translateX(-50%); z-index: 6; width: min(96%, 560px); max-height: 88%; overflow: auto;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 14px 12px; text-align: center;
}
.card-box h2 { margin: 0 0 8px; font-size: 1.2rem; }
.card-box .controls { justify-content: center; margin-top: 10px; }
.sc-wrap { overflow-x: auto; }
table.sc { width: auto; min-width: 100%; margin: 0 0 8px; font-variant-numeric: tabular-nums; font-size: 15px; }
table.sc th, table.sc td { padding: 4px 5px; text-align: center; min-width: 26px; }
table.sc th:first-child, table.sc td:first-child { text-align: left; white-space: nowrap; }
table.sc .par td, table.sc .par th { color: var(--ink-sub); font-size: 14px; }
table.sc td.now { outline: 2px solid var(--accent); outline-offset: -2px; }
table.sc .under { color: var(--ok); font-weight: 700; }
table.sc .over2 { color: var(--ng); }
table.sc .tot { font-weight: 700; }
.sc-note { color: var(--ink-sub); font-size: 14px; margin: 4px 0 0; }

.result-box { z-index: 7; inset: 4% 3% auto; max-height: 92%; overflow: auto; }
.result-box .big { margin: 0 0 8px; font-size: 1.4rem; 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 ol.rank { list-style: none; padding: 0; margin: 0 0 10px; display: inline-block; text-align: left; }
.result-box ol.rank li { display: flex; gap: 10px; align-items: baseline; padding: 1px 0; font-variant-numeric: tabular-nums; }
.result-box ol.rank .r { min-width: 2.4em; font-weight: 700; }
.result-box ol.rank .t { font-weight: 700; margin-left: auto; padding-left: 16px; }
.result-box .rec { color: var(--ok); font-weight: 700; }
@media (max-width: 480px) {
  .stage { padding: 8px; }
  .result-box { inset: 3% 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; }
  table.sc { font-size: 14px; }
  table.sc th, table.sc td { padding: 3px 3px; min-width: 22px; }
}
/* 上のバーの高さを一定に（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.5; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1.25; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 3; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 3; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1.25; } }
/* 上のバーの高さ ここまで */
