/* 花札こいこい固有の見た目（共通は ../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; }
/* PC: 卓（縦長 560:712）が画面の下にはみ出さないよう、画面の高さに合わせて幅を決める（盤の上端までスクロールすれば、手番バーと卓が1画面に収まる。G9） */
@media (min-width: 700px) { .board-wrap { max-width: max(420px, min(640px, calc((100vh - 110px) * 560 / 712))); } }
@media (max-width: 480px) { .stage { padding: 6px; } }

/* 卓の上の文字・枠 */
.zone { fill: rgba(0, 0, 0, .10); stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; stroke-dasharray: 6 5; }
.cap-box { fill: rgba(0, 0, 0, .12); stroke: rgba(255, 255, 255, .16); stroke-width: 1; }
.cap-label { fill: #F2EEE3; paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 3px; }
.cap-label.near { fill: #FFE08A; }
.on-felt { fill: #F2EEE3; }
.on-felt, .reach-head { paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 3px; } /* 畳の上でも読めるよう縁取り */
.on-felt.sub { fill: #DCD6C8; }

/* 席の札 */
.strip-box { fill: #FFF8EA; stroke: rgba(0, 0, 0, .3); stroke-width: 1.5; }
.strip.on .strip-box { stroke: #1F2328; stroke-width: 3.5; }
.strip-name, .strip-score { fill: #1F2328; }
.strip-sub { fill: #5B616B; }
.tag rect { fill: #FFFFFF; stroke: #B7791F; stroke-width: 1.5; }
.tag text { fill: #8A5A10; }
.tag.dark rect { fill: #1F2328; stroke: #1F2328; }
.tag.dark text { fill: #FFF8EA; }

/* できかけの役 */
.reach-head { fill: #F2EEE3; }
.pill rect { fill: #FFF3C4; stroke: #1F2328; stroke-width: 1.2; }
.pill text { fill: #1F2328; }
.pill.warn rect { fill: #FFFFFF; stroke: #B23A3A; stroke-width: 2; }
.pill.warn text { fill: #8E2020; }

/* 札 */
.card .ring { fill: none; stroke: none; }
.card .lift { transition: transform 150ms ease-out; }
.card.can .ring { stroke: #F2C230; stroke-width: 4; }
.card.sel .lift { transform: translateY(-16px); }
.card.sel .ring { stroke: #FFFFFF; stroke-width: 5; }
.card.sel .piece { filter: var(--shadow-lift); }
.card.target .ring { stroke: #F2C230; stroke-width: 6; }
.card.target.focus .ring { stroke: #FFFFFF; stroke-width: 6; stroke-dasharray: 8 4; }
.card.dim { opacity: .5; }
.card.clickable { cursor: pointer; }
.card { transition: opacity 150ms; }
.card .flip { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) { .card .lift { transition: none; } }

/* 役・結果の知らせ（卓の上に重ねる） */
.yaku-box {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: min(94%, 460px); max-height: 74%; overflow: auto;
  background: var(--surface); color: var(--ink); border: 3px solid var(--ink); border-radius: var(--radius); padding: 14px 16px; text-align: center;
}
.yaku-box h2 { margin: 0 0 6px; font-size: 1.35rem; }
.yaku-box .yrows { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
.yaku-box .yrow { display: flex; align-items: center; gap: 8px; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.yaku-box .yname { font-weight: 800; font-size: 1.1rem; min-width: 5.5em; text-align: left; }
.yaku-box .ycards { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; justify-content: flex-start; }
.yaku-box .ycards img { height: 44px; width: auto; border-radius: 2px; }
.yaku-box .ycards .more { align-self: center; font-size: 14px; color: var(--ink-sub); margin-left: 4px; }
.yaku-box .ypts { font-weight: 800; min-width: 3em; text-align: right; }
.yaku-box .total { font-size: 1.15rem; font-weight: 800; margin: 4px 0; }
.yaku-box .note { color: var(--ink-sub); font-size: 14px; margin: 4px 0 0; }
.yaku-box .controls { justify-content: center; margin-top: 10px; }
.btn.koi { background: #B23A3A; border-color: #B23A3A; color: #FFFFFF; }
@media (max-width: 480px) { .yaku-box { top: 8%; max-height: 88%; padding: 10px; } .yaku-box .ycards img { height: 36px; } }

/* 操作 */
#actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; min-height: var(--tap); align-items: center; }
#actions .note { color: var(--ink-sub); font-size: 14px; }

/* 役の一覧（解説） */
.yaku-table td:first-child { white-space: nowrap; font-weight: 700; }
.howto img[src*="parts"] { max-width: 460px; }
.howto img[src*="turn"], .howto img[src*="koikoi"] { max-width: 600px; }

/* 花札の絵のクレジット */
.site-footer .credit { margin: 0 0 8px; font-size: 14px; }
/* 上のバーの高さを一定に（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: 4; --tb-st-lines: 2; --tb-rt: 0px; --tb-st-rt: 0px; }
@media (min-width: 375px) { :root:lang(en) .turnbar { --tb-msg-lines: 4; --tb-st-lines: 2; } }
@media (min-width: 641px) { :root:lang(en) .turnbar { --tb-msg-lines: 2; --tb-st-lines: 1; } }
/* 上のバーの高さ ここまで */
