/* ジンラミー 固有の見た目（共通は ../common/base.css） */
#table { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#table text { pointer-events: none; }
.stage { padding: 10px; }
@media (max-width: 480px) { .stage { padding: 6px; margin-left: -4px; margin-right: -4px; } } /* 盤だけ左右に広げる（ページの余白は共通の16px） */

/* 札 */
.card .piece { filter: var(--shadow-piece); }
.card.lift .piece, .card.picked .piece { filter: var(--shadow-lift); }
#table.my-turn .hand .pick-able, #table.my-turn .pile.pick-able { cursor: pointer; }
.card-hit { fill: transparent; }
.pile-box { fill: rgba(0, 0, 0, .12); stroke: rgba(255, 255, 255, .28); stroke-width: 1.5; stroke-dasharray: 5 4; }
.pile-label { fill: #F2EEE3; }

/* 枠 */
.ring { fill: none; stroke-width: 4; pointer-events: none; }
.ring.sel { stroke: #FFE7A3; stroke-width: 5; }
.ring.can { stroke: #FFE7A3; stroke-width: 4; stroke-dasharray: 9 6; }
.ring.knockable { stroke: #7FD49A; stroke-width: 4; stroke-dasharray: 7 5; }
.ring.fresh { stroke: #FFFFFF; stroke-width: 3; }
.ring.ban { stroke: #F08A84; stroke-width: 3; stroke-dasharray: 3 4; }
.ring.pick { stroke-width: 5; }
.ring.focus { stroke: #FFFFFF; stroke-width: 3; stroke-dasharray: 6 4; }
.card.off .piece { outline: none; }

/* 組の下の線と名前（フェルトの上なので明るい色） */
.span-line.set, .span-line.run { stroke: #A8E6BC; }
.span-line.dead { stroke: #F5D49A; }
.span-label.set, .span-label.run { fill: #CFF3DA; }
.span-label.dead { fill: #FBE3B6; }

/* 席 */
.seat-box { fill: #FFF8EA; stroke: rgba(0, 0, 0, .3); stroke-width: 1.5; transition: stroke var(--dur); }
.seat.on .seat-box { stroke: #1F2328; stroke-width: 4; }
.seat.you.can-knock .seat-box { stroke: #2E7D4F; stroke-width: 4; }
.seat.you.can-knock .you-score { fill: #2E7D4F; }
.cpu-seat .seat-box { fill: rgba(255, 248, 234, .14); stroke: rgba(255, 255, 255, .3); }
.cpu-seat .seat.on .seat-box { stroke: #FFF8EA; stroke-width: 3; }
.cpu-seat .seat-name { fill: #FFF8EA; }
.cpu-seat .seat-sub { fill: #E6E0D2; }
.seat-name { fill: #1F2328; }
.seat-sub { fill: #5B616B; }
.badge rect { fill: #FFFFFF; stroke: #1F2328; stroke-width: 1.5; }
.badge text { fill: #1F2328; }
.badge.out rect { fill: #2E7D4F; stroke: #2E7D4F; }
.badge.out text, .badge.lose text { fill: #FFFFFF; }
.badge.lose rect { fill: #B23A3A; stroke: #B23A3A; }

/* 操作ボタン */
#play .acts { justify-content: center; margin-bottom: 8px; }
#play .acts .btn { min-width: 8em; }
#knock.ready { box-shadow: 0 0 0 3px var(--ok); }
.rule-list .field { margin-bottom: 12px; }

/* 結果 */
.result-box { inset: 4% 3% auto; max-height: 92%; overflow: auto; padding: 18px 16px; }
.result-hands { display: flex; flex-direction: column; gap: 6px; margin: 0 auto 8px; max-width: 560px; }
.rh-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); }
.rh-row.won { border-color: var(--ok); border-width: 2px; }
.rh-row .who { display: flex; align-items: center; gap: 6px; min-width: 4.6em; font-weight: 700; }
.rh-row .mini-hand { height: 34px; flex: 0 1 auto; min-width: 0; }
.rh-row .dw { margin-left: auto; font-weight: 700; white-space: nowrap; }
.result-box .detail { font-weight: 700; margin: 6px 0; }
.result-box table.score { margin: 0 auto 8px; border-collapse: collapse; font-size: 15px; }
.result-box table.score th, .result-box table.score td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.result-box table.score th:first-child { text-align: left; font-weight: 400; }
.result-box table.score tr:last-child th, .result-box table.score tr:last-child td { font-weight: 800; border-bottom: none; }
@media (max-width: 480px) {
  .result-box { inset: 2% 2% auto; padding: 12px 8px; max-height: 96%; }
  .result-box h2 { font-size: 1.25rem; margin-bottom: 6px; }
  .rh-row { flex-wrap: wrap; gap: 4px; }
  .rh-row .mini-hand { order: 3; max-width: 100%; height: auto; }
  .result-box .detail, .result-box .note { font-size: 14px; }
  .result-box table.score { font-size: 14px; }
  .result-box table.score th, .result-box table.score td { padding: 3px 6px; }
  .result-box.final .result-hands, .result-box.final .detail { display: none; } /* 最後の結果は点の表だけ（手札は盤の上で見える） */
}
@media (max-width: 480px) { .article th, .article td { padding: 6px; font-size: 14px; } }
@media (max-width: 480px) { #play .controls { gap: 6px; } #play .btn.icon { padding: 0 8px; font-size: 14px; } #play .spacer { display: none; } #play .acts .btn { min-width: 0; flex: 1; padding: 0 8px; } }
/* 上のバーの高さを一定に（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: 3; --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; } }
/* 上のバーの高さ ここまで */
