/* あっち向いてホイ固有の見た目（共通は ../common/base.css） */
.board-wrap { position: relative; max-width: 640px; margin: 0 auto; }
#board { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.status .sub { font-weight: 400; color: var(--ink-sub); font-size: .9rem; margin-left: 4px; }

/* 人物の画像の差し替え（短いフェードと小さな弾み）・掛け声のうなずき */
.sprite.swap { animation: swap .16s ease-out; }
@keyframes swap { from { opacity: .45; translate: 0 5px; } to { opacity: 1; translate: 0 0; } }
.sprite.bob { animation: bob .18s ease-out; }
@keyframes bob { 50% { translate: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .sprite.swap, .sprite.bob { animation: none; } }

/* 掛け声（盤の中央上に大きく）と押せる時間の帯 */
#chant { font: 800 44px var(--font); fill: #3B2A20; paint-order: stroke; stroke: #EFE8DA; stroke-width: 6px; }
#chant.go { fill: #2F5D8A; font-size: 54px; }
#chant[data-tone="you"] { fill: #2F6DB5; }
#chant[data-tone="cpu"], #chant[data-tone="ng"] { fill: #B23A3A; }
#detail .detail-t { font: 700 26px var(--font); fill: #3B2A20; white-space: pre; }
#detail .detail-a { fill: #3B2A20; }
#chant.beat { animation: chantpop .16s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes chantpop { from { scale: .8; } to { scale: 1; } }
@media (prefers-reduced-motion: reduce) { #chant.beat { animation: none; } }
.time-bg { fill: rgba(90, 58, 40, .15); }
.time-fill { fill: #2F5D8A; }

/* 名札（机の右側。名前・役わり・とった本数） */
.tag rect { fill: #FFFDF8; stroke: #5A3A28; stroke-width: 2; }
.tag.on rect { stroke: #2F5D8A; stroke-width: 4; }
.tag-name { font: 700 18px var(--font); fill: #3B2A20; }
.tag.on .tag-name { fill: #2F5D8A; }
.tag-dot { stroke: #5A3A28; stroke-width: 2; }
.tag-dot.cpu { fill: #C8453B; } .tag-dot.you { fill: #2F6DB5; }
.pip { fill: #fff; stroke: #5A3A28; stroke-width: 2; }
.pip.on { fill: #D9A21B; }
.me-tag rect { fill: #FFFDF8; stroke: #5A3A28; stroke-width: 2.5; }
.me-tag text { font: 800 19px var(--font); fill: #2F6DB5; }

/* 「まだ！」（早すぎたとき） */
.early {
  position: absolute; left: 50%; top: 8%; transform: translateX(-50%);
  background: var(--surface); color: var(--warn); border: 2px solid var(--warn); top: 17%; font-weight: 700; border-radius: 999px; padding: 2px 16px; pointer-events: none;
}

/* 操作ボタン（大きく。じゃんけんは3つ、向きは十字） */
.pad { margin-top: 10px; min-height: 184px; display: flex; align-items: center; justify-content: center; }
.padbtn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px 8px; background: var(--surface); color: var(--ink); border-color: var(--line-strong); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.padbtn img { width: 64px; height: 72px; object-fit: contain; }
.padbtn span { font-size: 16px; line-height: 1.2; display: flex; flex-direction: column; align-items: center; }
.padbtn kbd { font: 14px var(--font); color: var(--ink-sub); }
.pad.open .padbtn:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.pad-hands { display: grid; grid-template-columns: repeat(3, minmax(88px, 132px)); gap: 12px; }
.pad-hands .padbtn { height: 120px; }
.pad-dirs { display: grid; grid-template-columns: repeat(3, 76px); grid-template-rows: repeat(3, 56px); gap: 8px 12px; }
.pad-dirs .padbtn { flex-direction: row; gap: 6px; font-size: 17px; }
.pad-dirs .padbtn svg { width: 26px; height: 26px; }
.pad-dirs [data-dir="up"] { grid-column: 2; grid-row: 1; }
.pad-dirs [data-dir="left"] { grid-column: 1; grid-row: 2; }
.pad-dirs [data-dir="right"] { grid-column: 3; grid-row: 2; }
.pad-dirs [data-dir="down"] { grid-column: 2; grid-row: 3; }
.pad-hands[hidden], .pad-dirs[hidden] { display: none; }

.result-box .score-line { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.result-box { inset: 14% 8% auto; }

@media (max-width: 480px) {
  .game-lead { display: none; }
  .pad { min-height: 176px; }
  .pad-hands .padbtn { height: 108px; }
  .pad-hands .padbtn img { width: 52px; height: 60px; }
  .tag-name { font-size: 22px; } /* スマホ幅でも画面上で12px以上 */
  .me-tag text { font-size: 22px; }
  #chant { font-size: 50px; }
  #chant.go { font-size: 60px; }
}

.howto img[src*="same"], .howto img[src*="differ"], .howto img[src*="aiko"], .howto img[src*="kocchi"] { max-width: 480px; }
:root:lang(en) .pad-dirs .padbtn svg { flex-shrink: 0; } /* 英語のページ: 文字が長くても矢印を縮めない */
:root:lang(en) .pad-dirs { grid-template-columns: repeat(3, 96px); }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 3; --tb-st-lines: 1; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
