/* Backgammon — an inlaid wooden board drawn on the canvas; pip counts sit either side of the status line. */
.bg-col { padding: 2px 6px 6px; gap: 4px; }
.bg-top { direction: ltr; flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; width: 100%; max-width: 900px; }
.bg-status { min-height: 30px; padding: 0 4px; font-size: 0.95rem; line-height: 1.2; }
.bg-pip { display: inline-flex; align-items: center; gap: 6px; min-width: 62px; padding: 4px 9px; border-radius: 999px; border: 1px solid transparent; opacity: 0.7; transition: opacity 0.2s linear, border-color 0.2s linear; }
.bg-pip.is-turn { opacity: 1; border-color: var(--hairline); background: rgba(234, 217, 168, 0.08); }
.bg-pip b { font-size: 1rem; font-variant-numeric: tabular-nums; color: var(--parchment); }
.bg-dot { flex: none; display: inline-block; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.bg-dot--a { background: radial-gradient(circle at 35% 30%, #FFFDF4, #EFE2BC 60%, #B49A62); }
.bg-dot--b { background: radial-gradient(circle at 35% 30%, #6A5140, #2B1A10 60%, #100805); box-shadow: 0 0 0 1px rgba(184, 137, 59, 0.7); }
.bg-wrap { direction: ltr; }
.bg-wrap canvas { cursor: pointer; touch-action: manipulation; }

.fa-dock .kit-dock-btn:disabled { opacity: 0.4; }
.fa-dock .bg-done.is-ready { background: var(--gold); color: var(--w-ink); animation: bg-glow 1.4s ease-in-out infinite; }
@keyframes bg-glow { 50% { box-shadow: 0 0 0 5px rgba(234, 217, 168, 0.22); } }

/* the new-game panel */
.bg-opts { display: grid; gap: 12px; text-align: start; }
.bg-opt { transition: opacity 0.2s linear; }
.bg-opt.is-off { opacity: 0.35; pointer-events: none; }
.bg-opt__label { margin: 0 0 5px; font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
html[lang="ar"] .bg-opt__label { letter-spacing: 0; font-size: 13px; }
.bg-opts .fa-seg { display: flex; width: 100%; border-radius: 16px; }
.bg-opts .fa-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 6px; border-radius: 13px; line-height: 1.15; }

@media (max-width: 360px), (max-height: 600px) {
  .bg-col { padding: 0 3px 3px; gap: 2px; }
  .bg-status { font-size: 0.86rem; min-height: 26px; }
  .bg-pip { min-width: 54px; padding: 3px 7px; }
}
@media (prefers-reduced-motion: reduce) { .fa-dock .bg-done.is-ready { animation: none; } }
