/* Flyback 21 — table styles (loaded on / and /rz-game/) */

.bj {
  position: relative; border-radius: var(--r-case); overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--dial-600), var(--dial-700) 45%, var(--dial-800));
  box-shadow: 0 0 0 1px var(--dial-rim), 0 0 0 7px var(--dial-950), 0 0 0 8px var(--steel-dark), 0 30px 60px rgba(0,0,0,.45);
  margin: 8px;
}
/* tachymeter rail — a linear scale on the top and bottom edge of the case */
.bj__rail {
  height: 30px; position: relative; background: var(--dial-950);
  color: var(--on-dial-soft); font: 700 8.5px/1 var(--f-dial); letter-spacing: .12em;
  display: flex; align-items: flex-end; justify-content: space-between; padding: 0 22px 5px;
}
.bj__rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--face-3) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(90deg, rgba(213,199,162,.55) 0 1px, transparent 1px 12px);
  background-size: 100% 12px, 100% 6px; background-repeat: no-repeat;
}
.bj__rail--bottom { align-items: flex-start; padding: 5px 22px 0; }
.bj__rail--bottom::before { top: auto; bottom: 0; background-position: 0 100%, 0 100%; }
.bj__rail span:nth-child(odd) { color: var(--face-3); }

.bj__body { padding: 26px 30px 30px; display: grid; gap: 22px; }

