.room-game-backgammon .player-strip{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.room-game-backgammon .player-strip{
  padding: 12px 4px;
  font-size: 13px;
}
.room-game-backgammon .player-strip > span:first-child{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.room-game-backgammon .player-strip b{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.room-game-backgammon .checker-dot{
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #af9a7b;
}
.room-game-backgammon .checker-dot.light{
  background: #f0e4cb;
}
.room-game-backgammon .checker-dot.dark{
  background: #332923;
}
.room-game-backgammon .pips{
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.room-game-backgammon .board{
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)) 0.65fr repeat(
      6,
      minmax(0, 1fr)
    );
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1.46;
  background: #c8ad80;
  border: 14px solid #624933;
  border-radius: 10px;
  box-shadow:
    0 16px 50px #0004,
    inset 0 0 0 2px #3d2e23;
  padding: 7px;
  gap: 0 2px;
  overflow: hidden;
}
.room-game-backgammon .point{
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 0 2px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
  touch-action: manipulation;
}
.room-game-backgammon .point:before{
  content: "";
  position: absolute;
  inset: 0 2px 9%;
  background: #9b513c;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  z-index: -1;
}
.room-game-backgammon .point.alt:before{
  background: #f4e5c8;
}
.room-game-backgammon .point.bottom{
  flex-direction: column-reverse;
}
.room-game-backgammon .point.bottom:before{
  inset: 9% 2px 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.room-game-backgammon .point:hover:enabled{
  background: #ffffff12;
}
.room-game-backgammon .point .point-number{
  font-size: 10px;
  color: #493a2e;
  font-weight: 700;
  line-height: 17px;
}
.room-game-backgammon .piece,.piece.checker-drag,.piece.checker-flight{
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow:
    0 2px 3px #0006,
    inset 0 0 0 3px #ffffff15;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  margin-bottom: 1px;
}
.room-game-backgammon .piece.w,.piece.checker-drag.w,.piece.checker-flight.w{
  background: radial-gradient(circle at 35% 25%, #fff5df, #e3d1aa);
  border: 2px solid #bda781;
  color: #483c30;
}
.room-game-backgammon .piece.b,.piece.checker-drag.b,.piece.checker-flight.b{
  background: radial-gradient(circle at 35% 25%, #695040, #2c231d);
  border: 2px solid #382b21;
  color: #eee0c6;
}
.room-game-backgammon .point[data-selected="true"]{
  background: #315b9aaa;
  box-shadow: inset 0 0 0 2px #a7d9ff;
}
.room-game-backgammon .point[data-selectable="true"]{
  cursor: pointer;
}
.room-game-backgammon .point[data-destination="true"]:after{
  content: "";
  position: absolute;
  top: 52%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #174b85;
  border: 2px solid #f7e7c3;
  box-shadow: 0 0 0 4px #3676b955;
}
.room-game-backgammon .point.bottom[data-destination="true"]:after{
  top: auto;
  bottom: 52%;
}
.room-game-backgammon .point[data-combined="true"]:after{
  display: none;
}
.room-game-backgammon .move-total{
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 2px solid #f7e7c3;
  border-radius: 50%;
  background: #174b85;
  color: #fff4de;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  z-index: 1;
}
.room-game-backgammon .point .move-total{
  position: absolute;
  top: 52%;
}
.room-game-backgammon .point.bottom .move-total{
  top: auto;
  bottom: 52%;
}
.room-game-backgammon .bar,.room-game-backgammon .off{
  color: #f6e8cc;
  background: #634b35;
  border: 0;
  border-radius: 3px;
  padding: 3px 1px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 10px;
  gap: 6px;
  min-width: 0;
}
.room-game-backgammon .bar[data-selectable="true"]{
  box-shadow: inset 0 0 0 2px var(--gold);
}
.room-game-backgammon .bar .piece{
  width: 95%;
}
.room-game-backgammon .off{
  background: #826543;
  margin-left: 2px;
}
.room-game-backgammon .off[data-destination="true"]{
  background: #174b85;
  box-shadow: inset 0 0 0 2px #e6d5b3;
}
.room-game-backgammon .off .off-count{
  font-size: 17px;
}
.room-game-backgammon .turn-panel{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 20px 0 14px;
}
.room-game-backgammon .turn-panel p{
  font-size: 14px;
  margin: 7px 0 0;
}
.room-game-backgammon .dice{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.room-game-backgammon .die,.dice-flight{
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: serif;
  font-size: 36px;
  line-height: 1;
  box-shadow: 0 3px 0 #9f8b66;
}
.room-game-backgammon .die.used{
  opacity: 0.25;
  box-shadow: none;
}
.room-game-backgammon .dice-remaining{
  flex-basis: 100%;
  text-align: right;
  color: var(--muted);
  font-size: 11px;
}
.room-game-backgammon .die-choice{
  padding: 8px 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
@media (min-width: 1250px){.room-game-backgammon .board{
    max-height: 620px;
  }}
@media (max-width: 1000px){.room-game-backgammon .board{
    border-width: 10px;
  }
.room-game-backgammon .piece,.piece.checker-drag,.piece.checker-flight{
    border-width: 1px !important;
  }}
@media (max-width: 760px){.room-game-backgammon .board{
    border-width: 8px;
    padding: 4px;
    gap: 0 1px;
    aspect-ratio: 1.12;
  }
.room-game-backgammon .point{
    padding: 0;
  }
.room-game-backgammon .point:before{
    inset-inline: 0;
  }
.room-game-backgammon .piece,.piece.checker-drag,.piece.checker-flight{
    width: 94%;
    font-size: 10px;
  }
.room-game-backgammon .point .point-number{
    font-size: 8px;
    line-height: 14px;
  }
.room-game-backgammon .bar,.room-game-backgammon .off{
    font-size: 8px;
    gap: 4px;
  }
.room-game-backgammon .off .off-count{
    font-size: 13px;
  }
.room-game-backgammon .player-strip{
    font-size: 12px;
  }
.room-game-backgammon .turn-panel{
    padding: 14px 0;
  }
.room-game-backgammon .turn-panel p{
    font-size: 13px;
    line-height: 1.5;
  }
.room-game-backgammon .die,.dice-flight{
    width: 30px;
    height: 30px;
    font-size: 29px;
  }
.room-game-backgammon .dice{
    gap: 5px;
  }}
.room-game-backgammon .dice-area{
  min-width: 108px;
  display: flex;
  justify-content: flex-end;
}
.room-game-backgammon .dice-hand{
  display: block;
  width: 114px;
  height: 86px;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 4px 3px #0004);
}
.room-game-backgammon .roll-dice small{
  display: block;
  font-size: 11px;
  margin-top: 3px;
  font-weight: 600;
}
.room-game-backgammon .roll-dice:enabled .hand-cup{
  transform-origin: 82px 98px;
  animation: hand-ready 2.8s ease-in-out infinite;
}
.room-game-backgammon .roll-dice:hover:enabled .hand-cup{
  animation-duration: 0.8s;
}
.room-game-backgammon .roll-dice:active:enabled .held-dice{
  transform: translateY(-4px);
}
.room-game-backgammon .checker-flight{
  pointer-events: none;
  z-index: 1000;
  margin: 0;
}
.room-game-backgammon .point[data-selectable="true"] .piece:last-of-type,.room-game-backgammon .bar[data-selectable="true"] .piece{
  box-shadow:
    0 0 0 2px #e8bc70,
    0 0 12px #ffce7966,
    inset 0 0 0 3px #ffffff15;
}
.room-game-backgammon .point[data-destination="true"]:after{
  animation: destination-pulse 1.4s ease-in-out infinite;
}
@keyframes hand-ready{
  0%,
  60%,
  100% {
    transform: rotate(0);
  }
  70%,
  90% {
    transform: rotate(-5deg);
  }
  80% {
    transform: rotate(4deg);
  }
}
@keyframes destination-pulse{
  50% {
    transform: scale(1.25);
    opacity: 0.7;
  }
}
.room-game-backgammon .board.long-board{
  grid-template-columns: repeat(6, minmax(0, 1fr)) 0.65fr repeat(
      6,
      minmax(0, 1fr)
    );
}
.room-game-backgammon .board-area{
  padding-right: 68px;
}
.room-game-backgammon .board-area .board{
  overflow: visible;
}
.room-game-backgammon .board .off{
  position: absolute;
  left: calc(100% + 22px);
  width: 52px;
  height: 62px;
  transform: translateY(-50%);
  margin: 0;
  border: 1px solid #6d819d;
  border-radius: 10px;
  background: #263a54;
  color: #f6e8cc;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}
.room-game-backgammon .board .off:disabled{
  opacity: 0.75;
  cursor: default;
}
.room-game-backgammon .board .off[data-destination="true"]{
  background: #e0b76f;
  color: #172337;
  border-color: #ffdc9c;
  box-shadow: 0 0 0 2px #e0b76f55;
}
@media (max-width: 700px){.room-game-backgammon .board-area{
    padding-right: 62px;
  }
.room-game-backgammon .board .off{
    left: calc(100% + 16px);
    width: 48px;
    height: 56px;
  }}
.room-game-backgammon .point[data-selectable="true"],.room-game-backgammon .bar[data-selectable="true"]{
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.room-game-backgammon .board.dragging,.room-game-backgammon .board.dragging .piece{
  cursor: grabbing;
}
.room-game-backgammon .drag-origin{
  opacity: 0.25;
}
.room-game-backgammon .piece.checker-drag,.piece.checker-drag.checker-drag,.piece.checker-flight.checker-drag{
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  margin: 0;
  opacity: 1;
  cursor: grabbing;
  box-shadow:
    0 8px 18px #0008,
    inset 0 0 0 2px #ffffff30;
}
.room-game-backgammon .board-area{
  position: relative;
}
.room-game-backgammon .board-area .dice{
  position: absolute;
  left: calc((100% - 68px) * 0.75);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 76px;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}
.room-game-backgammon .board-area .dice-remaining{
  text-align: center;
  color: #fff1d5;
  background: #263a54e8;
  border-radius: 5px;
  padding: 3px;
}
.room-game-backgammon .die.dice-flight,.die.dice-flight{
  position: fixed;
  z-index: 10001;
  pointer-events: none;
  box-shadow:
    0 4px 0 #9f8b66,
    0 12px 18px #0005;
  will-change: transform;
}
@media (max-width: 700px){.room-game-backgammon .board-area .dice{
    left: calc((100% - 62px) * 0.75);
    width: 80px;
  }}
.room-game-backgammon .board-area .dice[data-side="left"]{
  left: calc((100% - 68px) * 0.25);
}
.room-game-backgammon .board-area .dice .die{
  position: absolute;
  left: 50%;
  top: 50%;
}
.room-game-backgammon .board-area .dice-remaining{
  position: absolute;
  top: calc(100% + 3px);
  width: 100%;
}
@media (max-width: 700px){.room-game-backgammon .board-area .dice[data-side="left"]{
    left: calc((100% - 62px) * 0.25);
  }}
.room-game-backgammon .die,.dice-flight{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  padding: 7px;
  border: 1px solid #dfcba8;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffef8 0%, #fff3d9 55%, #dcc6a0 100%);
  box-shadow:
    inset 0 1px 2px #fff,
    inset -2px -2px 3px #b49a7055,
    1px 4px 0 #af9771,
    2px 7px 9px #0005;
}
.room-game-backgammon .die-pip,.dice-flight .die-pip{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 65% 75%, #394251, #0c1420 80%);
  box-shadow:
    inset 0 1px 1px #000b,
    0 1px 0 #fff9;
}
.room-game-backgammon .die-value,.dice-flight .die-value{
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.room-game-backgammon .die.dice-flight,.die.dice-flight{
  box-shadow:
    inset 0 1px 2px #fff,
    inset -2px -2px 3px #b49a7055,
    1px 4px 0 #af9771,
    0 12px 18px #0005;
}
.room-game-backgammon .turn-panel{
  align-items: flex-start;
  padding-top: 6px;
}
.room-game-backgammon .dice-area{
  margin-top: -8px;
}
@media (max-width: 700px){.room-game-backgammon .die,.dice-flight{
    padding: 5px;
    border-radius: 7px;
  }
.room-game-backgammon .die-pip,.dice-flight .die-pip{
    width: 4.5px;
    height: 4.5px;
  }
.room-game-backgammon .turn-panel{
    padding-top: 4px;
  }}
.room-game-backgammon .turn-panel{
  flex-direction: column;
  gap: 8px;
}
.room-game-backgammon .turn-panel .dice-area{
  order: -1;
  width: calc(100% - 68px);
  justify-content: center;
  min-width: 0;
}
.room-game-backgammon .dice-area:has(#rollBtn[hidden]){
  display: none;
}
@media (max-width: 700px){.room-game-backgammon .turn-panel .dice-area{
    width: calc(100% - 62px);
  }}
.room-game-backgammon .winner-banner{
  position: absolute;
  top: 50%;
  left: 0;
  width: calc(100% - 68px);
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  z-index: 8;
  pointer-events: none;
}
@keyframes winner-flash{
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 8px 28px #0008,
      0 0 24px #efc47f88;
  }
  50% {
    opacity: 0.65;
    box-shadow:
      0 8px 28px #0008,
      0 0 4px #efc47f22;
  }
}
@media (max-width: 700px){.room-game-backgammon .winner-banner{
    width: calc(100% - 62px);
  }}
.room-game-backgammon .board{
  background:
    repeating-linear-gradient(4deg, #ffffff06 0 2px, #56351d06 3px 5px),
    linear-gradient(125deg, #dfc79e, #b99667 58%, #d8bb8d);
  border-color: #8a6643 #4c3223 #39271d #735133;
  box-shadow:
    0 5px 0 #322218,
    0 8px 0 1px #201810,
    0 18px 32px #0007,
    inset 0 2px 4px #2b1b12aa,
    inset 0 -2px 3px #ffe3b077;
}
.room-game-backgammon .point:before{
  background: linear-gradient(100deg, #b46d4e, #80432f 75%, #6b3728);
}
.room-game-backgammon .point.alt:before{
  background: linear-gradient(100deg, #fff0cf, #e8cf9f 75%, #c7aa77);
}
.room-game-backgammon .piece,.piece.checker-drag,.piece.checker-flight{
  position: relative;
  box-shadow:
    0 3px 0 var(--checker-edge),
    0 5px 5px #0008,
    inset 0 2px 2px #ffffff80,
    inset 0 -3px 3px #0005;
}
.room-game-backgammon .piece::before,.piece.checker-drag::before,.piece.checker-flight::before{
  content: "";
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  border: 1px solid var(--checker-ring);
  box-shadow:
    0 1px 1px #ffffff45,
    inset 0 1px 2px #0003;
  pointer-events: none;
}
.room-game-backgammon .piece.w,.piece.checker-drag.w,.piece.checker-flight.w{
  --checker-edge: #9c8057;
  --checker-ring: #bd9f6e;
  background: radial-gradient(
    ellipse at 32% 22%,
    #fffdf2,
    #f2dfb8 48%,
    #c0a16e
  );
  border-color: #f9e8c5 #c0a06e #9e8054 #e8ce9e;
}
.room-game-backgammon .piece.b,.piece.checker-drag.b,.piece.checker-flight.b{
  --checker-edge: #171512;
  --checker-ring: #77634e;
  background: radial-gradient(
    ellipse at 32% 22%,
    #88725a,
    #49392d 48%,
    #211d19
  );
  border-color: #8e775d #403226 #231d18 #6b5541;
}
.room-game-backgammon .board{
  touch-action: none;
}
.room-game-backgammon{--cream:#f3e8d0;--muted:#b2bfcf;--gold:#e8bc77;--ink:#111c2e;--line:#ffffff20}.room-game-backgammon .board-area{margin:16px 0}.room-game-backgammon .roll-row{display:flex;justify-content:center;width:calc(100% - 68px)}.room-game-backgammon .roll-dice{background:transparent;border:0}.room-game-backgammon .game-actions{margin-top:12px}
