/* すごろく固有の見た目（共通は ../common/base.css） */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.board-wrap { position: relative; max-width: 640px; margin: 0 auto; }
#board { border-radius: var(--radius); border: 1px solid var(--line); background: #E4F1D6; }

/* マス */
.cell text { font-family: var(--font); font-weight: 700; text-anchor: middle; }
.cell .num { fill: #8A7A6A; }
.cell .big-label { letter-spacing: -0.5px; }
.cell.here rect { stroke-width: 4; }

/* 駒 */
.pc .pc-body { filter: var(--shadow-piece); transition: filter var(--dur); }
.pc .pc-mark { fill: #FFFFFF; font-family: var(--font); font-weight: 700; text-anchor: middle; }
.pc .pc-ring { fill: none; stroke: none; }
.pc.turn .pc-ring { fill: rgba(47, 93, 138, .18); stroke: var(--accent); stroke-width: 3; }
.pc.moving .pc-body { filter: var(--shadow-lift); }

/* 盤の上のサイコロ */
#board-dice .dice-ring { fill: rgba(255, 252, 244, .9); stroke: rgba(74, 55, 40, .35); stroke-width: 2; }
#board-dice.ready { cursor: pointer; }
#board-dice.ready .dice-ring { stroke: var(--accent); stroke-width: 5; }
#board-dice .dice-body { filter: var(--shadow-piece); }
#board-dice.ready .dice-body { animation: nudge 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes nudge { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-7deg); } 86% { transform: rotate(7deg); } 94% { transform: rotate(-3deg); } }
@media (prefers-reduced-motion: reduce) { #board-dice.ready .dice-body { animation: none; } }

/* あそぶ人の並び（順番・位置・やすみ） */
.players { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.players:empty { display: none; }
.pchip { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px; line-height: 1.5; }
.pchip .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #4A3728; color: #fff; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pchip b { font-weight: 700; }
.pchip .pos { color: var(--ink-sub); font-size: 14px; }
.pchip .zz { font-size: 14px; font-weight: 700; color: var(--btn-ink); background: var(--btn); border-radius: 999px; padding: 0 8px; }
.pchip.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

/* しかけのますに止まったときの大きな知らせ（ひらがな・大きな文字） */
.event-card {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none;
  background: var(--surface); color: var(--ink); border: 4px solid var(--ink); border-radius: 18px; padding: 10px 26px 14px; min-width: 240px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
.event-card img { width: clamp(64px, 16vw, 100px); height: auto; }
.event-card p { margin: 0; font-size: clamp(22px, 5.5vw, 30px); font-weight: 700; line-height: 1.4; white-space: nowrap; }
.event-card.pop { animation: pop2 .28s ease-out; }
@keyframes pop2 { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .event-card.pop { animation: none; } }
.callout { font-size: clamp(22px, 5.5vw, 30px); z-index: 4; }

/* 主ボタン（「はじめる」の窓の主ボタンと同じ大きさ）。始める前は出さない（G3） */
.rollrow .btn.roll { min-height: 52px; font-size: 19px; padding: 0 28px; }
.legend { margin-top: 10px; }
.legend summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: var(--tap); display: flex; align-items: center; }
.legend ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.legend svg { width: 40px; height: 40px; flex: none; }

.result-box { z-index: 6; }
.result-box li { font-size: 17px; }

@media (max-width: 480px) {
  .stage { padding: 8px; }
  .pchip { font-size: 14px; padding: 2px 8px 2px 4px; }
  .rollrow .btn.roll { flex: 1 1 100%; order: -1; }
  .event-card { min-width: 200px; padding: 8px 18px 12px; }
}
/* 遊ぶ人の並びの高さを一定に（No.93。スマホ幅では2段に折り返す） */
@media (max-width: 640px) { .players:not(:empty) { min-height: 66px; align-content: flex-start; } }
/* 上のバーの高さを一定に（No.93。数字は一番長い文が画面の幅（360px・375px 以上・641px 以上）で何行になるか。--tb-rt はふりがなの分。base.css・turnbar.js） */
.turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; --tb-rt: 11px; --tb-st-rt: 0px; }
@media (min-width: 375px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
@media (min-width: 641px) { .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
:root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 1; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