.bj__gauges { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.bj__gauges .subdial { --s: 104px; }
.bj__gauges .subdial__val { font-size: 17px; }
.bj__callout {
  min-height: 74px; display: grid; place-items: center; text-align: center;
  border-top: 1px solid rgba(213,199,162,.25); border-bottom: 1px solid rgba(213,199,162,.25);
  padding: 10px 14px;
}
.bj__callout strong { display: block; font-family: var(--f-dial); font-size: clamp(14px, 2vw, 21px); letter-spacing: .06em; text-transform: uppercase; color: var(--face); }
.bj__callout span { display: block; font-size: 14.5px; color: var(--on-dial-soft); margin-top: 6px; }
.bj__callout.is-win strong { color: #F7E7A8; }
.bj__callout.is-bj { background: var(--face); border-color: var(--face); border-radius: 14px; }
.bj__callout.is-bj strong { color: var(--hand-deep); }
.bj__callout.is-bj span { color: var(--ink-soft); }
.bj__callout.is-lose strong { color: #FF8A7E; }
.bj__callout.is-warn strong { color: #FFB199; }
.bj__callout.pulse { animation: callout .5s var(--sweep); }
@keyframes callout { from { transform: scale(.94); opacity: .2; } to { transform: none; opacity: 1; } }

.bj__hand { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; min-height: 132px; }
.bj__hand .subdial { --s: 88px; }
.bj__hand .subdial__val { font-size: 22px; }
.bj__who { font: 700 10px/1 var(--f-dial); letter-spacing: .2em; text-transform: uppercase; color: var(--on-dial-soft); margin-bottom: 10px; }
.bj__cards { display: flex; flex-wrap: wrap; gap: 10px; min-height: 112px; align-items: center; }

/* cards */
.card { width: 76px; height: 108px; perspective: 700px; flex: none; }
.card__in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s var(--sweep); }
.card.is-down .card__in { transform: rotateY(180deg); }
.card.is-new { animation: deal .38s var(--sweep); }
@keyframes deal { from { transform: translate(40px, -30px) rotate(6deg); opacity: 0; } to { transform: none; opacity: 1; } }
.card__face, .card__back {
  position: absolute; inset: 0; border-radius: 9px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,.35);
}
.card__face { background: linear-gradient(180deg, #FFFBEE, var(--face)); color: var(--ink); border: 1px solid var(--face-3); }
.card__face.red { color: #B4211A; }
.card__rank { position: absolute; left: 8px; top: 7px; font: 700 15px/1 var(--f-dial); text-align: center; }
.card__rank i { display: block; font-style: normal; font-family: var(--f-text); font-size: 14px; margin-top: 3px; }
.card__pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; line-height: 1; padding-top: 10px; }
.card__corner { position: absolute; right: 8px; bottom: 7px; font: 700 11px/1 var(--f-dial); transform: rotate(180deg); }
.card__back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 50%, var(--face) 0 13px, var(--hand) 13px 15px, transparent 15px),
    repeating-linear-gradient(45deg, rgba(243,236,216,.13) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(-45deg, rgba(243,236,216,.13) 0 1px, transparent 1px 6px),
    var(--dial-900);
  border: 3px solid var(--face-2);
}

/* controls */
.bj__controls { display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: center; border-top: 1px solid rgba(213,199,162,.25); padding-top: 22px; }
.bj__chips { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chip {
  width: 54px; height: 54px; border-radius: 50%; cursor: pointer; position: relative;
  font: 700 11px/1 var(--f-dial); color: var(--ink);
  background: var(--face);
  border: 0;
  box-shadow: inset 0 0 0 4px var(--face), inset 0 0 0 5px var(--ink), 0 3px 0 var(--face-3);
}
.chip::before { /* minute ticks around the chip edge */
  content: ""; position: absolute; inset: 1px; border-radius: 50%;
  background: repeating-conic-gradient(var(--ink) 0 1.2deg, transparent 1.2deg 15deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 84%, #000 85%);
          mask: radial-gradient(circle closest-side, transparent 84%, #000 85%);
}
.chip--100 { background: var(--hand); color: #fff; box-shadow: inset 0 0 0 4px var(--hand), inset 0 0 0 5px #fff, 0 3px 0 var(--hand-deep); }
.chip--100::before { background: repeating-conic-gradient(#fff 0 1.2deg, transparent 1.2deg 15deg); }
.chip:hover { transform: translateY(-2px); }
.chip[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.bj__small { font: 700 10px/1 var(--f-dial); letter-spacing: .12em; text-transform: uppercase; background: none; border: 1px solid var(--dial-rim); color: var(--on-dial); padding: 12px 14px; border-radius: 999px; cursor: pointer; }
.bj__small:hover { background: var(--dial-800); }
.bj__small[disabled] { opacity: .35; cursor: not-allowed; }
.bj__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.bj__meta { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--on-dial-soft); }
.bj__meta b { color: var(--face); font-weight: 600; }

.bj__log { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.bj__log li { font: 700 9.5px/1 var(--f-dial); letter-spacing: .08em; padding: 6px 8px; border-radius: 999px; background: var(--dial-900); color: var(--on-dial-soft); }
.bj__log li.w { background: var(--face); color: var(--ink); }
.bj__log li.b { background: var(--hand); color: #fff; }

/* rules panel on /rz-game/ */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.rules article { background: #FBF6E6; border: 1px solid var(--face-3); border-radius: 18px; padding: 26px; }
.rules h3 { display: flex; align-items: center; gap: 12px; }
.rules p, .rules li { color: var(--ink-soft); font-size: 15.5px; }
.pay { width: 100%; border-collapse: collapse; font-size: 15px; }
.pay th, .pay td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--face-3); }
.pay th { font: 700 10px/1.2 var(--f-dial); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.pay td:last-child { font-weight: 600; color: var(--ink); text-align: right; }
.pay th:last-child { text-align: right; }

@media (max-width: 900px) {
  .rules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .bj { margin: 6px 4px; }
  .bj__body { padding: 20px 14px 22px; gap: 18px; }
  .bj__gauges { grid-template-columns: 1fr 1fr; gap: 16px; justify-items: center; }
  .bj__gauges .subdial { --s: 88px; }
  .bj__gauges .subdial__val { font-size: 14px; }
  .bj__callout { grid-column: 1 / -1; order: 3; width: 100%; }
  .bj__hand { grid-template-columns: 64px 1fr; gap: 12px; min-height: 0; }
  .bj__hand .subdial { --s: 60px; }
  .bj__hand .subdial__val { font-size: 16px; }
  .bj__hand .subdial__lbl { display: none; }
  .bj__who { letter-spacing: .1em; line-height: 1.4; font-size: 9px; }
  .bj__cards { gap: 6px; min-height: 84px; }
  .card { width: 54px; height: 78px; }
  .card__rank { font-size: 12px; left: 5px; top: 5px; }
  .card__rank i { font-size: 11px; }
  .card__pip { font-size: 24px; }
  .card__corner { display: none; }
  .bj__controls { grid-template-columns: 1fr; }
  .bj__chips { justify-content: center; }
  .chip { width: 48px; height: 48px; }
  .bj__actions { justify-content: stretch; }
  .bj__actions .btn { flex: 1 1 calc(50% - 10px); padding: 15px 10px; }
  .bj__rail span:nth-child(n+6) { display: none; }
}
