/* Ludo — scoped under .ludo */
.ludo { position: relative; display: grid; gap: 12px; justify-items: center; width: 100%; }
.ludo > .k-overlay { inset: -4px -8px; align-items: start; padding-top: 24px; }

.ld-chips { display: flex; gap: 6px; width: 100%; justify-content: center; flex-wrap: wrap; }
.ld-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 7px; border-radius: var(--pill);
  background: var(--surface-2); font-size: var(--t-sm); font-weight: 620;
  transition: background-color .2s, box-shadow .2s;
}
.ld-chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--seat); box-shadow: inset 0 0 0 3px rgb(255 255 255 / .55); }
.ld-chip small { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.ld-chip.is-turn { background: var(--surface); box-shadow: inset 0 0 0 2px var(--seat); }

.ld-board {
  position: relative; border-radius: 20px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  box-shadow: var(--lift);
}
.ld-board canvas { width: 100%; height: 100%; border-radius: 20px; cursor: pointer; }
.ld-board .k-overlay { border-radius: 20px; }

.ld-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; }
.ld-status { font-weight: 640; line-height: 1.3; min-width: 0; }
.ld-status small { display: block; color: var(--muted); font-weight: 520; font-size: var(--t-sm); margin-top: 2px; }

.ld-die {
  --seat: var(--ink);
  flex: none; width: 72px; height: 72px; padding: 11px;
  border: 0; border-radius: 20px; cursor: pointer;
  background: var(--seat);
  box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--seat) 60%, #000), 0 10px 20px -10px rgb(0 0 0 / .5);
  transition: transform .12s var(--ease), opacity .2s, box-shadow .12s;
  touch-action: manipulation;
}
.ld-die:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 -2px color-mix(in srgb, var(--seat) 60%, #000); }
.ld-die:disabled { cursor: default; }
.ld-die.is-waiting { opacity: .5; }
.ld-die.is-ready { animation: ld-nudge 1.4s ease-in-out infinite; }
.ld-die.is-rolling .ld-pips { animation: ld-spin .45s cubic-bezier(.3,.7,.4,1); }
.ld-pips {
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 4px;
  width: 100%; height: 100%; padding: 6px;
  background: #fff; border-radius: 12px;
}
.ld-pips span { border-radius: 50%; background: #1A1D3A; transform: scale(0); transition: transform .12s; }
.ld-pips span.on { transform: scale(1); }
@keyframes ld-spin { 0% { transform: rotate(0) scale(.85); } 60% { transform: rotate(320deg) scale(1.05); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes ld-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: rotate(-8deg); } 90% { transform: rotate(6deg); } }

.ld-foot { display: flex; justify-content: center; width: 100%; }

/* setup */
.ld-seats { display: grid; gap: 8px; }
.ld-seat { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; text-align: left; }
.ld-seat i { width: 22px; height: 22px; border-radius: 50%; background: var(--seat); }
.ld-seat span { font-weight: 620; }
.ld-seat .k-seg button { min-height: 36px; padding: 0 12px; font-size: var(--t-sm); }
.ld-count { width: 100%; }
