/* だるま落とし 固有の見た目（共通は ../common/base.css） */
.board-wrap { max-width: 560px; }
/* 画面の高さに合わせて大きさを決める（スマホでも「たたく」まで1画面に入るように） */
#cv {
  display: block; margin: 0 auto; width: min(100%, 560px, calc((100svh - 250px) / 0.9)); min-width: min(100%, 260px);
  aspect-ratio: 10 / 9; height: auto; border-radius: var(--radius); background: #EEE7D8; /* 壁の色（ダークでも同じ） */
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
#cv.pickable { cursor: pointer; }
#cv.pull { cursor: grab; }
#cv.pulling { cursor: grabbing; }
.board-wrap .callout { top: 30%; max-width: 86%; }
.linkbtn { display: inline-flex; align-items: center; text-decoration: none; }
.play-main { justify-content: center; }

/* たたく操作の列 */
#shotbar { max-width: 560px; margin: 8px auto 0; }
.shot-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.seg { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.segbtn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 12px; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; justify-content: center; }
.segbtn span { white-space: nowrap; }
.segbtn + .segbtn { border-left: 1px solid var(--line-strong); }
.segbtn[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); }
.segbtn:focus-visible { outline: 3px solid var(--warn); outline-offset: -3px; }
.segbtn:disabled { opacity: .45; cursor: default; }
.pick-label { min-width: 4.2em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); line-height: 44px; padding: 0 6px; }

/* 強さのゲージ（左が弱い・右が強い） */
.gauge { position: relative; flex: 1; min-width: 200px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); overflow: hidden; touch-action: none; }
.gzone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--ok) 22%, transparent); border-left: 2px solid var(--ok); border-right: 2px solid var(--ok); }
.gfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.gneedle { position: absolute; top: 3px; bottom: 3px; width: 4px; margin-left: -2px; left: 0; background: var(--ink); border-radius: 2px; }
.gauge.running .gneedle { background: var(--accent); }
.gauge.stopped .gneedle { background: var(--ink); width: 6px; margin-left: -3px; }
.gtag { position: absolute; bottom: 2px; font-size: 13px; color: var(--ink-sub); pointer-events: none; }
.gl { left: 6px; } .gr { right: 6px; }
.hit { min-width: 120px; font-weight: 700; touch-action: manipulation; }

/* 手番のバー */
.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 .sub { color: var(--ink-sub); font-size: 14px; font-weight: 400; }
.hud .tag { font-size: 14px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; color: var(--ink-sub); font-weight: 700; }

.result-box { z-index: 6; inset: 8% 5% 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 .new { color: var(--ok); font-size: 14px; margin-left: 4px; }
@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; }
  .gauge { min-width: 0; }
  .hit { min-width: 96px; }
  .segbtn { padding: 0 10px; }
}
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 3; --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: 2; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
