/* 🎲 BG125 Backgammon (Shulem, Nov 8 2026 8:03 AM): dice in the middle of the board, ✋ drag checkers, an "Out" tray for each player. Loads after dark105.css. */
.bgb.bg125{grid-template-columns:1fr 20px 1fr 30px;grid-template-rows:auto 46px auto;row-gap:0;padding:4px 0;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;--ck:min(6.2vw,25px);position:relative}
.bgb.bg125>.half.tl{grid-column:1;grid-row:1}.bgb.bg125>.half.tr{grid-column:3;grid-row:1}.bgb.bg125>.half.bl{grid-column:1;grid-row:3}.bgb.bg125>.half.br{grid-column:3;grid-row:3}
.bgb.bg125 .bc{width:var(--ck);height:var(--ck);font-size:10.5px}
.bgb.bg125 .pt{border:0;background:none;-webkit-tap-highlight-color:transparent}
.bgb.bg125 .pt.sel{background:rgba(47,111,228,.25)}
.bgb.bg125 .dr,.bgb.bg125 .dr *{touch-action:none}
.bgb.bg125 .pt.lift .stk b:last-child,.bgb.bg125 .bgbar.lift .bb b:last-child,.bgb.bg125 .bgbar.lift.lt .bt b:last-child{opacity:.25}
.bgb.bg125 .bgbar.lift.lt .bb b:last-child{opacity:1}
.bgb.bg125 .pt.hov .tri{filter:brightness(1.25) saturate(1.2)}.bgb.bg125 .pt.hov::after{transform:scale(1.45);background:#1fd47a}
/* the middle bar (its own name now: the app's top-bar style had turned it cream) */
.bgbar{grid-column:2;grid-row:1 / span 3;background:#6b3f1d;display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:6px 0;border:0;border-radius:0;min-height:0;-webkit-tap-highlight-color:transparent}
.bgbar .bt,.bgbar .bb{display:flex;flex-direction:column;gap:2px;align-items:center}
.bgbar.can{box-shadow:inset 0 0 0 3px #2fbf71}.bgbar.sel{background:#2f6fe4}
.bgb.bg125 .bgbar .bc{width:min(4.6vw,18px);height:min(4.6vw,18px)}
/* the middle strip: the dice land here */
.bgmid{grid-row:2;display:flex;align-items:center;justify-content:center;gap:8px;min-width:0;position:relative;z-index:3}
.bgmid.ml{grid-column:1}.bgmid.mr{grid-column:3}
.bgdice{display:flex;gap:6px;align-items:center}
.bgdice.flip,.bgrollb.flip{transform:rotate(180deg)}
.bg125 .die{width:30px;height:30px;padding:3px;border-radius:7px;flex:none;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.35);display:grid;grid-template-columns:repeat(3,1fr)}
.bg125 .die i{width:6px;height:6px}.bg125 .die i.on{background:#1c2433}
.bg125 .die.p2{background:#b33a2b}.bg125 .die.p2 i.on{background:#fff}
.bg125 .bgdice.dbl{gap:4px}.bg125 .bgdice.dbl .die{width:25px;height:25px;padding:2.5px;border-radius:6px}.bg125 .bgdice.dbl .die i{width:5px;height:5px}
.bg125 .die.used{opacity:.35;box-shadow:none}
.bgdice.rl .die{animation:bgtumble .76s cubic-bezier(.2,.75,.3,1) both;animation-delay:calc(var(--k,0) * 45ms)}
.bgmid.ml .die{--fx:-70px}.bgmid.mr .die{--fx:70px}
@keyframes bgtumble{0%{transform:translate(var(--fx,70px),-16px) rotate(-460deg) scale(.6);opacity:.2}55%{transform:translate(calc(var(--fx,70px) * -.06),3px) rotate(18deg) scale(1.08);opacity:1}78%{transform:translate(2px,-2px) rotate(-6deg) scale(.98)}100%{transform:none}}
@media (prefers-reduced-motion:reduce){.bgdice.rl .die{animation-duration:.01s}}
.bgrollb{min-height:34px;padding:5px 14px;font-size:14.5px;border-radius:18px;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.3)}
/* ⬇️ the "Out" trays, next to each home */
.bgoff{grid-column:4;margin:0;align-self:stretch;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;padding:5px 2px;background:#4e2c12;border-left:3px solid #6b3f1d;min-height:0;-webkit-tap-highlight-color:transparent}
.bgoff.top{grid-row:1}.bgoff.bot{grid-row:3;flex-direction:column-reverse}
.bgoffm{grid-column:4;margin:0;grid-row:2;background:#6b3f1d;border-left:3px solid #6b3f1d}
.bgoff .bgol{order:2;display:flex;flex-direction:column;align-items:center;line-height:1.05;color:#f3ead7}
.bgoff .bgol small{font-size:8.5px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;opacity:.9}
.bgoff .bgol b{font-size:16px;font-weight:900}
.bgoff .bgos{display:flex;flex-direction:column;gap:1.5px;align-items:center}
.bgoff.bot .bgos{flex-direction:column-reverse}
.bgoff .bgos i{display:block;width:22px;height:5.5px;border-radius:3px}
.bgoff .bgos i.p1{background:linear-gradient(#fff,#e2d8c2);box-shadow:0 1px 0 #7a6a4a}.bgoff .bgos i.p2{background:linear-gradient(#d4553f,#8f2a1c);box-shadow:0 1px 0 #3f0f08}
.bgoff.flip .bgol{transform:rotate(180deg)}
.bgoff.tgt{box-shadow:inset 0 0 0 3px #2fbf71;cursor:pointer}.bgoff.tgt .bgol b::after{content:" ⬇";font-size:11px}
.bgoff.hov{background:#2f8f5a}
.bgfly{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;box-shadow:0 10px 18px rgba(0,0,0,.4)!important;will-change:transform}
.bgfly.back{transition:transform .22s ease-out}
.bgx .bgxn{font-weight:900;color:#1c2433}
/* 🌙 dark */
html.kdark .bgbar{background:#6b3f1d}html.kdark .bgbar.sel{background:#2f6fe4}
html.kdark .bgoff{background:#3a2210;border-left-color:#6b3f1d}html.kdark .bgoffm{background:#6b3f1d}
html.kdark .bgoff .bgos i.p1{background:linear-gradient(#5a5a5a,#2a2a2a);box-shadow:0 0 0 1px rgba(255,255,255,.28)}
html.kdark .bg125 .die{background:#262626;box-shadow:0 2px 4px rgba(0,0,0,.5)}html.kdark .bg125 .die i.on{background:#ececec}
html.kdark .bg125 .die.p2{background:#b33a2b}html.kdark .bg125 .die.p2 i.on{background:#fff}
html.kdark .bgx .bgxn{color:#fff}
html.kdark .bgoff.hov{background:#2f8f5a}
