.ms-sub {
  opacity: 0.72;
  font-weight: 400;
  margin-left: 3px;
}

.ms-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ms-custom-only {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ms-board-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ms-stage {
  display: inline-grid;
  gap: 6px;
  align-items: center;
  justify-items: center;
  user-select: none;
}

.ms-coord {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.ms-cell {
  width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 12px;
  border: 1.5px solid #2e2923;
  background: #1d1a16;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

.ms-cell:hover:not(.is-gap) {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.ms-cell.is-gap {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.ms-cell.is-gap.is-gap-edit {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.ms-cell.is-rooted {
  border-color: rgba(110, 200, 160, 0.72);
  background: radial-gradient(circle, rgba(110, 200, 160, 0.25), #18231d);
  box-shadow: inset 0 0 12px rgba(110, 200, 160, 0.16);
}

.ms-cell.is-click-pending {
  border-color: rgba(232, 160, 74, 0.75);
}

.ms-cell.is-next-target {
  border-color: #ffe39b;
  box-shadow: 0 0 0 3px rgba(232, 160, 74, 0.45), 0 0 20px rgba(232, 160, 74, 0.55);
  animation: msPulse 1.1s ease-in-out infinite;
  z-index: 3;
}

@keyframes msPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.ms-svg {
  width: 38px;
  height: 38px;
  pointer-events: none;
}

.ms-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #12110e;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}

@media (max-width: 560px) {
  .ms-cell {
    width: 44px;
    height: 44px;
  }
  .ms-svg {
    width: 28px;
    height: 28px;
  }
}
