/* =====================================================================
   style.css — ブラックジャック（21）ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる。
   ===================================================================== */

/* 設定のチェックボックス行 */
.sg-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

/* 数値表示（所持チップ・最高記録・ベット） */
.bj-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
}
.sg-stat {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
}
.sg-stat__label {
  font-size: 0.72rem;
  color: var(--sg-muted, #777);
}
.sg-stat__value {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ベット行 */
.bj-bet-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.bj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bj-chip {
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}

/* 操作ボタン群 */
.bj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

/* 手札エリア */
.bj-hand__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.bj-hand__name {
  font-weight: 600;
  color: var(--sg-muted, #777);
}
.bj-hand__total {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--sg-fg, #1c2530);
}

/* カード並べ */
.bj-cards {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(5px, 1.6vw, 10px);
  min-height: calc(var(--bj-card-w, 60px) * 1.4);
  padding: 6px;
  border-radius: 10px;
  background: rgba(47, 133, 90, 0.1);
}

/* カード共通 */
.bj-card {
  --bj-card-w: clamp(46px, 15vw, 66px);
  position: relative;
  width: var(--bj-card-w);
  height: calc(var(--bj-card-w) * 1.4);
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: calc(var(--bj-card-w) * 0.12);
  background: #fff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  flex: 0 0 auto;
}
.bj-card.is-red {
  color: #c0392b;
}
.bj-card.is-black {
  color: #1c2530;
}

/* 空プレースホルダ（手札が無いとき用の高さ確保） */
.bj-card.is-empty {
  background: transparent;
  border: 1px dashed var(--sg-border, #b9c0cc);
  box-shadow: none;
}

/* カードの表記 */
.bj-corner {
  position: absolute;
  font-weight: 700;
  line-height: 1;
  font-size: clamp(0.64rem, 3.4vw, 0.95rem);
  text-align: center;
}
.bj-corner--tl {
  top: 4%;
  left: 8%;
}
.bj-corner--br {
  bottom: 4%;
  right: 8%;
  transform: rotate(180deg);
}
.bj-pip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1rem, 5vw, 1.7rem);
  line-height: 1;
}

/* 裏向き */
.bj-card.is-back {
  background: repeating-linear-gradient(
      45deg,
      var(--sg-primary, #3b5bdb),
      var(--sg-primary, #3b5bdb) 4px,
      #2f49b0 4px,
      #2f49b0 8px
    );
  border-color: rgba(0, 0, 0, 0.35);
  color: transparent;
}

/* 結果メッセージ */
.bj-result {
  margin-top: 12px;
  text-align: center;
  font-weight: 700;
}
.bj-result.is-win {
  color: var(--sg-accent, #2f9e44);
}
.bj-result.is-lose {
  color: #c0392b;
}
.bj-result.is-push {
  color: var(--sg-muted, #777);
}
