/* ブラックジャック固有の見た目（共通は ../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; }

/* テーブルの文字・山札 */
.felt-text { fill: rgba(255, 248, 234, .78); }
.felt-text.sub { fill: rgba(255, 231, 163, .85); }
.stock-slot { fill: rgba(0, 0, 0, .14); stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.shoe .card, .discard .card { filter: var(--shadow-piece); }
.pile-label { fill: #F2EEE3; }
.on-table .piece, .over .card .piece { filter: var(--shadow-piece); }
.card .flip { transform-box: fill-box; transform-origin: center; }
.card.lift .piece { filter: var(--shadow-lift); }

/* 名札・合計 */
.nametag rect { fill: #FFF8EA; stroke: rgba(0, 0, 0, .35); stroke-width: 1.5; }
.nametag text { fill: #1F2328; }
.total rect { fill: #FFF8EA; stroke: #1F2328; stroke-width: 2.5; }
.total text { fill: #1F2328; }
.total .pre { fill: #5B616B; }
.total.up rect { fill: #E9E4D8; stroke: rgba(0, 0, 0, .35); stroke-width: 1.5; }
.total.bust rect { fill: #B23A3A; stroke: #FFFFFF; }
.total.bust text, .total.bust .pre { fill: #FFFFFF; }
.total.bj rect { fill: #FFE7A3; stroke: #B7791F; stroke-width: 3; }
.total.bj .pre { fill: #7A5212; }
.total.n21 rect { fill: #E3F2E8; stroke: #2E7D4F; stroke-width: 3; }

/* 出した点・結果 */
.token .tk { fill: #2F5D8A; stroke: #FFFFFF; stroke-width: 2; filter: var(--shadow-piece); }
.token .tk-ring { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; stroke-dasharray: 4 3; }
.token text { fill: #FFFFFF; }
.token.ins .tk { fill: #7A5AA6; }
.token-label { fill: #F2EEE3; }
.res rect { stroke: #FFFFFF; stroke-width: 2; }
.res text { fill: #FFFFFF; }
.res.win rect { fill: #2E7D4F; }
.res.lose rect { fill: #B23A3A; }
.res.push rect { fill: #5B616B; }
.hand.r-lose .on-table { opacity: .8; }
.active-frame { fill: rgba(255, 231, 163, .10); stroke: #FFE7A3; stroke-width: 3; stroke-dasharray: 8 5; }

/* 下の帯 */
.bottom-bg { fill: rgba(0, 0, 0, .28); stroke: rgba(255, 255, 255, .25); stroke-width: 1; }
.b-points, .b-round { fill: #FFF8EA; }
.b-label { fill: #E7E0CF; font-weight: 700; }

/* 操作 */
#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; }
#actions .group-label { font-weight: 700; margin-right: 2px; }
#actions .btn.bet { min-width: 64px; }
#actions .btn.bet.chosen { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); } /* 選んだ点数は主ボタンと同じ地（ダークでも濃い青。D3/D14） */
#actions .btn.off { opacity: .45; border-style: dashed; } /* 今は選べない手（押すと理由を出す）。押せないボタンと同じ見た目 */
#actions .btn .k { font-size: 14px; padding: 0 4px; margin-left: 4px; opacity: .8; border-radius: 4px; border: 1px solid currentColor; background: transparent; color: inherit; font-family: inherit; }
#actions #deal-btn { margin-left: auto; min-width: 120px; }
@media (hover: none) { #actions .btn .k { display: none; } }

/* ヒント（基本戦略の表） */
#hint { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--bg); }
#hint p { margin: 0 0 8px; }
#hint .advice { font-weight: 700; }
#hint .evs { font-size: 14px; color: var(--ink-sub); }
.strat-wrap { overflow-x: auto; }
table.strat { border-collapse: collapse; margin: 4px 0 8px; font-size: 14px; width: 100%; }
table.strat caption { text-align: left; font-weight: 700; padding: 0 0 4px; }
table.strat th, table.strat td { border: 1px solid var(--line); padding: 3px 2px; text-align: center; min-width: 26px; }
table.strat th.corner { font-size: 14px; font-weight: 700; line-height: 1.2; }
table.strat tr.grp th { text-align: left; background: var(--surface); font-size: 14px; padding: 4px 6px; }
table.strat tbody th { white-space: nowrap; padding: 3px 6px; }
table.strat .col-on { outline: 3px solid var(--accent); outline-offset: -3px; }
table.strat tr.row-on th { outline: 3px solid var(--accent); outline-offset: -3px; }
table.strat td.here { outline: 4px solid #1F2328; outline-offset: -4px; font-size: 16px; font-weight: 800; }
.c-h { background: #F6D5D0; color: #6E1F17; }
.c-s { background: #F2E9C9; color: #5A4610; }
.c-d { background: #CFE3F5; color: #173E66; }
.c-p { background: #D6ECD9; color: #1C5230; }
.c-r { background: #E3DCEE; color: #45306A; }
#hint .legend { font-size: 14px; line-height: 2; }
#hint .legend .lg { display: inline-block; margin-right: 12px; white-space: nowrap; }
#hint .legend .lg > span { display: inline-block; min-width: 24px; text-align: center; border-radius: 4px; margin-right: 3px; font-weight: 700; }
.hint-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.hint-tabs .tab { min-height: var(--tap); padding: 4px 12px; font-size: 15px; }
.hint-tabs .tab.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }

.result-box { inset: 10% 6% auto; max-height: 86%; overflow: auto; }
.result-box ul { list-style: none; padding: 0; margin: 0 0 12px; text-align: left; display: inline-block; }
.result-box li { font-size: 16px; padding: 2px 0; }
.result-box li.main { font-size: 18px; }
.result-box li.best { color: var(--ok); font-weight: 700; }
.howto img { max-width: 640px; }
@media (max-width: 480px) {
  .article th, .article td { padding: 6px; font-size: 14px; }
  #actions #deal-btn { margin-left: 0; flex: 1 1 100%; }
  #actions .btn.bet { min-width: 0; flex: 1 1 0; padding-left: 4px; padding-right: 4px; }
  #actions .btn.act { flex: 1 1 28%; padding-left: 6px; padding-right: 6px; }
  table.strat { font-size: 14px; } /* D9: 14px以上。はみ出す分は横にスクロール（.strat-wrap） */
  table.strat th, table.strat td { min-width: 0; padding: 3px 1px; }
  table.strat tbody th { padding: 3px 3px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .c-h { background: #5A2A25; color: #F6D5D0; }
  :root:not([data-theme="light"]) .c-s { background: #4F4527; color: #F2E9C9; }
  :root:not([data-theme="light"]) .c-d { background: #23415E; color: #CFE3F5; }
  :root:not([data-theme="light"]) .c-p { background: #25482F; color: #D6ECD9; }
  :root:not([data-theme="light"]) .c-r { background: #3E3353; color: #E3DCEE; }
  :root:not([data-theme="light"]) table.strat td.here { outline-color: #FFF8EA; }
}
/* 上のバーの高さを一定に（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; } }
/* 上のバーの高さ ここまで */
